@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --forest-950: #01261d;
    --forest-900: #02382b;
    --forest-800: #044e3d;
    --forest-700: #06634e;
    --forest-600: #059669;
    --emerald-500: #10b981;
    --emerald-100: #d1fae5;
    --emerald-50: #f0fdf4;
    --bg-main: #f4f6f8;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--forest-700);
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--forest-900);
    color: #e2e8f0;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
    height: 100dvh;
}

.sidebar-profile-box {
    background-color: rgba(1, 38, 29, 0.6);
    border: 1px solid rgba(4, 78, 61, 0.8);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none;
}

.nav-link:hover {
    background-color: var(--forest-800);
    color: #ffffff;
}

.nav-link.active {
    background-color: rgba(6, 99, 78, 0.7);
    color: #ffffff;
    font-weight: 600;
}

/* Cards & Content */
.admin-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
    .admin-card {
        padding: 1.25rem;
    }
}

.stat-badge {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--emerald-50);
    color: var(--forest-600);
}

/* ============================================================
   STANDARD TABLE (Properties, Service Providers, Shops etc.)
   ============================================================ */
.admin-table {
    width: 100%;
    text-align: left;
    font-size: 0.75rem;
    border-collapse: collapse;
    min-width: 650px;
}

.admin-table th {
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.6875rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}

/* ============================================================
   COMPACT TABLE — Dashboard साठी (same font, less column spacing)
   ============================================================ */
.admin-table-compact {
    width: 100%;
    text-align: left;
    font-size: 0.75rem;                    /* ✅ same as properties page */
    border-collapse: collapse;
    min-width: 0;
    table-layout: fixed;                   /* ✅ consistent column widths */
}

.admin-table-compact th {
    padding: 0.5rem 0.4rem;                /* ✅ horizontal spacing कमी */
    color: var(--text-secondary);
    font-size: 0.6875rem;                  /* ✅ same as properties page */
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.admin-table-compact td {
    padding: 0.625rem 0.4rem;              /* ✅ same row height, less horizontal */
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    font-size: 0.75rem;                    /* ✅ same as properties page */
}

/* First cell थोडा जास्त padding-left (card च्या border पासून gap) */
.admin-table-compact th:first-child,
.admin-table-compact td:first-child {
    padding-left: 0.75rem;
}

/* Last cell थोडा जास्त padding-right */
.admin-table-compact th:last-child,
.admin-table-compact td:last-child {
    padding-right: 0.75rem;
}

/* Cell variants (dashboard साठी) */
.admin-table-compact td.cell-title {
    font-weight: 700;                      /* ✅ same as properties (font-bold) */
    color: #0f172a;
}

.admin-table-compact td.cell-num {
    font-weight: 700;                      /* ✅ same as properties (font-bold) */
    color: #0f172a;
}

.admin-table-compact td.cell-muted {
    font-weight: 400;
    color: var(--text-primary);
}

/* Mobile — थोडा tighter */
@media (max-width: 480px) {
    .admin-table-compact th,
    .admin-table-compact td {
        padding: 0.5rem 0.3rem;
        font-size: 0.6875rem;
    }
    .admin-table-compact th:first-child,
    .admin-table-compact td:first-child {
        padding-left: 0.5rem;
    }
    .admin-table-compact th:last-child,
    .admin-table-compact td:last-child {
        padding-right: 0.5rem;
    }
}

/* Status Pills */
.status-pill {
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.status-approved {
    background-color: var(--emerald-100);
    color: var(--forest-800);
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-rejected {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Primary Theme Button */
.btn-primary {
    background-color: var(--forest-900);
    color: #ffffff;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.btn-primary:hover {
    background-color: var(--forest-800);
}

/* ============================================================
   MOBILE RESPONSIVE NAVIGATION (CLEAN, NO BLUR)
   ============================================================ */

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 65;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    z-index: 5;
}
.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* ---------- MOBILE (below lg) ---------- */
@media (max-width: 1023.98px) {

    .sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 70;
        width: 260px;
        max-width: 80vw;
        height: 100dvh !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 18px rgba(0, 0, 0, 0.25);
        filter: none !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }

    .sidebar-close-btn {
        display: flex;
    }
}

/* ---------- DESKTOP (lg and up) ---------- */
@media (min-width: 1024px) {
    .sidebar-overlay {
        display: none !important;
    }
    .sidebar-close-btn {
        display: none !important;
    }
}

/* ---------- SMALL PHONES (below sm) ---------- */
@media (max-width: 639.98px) {
    .admin-card {
        padding: 0.875rem;
    }
    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.625rem;
    }
    .admin-table {
        min-width: 560px;
    }
}