/* ==========================================================================
   VARS Royal Palaces - Owner Authorized Admin Registration Styling
   File: static/css/admin_register.css
   ========================================================================== */

:root {
    --gold-primary: #c5a059;
    --gold-light: #dfbe7a;
    --gold-dark: #9a7633;
    --navy-deep: #081228;
    --navy-surface: #0f1f3d;
    --navy-card: #15264b;
    --navy-border: rgba(197, 160, 89, 0.25);
    --text-white: #ffffff;
    --text-muted: #cbd5e1;
    --accent-green: #10b981;
    --accent-red: #ef4444;
}

.admin-auth-wrapper {
    max-width: 920px;
    margin: 40px auto 70px auto;
    padding: 0 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Header Crest */
.auth-crest-header {
    margin-bottom: 35px;
    text-align: center;
}

.auth-crest-header .crown-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.15), rgba(197, 160, 89, 0.05));
    border: 1px solid var(--navy-border);
    color: var(--gold-light);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.auth-crest-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.3rem;
    color: var(--gold-light);
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-crest-header .subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Stepper Indicator */
.stepper-track {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 0 40px;
}

.step-node {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step-node.active, .step-node.completed {
    opacity: 1;
}

.node-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy-surface);
    border: 2px solid #64748b;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.step-node.active .node-circle {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    border-color: var(--gold-light);
    color: var(--navy-deep);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
}

.step-node.completed .node-circle {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: #ffffff;
}

.node-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-white);
}

.step-divider {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 20px;
    transition: all 0.3s ease;
}

.step-divider.active {
    background: linear-gradient(90deg, var(--gold-primary), var(--accent-green));
}

/* Main Card */
.admin-auth-card {
    background: linear-gradient(180deg, rgba(21, 38, 75, 0.95) 0%, rgba(15, 31, 61, 0.98) 100%);
    border: 1px solid var(--navy-border);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    padding: 35px 40px;
    backdrop-filter: blur(10px);
}

/* Security Banner */
.security-banner {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: rgba(8, 18, 40, 0.6);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.shield-icon {
    font-size: 2.4rem;
    line-height: 1;
}

.shield-info h3 {
    color: var(--gold-light);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.shield-info p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

.owner-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-white);
}

.owner-pill strong {
    color: var(--gold-light);
    letter-spacing: 0.5px;
}

.verified-tag {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* OTP Action Box */
.otp-action-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.otp-action-box h4 {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.otp-action-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 18px;
}

/* Buttons */
.btn-royal {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-light) 100%);
    color: var(--navy-deep);
    border: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 13px 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.btn-royal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.45);
    background: linear-gradient(135deg, var(--gold-light) 0%, #ecd39c 100%);
}

.btn-royal-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.btn-royal-outline:hover {
    border-color: var(--text-white);
    color: var(--text-white);
}

/* OTP Verify Box */
.otp-verify-box {
    background: rgba(8, 18, 40, 0.4);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.verify-header h4 {
    color: var(--gold-light);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.verify-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 22px;
}

.otp-inputs-wrapper {
    margin-bottom: 18px;
}

.otp-input-field {
    width: 260px;
    height: 58px;
    background: rgba(15, 31, 61, 0.9);
    border: 2px solid var(--navy-border);
    border-radius: 10px;
    color: var(--gold-light);
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 12px;
    font-family: monospace;
    transition: all 0.25s ease;
}

.otp-input-field:focus {
    outline: none;
    border-color: var(--gold-light);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.35);
}

.otp-meta-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    font-size: 0.88rem;
}

.otp-timer-text {
    color: var(--text-muted);
}

.btn-link-resend {
    background: none;
    border: none;
    color: var(--gold-light);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0;
}

.btn-link-resend:hover {
    color: #ffffff;
}

/* STEP 2: NORMAL ADMIN FORM */
.owner-approved-banner {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 18px 24px;
    margin-bottom: 30px;
}

.owner-approved-banner .approved-badge {
    color: #34d399;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.owner-approved-banner h3 {
    color: var(--text-white);
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.owner-approved-banner p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.form-section-title {
    color: var(--gold-light);
    font-size: 1.05rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    padding-bottom: 8px;
    margin: 25px 0 18px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 16px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-white);
}

.form-group label .req {
    color: #f87171;
}

.form-group input, .form-group select {
    background: rgba(8, 18, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 11px 14px;
    color: var(--text-white);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--gold-light);
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.25);
    background: rgba(8, 18, 40, 0.9);
}

.pwd-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pwd-input-wrap input {
    width: 100%;
    padding-right: 44px;
}

.toggle-pwd-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}

.admin-notice-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.88rem;
    color: #fbbf24;
    line-height: 1.5;
    margin: 20px 0 25px 0;
}

.candidate-summary-box {
    background: rgba(8, 18, 40, 0.7);
    border: 1px solid var(--navy-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 25px;
}

.candidate-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.cand-item {
    background: rgba(21, 38, 75, 0.6);
    border: 1px solid rgba(197, 160, 89, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
}

.cand-item label {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.cand-item .cand-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gold-light);
    word-break: break-all;
}

.aadhaar-upload-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 5px;
    display: block;
}

.btn-secondary-action {
    background: transparent;
    border: 1px solid #475569;
    color: #cbd5e1;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary-action:hover {
    border-color: var(--gold-primary);
    color: var(--gold-light);
    background: rgba(197, 160, 89, 0.05);
}

/* Security Footer */
.auth-security-footer {
    text-align: center;
    margin-top: 30px;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.6;
}

.auth-security-footer a {
    color: var(--gold-light);
    text-decoration: underline;
}

/* Multi-Department Interactive Selection */
.dept-selector-container {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(8, 18, 40, 0.6);
    border: 1.5px solid rgba(197, 160, 89, 0.25);
    border-radius: 14px;
}

.dept-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dept-selector-header label {
    font-weight: 700;
    color: var(--gold-light);
    font-size: 0.95rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dept-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.dept-select-card {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 31, 61, 0.7);
    border: 1.5px solid rgba(100, 116, 139, 0.3);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.22s ease;
    user-select: none;
}

.dept-select-card:hover {
    border-color: var(--gold-primary);
    background: rgba(21, 38, 75, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.dept-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dept-card-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.dept-card-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.dept-card-text {
    flex-grow: 1;
    min-width: 0;
}

.dept-card-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.dept-card-desc {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dept-check-indicator {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1.5px solid #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    color: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Checked Card State */
.dept-select-card.selected,
.dept-select-card:has(.dept-checkbox:checked) {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.22), rgba(15, 31, 61, 0.95));
    border-color: var(--gold-light);
    box-shadow: 0 0 16px rgba(197, 160, 89, 0.28);
}

.dept-select-card.selected .dept-card-title,
.dept-select-card:has(.dept-checkbox:checked) .dept-card-title {
    color: var(--gold-light);
}

.dept-select-card.selected .dept-check-indicator,
.dept-select-card:has(.dept-checkbox:checked) .dept-check-indicator {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    border-color: var(--gold-light);
    color: #081228;
    font-weight: 900;
}

.btn-dept-quick {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-dept-quick:hover {
    background: rgba(197, 160, 89, 0.25);
    border-color: var(--gold-primary);
    color: var(--gold-light);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-auth-card {
        padding: 24px 20px;
    }
    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
    }
    .stepper-track {
        padding: 0 10px;
    }
    .form-action-row {
        flex-direction: column-reverse;
        width: 100%;
    }
    .form-action-row button, .form-action-row a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
