* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, sans-serif;
}

:root {
    --bg: #0a0f1e;
    --surface: #0d1b3e;
    --surface2: #112248;
    --surface3: #1a2f5a;
    --border: #1e3460;
    --border2: #2a4070;
    --text: #f0f4ff;
    --muted: #7a92b8;
    --muted2: #4a6090;
    --green: #2e7d32;
    --green-light: #43a047;
    --green-bright: #4caf50;
    --green-glow: rgba(76, 175, 80, 0.15);
    --green-text: #81c784;
    --amber: #f59e0b;
    --red: #ef4444;
    --purple: #a855f7;
    --blue: #3b82f6;
}

.dash {
    display: flex;
    height: 820px;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    /* border-radius: 12px; */
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: var(--surface);
    padding: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
}

.logo-area {
    padding: 18px 16px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 34px;
    height: 34px;
    background: var(--green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
}

.logo-sub {
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 1px;
    margin-top: 1px;
}

.nav-body {
    padding: 12px 10px;
    flex: 1;
    overflow-y: auto;
}

.nav-group-label {
    font-size: 9px;
    color: var(--muted2);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 8px 6px;
    font-weight: 500;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 12.5px;
    cursor: pointer;
    margin-bottom: 1px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.nav-link:hover {
    background: var(--surface2);
    color: var(--text);
    border-color: var(--border);
}

.nav-link.active {
    background: var(--green);
    color: white;
    border-color: var(--green-light);
}

.nav-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.nbadge {
    margin-left: auto;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.nbadge.green {
    background: var(--green-glow);
    color: var(--green-text);
}

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

.sidebar-footer-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    background: var(--surface2);
    border: 1px solid var(--border);
}

.avatar-sm {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.suser-name {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
}

.suser-role {
    font-size: 10px;
    color: var(--muted);
}

/* TOPBAR */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    background: var(--surface);
    padding: 12px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    flex-direction: column;
}

.page-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.breadcrumb {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
}

.breadcrumb span {
    color: var(--green-text);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    background: var(--surface2);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border);
    position: relative;
}

.notif-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 6px;
    height: 6px;
    background: var(--red);
    border-radius: 50%;
    border: 1.5px solid var(--surface);
}

.search-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 5px 11px;
    width: 180px;
}

.search-wrap input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 12px;
    width: 100%;
}

.search-wrap input::placeholder {
    color: var(--muted2);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 4px 10px 4px 5px;
    border-radius: 20px;
    cursor: pointer;
}

.user-pill-name {
    font-size: 12px;
    color: var(--text);
}

.green-dot {
    width: 7px;
    height: 7px;
    background: var(--green-bright);
    border-radius: 50%;
    flex-shrink: 0;
}

/* CONTENT */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg);
}

/* Welcome bar */
.welcome-bar {
    background: var(--green);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    border: 1px solid var(--green-light);
}

.welcome-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.welcome-sub {
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    margin-top: 2px;
}

.welcome-btn {
    background: white;
    color: var(--green);
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

/* Stats */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    background: var(--surface);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.stat-card.blue::before {
    background: var(--blue);
}

.stat-card.green::before {
    background: var(--green-bright);
}

.stat-card.amber::before {
    background: var(--amber);
}

.stat-card.purple::before {
    background: var(--purple);
}

.stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 3px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.stat-change {
    font-size: 11px;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.stat-change.up {
    color: var(--green-text);
}

.stat-change.down {
    color: var(--red);
}

/* Bottom grid */
.bottom-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 14px;
}

.card {
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.view-btn {
    font-size: 11px;
    color: var(--green-text);
    cursor: pointer;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 3px;
}

.card-body {
    padding: 0 18px 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 9px 0;
    font-size: 10px;
    color: var(--muted);
    text-align: left;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 10px 0;
    font-size: 12.5px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.s-active {
    background: rgba(76, 175, 80, 0.12);
    color: var(--green-text);
}

.s-pending {
    background: rgba(245, 158, 11, 0.12);
    color: var(--amber);
}

.s-inactive {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
}

.plan-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
}

.plan-free {
    background: var(--surface3);
    color: var(--muted);
}

.plan-pro {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}

.plan-premium {
    background: rgba(76, 175, 80, 0.12);
    color: var(--green-text);
}

/* Activity */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.act-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-text {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.activity-text strong {
    color: var(--text);
}

.activity-time {
    font-size: 10px;
    color: var(--muted2);
    margin-top: 2px;
}

/* City badges row */
.city-row {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.city-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px;
    color: var(--muted);
    cursor: pointer;
}

.city-chip.active {
    border-color: var(--green-bright);
    color: var(--green-text);
    background: var(--green-glow);
}

.city-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-bright);
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #1e3460;
    background: #112248;
    color: #fff;
    font-size: 13px;
    outline: none;
}

.form-input:focus {
    border-color: #4caf50;
}

/* select specific */
select.form-input {
    appearance: none;
    cursor: pointer;
}
.ts-control {
    padding: 10px 12px !important;
    border-radius: 10px !important;
    background: var(--surface-2) !important;
    border: 1px solid var(--border) !important;
    font-size: 13px;
    color: var(--text);
}

.ts-dropdown {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.ts-dropdown .option:hover {
    background: rgba(16,185,129,0.1); /* RabatCity green hover */
}

/* BASE BUTTON */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

/* ================= WHITE ================= */
.btn-white {
    background: #ffffff;
    color: #0a0f1e;
}

.btn-white:hover {
    background: #f1f5f9;
}

/* ================= GREEN ================= */
.btn-green {
    background: #2e7d32;
    color: white;
}

.btn-green:hover {
    background: #43a047;
}

/* ================= OUTLINE WHITE ================= */
.btn-outline-white {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-outline-white:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.4);
}

/* ================= OUTLINE GREEN ================= */
.btn-outline-green {
    background: transparent;
    color: #4caf50;
    border: 1px solid rgba(76,175,80,0.5);
}

.btn-outline-green:hover {
    background: rgba(76,175,80,0.1);
    border-color: #4caf50;
}

/* ================= FULL WIDTH ================= */
.btn-block {
    width: 100%;
}

/* ================= SMALL ================= */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ================= LARGE ================= */
.btn-lg {
    padding: 10px 18px;
    font-size: 14px;
}

/* TABLE */
table th {
    padding: 10px 0;
    font-size: 11px;
    color: var(--muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

/* MODAL */
.custom-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.custom-modal-content {
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.modal-body {
    padding: 18px;
}

/* ===== PERMISSION GROUP ===== */
.permission-group {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* ===== CHECKBOX CARD ===== */
.checkbox-card {
    cursor: pointer;
}

/* UI BOX */
.checkbox-ui {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    transition: 0.2s;
}

/* Hover */
.checkbox-card:hover .checkbox-ui {
    border-color: rgba(37, 99, 235, 0.5); /* blue */
    color: #60a5fa;
}

/* Checked state */
.checkbox-input:checked + .checkbox-ui {
    background: rgba(37, 99, 235, 0.12); /* soft blue bg */
    border-color: rgba(16, 185, 129, 0.6); /* green accent */
    color: #10b981; /* green text */
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* RabatCity success */
.badge-success {
    background: rgba(16, 185, 129, 0.12); /* soft green */
    color: #10b981; /* emerald */
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-success:hover {
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.text-green {
    color: var(--green-text);
}
.user-card {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 24px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

/* LEFT */
.user-card-left {
    display: flex;
    gap: 16px;
    align-items: center;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(37,99,235,0.3);
}

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

.user-email {
    font-size: 13px;
    color: var(--text-muted);
}

/* BADGES */
.user-badges {
    margin-top: 6px;
    display: flex;
    gap: 8px;
}

/* RIGHT */
.user-card-right {
    display: flex;
    gap: 30px;
    align-items: center;
}

.info-item span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.info-item strong {
    font-size: 13px;
    color: var(--text);
}

.badge-danger {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
}

.badge-warning {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}

.badge-primary {
    background: rgba(37,99,235,0.12);
    color: #2563eb;
}
/* SWITCH */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

/* hide checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* slider */
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #374151;
    border-radius: 999px;
    transition: 0.3s;
}

/* circle */
.slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

/* ACTIVE (RabatCity green) */
.switch input:checked + .slider {
    background: #10b981;
}

/* move circle */
.switch input:checked + .slider::before {
    transform: translateX(20px);
}

/* hover effect */
.switch:hover .slider {
    box-shadow: 0 0 6px rgba(16,185,129,0.4);
}
.edit-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}
.feature-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.btn-remove {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: none;
    border-radius: 8px;
    padding: 0 10px;
    cursor: pointer;
}
.features-list {
    padding-left: 0;
    margin: 0;
    list-style: none;
    font-size: 13px;
    color: var(--text-muted);
}

.features-list li {
    margin-bottom: 4px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.switch {
    position: relative;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: #374151;
    border-radius: 999px;
    transition: 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked + .slider {
    background: #10b981;
}

.switch input:checked + .slider::before {
    transform: translateX(16px);
}
