/* ============================================================
   APOORVAA ADMIN PANEL — admin.css
   ============================================================ */

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

:root {
    --bg:         #0d0d12;
    --bg-card:    #161620;
    --bg-sidebar: #111118;
    --border:     rgba(255,255,255,0.08);
    --teal:       #2ec4c5;
    --teal-dim:   rgba(46,196,197,0.15);
    --red:        #e03f54;
    --red-dim:    rgba(224,63,84,0.15);
    --gold:       #f5c842;
    --gold-dim:   rgba(245,200,66,0.15);
    --text:       #e8e8f0;
    --text-muted: #7a7a9a;
    --radius:     14px;
    --shadow:     0 8px 32px rgba(0,0,0,0.5);
    --trans:      0.25s ease;
}

body {
    font-family: 'Inter', 'Outfit', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ═══════════════════════════════
   LOGIN SCREEN
═══════════════════════════════ */
#login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(46,196,197,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 100%, rgba(224,63,84,0.06) 0%, transparent 60%),
                var(--bg);
    padding: 2rem;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.login-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--teal-dim);
    border: 1px solid var(--teal);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 1.4rem;
}

.login-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--red);
    letter-spacing: 1px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2rem;
    margin-top: 0.25rem;
}

.login-label {
    display: block;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.login-input-wrap {
    position: relative;
    margin-bottom: 1.25rem;
}

.login-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 2.8rem 0.85rem 1rem;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--trans), box-shadow var(--trans);
}

.login-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(46,196,197,0.12);
}

.login-eye {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color var(--trans);
}
.login-eye:hover { color: var(--text); }

.login-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--teal), #1a9fa0);
    border: none;
    border-radius: 10px;
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform var(--trans), box-shadow var(--trans), opacity var(--trans);
    margin-top: 0.5rem;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(46,196,197,0.3); }
.login-btn:active { transform: translateY(0); }

.login-error {
    background: var(--red-dim);
    border: 1px solid var(--red);
    color: var(--red);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    margin-top: 1rem;
    display: none;
}
.login-error.show { display: block; }

/* ═══════════════════════════════
   MAIN ADMIN LAYOUT
═══════════════════════════════ */
#admin-app {
    display: none;
    min-height: 100vh;
}
#admin-app.visible { display: flex; }

/* ── SIDEBAR ── */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.sidebar-brand-icon {
    width: 38px;
    height: 38px;
    background: var(--teal-dim);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-brand-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
}
.sidebar-brand-text span {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-nav-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background var(--trans), color var(--trans);
    margin-bottom: 0.25rem;
}
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.sidebar-link.active { background: var(--teal-dim); color: var(--teal); }
.sidebar-link .icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-spacer { flex: 1; }

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    color: var(--red);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    background: none;
    width: 100%;
    text-align: left;
    transition: background var(--trans), border-color var(--trans);
}
.logout-btn:hover { background: var(--red-dim); border-color: var(--red); }

/* ── MAIN CONTENT ── */
.admin-main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ── TOP BAR ── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 1rem;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.topbar-title span {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    display: block;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.25rem; border-radius: 9px; font-size: 0.875rem; font-weight: 600; cursor: pointer; border: none; transition: transform var(--trans), box-shadow var(--trans), opacity var(--trans); text-decoration: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--teal), #1a9fa0); color: #000; }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(46,196,197,0.3); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; box-shadow: 0 6px 20px rgba(224,63,84,0.3); }
.btn-ghost { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }
.btn-icon { padding: 0.5rem; border-radius: 8px; }

/* ── PAGE CONTENT ── */
.page-content {
    padding: 2rem;
    flex: 1;
}

/* ── STATS ROW ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-icon.teal { background: var(--teal-dim); color: var(--teal); }
.stat-icon.red { background: var(--red-dim); color: var(--red); }
.stat-icon.gold { background: var(--gold-dim); color: var(--gold); }

.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text); line-height: 1.1; }

/* ── WORKS GRID (Admin) ── */
.admin-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.admin-work-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--trans), box-shadow var(--trans);
    position: relative;
}
.admin-work-card:hover { border-color: rgba(255,255,255,0.15); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.admin-work-card.dragging { opacity: 0.4; border-style: dashed; border-color: var(--teal); }
.admin-work-card.drag-over { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }

.admin-card-img {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #1a1a26;
}
.admin-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.drag-handle {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: rgba(0,0,0,0.65);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-muted);
    padding: 0.3rem 0.5rem;
    cursor: grab;
    font-size: 0.85rem;
    user-select: none;
    transition: background var(--trans), color var(--trans);
    z-index: 2;
}
.drag-handle:hover { background: var(--teal); color: #000; }
.drag-handle:active { cursor: grabbing; }

.card-order-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: rgba(0,0,0,0.65);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    z-index: 2;
}

.admin-card-body {
    padding: 1rem 1.25rem 1.25rem;
}
.admin-card-tag {
    display: inline-block;
    background: var(--teal-dim);
    color: var(--teal);
    border: 1px solid rgba(46,196,197,0.3);
    padding: 0.15rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.admin-card-title { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.admin-card-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0.85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.admin-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* ── ADD / EDIT MODAL ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
    transform: scale(0.95);
    transition: transform 0.25s ease;
}
.modal-overlay.open .modal-box { transform: scale(1); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; padding: 0.2rem; border-radius: 6px; transition: color var(--trans); }
.modal-close:hover { color: var(--red); }

.modal-body { padding: 1.75rem; }

/* ── FORM FIELDS ── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.5rem; }
.form-input, .form-textarea, .form-select {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--trans), box-shadow var(--trans);
    font-family: inherit;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(46,196,197,0.1);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-select option { background: var(--bg-card); }

/* ── IMAGE UPLOAD DROP ZONE ── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--trans), background var(--trans);
    position: relative;
    overflow: hidden;
}
.upload-zone:hover, .upload-zone.drag-active { border-color: var(--teal); background: var(--teal-dim); }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-zone-icon { font-size: 2rem; margin-bottom: 0.5rem; color: var(--text-muted); }
.upload-zone-text { font-size: 0.9rem; color: var(--text-muted); }
.upload-zone-text strong { color: var(--teal); }

.upload-preview {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 1rem;
    display: none;
    border: 1px solid var(--border);
}
.upload-preview.show { display: block; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border);
}

/* ── CONFIRM DIALOG ── */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.confirm-overlay.open { opacity: 1; pointer-events: all; }
.confirm-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.confirm-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.confirm-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.confirm-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.6; }
.confirm-actions { display: flex; gap: 0.75rem; justify-content: center; }

/* ── TOAST ── */
.admin-toast-wrap {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.admin-toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.9rem 1.25rem;
    font-size: 0.88rem;
    color: var(--text);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 240px;
    animation: toastIn 0.3s ease;
}
.admin-toast.success { border-color: var(--teal); }
.admin-toast.success .toast-dot { background: var(--teal); }
.admin-toast.error { border-color: var(--red); }
.admin-toast.error .toast-dot { background: var(--red); }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.88rem; }

/* ── VIEW SITE LINK ── */
.view-site-banner {
    background: var(--teal-dim);
    border: 1px solid rgba(46,196,197,0.3);
    border-radius: 12px;
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.view-site-banner span { font-size: 0.88rem; color: var(--text-muted); }
.view-site-banner strong { color: var(--teal); }

/* ── SECTION HEADING ── */
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}
.section-heading h2 { font-size: 1rem; font-weight: 700; color: var(--text); }
.section-heading p { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .sidebar { width: 220px; }
    .stats-row { grid-template-columns: 1fr; }
    .page-content { padding: 1.25rem; }
    .topbar { padding: 1rem 1.25rem; }
}
@media (max-width: 600px) {
    #admin-app.visible { flex-direction: column; }
    .sidebar { width: 100%; min-height: auto; height: auto; position: relative; flex-direction: row; flex-wrap: wrap; padding: 1rem; }
    .sidebar-brand { border: none; margin: 0; padding: 0; }
    .sidebar-footer { border: none; padding: 0; }
    .sidebar-nav-label { display: none; }
    .sidebar-link span { display: none; }
    .sidebar-link { padding: 0.6rem; }
    .admin-works-grid { grid-template-columns: 1fr; }
}

/* ── TAB VISIBILITY ── */
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
    animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── SETTINGS FORMS ── */
.admin-settings-form {
    max-width: 650px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
}
.admin-settings-form button[type="submit"] {
    margin-top: 1rem;
}

/* ── SECTORS GRID/LIST ── */
.admin-sectors-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.sector-row-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: transform var(--trans), border-color var(--trans);
}
.sector-row-card:hover {
    transform: translateY(-2px);
    border-color: rgba(46,196,197,0.3);
}
.sector-feature-pill {
    background: rgba(46,196,197,0.1);
    border: 1px solid rgba(46,196,197,0.2);
    color: var(--teal);
    border-radius: 99px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}

