*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* ── Brand ── */
.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.brand-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    color: #075E54;
    margin-bottom: 4px;
}

.brand-sub {
    font-size: 14px;
    color: #6B7280;
}

/* ── Form ── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.field-input {
    padding: 11px 14px;
    border: 1.5px solid #D1D5DB;
    border-radius: 9px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    font-family: inherit;
}

.field-input:focus {
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.password-wrap {
    position: relative;
}

.password-wrap .field-input {
    padding-right: 44px;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.toggle-pw:hover { opacity: 1; }

/* ── Error ── */
.login-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.hidden { display: none !important; }

/* ── Button ── */
.login-btn {
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-top: 4px;
    font-family: inherit;
}

.login-btn:hover   { background: #128C7E; }
.login-btn:active  { transform: scale(0.98); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
    vertical-align: middle;
}
