/**
 * Zoom Into Web - Modern Admin Dashboard CSS
 * Visual Reference: Alasmart Admin System
 * Separated completely from public frontend styles.
 */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-border: #c7d2fe;
    --primary-focus: rgba(79, 70, 229, 0.25);

    --secondary: #64748b;
    --secondary-hover: #475569;

    --sidebar-bg: #0f172a;
    --sidebar-surface: #1e293b;
    --sidebar-border: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-text-bright: #f8fafc;
    --sidebar-hover: #1e293b;
    --sidebar-active-bg: rgba(79, 70, 229, 0.2);
    --sidebar-active-text: #818cf8;
    --sidebar-active-border: #6366f1;

    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --success-text: #065f46;

    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --warning-text: #92400e;

    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --danger-text: #991b1b;

    --info: #0ea5e9;
    --info-bg: #f0f9ff;
    --info-border: #bae6fd;
    --info-text: #0369a1;

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --header-height: 70px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

ul, ol {
    list-style: none;
}

/* ==========================================================================
   Admin Master Layout
   ========================================================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--body-bg);
}

/* Admin Sidebar */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
}

.brand-icon-box {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.brand-meta {
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s ease;
}

.brand-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.brand-tag {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sidebar-text);
}

.sidebar-close-mobile {
    display: none;
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
}

.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-surface) transparent;
}

.sidebar-scrollable::-webkit-scrollbar {
    width: 5px;
}
.sidebar-scrollable::-webkit-scrollbar-thumb {
    background-color: var(--sidebar-surface);
    border-radius: 4px;
}

.nav-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 14px 14px 6px;
    margin-top: 6px;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 13.5px;
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-text-bright);
}

.nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-color: rgba(99, 102, 241, 0.25);
    font-weight: 600;
}

.nav-link .nav-icon {
    width: 20px;
    font-size: 15px;
    text-align: center;
    color: inherit;
    flex-shrink: 0;
}

.nav-link .nav-label {
    flex: 1;
}

.nav-link .nav-chevron {
    font-size: 11px;
    transition: transform 0.2s ease;
    color: #64748b;
}

.nav-item.open > .nav-link .nav-chevron {
    transform: rotate(90deg);
}

.nav-link .nav-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    background-color: var(--primary);
    color: #ffffff;
}

/* Submenu dropdown */
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
    padding-left: 20px;
}

.nav-item.open > .nav-submenu {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
    margin-top: 4px;
    margin-bottom: 6px;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.submenu-link::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #475569;
    transition: var(--transition);
}

.submenu-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.04);
}

.submenu-link:hover::before {
    background-color: var(--primary);
}

.submenu-link.active {
    color: #ffffff;
    font-weight: 600;
}

.submenu-link.active::before {
    background-color: #818cf8;
    box-shadow: 0 0 6px #818cf8;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(15, 23, 42, 0.7);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid #334155;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: #818cf8;
    font-weight: 500;
    text-transform: capitalize;
}

.sidebar-collapse-btn {
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    padding: 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-collapse-btn:hover {
    color: #ffffff;
    background-color: var(--sidebar-surface);
}

/* Collapsed Sidebar State */
body.sidebar-collapsed .admin-sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .brand-meta,
body.sidebar-collapsed .nav-category,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-chevron,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .sidebar-user-info,
body.sidebar-collapsed .nav-submenu {
    display: none !important;
}

body.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
}

body.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
}

body.sidebar-collapsed .sidebar-footer {
    justify-content: center;
    padding: 12px 0;
}

body.sidebar-collapsed .admin-main {
    margin-left: var(--sidebar-collapsed-width);
}

/* ==========================================================================
   Admin Main Container
   ========================================================================== */

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sticky Top Header */
.admin-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 40;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-toggle-sidebar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    background-color: #ffffff;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
}

.btn-toggle-sidebar:hover {
    background-color: var(--body-bg);
    color: var(--text-main);
    border-color: #cbd5e1;
}

.header-search {
    position: relative;
    width: 320px;
}

.header-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
}

.header-search-input {
    width: 100%;
    padding: 9px 40px 9px 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    background-color: #f8fafc;
    font-size: 13.5px;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

.header-search-input:focus {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus);
}

.header-search-kbd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    color: #64748b;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--card-border);
    background-color: #ffffff;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    position: relative;
    transition: var(--transition);
}

.header-btn:hover {
    background-color: var(--body-bg);
    color: var(--text-main);
}

.header-btn .notification-pulse {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger);
    box-shadow: 0 0 0 2px #ffffff;
}

.btn-visit-store {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    background-color: #ffffff;
    color: var(--secondary);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-visit-store:hover {
    background-color: #f1f5f9;
    color: var(--text-main);
}

/* User Header Pill */
.header-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 6px;
    border-radius: var(--radius-full);
    border: 1px solid var(--card-border);
    background-color: #ffffff;
    cursor: pointer;
    transition: var(--transition);
}

.header-user-btn:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.header-user-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.header-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

.header-user-role {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--primary);
    text-transform: capitalize;
}

/* Dropdown Menus */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--card-border);
    min-width: 240px;
    display: none;
    z-index: 100;
    animation: dropdownFade 0.15s ease-out;
}

.dropdown-container.open .dropdown-menu {
    display: block;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.dropdown-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.dropdown-body {
    padding: 6px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: var(--primary);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--secondary);
    font-size: 14px;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--card-border);
    margin: 6px 0;
}

/* Notifications Box */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
}

.notification-item:hover {
    background-color: #f8fafc;
}

.notif-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.notif-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
}

.notif-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ==========================================================================
   Page Content Canvas
   ========================================================================== */

.admin-content {
    flex: 1;
    padding: 28px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.admin-breadcrumbs a {
    color: var(--text-muted);
    font-weight: 500;
}

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

.admin-breadcrumbs .separator {
    font-size: 10px;
    color: #cbd5e1;
}

.admin-breadcrumbs .current {
    color: var(--primary);
    font-weight: 600;
}

/* ==========================================================================
   Cards & Stats
   ========================================================================== */

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--transition);
}

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

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.card-body {
    padding: 22px;
}

.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--card-border);
    background-color: #fafbfd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Metrics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 10px;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

.stat-subtext {
    font-size: 11.5px;
    color: var(--text-light);
    margin-left: 4px;
    font-weight: 400;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon-revenue {
    background-color: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}
.stat-icon-orders {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.stat-icon-products {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}
.stat-icon-customers {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* ==========================================================================
   Charts & Overview Section
   ========================================================================== */

.dashboard-split-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-chart-filter {
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background-color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-chart-filter.active,
.btn-chart-filter:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.chart-container {
    position: relative;
    height: 310px;
    width: 100%;
}

/* Order Overview Breakdown */
.order-overview-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-overview-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
}

.order-overview-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-overview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.progress-track {
    height: 8px;
    border-radius: var(--radius-full);
    background-color: #f1f5f9;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.5s ease-in-out;
}

/* ==========================================================================
   Tables & Badges
   ========================================================================== */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.admin-table th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 18px;
    border-bottom: 1px solid var(--card-border);
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: var(--text-main);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background-color: #fbfcfe;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    text-transform: capitalize;
    white-space: nowrap;
}

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

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

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

.badge-info {
    background-color: var(--info-bg);
    color: var(--info-text);
    border-color: var(--info-border);
}

.badge-neutral {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-border);
}

/* User & Product table cells */
.table-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.table-user-info {
    display: flex;
    flex-direction: column;
}

.table-user-name {
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

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

.table-product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-product-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--card-border);
    flex-shrink: 0;
}

.table-product-title {
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.table-product-category {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Action Buttons */
.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background-color: #ffffff;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.btn-action:hover {
    background-color: var(--body-bg);
    color: var(--text-main);
    border-color: #cbd5e1;
}

.btn-action.action-delete:hover {
    background-color: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-border);
}

/* ==========================================================================
   Buttons & Forms
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(79, 70, 229, 0.2);
}

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

.btn-secondary {
    background-color: #ffffff;
    border-color: var(--card-border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control,
.form-select {
    width: 100%;
    padding: 9px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    background-color: #ffffff;
    font-size: 13.5px;
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 20px;
    animation: fadeIn 0.15s ease-out;
}

.modal-backdrop.open {
    display: flex;
}

.modal-dialog {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalSlide 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-main);
    background-color: #f1f5f9;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--card-border);
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #ffffff;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--card-border);
    min-width: 300px;
    max-width: 420px;
    animation: toastIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transition: opacity 0.2s ease;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 14px;
}

.toast.toast-success {
    border-left: 4px solid var(--success);
}
.toast.toast-success .toast-icon {
    color: var(--success);
}

.toast.toast-error {
    border-left: 4px solid var(--danger);
}
.toast.toast-error .toast-icon {
    color: var(--danger);
}

.toast.toast-info {
    border-left: 4px solid var(--info);
}
.toast.toast-info .toast-icon {
    color: var(--info);
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.empty-state-desc {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 360px;
    margin: 0 auto 20px;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Drawer
   ========================================================================== */

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    z-index: 45;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    body.mobile-sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    body.mobile-sidebar-open .sidebar-overlay {
        display: block;
    }

    .sidebar-close-mobile {
        display: block;
    }

    .admin-main {
        margin-left: 0 !important;
    }

    .admin-header {
        padding: 0 16px;
    }

    .admin-content {
        padding: 16px;
    }

    .header-search {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header-user-details {
        display: none;
    }
}

