@import url('dwu-theme.css');

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--dwu-text);
    line-height: 1.5;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: var(--font-heading);
}

.auth-card {
    max-width: 420px;
    margin: 2rem auto 3rem;
    padding: 2rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-top: 5px solid var(--dwu-gold);
    border-bottom: 3px solid var(--dwu-green);
}

.auth-topbar {
    background: linear-gradient(180deg, var(--dwu-green-dark) 0%, var(--dwu-green) 100%);
    border-bottom: 3px solid var(--dwu-gold);
    box-shadow: var(--shadow-md);
}

.auth-topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    text-align: center;
}

.auth-topbar-welcome {
    margin: 0;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.auth-card-wide {
    max-width: 520px;
}

.auth-card h1 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    color: var(--dwu-green-dark);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.auth-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem;
    background: var(--dwu-white);
    border-radius: 50%;
    padding: 4px;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--dwu-gold);
}

.auth-home-link {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--dwu-muted);
    text-decoration: none;
    font-weight: 600;
}

.auth-home-link:hover {
    color: var(--dwu-green);
    text-decoration: underline;
}

.subtitle {
    margin: 0 0 1.5rem;
    color: var(--dwu-muted);
    font-size: 0.95rem;
    text-align: center;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.85rem 0 0.35rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--dwu-navy);
    cursor: pointer;
}

.auth-remember input {
    width: auto;
    margin: 0;
}

.auth-remember-note {
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    color: #666;
    line-height: 1.4;
}

.auth-forgot {
    margin: -0.5rem 0 1rem;
    text-align: right;
    font-size: 0.88rem;
}

.auth-forgot a {
    color: var(--dwu-green);
    font-weight: 600;
    text-decoration: none;
}

.auth-forgot a:hover {
    text-decoration: underline;
}

label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dwu-green-dark);
}

.required {
    color: #c0392b;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--dwu-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-body);
}

.password-field {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid var(--dwu-border);
    border-radius: 4px;
    background: var(--dwu-white);
    overflow: hidden;
}

.password-field:focus-within {
    border-color: var(--dwu-green);
    box-shadow: 0 0 0 2px rgba(0, 92, 48, 0.15);
}

.password-field input[type="password"],
.password-field input[type="text"] {
    flex: 1;
    min-width: 0;
    width: auto;
    margin-bottom: 0;
    padding: 0.65rem 0.5rem 0.65rem 0.75rem;
    border: none;
    border-radius: 0;
    background: transparent;
}

.password-field input:focus {
    outline: none;
    box-shadow: none;
}

.password-toggle-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-right: 0.25rem;
    border: none;
    background: transparent;
    color: var(--dwu-muted);
    padding: 0;
    border-radius: 4px;
    cursor: pointer;
}

.password-toggle-btn:hover {
    color: var(--dwu-green);
    background: var(--dwu-off-white);
}

.password-toggle-btn svg {
    display: block;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--dwu-green);
    box-shadow: 0 0 0 2px rgba(0, 92, 48, 0.15);
}

.btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-primary {
    width: 100%;
    background: var(--dwu-green);
    color: var(--dwu-white);
}

.btn-primary:hover {
    background: var(--dwu-green-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--dwu-white);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.alert-error {
    background: #fdecea;
    color: #922b21;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #e8f6ef;
    color: var(--dwu-green-dark);
    border: 1px solid #b7dfc9;
}

.alert-info {
    background: #eef6ff;
    color: #1a4a7a;
    border: 1px solid #c5ddf5;
}

.auth-notice {
    margin-bottom: 1rem;
}

.field-hint {
    margin: -0.35rem 0 0.85rem;
    font-size: 0.85rem;
    color: var(--dwu-muted);
    line-height: 1.4;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--dwu-muted);
}

.auth-footer a {
    color: var(--dwu-green);
    font-weight: 700;
}

.site-header {
    background: linear-gradient(135deg, var(--dwu-green-dark), var(--dwu-green));
    color: var(--dwu-white);
    border-bottom: 3px solid var(--dwu-gold);
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.brand {
    font-weight: 700;
    font-family: var(--font-heading);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dwu-white);
    text-decoration: none;
}

.header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: var(--dwu-white);
    border-radius: 50%;
    padding: 2px;
    border: 2px solid var(--dwu-gold);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome {
    font-size: 0.95rem;
}

.container {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.card {
    background: var(--dwu-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    border-top: 3px solid var(--dwu-gold);
}

.card h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    color: var(--dwu-green-dark);
}

.profile-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 0;
}

.profile-list div {
    margin: 0;
}

.profile-list dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dwu-muted);
    margin-bottom: 0.15rem;
}

.profile-list dd {
    margin: 0;
    font-weight: 600;
}

.profile-page .btn-secondary {
    color: var(--dwu-green-dark);
    border-color: var(--dwu-border);
    background: var(--dwu-white);
}

.profile-page .btn-secondary:hover {
    background: var(--dwu-off-white);
    color: var(--dwu-green-dark);
}

.profile-page .site-header .btn-secondary {
    color: var(--dwu-white);
    border-color: rgba(255, 255, 255, 0.7);
    background: transparent;
}

.profile-page .site-header .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 768px) {
    .auth-topbar-inner {
        padding: 0.75rem 1rem;
    }

    .auth-topbar-welcome {
        font-size: 0.875rem;
        line-height: 1.35;
    }

    .auth-card {
        margin: 1rem auto 2rem;
        padding: 1.25rem;
        max-width: calc(100% - 1.5rem);
    }

    .auth-card-wide {
        max-width: calc(100% - 1.5rem);
    }

    .auth-card h1 {
        font-size: 1.1rem;
    }

    .auth-logo {
        max-width: 72px;
    }
}
