/* SaasAdmin - Modern UI Styles with Inter Font */

/* ============================================================================
   CSS Variables - Design Tokens
   ============================================================================ */
:root {
    /* Colors */
    --color-primary: #6366f1;
    --color-primary-hover: #4f46e5;
    --color-primary-light: #eef2ff;

    --color-success: #10b981;
    --color-success-light: #d1fae5;
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    --color-danger: #ef4444;
    --color-danger-light: #fee2e2;
    --color-info: #3b82f6;
    --color-info-light: #dbeafe;

    /* Grays */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    /* Layout */
    --sidebar-width: 256px;
    --header-height: 64px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Border radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* ============================================================================
   Base Styles
   ============================================================================ */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-gray-900);
    background-color: var(--color-gray-50);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ============================================================================
   Layout - Sidebar + Main Content
   ============================================================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--color-gray-100);
}

.sidebar-logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-gray-900);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.sidebar-logo:hover {
    color: var(--color-gray-900);
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #8b5cf6 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section {
    padding: 0 0.75rem;
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: var(--color-gray-600);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    margin-bottom: 0.125rem;
}

.nav-item:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-900);
}

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

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--color-gray-100);
}

.org-switcher {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    background: var(--color-gray-50);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}

.org-switcher:hover {
    background: var(--color-gray-100);
}

.org-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #8b5cf6 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.org-info {
    flex: 1;
    min-width: 0;
}

.org-name {
    font-weight: 600;
    color: var(--color-gray-900);
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.org-role {
    font-size: 0.6875rem;
    color: var(--color-gray-500);
}

.org-switcher-icon {
    color: var(--color-gray-400);
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top header */
.top-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-gray-500);
}

.breadcrumb a {
    color: var(--color-gray-500);
}

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

.breadcrumb-separator {
    color: var(--color-gray-300);
}

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

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    color: var(--color-gray-700);
}

.user-menu:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-900);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--color-gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-600);
    font-weight: 600;
    font-size: 0.6875rem;
}

.user-name {
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Page content */
.page-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1280px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 0;
}

.page-header-subtitle {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin-top: 0.25rem;
}

/* ============================================================================
   Cards
   ============================================================================ */
.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 0;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-gray-100);
    background: var(--color-gray-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ============================================================================
   Buttons
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

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

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

.btn-secondary {
    background: white;
    color: var(--color-gray-700);
    border-color: var(--color-gray-300);
}

.btn-secondary:hover {
    background: var(--color-gray-50);
    border-color: var(--color-gray-400);
    color: var(--color-gray-900);
}

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

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

.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-success:hover {
    background: #059669;
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--color-gray-600);
}

.btn-ghost:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-900);
}

.btn-outline-primary {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-primary:hover {
    background: var(--color-primary);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================================================
   Tables
   ============================================================================ */
.table-container {
    overflow-x: auto;
}

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

.table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--color-gray-50);
    border-bottom: 1px solid var(--color-gray-200);
    border-top: none;
}

.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-gray-100);
    vertical-align: middle;
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background: var(--color-gray-50);
}

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

.table-link {
    font-weight: 500;
    color: var(--color-gray-900);
}

.table-link:hover {
    color: var(--color-primary);
}

.table-meta {
    font-size: 0.75rem;
    color: var(--color-gray-500);
    margin-top: 0.125rem;
}

/* ============================================================================
   Badges
   ============================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 9999px;
    text-transform: capitalize;
}

.badge-success,
.badge.bg-success {
    background: var(--color-success-light) !important;
    color: #065f46 !important;
}

.badge-warning,
.badge.bg-warning {
    background: var(--color-warning-light) !important;
    color: #92400e !important;
}

.badge-danger,
.badge.bg-danger {
    background: var(--color-danger-light) !important;
    color: #991b1b !important;
}

.badge-info,
.badge.bg-info {
    background: var(--color-info-light) !important;
    color: #1e40af !important;
}

.badge-gray,
.badge.bg-secondary {
    background: var(--color-gray-100) !important;
    color: var(--color-gray-600) !important;
}

.badge.bg-primary {
    background: var(--color-primary-light) !important;
    color: var(--color-primary) !important;
}

/* Dot indicator */
.badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.375rem;
    background: currentColor;
}

/* ============================================================================
   Forms
   ============================================================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-gray-700);
    margin-bottom: 0.375rem;
}

.form-input,
.form-select,
.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius);
    background: white;
    color: var(--color-gray-900);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

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

.form-input::placeholder {
    color: var(--color-gray-400);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-gray-500);
    margin-top: 0.375rem;
}

.form-error {
    font-size: 0.75rem;
    color: var(--color-danger);
    margin-top: 0.375rem;
}

/* ============================================================================
   Alerts
   ============================================================================ */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: none;
}

.alert-success {
    background: var(--color-success-light);
    color: #065f46;
}

.alert-warning {
    background: var(--color-warning-light);
    color: #92400e;
}

.alert-danger {
    background: var(--color-danger-light);
    color: #991b1b;
}

.alert-info {
    background: var(--color-info-light);
    color: #1e40af;
}

/* ============================================================================
   Empty State
   ============================================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--color-gray-300);
}

.empty-state-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 0.375rem;
}

.empty-state-text {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin-bottom: 1.25rem;
}

/* ============================================================================
   Stats
   ============================================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-gray-500);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-gray-900);
}

/* ============================================================================
   Timeline / Activity
   ============================================================================ */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.34375rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--color-gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 1rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.375rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-gray-300);
    border: 2px solid white;
}

.timeline-dot.success { background: var(--color-success); }
.timeline-dot.warning { background: var(--color-warning); }
.timeline-dot.danger { background: var(--color-danger); }
.timeline-dot.info { background: var(--color-info); }

.timeline-content {
    font-size: 0.8125rem;
}

.timeline-title {
    font-weight: 500;
    color: var(--color-gray-900);
}

.timeline-time {
    font-size: 0.6875rem;
    color: var(--color-gray-500);
    margin-top: 0.125rem;
}

/* ============================================================================
   Activity List
   ============================================================================ */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--color-gray-100);
    color: var(--color-gray-700);
    text-decoration: none;
    transition: background 0.15s ease;
}

.activity-item:hover {
    background: var(--color-gray-50);
}

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

.activity-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.activity-title {
    font-weight: 500;
    color: var(--color-gray-900);
    font-size: 0.875rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--color-gray-500);
}

/* ============================================================================
   Details / Key-Value List
   ============================================================================ */
.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-gray-100);
}

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

.detail-label {
    font-size: 0.8125rem;
    color: var(--color-gray-500);
}

.detail-value {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-gray-900);
    text-align: right;
}

/* ============================================================================
   Auth Pages (Minimal Layout)
   ============================================================================ */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-gray-100) 100%);
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #8b5cf6 100%);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-icon {
    margin-bottom: 1rem;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 0 0 0.375rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin: 0;
    line-height: 1.5;
}

.auth-footer-text {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-gray-500);
    margin: 1.25rem 0 0;
}

/* Dev mode box */
.dev-mode-box {
    background: var(--color-success-light);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.dev-mode-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.dev-mode-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #065f46;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dev-mode-text {
    font-size: 0.8125rem;
    color: #065f46;
    margin: 0 0 0.75rem;
}

.dev-mode-link {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.dev-mode-link code {
    font-size: 0.6875rem;
    word-break: break-all;
    background: rgba(0, 0, 0, 0.05);
    display: block;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

/* Org list (for select page) */
.org-list {
    margin-bottom: 0.5rem;
}

.org-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem;
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    margin-bottom: 0.5rem;
    font-family: inherit;
}

.org-list-item:hover {
    background: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.org-list-item .org-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.org-list-item .org-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.org-list-item .org-name {
    font-size: 0.9375rem;
}

.org-list-item .org-role {
    font-size: 0.75rem;
    color: var(--color-gray-500);
}

/* ============================================================================
   Code
   ============================================================================ */
code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.8125rem;
    padding: 0.125rem 0.375rem;
    background: var(--color-gray-100);
    border-radius: var(--radius-sm);
    color: var(--color-gray-700);
}

/* ============================================================================
   Dropdown Menu
   ============================================================================ */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: white;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.375rem;
    z-index: 50;
    display: none;
    margin-top: 0.25rem;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--color-gray-700);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-900);
}

.dropdown-divider {
    height: 1px;
    background: var(--color-gray-200);
    margin: 0.375rem 0;
}

/* ============================================================================
   Spinner
   ============================================================================ */
.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--color-gray-200);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   Utilities
   ============================================================================ */
.text-muted { color: var(--color-gray-500) !important; }
.text-primary { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }

.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.w-full { width: 100%; }

/* ============================================================================
   Grid Layout
   ============================================================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.row > * {
    padding: 0 0.75rem;
}

.col-md-4 {
    width: 100%;
}

.col-md-8 {
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-4 {
        width: 33.333%;
    }

    .col-md-8 {
        width: 66.666%;
    }
}

/* List group */
.list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-group-flush .list-group-item {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
}

.list-group-flush .list-group-item:first-child {
    border-top: 0;
}

.list-group-flush .list-group-item:last-child {
    border-bottom: 0;
}

.list-group-item {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--color-gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-start { align-items: flex-start; }

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

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

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: 1rem;
    }

    .page-content {
        padding: 1rem;
    }
}
