/**
 * Delegate Login - Native mobile UI
 */

.d-none { display: none !important; }

.login-page {
    min-height: 100vh;
    background: #f2f2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    padding-top: calc(24px + env(safe-area-inset-top, 0));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
}

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

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.9375rem;
    color: #8e8e93;
    margin: 0;
}

/* Scan CTA - primary */
.login-scan-cta {
    text-align: center;
    padding: 10px 0;
}

.login-scan-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, #1e3570 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
}

.login-scan-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 8px 0;
}

.login-scan-hint {
    font-size: 0.875rem;
    color: #8e8e93;
    margin: 0;
}

.login-link-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: transparent;
    border: none;
    font-size: 0.9375rem;
    color: var(--theme-primary);
    font-weight: 500;
    cursor: pointer;
}

.login-link-btn:active {
    opacity: 0.8;
}

/* Badge form */
.login-badge-form {
    margin-top: 16px;
}

.login-input-wrap {
    margin-bottom: 16px;
}

.login-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    background: #fff;
}

.login-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(40, 71, 150, 0.15);
}

/* PIN boxes */
.login-pin-section {
    margin-bottom: 24px;
}

.login-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #8e8e93;
    margin-bottom: 12px;
}

.pin-boxes {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.pin-box {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid #e5e5ea;
    border-radius: 14px;
    background: #f9f9f9;
}

.pin-box:focus {
    outline: none;
    border-color: var(--theme-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(40, 71, 150, 0.15);
}

/* Button */
.login-btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--theme-primary);
    border: none;
    border-radius: 14px;
    cursor: pointer;
}

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-btn:not(:disabled):active {
    opacity: 0.9;
}

/* Welcome */
.login-welcome {
    text-align: center;
    margin-bottom: 28px;
}

.login-welcome i {
    font-size: 2rem;
    color: var(--theme-primary);
    margin-bottom: 12px;
}

.login-welcome p {
    font-size: 1rem;
    color: #1d1d1f;
    margin: 0 0 4px 0;
}

.login-welcome-hint {
    font-size: 0.875rem !important;
    color: #8e8e93 !important;
}

/* Alert */
.login-alert {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9375rem;
}

.login-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.login-alert-error {
    background: #ffebee;
    color: #c62828;
}

.login-back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 0.875rem;
    color: #8e8e93;
    text-decoration: none;
}

.login-back-link:active {
    color: var(--theme-primary);
}
