@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
    --primary: #1a6ef5;
    --primary-light: #e8f0fe;
    --primary-dark: #1558c0;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --pending: #7c3aed;
    --pending-bg: #ede9fe;

    --sidebar-w: 220px;
    --header-h: 60px;

    --bg: #f4f6fb;
    --surface: #ffffff;
    --border: #e5e9f2;
    --text: #1e2535;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
    --shadow: 0 4px 16px rgba(0, 0, 0, .08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .12);

    --font: 'Plus Jakarta Sans', sans-serif;
    --transition: .2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: var(--font);
    border: none;
}

input {
    font-family: var(--font);
    border: none;
    outline: none;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform var(--transition);
}

/* Logo */
.sidebar__logo {
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}

.sidebar__logo img {
    /* height: 36px; */
    width: auto;
}

/* Nav */
.sidebar__nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.sidebar__nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar__nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    border-radius: 0;
    color: var(--text-muted);
    font-size: .84rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
    position: relative;
}

.nav-item i, .nav-item svg {
    font-size: 1rem;
    flex-shrink: 0;
    width: 18px;
}

.nav-item:hover {
    background: var(--bg);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

/* Sidebar user */
.sidebar__user {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar__user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
}

.sidebar__user-info {
    min-width: 0;
}

.sidebar__user-name {
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__user-email {
    font-size: .7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 8px;
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    z-index: 99;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-sep {
    color: var(--border);
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-wrapper {
    margin-left: var(--sidebar-w);
    margin-top: var(--header-h);
    flex: 1;
    min-height: calc(100vh - var(--header-h));
    padding: 24px;
}

/* ── Page Header ── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.page-header__left h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.page-header__left p {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.page-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 600;
    transition: background var(--transition), box-shadow var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--bg);
}

/* ── Stat Cards ── */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

.stat-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.stat-card__icon--blue {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card__icon--green {
    background: var(--success-bg);
    color: var(--success);
}

.stat-card__icon--orange {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-card__info {
    flex: 1;
    min-width: 0;
}

.stat-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-card__label {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.stat-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    margin-top: 6px;
}

.stat-card__badge--up {
    background: var(--success-bg);
    color: var(--success);
}

.stat-card__badge--down {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ── Table Card ── */
.table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Table Toolbar */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}

.table-toolbar__left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-toolbar__title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
}

.table-toolbar__count {
    font-size: .75rem;
    color: var(--text-muted);
    background: var(--bg);
    border-radius: 20px;
    padding: 2px 8px;
}

.table-toolbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Search */
.search-box {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 11px;
    min-width: 200px;
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    background: none;
    font-size: .8rem;
    color: var(--text);
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-light);
}

/* Filter Selects */
.filter-select {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: .78rem;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color var(--transition);
}

.filter-select:hover {
    border-color: var(--primary);
}

.filter-select select {
    background: none;
    border: none;
    outline: none;
    font-size: .78rem;
    font-family: var(--font);
    color: var(--text);
    cursor: pointer;
}

/* Bulk Actions */
.btn-bulk {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: .76rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: background var(--transition);
}

.btn-bulk:hover {
    background: var(--bg);
}

.btn-reset {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: .76rem;
    font-weight: 600;
    border: none;
    background: none;
    color: var(--text-muted);
}

.btn-reset:hover {
    color: var(--danger);
}

/* ── Data Table ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead tr {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.data-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
    padding-left: 18px;
    width: 36px;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #fafbfd;
}

.data-table td {
    padding: 12px 14px;
    font-size: .82rem;
    vertical-align: middle;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
}

.form-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* User cell */
.user-cell {
}

.user-name {
    font-weight: 600;
    color: var(--text);
    font-size: .83rem;
}

.user-company {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-active {
    background: var(--success-bg);
    color: var(--success);
}

.badge-active::before {
    background: var(--success);
}

.badge-suspended {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-suspended::before {
    background: var(--warning);
}

.badge-pending {
    background: var(--pending-bg);
    color: var(--pending);
}

.badge-pending::before {
    background: var(--pending);
}

.badge-inactive {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-inactive::before {
    background: var(--danger);
}

/* Verified */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .78rem;
    color: var(--success);
    font-weight: 500;
}

.verified-badge svg {
    width: 14px;
    height: 14px;
}

/* Action buttons */
.action-btns {
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    font-size: .8rem;
}

.action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* ── Pagination ── */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}

.table-footer__info {
    font-size: .78rem;
    color: var(--text-muted);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}

.page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .header {
        left: 0;
    }

    .stat-cards {
        grid-template-columns: 1fr;
    }

    .table-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-toolbar__right {
        width: 100%;
    }

    .search-box {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .main-wrapper {
        padding: 14px;
    }

    .page-header {
        flex-direction: column;
    }

    .page-header__actions {
        width: 100%;
    }
}

/* Table footer left group */
.table-footer__left-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Per-page selector */
.per-page-select {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: .75rem;
    color: var(--text-muted);
}

.per-page-select select {
    background: none;
    border: none;
    outline: none;
    font-size: .75rem;
    font-family: var(--font);
    color: var(--text);
    cursor: pointer;
}

.per-page-select svg {
    color: var(--text-muted);
}

/* Ellipsis */
.page-ellipsis {
    width: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: .78rem;
}

/* ── Verified icon colors ── */
.verified-active {
    color: #16a34a !important;
}

.verified-inactive {
    color: #9ca3af !important;
}

/* ── Status Dropdown ── */
.status-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    z-index: 999;
    min-width: 150px;
    overflow: hidden;
}

.status-drop-item {
    display: block;
    width: 100%;
    padding: 8px 14px;
    text-align: left;
    font-size: .82rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary, #374151);
    transition: background .15s;
}

.status-drop-item:hover {
    background: #f3f4f6;
}

.status-drop-item--active {
    font-weight: 600;
    background: #f0fdf4;
    color: #16a34a;
}
.sidebar__user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.sidebar__user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}