/**
 * WTP Admin - Modern UI Stylesheet
 * Design System moderno e limpo
 * Versão 2.0 - Dezembro 2024
 */

/* ============================================
   CSS VARIABLES - Design Tokens
   ============================================ */
:root {
    /* Cores Primárias - Baseado na identidade LATAM */
    --primary: #3f51b5;
    --primary-dark: #303f9f;
    --primary-light: #7986cb;
    --primary-50: rgba(63, 81, 181, 0.1);
    --primary-100: rgba(63, 81, 181, 0.2);
    
    /* Cores de Destaque */
    --accent: #ff6b6b;
    --accent-dark: #ee5a5a;
    --accent-light: #ff8a8a;
    
    /* Cores Neutras */
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    
    /* Cores Semânticas */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Cores de Texto */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-white: #ffffff;
    
    /* Backgrounds */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b;
    --bg-sidebar-hover: #334155;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Bordas */
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-full: 9999px;
    --border-color: #e5e7eb;
    
    /* Transições */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Tipografia */
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Espaçamento */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --navbar-height: 64px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title i {
    color: var(--primary);
}

/* ============================================
   SIDEBAR - Modern Dark Theme
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width) !important;
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-sidebar) 0%, #0f172a 100%);
    color: var(--text-white);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all var(--transition-slow);
    display: flex;
    flex-direction: column;
    margin-left: 0 !important;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-600);
    border-radius: var(--border-radius-full);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header::before {
    content: '✈';
    font-size: 1.5rem;
}

/* Sidebar Navigation */
.sidebar .components {
    padding: 1rem 0;
    margin: 0;
    flex: 1;
}

.sidebar .components li {
    margin: 0.25rem 0.75rem;
}

.sidebar .components li a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
}

.sidebar .components li a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.8;
}

.sidebar .components li a:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
    transform: translateX(4px);
}

.sidebar .components li a:hover i {
    opacity: 1;
}

.sidebar .components li a.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(63, 81, 181, 0.4);
}

.sidebar .components li a.active i {
    opacity: 1;
}

/* Sidebar User Info */
.sidebar-user-info {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: rgba(0, 0, 0, 0.2);
    margin-top: auto;
}

.sidebar-user-info .user-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: var(--text-white);
    flex-shrink: 0;
}

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

.sidebar-user-info .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info .user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   MAIN CONTENT AREA - FULL WIDTH FIX
   ============================================ */

/* Reset base layout */
html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Main container - must be full viewport */
body > .main-container,
.main-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    position: relative;
}

/* Flex container for sidebar + content */
.main-container > .d-flex {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    display: flex !important;
}

/* Content area - MUST fill remaining space */
.content {
    position: absolute !important;
    left: var(--sidebar-width) !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    min-height: 100vh;
    background: var(--bg-body);
    overflow-x: hidden;
    overflow-y: auto;
    width: calc(100vw - var(--sidebar-width)) !important;
}

/* All containers inside content should be full width */
.content .container-fluid,
.content > .container-fluid,
.content .navbar .container-fluid,
.content .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    box-sizing: border-box !important;
}

/* Content padding */
.content > .container-fluid.py-4,
.content > .container-fluid.p-4 {
    padding: 1.5rem !important;
}

/* Cards should be full width */
.content .card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Rows should be full width */
.content .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    width: calc(100% + 1.5rem);
    max-width: calc(100% + 1.5rem);
}

/* Navbar full width */
.content .navbar {
    width: 100% !important;
    max-width: 100% !important;
}

/* Tables full width */
.content .table-responsive {
    width: 100% !important;
}

.content .table {
    width: 100% !important;
}

/* Fix for stats cards */
.dashboard-stat {
    width: 100%;
}

/* Fix row gutters */
.row.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Ensure all columns are properly sized */
.content [class*="col-"] {
    box-sizing: border-box;
}

/* Remove any margin/padding that could cause gap */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

#overlay.show {
    display: block;
}

.sidebar {
    flex-shrink: 0;
}

/* Top Navbar */
.navbar {
    height: var(--navbar-height);
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar.bg-indigo {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border-bottom: none;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-white) !important;
}

.navbar .text-white {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Content Container */
.container-fluid.p-4 {
    padding: 2rem !important;
    max-width: 1600px;
}

/* ============================================
   CARDS - Modern Design
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.card-header.bg-indigo,
.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border-bottom: none;
    color: var(--text-white) !important;
}

.card-header.bg-indigo *,
.card-header.bg-primary * {
    color: var(--text-white) !important;
}

.card-header .card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.25rem;
}

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

/* ============================================
   DASHBOARD STATS
   ============================================ */
.dashboard-stat {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

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

.dashboard-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.dashboard-stat i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.dashboard-stat h3 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dashboard-stat p {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-stat-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    border: none;
}

.dashboard-stat-primary::before {
    display: none;
}

.dashboard-stat-primary h3,
.dashboard-stat-primary p,
.dashboard-stat-primary i {
    color: var(--text-white) !important;
}

.dashboard-stat-coral {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--text-white);
    border: none;
}

.dashboard-stat-coral::before {
    display: none;
}

.dashboard-stat-coral h3,
.dashboard-stat-coral p,
.dashboard-stat-coral i {
    color: var(--text-white) !important;
}

.dashboard-stat-light {
    background: var(--bg-card);
}

.dashboard-stat-light::before {
    background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
}

.dashboard-stat-light i {
    color: var(--success);
}

.dashboard-stat-light h3 {
    color: var(--text-primary);
}

.dashboard-stat-light p {
    color: var(--text-secondary);
}

/* ============================================
   TABLES - Clean & Modern
   ============================================ */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-50);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.table thead.bg-indigo th,
.table thead.bg-primary th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white) !important;
    border-bottom: none;
}

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

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

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

.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* ============================================
   BUTTONS - Modern Style
   ============================================ */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
}

.btn:focus {
    box-shadow: 0 0 0 3px var(--primary-100);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a237e 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--text-white);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--text-white);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: var(--text-white);
}

.btn-outline-secondary {
    background: transparent;
    border: 1.5px solid var(--gray-400);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-500);
    color: var(--text-primary);
}

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

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Action buttons - gray by default, colored on hover */
.btn-action {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
    transition: all var(--transition);
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

.btn-action.btn-action-view:hover {
    background: var(--info);
    border-color: var(--info);
    color: var(--text-white);
}

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

.btn-action.btn-action-success:hover {
    background: var(--success);
    border-color: var(--success);
    color: var(--text-white);
}

/* Table action buttons - neutral style (gray by default) */
.table .btn-group .btn,
.table .btn-sm,
.table .btn-outline-primary,
.table .btn-outline-info,
.table .btn-outline-danger,
.table .btn-outline-success,
.table .btn-outline-warning {
    background: var(--gray-100) !important;
    border: 1px solid var(--gray-300) !important;
    color: var(--gray-600) !important;
    transition: all 0.2s ease;
}

.table .btn-group .btn:hover,
.table .btn-sm:hover {
    background: var(--gray-200) !important;
    color: var(--gray-800) !important;
}

.table .btn-outline-primary:hover,
.table .btn-group .btn-outline-primary:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--text-white) !important;
}

.table .btn-outline-info:hover,
.table .btn-group .btn-outline-info:hover {
    background: var(--info) !important;
    border-color: var(--info) !important;
    color: var(--text-white) !important;
}

.table .btn-outline-danger:hover,
.table .btn-group .btn-outline-danger:hover {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--text-white) !important;
}

.table .btn-outline-success:hover,
.table .btn-group .btn-outline-success:hover {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: var(--text-white) !important;
}

.table .btn-outline-warning:hover,
.table .btn-group .btn-outline-warning:hover {
    background: var(--warning) !important;
    border-color: var(--warning) !important;
    color: var(--text-white) !important;
}

/* Quick Action Buttons */
.btn.py-3 {
    flex-direction: column;
    padding: 1.5rem 1rem !important;
    min-height: 120px;
}

.btn.py-3 i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   FORMS - Clean Design
   ============================================ */
.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: all var(--transition);
    background-color: var(--bg-card);
}

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

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

.input-group-text {
    background: var(--gray-100);
    border: 1.5px solid var(--border-color);
    border-right: none;
    color: var(--text-secondary);
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: none;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary);
}

/* ============================================
   BADGES - Modern Pills
   ============================================ */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    letter-spacing: 0.25px;
}

.badge.bg-success,
.bg-success {
    background: var(--success) !important;
}

.badge.bg-danger,
.bg-danger {
    background: var(--danger) !important;
}

.badge.bg-warning {
    background: var(--warning) !important;
    color: var(--text-white);
}

.badge.bg-info {
    background: var(--info) !important;
}

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

/* ============================================
   ALERTS - Clean Style
   ============================================ */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.alert i {
    font-size: 1.125rem;
    margin-top: 0.125rem;
}

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

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

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

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

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress {
    height: 22px;
    background: var(--gray-200);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--border-radius);
    transition: width var(--transition-slow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    padding: 0 8px;
}

.progress-bar.bg-indigo {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
}

.progress-bar.bg-danger {
    background: linear-gradient(90deg, var(--danger) 0%, #f87171 100%);
}

.progress-bar.bg-warning {
    background: linear-gradient(90deg, var(--warning) 0%, #fbbf24 100%);
    color: var(--text-primary);
    text-shadow: none;
}

/* ============================================
   MODALS - Modern Design
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

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

.modal-header.bg-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%) !important;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-header.bg-danger * {
    color: var(--text-white) !important;
}

.modal-title {
    font-weight: 600;
    font-size: 1.125rem;
}

.modal-body {
    padding: 1.5rem;
}

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

/* ============================================
   TOASTS - Notification Style
   ============================================ */
.toast {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: none;
}

.toast.bg-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
}

.toast.bg-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%) !important;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition);
}

.page-link:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--primary);
}

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

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem;
}

.login-container .card {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--border-radius-xl);
}

.login-container .card-body {
    padding: 2.5rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition);
}

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

/* ============================================
   UTILITIES
   ============================================ */
.text-indigo {
    color: var(--primary) !important;
}

.bg-indigo {
    background: var(--primary) !important;
}

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

.shadow {
    box-shadow: var(--shadow) !important;
}

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

/* ============================================
   RESPONSIVE - Mobile First
   ============================================ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show,
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
    }
    
    #overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(4px);
    }
    
    #overlay.show {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .container-fluid.p-4 {
        padding: 1rem !important;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .dashboard-stat {
        padding: 1.25rem;
    }
    
    .dashboard-stat h3 {
        font-size: 1.75rem;
    }
    
    .btn.py-3 {
        min-height: 100px;
        padding: 1rem !important;
    }
    
    .btn.py-3 i {
        font-size: 1.5rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }
}

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

.card {
    animation: fadeIn 0.3s ease-out;
}

/* Loading Spinner */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 2px;
}

/* ============================================
   DARK MODE SUPPORT (Future)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ============================================
   STAT CARDS ALTERNATIVE
   ============================================ */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.stat-card .stat-icon.primary {
    background: var(--primary-50);
    color: var(--primary);
}

.stat-card .stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-card .stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card .stat-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    background: var(--primary-50);
    color: var(--primary);
}

.avatar.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
}

/* ============================================
   STATUS INDICATORS
   ============================================ */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--border-radius-full);
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--gray-400); }
.status-dot.busy { background: var(--danger); }
.status-dot.away { background: var(--warning); }

/* ============================================
   DROPDOWN IMPROVEMENTS
   ============================================ */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

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

.dropdown-item i {
    width: 20px;
    margin-right: 0.5rem;
    color: var(--text-muted);
}

/* ============================================
   TOOLTIP IMPROVEMENTS
   ============================================ */
.tooltip {
    font-size: 0.8125rem;
}

.tooltip-inner {
    background: var(--gray-900);
    border-radius: var(--border-radius-sm);
    padding: 0.375rem 0.75rem;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item {
    font-size: 0.875rem;
}

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

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

/* ============================================
   SEARCH BOX
   ============================================ */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ============================================
   LOADING STATES
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   NOTIFICATION DOT
   ============================================ */
.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: var(--border-radius-full);
    border: 2px solid var(--bg-card);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--border-radius-full);
}

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

/* ============================================
   FOCUS VISIBLE
   ============================================ */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
    }
}
