.auth-layout {
    max-width: 620px;
    margin: clamp(14px, 3vw, 40px) auto;
    background: linear-gradient(180deg, #f6f9fc 0%, #ffffff 58%);
    border: 1px solid #d5e1ed;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    padding: clamp(20px, 2.8vw, 34px);
}

.auth-layout h1 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: #0f172a;
}

.auth-layout p.subtle,
.subtle {
    color: #4b5563;
}

.auth-layout p.subtle {
    margin: 0 0 22px;
    font-size: 1.03rem;
    line-height: 1.5;
}

.auth-layout .messages {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.auth-layout .messages li {
    border-radius: 10px;
    border: 1px solid #cddcec;
    background: #eef5fb;
    color: #1f3f60;
    font-weight: 500;
    padding: 10px 12px;
}

.auth-layout .messages li.error {
    border-color: #f0c2c2;
    background: #fef2f2;
    color: #8a2323;
}

.auth-layout .messages li.success {
    border-color: #b9dfca;
    background: #eefaf2;
    color: #1f5d35;
}

.auth-form {
    display: grid;
    gap: 15px;
}

.auth-form .form-group {
    margin: 0;
}

.auth-form label {
    display: block;
    font-weight: 700;
    margin: 0 0 7px;
    color: #1f2937;
    font-size: 0.95rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="url"],
.auth-form textarea,
.auth-form select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #c8d5e3;
    border-radius: 9px;
    font-size: 1rem;
    line-height: 1.3;
    box-sizing: border-box;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="url"]:focus,
.auth-form textarea:focus,
.auth-form select:focus {
    outline: none;
    border-color: #2f5a84;
    box-shadow: 0 0 0 3px rgba(47, 90, 132, 0.18);
}

.auth-form textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.87rem;
}

.form-error {
    color: #b42318;
    font-size: 0.87rem;
    margin-top: 6px;
    font-weight: 600;
}

.form-group-checkbox {
    margin-top: -2px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-weight: 600;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    min-width: 128px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1;
    box-sizing: border-box;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #1d4f80, #163c65);
    color: #ffffff;
    border-color: #163c65;
    box-shadow: 0 8px 20px rgba(29, 79, 128, 0.27);
}

.btn.primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.btn.secondary {
    background: #f3f4f6;
    color: #111827;
    border-color: #d0d7de;
}

.btn:focus-visible {
    outline: 2px solid #2f5a84;
    outline-offset: 2px;
}

.auth-footer {
    margin-top: 6px;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.auth-footer a {
    color: #1d4f80;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-spacer {
    min-width: 1px;
}

.comment-card {
    margin-top: 32px;
    padding: 24px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment {
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.comment:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-meta {
    font-size: 14px;
    color: #667085;
    margin-bottom: 6px;
}

.comment-body {
    margin: 0;
    color: #1f2937;
    line-height: 1.5;
}

.comment-form h4 {
    margin-top: 0;
    margin-bottom: 12px;
}

.comment-form .form-group {
    margin-bottom: 14px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
}

.comment-form textarea {
    min-height: 120px;
}

.comment-form .checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-login {
    margin-bottom: 16px;
}

.socialaccount_providers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.socialaccount_provider {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: #f3f4f6;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    color: #111;
    text-decoration: none;
    font-weight: 600;
    min-width: 140px;
    transition: all 0.2s ease;
}

.socialaccount_provider:hover {
    background: #e5e7eb;
    border-color: #c3c8d0;
}

.divider {
    text-align: center;
    position: relative;
    margin: 16px 0;
    color: #888;
}

.divider span {
    background: #fff;
    padding: 0 12px;
    position: relative;
    z-index: 1;
}

.divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e5e7eb;
    transform: translateY(-50%);
}

@media (max-width: 600px) {
    .auth-layout {
        margin: 10px auto;
        padding: 18px 14px;
        border-radius: 12px;
    }

    .auth-layout h1 {
        font-size: 1.7rem;
    }

    .auth-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-footer .btn,
    .auth-footer button {
        width: 100%;
        text-align: center;
    }

    .auth-spacer {
        display: none;
    }

    .socialaccount_provider {
        min-width: 0;
        width: 100%;
    }

    .comment-card {
        margin-top: 24px;
        padding: 16px;
    }
}
