/* ============================================================
   ADMIN ACCESS MODAL & PANEL STYLES
   ============================================================ */

/* ── Secret Trigger Icon in Footer ────────────────────────── */
.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-secret-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.35;
    cursor: default;
    transition: opacity 200ms ease, transform 120ms ease;
    user-select: none;
    -webkit-user-select: none;
    vertical-align: middle;
}

.footer-secret-icon:hover {
    opacity: 0.7;
}

.footer-secret-icon:active {
    transform: scale(0.85);
}

/* ── Modal Backdrop ───────────────────────────────────────── */
.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.admin-modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* ── Modal Container ──────────────────────────────────────── */
.admin-modal {
    background: #FFFFFF;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(16px) scale(0.98);
    transition: transform 220ms ease, max-width 200ms ease;
}

.admin-modal.passcode-mode {
    max-width: 300px;
    border-radius: 18px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.admin-modal-backdrop.active .admin-modal {
    transform: translateY(0) scale(1);
}

/* ── Header ───────────────────────────────────────────────── */
.admin-modal-header {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
    color: #FFFFFF;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.admin-modal-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.admin-modal-title span.badge {
    background: #4F46E5;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.03em;
}

.admin-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #FFFFFF;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 150ms ease;
    font-size: 16px;
}

.admin-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Passcode View (Minimal & Stealth) ────────────────────── */
.admin-login-view {
    position: relative;
    padding: 38px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.admin-close-stealth-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: none;
    color: #94A3B8;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 140ms ease;
    padding: 0;
}

.admin-close-stealth-btn:hover {
    color: #1E293B;
    background: #F1F5F9;
}

.admin-login-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.admin-login-icon svg {
    width: 22px;
    height: 22px;
}

.admin-login-form {
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-passcode-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #CBD5E1;
    border-radius: 10px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 0.25em;
    font-family: inherit;
    outline: none;
    transition: all 140ms ease;
    box-sizing: border-box;
    background: #FFFFFF;
}

.admin-passcode-input:focus {
    border-color: #0F172A;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.admin-submit-icon-btn {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    background: #0F172A;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 140ms ease;
}

.admin-submit-icon-btn:hover {
    background: #1E293B;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.admin-submit-icon-btn svg {
    width: 17px;
    height: 17px;
}

.admin-spin {
    animation: admin-spin-kf 0.75s linear infinite;
}

@keyframes admin-spin-kf {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.admin-login-error {
    color: #EF4444;
    font-size: 12px;
    font-weight: 500;
    min-height: 16px;
    margin: 0;
}

/* ── Dashboard Tabs ───────────────────────────────────────── */
.admin-tabs {
    display: flex;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    padding: 0 16px;
    gap: 8px;
    flex-shrink: 0;
}

.admin-tab-btn {
    background: none;
    border: none;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 150ms ease;
    font-family: inherit;
}

.admin-tab-btn:hover {
    color: #1E293B;
}

.admin-tab-btn.active {
    color: #4F46E5;
    border-bottom-color: #4F46E5;
}

/* ── Tab Content Area ─────────────────────────────────────── */
.admin-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.admin-tab-pane {
    display: none;
}

.admin-tab-pane.active {
    display: block;
}

/* ── Form Controls ────────────────────────────────────────── */
.admin-form-group {
    margin-bottom: 18px;
}

.admin-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.admin-hint {
    font-size: 11.5px;
    color: #64748B;
    margin-top: 4px;
}

.admin-input,
.admin-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 13px;
    color: #0F172A;
    background: #FFFFFF;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.admin-input:focus,
.admin-textarea:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.admin-textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}

/* ── Experience Cards Editor ──────────────────────────────── */
.experience-list-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.experience-edit-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px 16px;
    position: relative;
    transition: border-color 150ms ease;
}

.experience-edit-card:hover {
    border-color: #CBD5E1;
}

.experience-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.experience-card-num {
    font-size: 12px;
    font-weight: 700;
    color: #4F46E5;
    background: #EEF2FF;
    padding: 2px 8px;
    border-radius: 6px;
}

.experience-delete-btn {
    background: none;
    border: none;
    color: #EF4444;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background 130ms ease;
}

.experience-delete-btn:hover {
    background: #FEE2E2;
}

.experience-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    border: none;
    text-decoration: none;
}

.admin-btn-primary {
    background: #4F46E5;
    color: #FFFFFF;
}

.admin-btn-primary:hover {
    background: #4338CA;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.admin-btn-outline {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #334155;
}

.admin-btn-outline:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
}

.admin-btn-ghost {
    background: transparent;
    color: #64748B;
}

.admin-btn-ghost:hover {
    color: #EF4444;
    background: #FEF2F2;
}

/* ── Modal Footer ─────────────────────────────────────────── */
.admin-modal-footer {
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.admin-sync-status {
    font-size: 12px;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94A3B8;
}

.admin-status-dot.online {
    background: #10B981;
}

.admin-status-dot.saving {
    background: #F59E0B;
    animation: pulse-dot 1s infinite ease-in-out;
}

/* ── Toast Notification ───────────────────────────────────── */
.admin-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1E293B;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: all 200ms ease;
}

.admin-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.admin-toast.success {
    background: #065F46;
    border: 1px solid #059669;
}

.admin-toast.error {
    background: #991B1B;
    border: 1px solid #DC2626;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 580px) {
    .experience-grid-row {
        grid-template-columns: 1fr;
    }
    .admin-modal {
        max-height: 95vh;
    }
}
