/**
 * Roomarkets - Modern UI Design System
 * Dual Theme (Dark/Light) with Glassmorphism
 * 2025-2026 Design Standards
 */

/* ============================================
   CSS CUSTOM PROPERTIES - THEME VARIABLES
   ============================================ */

:root {
    /* Font */
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Accent Colors (Shared) */
    --primary: #17a2b8;
    --primary-hover: #138496;
    --primary-light: #3fc1d3;
    --primary-gradient: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    --primary-glow: 0 0 20px rgba(23, 162, 184, 0.4);
    
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;
    --danger-light: #f87171;
    --info: #22d3ee;
    --info-light: #67e8f9;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;
    
    /* Spacing */
    --sidebar-width: 240px;
    --header-height: 56px;
}

/* Light Theme (Default) */
[data-theme="light"], :root:not([data-theme]) {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-header: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #f8fafc;
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.12);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-thumb-hover: #94a3b8;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-body: #0c0c10;
    --bg-card: #16161d;
    --bg-elevated: #1e1e28;
    --bg-sidebar: #12121a;
    --bg-header: #12121a;
    --bg-input: #1e1e28;
    --bg-hover: #252532;
    
    --text-primary: #f1f5f9;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-inverse: #0f172a;
    
    --border-color: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    
    --glass-bg: rgba(22, 22, 29, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --scrollbar-track: #1e1e28;
    --scrollbar-thumb: #3f3f46;
    --scrollbar-thumb-hover: #52525b;
}

/* ============================================
   BASE STYLES
   ============================================ */

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 13px;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
}

h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.9375rem; }
h6 { font-size: 0.875rem; }

p {
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
}

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

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

.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }

/* Override Bootstrap's text-dark/text-light for theme compatibility */
.text-dark { color: var(--text-primary) !important; }
.text-light { color: var(--text-inverse) !important; }
.text-body { color: var(--text-primary) !important; }
.text-black-50 { color: var(--text-muted) !important; }
.text-white-50 { color: var(--text-muted) !important; }

/* ============================================
   LAYOUT - SIDEBAR ENABLED
   ============================================ */

body.sidebar-enabled {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Header */
.top-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

/* Sidebar Toggle */
.sidebar-toggle {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Logo */
.navbar-brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.navbar-brand i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Theme Toggle Button */
.theme-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    font-size: 0.875rem;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--primary-glow);
}

.theme-toggle .fa-sun,
.theme-toggle .fa-moon {
    position: absolute;
    transition: all var(--transition-normal);
}

[data-theme="light"] .theme-toggle .fa-sun,
:root:not([data-theme]) .theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="light"] .theme-toggle .fa-moon,
:root:not([data-theme]) .theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Header User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-dropdown-toggle:hover {
    border-color: var(--border-strong);
    background: var(--bg-hover);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
}

.user-info {
    display: none;
}

@media (min-width: 768px) {
    .user-info {
        display: block;
        text-align: left;
    }
    
    .user-name {
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.2;
    }
    
    .user-role {
        font-size: 0.6875rem;
        color: var(--text-muted);
    }
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999;
    transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-content {
    padding: 1rem 0;
}

.sidebar-nav .nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section-title {
    padding: 1.25rem 1.25rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.sidebar-nav .nav-item {
    margin: 0.125rem 0.75rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-nav .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.7;
    transition: all var(--transition-fast);
}

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

.sidebar-nav .nav-link:hover i {
    opacity: 1;
    color: var(--primary);
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    color: var(--primary);
}

.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary-gradient);
    border-radius: 0 2px 2px 0;
}

.sidebar-nav .nav-link.active i {
    opacity: 1;
    color: var(--primary);
}

/* Submenu */
.sidebar-nav .nav-link[data-bs-toggle="collapse"] .fa-chevron-down {
    margin-left: auto;
    font-size: 0.625rem;
    transition: transform var(--transition-fast);
}

.sidebar-nav .nav-link[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.sidebar-nav .submenu {
    padding: 0.25rem 0 0.25rem 2.5rem;
    list-style: none;
}

.sidebar-nav .submenu .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 1.5rem;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--border-color);
    padding: 0.875rem 1.25rem;
}

/* Glass Card */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Gradient Border Card */
.card-gradient-border {
    position: relative;
    background: var(--bg-card);
    border: none;
}

.card-gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: var(--radius-lg);
    background: var(--primary-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.3);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), var(--primary-glow);
    color: white;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

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

.btn-success:hover {
    background: var(--success-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(16, 185, 129, 0.4);
    color: white;
}

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

.btn-warning:hover {
    background: var(--warning-light);
    transform: translateY(-1px);
    color: white;
}

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

.btn-danger:hover {
    background: var(--danger-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(239, 68, 68, 0.4);
    color: white;
}

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

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
}

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

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

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    display: block;
}

.form-control,
.form-select {
    font-family: var(--font-family);
    font-size: 0.8125rem;
    padding: 0.4375rem 0.625rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    width: 100%;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.15);
}

.form-control:disabled,
.form-select:disabled {
    background: var(--bg-elevated);
    opacity: 0.6;
    cursor: not-allowed;
}

/* Input with Icon */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 2.75rem;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Floating Label */
.form-floating {
    position: relative;
}

.form-floating > .form-control {
    height: 2.75rem;
    padding: 1.25rem 0.75rem 0.375rem;
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.75rem;
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
    transform-origin: left top;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.75) translateY(-0.5rem);
    color: var(--primary);
}

/* Checkbox & Radio */
.form-check-input {
    width: 0.9375rem;
    height: 0.9375rem;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: 0.1875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-check-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.15);
}

/* ============================================
   TABLES
   ============================================ */

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table thead {
    background: var(--bg-elevated);
}

.table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 0.625rem 1rem;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
    font-size: 0.8125rem;
}

.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

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

/* ============================================
   BADGES
   ============================================ */

.badge {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-primary {
    background: rgba(23, 162, 184, 0.15);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-info {
    background: rgba(34, 211, 238, 0.15);
    color: var(--info);
}

.badge-muted {
    background: var(--bg-elevated);
    color: var(--text-muted);
}

/* Status Dot */
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot-success { background: var(--success); }
.status-dot-warning { background: var(--warning); }
.status-dot-danger { background: var(--danger); }
.status-dot-muted { background: var(--text-muted); }

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 0.875rem 1rem;
}

.modal-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    gap: 0.5rem;
}

.btn-close {
    filter: var(--text-primary);
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

[data-theme="dark"] .btn-close {
    filter: invert(1);
}

/* Modal Backdrop */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: none;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: rgba(34, 211, 238, 0.1);
    color: var(--info);
    border-left: 4px solid var(--info);
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */

.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.375rem;
    min-width: 180px;
}

.dropdown-item {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

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

.dropdown-item i {
    width: 14px;
    text-align: center;
    opacity: 0.7;
    font-size: 0.75rem;
}

.dropdown-item.text-danger {
    color: var(--danger);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    border-color: var(--border-color);
    margin: 0.5rem 0;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    gap: 0.25rem;
}

.page-link {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.625rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.page-link:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0;
    margin: 0 0 1rem 0;
    background: transparent;
}

.breadcrumb-item {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

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

.breadcrumb-item.active {
    color: var(--text-primary);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    padding-right: 0.5rem;
    color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
    margin-left: var(--sidebar-width);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed ~ .main-footer {
    margin-left: 0;
}

@media (max-width: 991.98px) {
    .main-footer {
        margin-left: 0 !important;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

.bg-body { background-color: var(--bg-body) !important; }
.bg-card { background-color: var(--bg-card) !important; }
.bg-elevated { background-color: var(--bg-elevated) !important; }

.border-color { border-color: var(--border-color) !important; }

.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

/* Gradient Text */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow Effects */
.glow-primary {
    box-shadow: var(--primary-glow);
}

/* Loading Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Fade Animations */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-title i {
    color: var(--primary);
    font-size: 1rem;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
}

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

.empty-state-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
}

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

.empty-state-text {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

/* ============================================
   PUBLIC NAVIGATION
   ============================================ */

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

.public-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link-public {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link-public:hover {
    color: var(--primary);
    background: rgba(23, 162, 184, 0.1);
}

/* ============================================
   PUBLIC FOOTER
   ============================================ */

.public-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.footer-logo i {
    color: var(--primary);
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.footer-links h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 576px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
