/**
 * Homeopathic Assistant - Modern UI Stylesheet
 * Super Responsive, Mobile-First Design
 * Clean, Professional & User-Friendly
 */

/* ============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
    /* Primary Colors */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;
    
    /* Secondary Colors */
    --secondary-500: #8b5cf6;
    --secondary-600: #7c3aed;
    
    /* Semantic Colors */
    --success-50: #f0fdf4;
    --success-100: #dcfce7;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;
    
    --danger-50: #fef2f2;
    --danger-100: #fee2e2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-700: #b91c1c;
    
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    --info-50: #eff6ff;
    --info-100: #dbeafe;
    --info-500: #3b82f6;
    --info-600: #2563eb;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* White & Shadows */
    --white: #ffffff;
    --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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Layout */
    --sidebar-width: 250px;
    --sidebar-width-collapsed: 80px;
    --header-height: 64px;
    --border-radius-sm: 6px;
    --border-radius: 10px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-overlay: 400;
    --z-modal: 500;
    --z-toast: 600;
    
    /* Background & Text */
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --border-color: var(--gray-200);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p { margin-bottom: 1rem; }
a { color: var(--primary-600); text-decoration: none; }
a:hover { color: var(--primary-700); }

/* ============================================
   HEADER NAVIGATION
   ============================================ */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
    z-index: var(--z-fixed);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 1rem;
    max-width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1.5rem;
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--primary-600);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-600);
    white-space: nowrap;
}

.logo i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Header Search */
.header-search {
    position: relative;
    display: none;
}

.search-input {
    width: 280px;
    padding: 0.625rem 1rem;
    padding-right: 3rem;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 0.875rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary-500);
    width: 320px;
    box-shadow: var(--shadow-md);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid transparent;
}

.user-info:hover {
    background: var(--gray-100);
}

.user-info:active,
.user-info.active {
    border-color: var(--primary-200);
    background: var(--primary-50);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: none;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.user-info i.fa-chevron-down {
    display: none;
    font-size: 0.75rem;
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.user-info.active i.fa-chevron-down {
    transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: var(--z-dropdown);
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.user-dropdown a:hover {
    background: var(--gray-50);
    color: var(--primary-600);
}

.user-dropdown a i {
    width: 18px;
    text-align: center;
    color: var(--gray-500);
}

.user-dropdown a:hover i {
    color: var(--primary-600);
}

.user-dropdown hr {
    margin: 0.25rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.user-dropdown .text-danger {
    color: var(--danger-600);
}

.user-dropdown .text-danger i {
    color: var(--danger-500);
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    z-index: var(--z-sticky);
    transform: translateX(-100%);
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 0.125rem 0.75rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    font-size: 0.9375rem;
    font-weight: 500;
    position: relative;
}

.sidebar-nav a:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 600;
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 4px;
    background: var(--primary-500);
    border-radius: 0 4px 4px 0;
}

.sidebar-nav a i {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .badge {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    color: var(--white);
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.nav-section {
    padding: 1.5rem 1rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0.75rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.version {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-align: center;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
    margin-top: var(--header-height);
    margin-left: 0;
    padding: 0.75rem;
    min-height: calc(100vh - var(--header-height));
    transition: var(--transition);
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
    background: var(--bg-secondary);
}

.container-fluid {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Dashboard Container */
.dashboard-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.page-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.page-header h1 i {
    color: var(--primary-500);
    font-size: 1rem;
}

.page-header .text-muted {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Mobile: compact button */
.header-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

/* ============================================
   CARDS & PANELS
   ============================================ */
.dashboard-card,
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.dashboard-card:hover,
.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.card-header h3 i {
    color: var(--primary-500);
    font-size: 0.875rem;
}

.card-body {
    padding: 0.75rem;
}

/* ============================================
   STATISTICS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-primary::before { background: linear-gradient(90deg, var(--primary-500), var(--primary-400)); }
.stat-success::before { background: linear-gradient(90deg, var(--success-500), var(--success-600)); }
.stat-info::before { background: linear-gradient(90deg, var(--info-500), var(--info-600)); }
.stat-warning::before { background: linear-gradient(90deg, var(--warning-500), var(--warning-600)); }
.stat-danger::before { background: linear-gradient(90deg, var(--danger-500), var(--danger-600)); }

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.stat-primary .stat-icon { background: var(--primary-100); color: var(--primary-600); }
.stat-success .stat-icon { background: var(--success-100); color: var(--success-600); }
.stat-info .stat-icon { background: var(--info-100); color: var(--info-600); }
.stat-warning .stat-icon { background: var(--warning-100); color: var(--warning-600); }
.stat-danger .stat-icon { background: var(--danger-100); color: var(--danger-600); }

.stat-details {
    min-width: 0;
    flex: 1;
}

.stat-details h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: var(--text-primary);
}

.stat-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* ============================================
   TABLES
   ============================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: -0.25rem;
    padding: 0.25rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.data-table thead {
    background: var(--bg-secondary);
}

.data-table th {
    padding: 0.625rem 0.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 0.625rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    white-space: nowrap;
    min-height: 44px;
    line-height: 1;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--white);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: var(--white);
}

.btn-success {
    background: var(--success-500);
    color: var(--white);
}

.btn-success:hover {
    background: var(--success-600);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-500);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--danger-600);
    color: var(--white);
}

.btn-warning {
    background: var(--warning-500);
    color: var(--white);
}

.btn-warning:hover {
    background: var(--warning-600);
    color: var(--white);
}

.btn-info {
    background: var(--info-500);
    color: var(--white);
}

.btn-info:hover {
    background: var(--info-600);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-500);
    color: var(--primary-600);
}

.btn-outline:hover {
    background: var(--primary-500);
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    min-height: 36px;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    min-height: 52px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
}

.btn-icon.btn-sm {
    width: 36px;
    height: 36px;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.25px;
}

.badge-primary { background: var(--primary-100); color: var(--primary-700); }
.badge-success { background: var(--success-100); color: var(--success-700); }
.badge-danger { background: var(--danger-100); color: var(--danger-700); }
.badge-warning { background: var(--warning-100); color: var(--warning-600); }
.badge-info { background: var(--info-100); color: var(--info-600); }

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* Form Check / Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.form-check-input:checked {
    background: var(--primary-500);
    border-color: var(--primary-500);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-size: 0.75rem;
    background-position: center;
    background-repeat: no-repeat;
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-100);
}

.form-check-label {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
    margin: 0;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.search-box i.fa-search {
    position: absolute;
    left: 1rem;
    top: 0.875rem;
    color: var(--gray-400);
    pointer-events: none;
}

.search-box .form-control {
    padding-left: 2.75rem;
}

.search-form {
    width: 100%;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--gray-300);
}

.empty-state p {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
    margin-bottom: 1rem;
}

.quick-actions h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.action-card {
    background: var(--bg-primary);
    padding: 0.75rem 0.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
    color: var(--primary-600);
}

.action-card i {
    font-size: 1.125rem;
    color: var(--primary-500);
}

.action-card span {
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1.2;
}

/* ============================================
   FOLLOW-UP LIST
   ============================================ */
.followup-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.followup-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
}

.followup-item:hover {
    background: var(--gray-100);
}

.followup-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--white);
    border-radius: var(--border-radius);
    flex-shrink: 0;
}

.followup-date .day {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.followup-date .month {
    font-size: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.followup-details {
    flex: 1;
    min-width: 0;
}

.followup-details strong {
    display: block;
    margin-bottom: 0.125rem;
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.followup-details p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.followup-action {
    flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-left: 0;
    padding: 0.5rem;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.75rem;
}

/* Hide footer on auth pages */
body.auth-page .footer {
    display: none;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.alert i {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-success { background: var(--success-50); color: var(--success-700); border: 1px solid var(--success-100); }
.alert-danger { background: var(--danger-50); color: var(--danger-700); border: 1px solid var(--danger-100); }
.alert-warning { background: var(--warning-50); color: var(--warning-600); border: 1px solid var(--warning-100); }
.alert-info { background: var(--info-50); color: var(--info-600); border: 1px solid var(--info-100); }

.alert-dismissible {
    padding-right: 3rem;
    position: relative;
}

.alert .close {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    color: inherit;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
}

.alert .close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

/* ============================================
   AUTH PAGES (Login/Register)
   ============================================ */

/* Auth Page - Full viewport fit, no scroll */
html.auth-page-html,
body.auth-page {
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}

.auth-layout {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--gray-100) 100%);
    overflow: hidden;
    box-sizing: border-box;
    flex-direction: column;
}

/* Auth layout alerts (flash messages) */
.auth-layout > .alert {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    max-width: 90%;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

/* Homeopathy watermark background */
.auth-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Floating pills/globules */
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 20% 90%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
        /* Small dots pattern like homeo globules */
        radial-gradient(circle, rgba(99, 102, 241, 0.18) 1px, transparent 1px),
        radial-gradient(circle, rgba(139, 92, 246, 0.15) 1.5px, transparent 1.5px);
    background-size: 
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%,
        30px 30px,
        50px 50px;
    background-position:
        0 0,
        0 0,
        0 0,
        0 0,
        0 0,
        15px 15px;
    pointer-events: none;
    z-index: 0;
}

/* Decorative homeo symbols */
.auth-layout::after {
    content: '✚';
    position: absolute;
    font-size: 30rem;
    color: rgba(99, 102, 241, 0.35);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    font-weight: bold;
    text-shadow: 0 0 60px rgba(99, 102, 241, 0.15);
}

/* Floating leaf/herb decorations */
.auth-container {
    width: 100%;
    max-width: 400px;
    max-height: calc(100% - 1rem);
    display: flex;
    flex-direction: column;
    margin: auto;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Corner decorative elements */
.auth-box {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(99, 102, 241, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    position: relative;
    width: 100%;
}

/* Back button styling */
.auth-back-btn {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-back-btn .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.auth-back-btn .btn-back:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-500);
    transform: translateX(-3px);
}

.auth-back-btn .btn-back i {
    font-size: 0.75rem;
}

/* Subtle mortar & pestle watermark inside box */
.auth-box::before {
    content: '🌿';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 6rem;
    opacity: 0.1;
    transform: rotate(15deg);
    pointer-events: none;
    z-index: 0;
}

.auth-box::after {
    content: '💊';
    position: absolute;
    bottom: -15px;
    left: -15px;
    font-size: 4rem;
    opacity: 0.1;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    padding: 1rem 1rem;
    text-align: center;
    color: var(--white);
    flex-shrink: 0;
}

.auth-logo {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.375rem;
}

.auth-logo i {
    font-size: 1.25rem;
}

.auth-header h1 {
    font-size: 1.125rem;
    margin-bottom: 0.125rem;
    color: var(--white);
}

.auth-header p {
    font-size: 0.7rem;
    opacity: 0.9;
    margin: 0;
}

.auth-body {
    padding: 1rem 1rem 0.75rem;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.auth-body h2 {
    font-size: 1rem;
    margin-bottom: 0.125rem;
    text-align: center;
}

.auth-body > p {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.875rem;
}

.auth-form .form-group {
    margin-bottom: 0.75rem;
}

.auth-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.auth-form .form-group label i {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.auth-form .form-control {
    padding: 0.5rem 0.625rem;
    font-size: 0.85rem;
}

.auth-form .form-check {
    margin-bottom: 0.625rem;
}

.auth-form .btn-block {
    padding: 0.5rem 0.875rem;
    font-size: 0.85rem;
}

/* Form hint text */
.form-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Verification notice box */
.verification-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-50), var(--info-50));
    border: 1px solid var(--primary-200);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.verification-notice > i {
    color: var(--primary-500);
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.verification-notice strong {
    display: block;
    color: var(--primary-700);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.verification-notice p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Select dropdown styling */
.auth-form select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

/* Password toggle eye icon */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-control {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--gray-600);
}

.password-toggle:focus {
    outline: none;
    color: var(--primary-500);
}

.password-toggle i {
    font-size: 0.95rem;
}

.auth-footer {
    text-align: center;
    padding: 0.625rem 0.75rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.auth-footer p {
    margin: 0;
}

.auth-footer a {
    font-weight: 500;
}

/* Mobile screens */
@media (max-width: 480px) {
    .auth-layout {
        padding: 0.5rem;
    }
    
    .auth-container {
        max-width: 100%;
        max-height: calc(100% - 0.5rem);
    }
    
    .auth-box {
        border-radius: var(--border-radius);
    }
    
    .auth-header {
        padding: 0.75rem;
    }
    
    .auth-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 0.25rem;
    }
    
    .auth-logo i {
        font-size: 1.125rem;
    }
    
    .auth-header h1 {
        font-size: 1rem;
    }
    
    .auth-header p {
        font-size: 0.65rem;
    }
    
    .auth-body {
        padding: 0.75rem;
    }
    
    .auth-body h2 {
        font-size: 0.9rem;
    }
    
    .auth-body > p {
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
    }
    
    .auth-form .form-group {
        margin-bottom: 0.625rem;
    }
    
    .auth-form .form-group label {
        font-size: 0.75rem;
    }
    
    .auth-form .form-control {
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .auth-form .form-check {
        margin-bottom: 0.5rem;
    }
    
    .auth-form .btn-block {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .auth-footer {
        padding: 0.5rem;
        font-size: 0.7rem;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-height: 600px) {
    .auth-layout {
        padding: 0.375rem;
    }
    
    .auth-container {
        max-height: calc(100% - 0.5rem);
    }
    
    .auth-header {
        padding: 0.5rem;
    }
    
    .auth-logo {
        width: 35px;
        height: 35px;
        margin-bottom: 0.25rem;
    }
    
    .auth-logo i {
        font-size: 1rem;
    }
    
    .auth-header h1 {
        font-size: 0.9rem;
    }
    
    .auth-header p {
        font-size: 0.6rem;
    }
    
    .auth-body {
        padding: 0.625rem 0.75rem;
    }
    
    .auth-body h2 {
        font-size: 0.85rem;
        margin-bottom: 0;
    }
    
    .auth-body > p {
        font-size: 0.65rem;
        margin-bottom: 0.5rem;
    }
    
    .auth-form .form-group {
        margin-bottom: 0.5rem;
    }
    
    .auth-form .form-group label {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
    }
    
    .auth-form .form-control {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .auth-form .form-check {
        margin-bottom: 0.4rem;
    }
    
    .auth-form .btn-block {
        padding: 0.4rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .auth-footer {
        padding: 0.4rem 0.5rem;
        font-size: 0.65rem;
    }
}

/* Very small height screens (landscape phones) */
@media (max-height: 480px) {
    .auth-layout {
        padding: 0.25rem;
    }
    
    .auth-container {
        max-height: calc(100% - 0.25rem);
    }
    
    .auth-box {
        border-radius: 8px;
    }
    
    .auth-header {
        padding: 0.375rem 0.5rem;
    }
    
    .auth-logo {
        width: 28px;
        height: 28px;
        margin-bottom: 0.125rem;
    }
    
    .auth-logo i {
        font-size: 0.875rem;
    }
    
    .auth-header h1 {
        font-size: 0.8rem;
    }
    
    .auth-header p {
        display: none;
    }
    
    .auth-body {
        padding: 0.5rem 0.625rem;
    }
    
    .auth-body h2 {
        font-size: 0.8rem;
    }
    
    .auth-body > p {
        display: none;
    }
    
    .auth-form .form-group {
        margin-bottom: 0.375rem;
    }
    
    .auth-form .form-group label {
        font-size: 0.65rem;
        margin-bottom: 0.125rem;
    }
    
    .auth-form .form-control {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .auth-form .form-check {
        margin-bottom: 0.3rem;
    }
    
    .auth-form .form-check-label {
        font-size: 0.65rem;
    }
    
    .auth-form .btn-block {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .auth-footer {
        padding: 0.3rem 0.4rem;
        font-size: 0.6rem;
    }
}

/* Wider screens - slightly larger auth box */
@media (min-width: 576px) and (min-height: 700px) {
    .auth-container {
        max-width: 420px;
    }
    
    .auth-header {
        padding: 1.25rem 1rem;
    }
    
    .auth-logo {
        width: 55px;
        height: 55px;
        margin-bottom: 0.5rem;
    }
    
    .auth-logo i {
        font-size: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.25rem;
    }
    
    .auth-header p {
        font-size: 0.75rem;
    }
    
    .auth-body {
        padding: 1.25rem;
    }
    
    .auth-body h2 {
        font-size: 1.125rem;
    }
    
    .auth-body > p {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .auth-form .form-group {
        margin-bottom: 0.875rem;
    }
    
    .auth-form .form-control {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .auth-form .btn-block {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    .auth-footer {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-sticky) - 1);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   PATIENT LIST STYLES
   ============================================ */
.patients-container {
    width: 100%;
}

.patient-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.patient-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.patient-details {
    flex: 1;
    min-width: 0;
}

.patient-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.patient-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.patient-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* === Responsive Enhancements for Patients List === */
@media (max-width: 991.98px) {
  .patients-container {
    padding: 0.5rem;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .header-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.25rem;
  }
  .dashboard-card {
    padding: 0.5rem 0.25rem;
    border-radius: 8px;
  }
  .search-form .search-box {
    flex-direction: column;
    gap: 0.5rem;
  }
  .search-form .form-control {
    width: 100%;
    min-width: 0;
    font-size: 0.95em;
  }
  .search-form .btn {
    width: 100%;
    margin-top: 0.25rem;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding: 0.25rem 0.5rem;
  }
  .data-table {
    min-width: 600px;
    font-size: 0.85em;
  }
  .data-table th, .data-table td {
    padding: 0.5rem 0.25rem;
  }
  .action-buttons {
    flex-direction: row;
    gap: 0.25rem;
  }
  .pagination-container {
    margin-top: 1rem;
  }
  .pagination li a, .pagination li span {
    min-width: 32px;
    height: 32px;
    font-size: 0.85em;
    padding: 0.25rem 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .patients-container {
    padding: 0.25rem;
  }
  .dashboard-card {
    padding: 0.25rem 0.1rem;
    border-radius: 6px;
  }
  .page-header h1 {
    font-size: 1.1rem;
  }
  .data-table {
    font-size: 0.8em;
  }
  .data-table th, .data-table td {
    padding: 0.35rem 0.15rem;
  }
  .action-buttons {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.15rem !important;
    justify-content: flex-start;
    align-items: center;
  }
  .action-buttons .btn {
    min-width: 32px;
    min-height: 32px;
    font-size: 0.9em;
    padding: 0.25rem 0.5rem;
  }
  .pagination li a, .pagination li span {
    min-width: 28px;
    height: 28px;
    font-size: 0.8em;
    padding: 0.15rem 0.3rem;
  }
}

@media (max-width: 767.98px) {
  .data-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-secondary, #f9fafb);
    z-index: 2;
  }
}

@media (max-width: 480px) {
  .action-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.15rem;
  }
}

/* ============================================
   RESPONSIVE - VERY SMALL PHONES (max 359px)
   ============================================ */
@media (max-width: 359px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .page-header h1 {
        font-size: 1rem;
    }
    
    .page-header .text-muted {
        font-size: 0.7rem;
    }
    
    .stats-grid {
        gap: 0.375rem;
    }
    
    .stat-card {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 30px;
        height: 30px;
        font-size: 0.875rem;
    }
    
    .stat-details h3 {
        font-size: 1rem;
    }
    
    .stat-details p {
        font-size: 0.625rem;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.375rem;
    }
    
    .action-card {
        padding: 0.625rem 0.375rem;
    }
    
    .action-card i {
        font-size: 1rem;
    }
    
    .action-card span {
        font-size: 0.6rem;
    }
    
    .card-header {
        padding: 0.5rem 0.625rem;
    }
    
    .card-header h3 {
        font-size: 0.75rem;
    }
    
    .card-body {
        padding: 0.5rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.375rem;
        font-size: 0.65rem;
    }
    
    .followup-date {
        width: 35px;
        height: 35px;
    }
    
    .followup-date .day {
        font-size: 0.875rem;
    }
    
    .followup-date .month {
        font-size: 0.4375rem;
    }
    
    .followup-details strong {
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        min-height: 38px;
    }
    
    .btn-sm {
        padding: 0.375rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* ============================================
   RESPONSIVE - SMALL TABLETS (576px+)
   ============================================ */
@media (min-width: 576px) {
    .main-content {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .page-header h1 {
        font-size: 1.375rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.125rem;
    }
    
    .stat-details h3 {
        font-size: 1.375rem;
    }
    
    .stat-details p {
        font-size: 0.75rem;
    }
    
    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }
    
    .action-card {
        padding: 1rem 0.625rem;
        gap: 0.5rem;
    }
    
    .action-card i {
        font-size: 1.25rem;
    }
    
    .action-card span {
        font-size: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .search-box {
        flex-direction: row;
        align-items: center;
    }
    
    .search-box .form-control {
        flex: 1;
    }
    
    .form-row {
        flex-direction: row;
    }
    
    .auth-body {
        padding: 2.5rem;
    }
    
    .patient-card {
        flex-direction: row;
        align-items: center;
    }
    
    .patient-info {
        flex: 1;
    }
    
    .logo span {
        display: inline;
    }
}

/* ============================================
   RESPONSIVE - TABLETS (768px+)
   ============================================ */
@media (min-width: 768px) {
    .header-search {
        display: block;
    }
    
    .user-details {
        display: flex;
    }
    
    .user-info i.fa-chevron-down {
        display: block;
    }
    
    .sidebar {
        transform: translateX(0);
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        padding: 1rem;
        width: calc(100% - var(--sidebar-width));
    }
    
    .footer {
        margin-left: var(--sidebar-width);
        padding: 0.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header h1 i {
        font-size: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.875rem;
    }
    
    .stat-card {
        padding: 1.125rem;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .stat-details h3 {
        font-size: 1.5rem;
    }
    
    .stat-details p {
        font-size: 0.8rem;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .dashboard-card,
    .card {
        margin-bottom: 0;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
    }
    
    .card-header h3 {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .actions-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.875rem;
    }
    
    .action-card {
        padding: 1.25rem 0.75rem;
        gap: 0.5rem;
    }
    
    .action-card i {
        font-size: 1.5rem;
    }
    
    .action-card span {
        font-size: 0.8125rem;
    }
    
    .card-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .followup-date {
        width: 48px;
        height: 48px;
    }
    
    .followup-date .day {
        font-size: 1.125rem;
    }
    
    .followup-date .month {
        font-size: 0.5625rem;
    }
    
    .followup-details strong {
        font-size: 0.9rem;
    }
    
    .data-table {
        font-size: 0.8125rem;
    }
    
    .data-table th {
        padding: 0.75rem;
        font-size: 0.7rem;
    }
    
    .data-table td {
        padding: 0.875rem 0.75rem;
    }
    
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
    
    .hide-mobile {
        display: block;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .sidebar-toggle {
        display: none;
    }
}

/* ============================================
   RESPONSIVE - DESKTOPS (992px+)
   ============================================ */
@media (min-width: 992px) {
    .main-content {
        padding: 1.5rem;
    }
    
    .stats-grid {
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-icon {
        width: 52px;
        height: 52px;
        font-size: 1.375rem;
    }
    
    .stat-details h3 {
        font-size: 1.625rem;
    }
    
    .actions-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1rem;
    }
    
    .action-card {
        padding: 1.375rem 1rem;
    }
    
    .action-card i {
        font-size: 1.625rem;
    }
    
    .action-card span {
        font-size: 0.875rem;
    }
    
    .dashboard-grid {
        gap: 1.25rem;
    }
}

/* ============================================
   RESPONSIVE - LARGE DESKTOPS (1200px+)
   ============================================ */
@media (min-width: 1200px) {
    .main-content {
        padding: 1.5rem 2rem;
    }
}

/* ============================================
   RESPONSIVE - EXTRA LARGE (1400px+)
   ============================================ */
@media (min-width: 1400px) {
    .stats-grid {
        gap: 1.25rem;
    }
    
    .stat-card {
        padding: 1.75rem;
    }
    
    .stat-details h3 {
        font-size: 2rem;
    }
}

/* ============================================
   TOUCH DEVICE IMPROVEMENTS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .sidebar-nav a,
    .action-card,
    button {
        min-height: 44px;
    }
    
    .btn:hover,
    .stat-card:hover,
    .action-card:hover,
    .dashboard-card:hover {
        transform: none;
    }
    
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table td {
        padding: 0.625rem 0.5rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .main-header,
    .footer,
    .btn,
    .header-actions,
    .quick-actions,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        margin-top: 0;
        padding: 0;
    }
    
    .dashboard-card,
    .stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
        font-size: 12pt;
    }
}

/* ============================================
   LANDSCAPE ON MOBILE
   ============================================ */
@media (max-width: 767px) and (orientation: landscape) {
    :root {
        --header-height: 56px;
    }
    
    .sidebar {
        width: 260px;
    }
    
    .auth-layout {
        padding: 1rem;
    }
    
    .auth-header {
        padding: 1.5rem;
    }
}

/* ============================================
   SAFE AREA INSETS (iPhone X+)
   ============================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .main-content {
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
    }
    
    .footer {
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
    }
    
    .sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ============================================
   LOADING & ANIMATIONS
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.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 ease-in-out infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   MODAL STYLES
   ============================================ */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: calc(100% - 2rem);
    max-width: 500px;
    max-height: calc(100vh - 2rem);
    background: var(--bg-primary);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: calc(var(--z-modal) + 1);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) var(--gray-100);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   MATERIA MEDICA STYLES
   ============================================ */
.remedy-reference {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--gray-600);
    font-size: 0.8rem;
    border-top: 1px dashed var(--gray-200);
    margin-top: 0.5rem;
}

.remedy-reference i {
    color: var(--primary-500);
    margin-top: 2px;
}

.remedy-reference small {
    line-height: 1.4;
}

.book-reference {
    background: linear-gradient(135deg, var(--primary-50), var(--info-50));
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-500);
    font-style: italic;
    color: var(--gray-700);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item label i {
    color: var(--primary-500);
}

.info-value {
    font-size: 1rem;
    color: var(--gray-800);
}

.remedy-name-large {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-700);
}

.latin-name {
    color: var(--gray-600);
}

.badge-lg {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.remedy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.remedy-card {
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    padding: 1.25rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.remedy-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.remedy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.remedy-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.remedy-header h3 a {
    color: var(--primary-700);
    text-decoration: none;
}

.remedy-header h3 a:hover {
    color: var(--primary-500);
    text-decoration: underline;
}

.remedy-common {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.remedy-keynote {
    font-size: 0.875rem;
    color: var(--gray-700);
    flex-grow: 1;
    margin: 0.75rem 0;
}

.remedy-keynote strong {
    color: var(--gray-800);
    display: block;
    margin-bottom: 0.25rem;
}

.remedy-keynote p {
    margin: 0;
    line-height: 1.5;
}

.remedy-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.keynote-content,
.clinical-content {
    line-height: 1.7;
    color: var(--gray-700);
}

@media (max-width: 576px) {
    .remedy-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   REPERTORY PROGRESS BAR & COVERAGE STYLES
   ============================================ */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
    border-radius: 4px;
    transition: width var(--transition);
    min-width: 2px;
}

/* Grade dots for repertorization */
.grade-breakdown {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.grade-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
}

.grade-dot.grade-1 {
    background-color: var(--gray-400);
}

.grade-dot.grade-2 {
    background-color: var(--warning-500);
}

.grade-dot.grade-3 {
    background-color: var(--success-500);
}

/* Score badges */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.score-badge.score-high {
    background-color: var(--success-100);
    color: var(--success-700);
}

.score-badge.score-medium {
    background-color: var(--warning-100);
    color: var(--warning-600);
}

.score-badge.score-low {
    background-color: var(--gray-100);
    color: var(--gray-600);
}

/* Repertorization table */
.repertorization-table {
    width: 100%;
    border-collapse: collapse;
}

.repertorization-table th,
.repertorization-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.repertorization-table th {
    background-color: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.repertorization-table tbody tr:hover {
    background-color: var(--gray-50);
}

.repertorization-table-wrapper {
    overflow-x: auto;
}

/* Selected rubrics chips */
.selected-rubrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rubric-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: 20px;
    font-size: 14px;
}

.rubric-chip .rubric-category {
    font-weight: 600;
    color: var(--primary-700);
}

.rubric-chip .rubric-text {
    color: var(--gray-700);
}

.rubric-chip .remove-rubric {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background-color: var(--primary-200);
    color: var(--primary-700);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.rubric-chip .remove-rubric:hover {
    background-color: var(--danger-500);
    color: var(--white);
}

/* ============================================
   BEAUTIFUL PAGINATION STYLES
   ============================================ */
.pagination-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 16px 0;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-item {
    list-style: none;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.page-link:hover {
    color: var(--primary-600);
    background: var(--primary-50);
    border-color: var(--primary-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.page-item.active .page-link {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: scale(1.05);
}

.page-item.disabled .page-link {
    color: var(--gray-400);
    background: var(--gray-100);
    border-color: var(--gray-200);
    cursor: not-allowed;
    pointer-events: none;
}

.page-ellipsis {
    border: none !important;
    background: transparent !important;
    cursor: default !important;
    color: var(--gray-500) !important;
}

.pagination-info {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Mobile pagination */
@media (max-width: 576px) {
    .pagination-nav {
        padding: 12px 0;
    }
    
    .pagination {
        gap: 4px;
    }
    
    .page-link {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    /* Hide some page numbers on mobile */
    .page-item:not(.active):not(:first-child):not(:last-child):not(:nth-child(2)):not(:nth-last-child(2)) {
        display: none;
    }
}

/* ============================================
   BEAUTIFUL LOADERS
   ============================================ */
/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.loader-spinner::before,
.loader-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.loader-spinner::before {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    animation-delay: 0s;
}

.loader-spinner::after {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    background: linear-gradient(135deg, var(--secondary-500), var(--primary-400));
    animation-delay: 0.3s;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.loader-text {
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Button Loader */
.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loader .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Card/Content Loader */
.content-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--gray-50), var(--white));
    border-radius: var(--border-radius-lg);
}

.content-loader .loader-icon {
    width: 50px;
    height: 50px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.content-loader .loader-message {
    margin-top: 16px;
    font-size: 14px;
    color: var(--gray-600);
    text-align: center;
}

/* Skeleton Loader */
.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 ease-in-out infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }
.skeleton-text.full { width: 100%; }

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    width: 100%;
}

/* AI Brain Loader */
.ai-brain-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.ai-brain-loader .brain-icon {
    font-size: 4rem;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: brain-pulse 2s ease-in-out infinite;
}

@keyframes brain-pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1);
        filter: brightness(1.2);
    }
}

.ai-brain-loader .loader-title {
    margin-top: 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
}

.ai-brain-loader .loader-subtitle {
    margin-top: 8px;
    font-size: 14px;
    color: var(--gray-500);
}

.ai-brain-loader .progress-bar {
    margin-top: 20px;
    width: 200px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
}

.ai-brain-loader .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--secondary-500));
    animation: progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes progress-indeterminate {
    0% { transform: translateX(-100%); width: 30%; }
    50% { transform: translateX(100%); width: 60%; }
    100% { transform: translateX(300%); width: 30%; }
}

/* Dot Loader */
.dot-loader {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.dot-loader .dot {
    width: 10px;
    height: 10px;
    background: var(--primary-500);
    border-radius: 50%;
    animation: dot-bounce 1.4s ease-in-out infinite both;
}

.dot-loader .dot:nth-child(1) { animation-delay: -0.32s; }
.dot-loader .dot:nth-child(2) { animation-delay: -0.16s; }
.dot-loader .dot:nth-child(3) { animation-delay: 0s; }

@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Upload Progress Loader */
.upload-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-50), var(--white));
    border-radius: var(--border-radius-lg);
    border: 2px dashed var(--primary-300);
}

.upload-loader .upload-icon {
    font-size: 3rem;
    color: var(--primary-500);
    animation: upload-bounce 1s ease-in-out infinite;
}

@keyframes upload-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.upload-loader .upload-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-700);
}

.upload-loader .upload-progress {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.upload-loader .upload-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--secondary-500));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */

/* Landing Page Base */
html.landing-page-html,
body.landing-page {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--white);
}

/* Landing Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: transparent;
}

.landing-nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-600);
    text-decoration: none;
}

.nav-logo i {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--gray-700);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-600);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    padding: 0.75rem 0;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--gray-100);
}

.mobile-menu hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 0.5rem 0;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 1.5rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--white) 50%, var(--secondary-500) 200%);
    opacity: 0.5;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.float-element {
    position: absolute;
    font-size: 3rem;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
}

.elem-1 { top: 10%; left: 5%; animation-delay: 0s; }
.elem-2 { top: 20%; right: 10%; animation-delay: 1s; }
.elem-3 { top: 60%; left: 8%; animation-delay: 2s; }
.elem-4 { top: 70%; right: 5%; animation-delay: 3s; }
.elem-5 { top: 40%; right: 15%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-100), var(--secondary-500));
    background-size: 200% 200%;
    color: var(--primary-700);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: shimmer 3s ease infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content > p {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-500);
    color: var(--primary-600);
}

.btn-outline:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item strong {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-600);
}

.stat-item span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.hero-image {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.dashboard-preview {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl), 0 30px 60px rgba(99, 102, 241, 0.15);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.dashboard-preview:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.preview-dots {
    display: flex;
    gap: 6px;
}

.preview-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-300);
}

.preview-dots span:first-child { background: #ff5f57; }
.preview-dots span:nth-child(2) { background: #febc2e; }
.preview-dots span:last-child { background: #28c840; }

.preview-title {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.preview-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s ease;
}

.preview-card:hover {
    background: var(--primary-50);
    transform: translateY(-2px);
}

.preview-card i {
    font-size: 1.5rem;
    color: var(--primary-500);
}

.preview-card span {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.preview-card strong {
    font-size: 1.25rem;
    color: var(--gray-900);
}

/* Section Styles */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--primary-100);
    color: var(--primary-700);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: var(--gray-50);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    position: relative;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-card.featured {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    color: var(--white);
}

.feature-card.featured h3,
.feature-card.featured p {
    color: var(--white);
}

.feature-card.featured .feature-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    background: var(--primary-100);
    color: var(--primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

.feature-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.3);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* About Section */
.about-section {
    padding: 6rem 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text .section-badge {
    margin-bottom: 1rem;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.about-text > p {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.about-feature.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.about-feature i {
    color: var(--success-500);
    font-size: 1.25rem;
}

.about-feature span {
    font-weight: 500;
    color: var(--gray-700);
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-card {
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    padding: 3rem;
    border-radius: var(--border-radius-xl);
    color: var(--white);
    text-align: center;
    max-width: 350px;
    box-shadow: var(--shadow-xl), 0 20px 40px rgba(99, 102, 241, 0.3);
}

.about-card .card-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.about-card .card-icon i {
    font-size: 2rem;
}

.about-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.about-card p {
    opacity: 0.9;
    line-height: 1.6;
    margin: 0;
}

/* How It Works Section */
.how-it-works-section {
    padding: 6rem 0;
    background: var(--gray-50);
}

.steps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.step-card {
    flex: 1;
    max-width: 300px;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.step-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.step-card p {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin: 0;
}

.step-connector {
    color: var(--gray-300);
    font-size: 1.5rem;
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
    background: var(--white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info .section-badge {
    margin-bottom: 1rem;
}

.contact-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.contact-info > p {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.contact-item.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: var(--primary-100);
    color: var(--primary-600);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-item div strong {
    display: block;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.contact-item div span {
    color: var(--gray-600);
    font-size: 0.875rem;
    word-break: break-word;
    line-height: 1.4;
}

.contact-item div {
    flex: 1;
    min-width: 0;
}

.contact-form-wrapper {
    position: relative;
}

.contact-form-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
}

.contact-form-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.contact-form-card h3 i {
    color: var(--primary-500);
}

.contact-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-form .form-group {
    margin-bottom: 1.25rem;
}

.contact-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.contact-form .form-group label i {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.contact-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-white {
    background: var(--white);
    color: var(--primary-600);
}

.btn-white:hover {
    background: var(--gray-100);
}

.btn-outline-white {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Landing Footer */
.landing-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 4rem 0 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--gray-800);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--primary-400);
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--gray-800);
    color: var(--gray-400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-600);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    margin: 0;
}

/* Landing Page Responsive */

/* Extra Large Screens (1400px+) */
@media (min-width: 1400px) {
    .nav-container,
    .section-container,
    .footer-container {
        max-width: 1320px;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .dashboard-preview {
        max-width: 550px;
    }
}

/* Large Screens (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .hero-section {
        padding: 8rem 2rem 4rem;
    }
}

/* Tablets Landscape & Small Desktops (1024px - 1199px) */
@media (max-width: 1199px) {
    .hero-section {
        padding: 7rem 1.5rem 3rem;
    }
    
    .hero-content h1 {
        font-size: 2.75rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2.25rem;
    }
}

/* Tablets Portrait (768px - 1023px) */
@media (max-width: 1024px) {
    .hero-section {
        flex-direction: column;
        padding-top: 6rem;
        min-height: auto;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-image {
        padding: 0;
        margin-top: 2rem;
    }
    
    .dashboard-preview {
        transform: none;
        max-width: 400px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-text {
        text-align: center;
    }
    
    .about-text .btn {
        margin: 0 auto;
    }
    
    .about-features {
        max-width: 500px;
        margin: 0 auto 2rem;
    }
    
    .steps-grid {
        flex-direction: column;
        gap: 2rem;
    }
    
    .step-connector {
        transform: rotate(90deg);
    }
    
    .step-card {
        max-width: 400px;
        width: 100%;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-details {
        align-items: center;
    }
    
    .contact-item {
        max-width: 350px;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-brand {
        max-width: 100%;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Mobile Landscape & Small Tablets (576px - 767px) */
@media (max-width: 768px) {
    /* Navigation */
    .landing-nav {
        padding: 0.75rem 0;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-logo span {
        font-size: 1.25rem;
    }
    
    .nav-links,
    .nav-actions {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 8px;
        transition: background 0.3s ease;
    }
    
    .mobile-menu-btn:hover {
        background: rgba(99, 102, 241, 0.1);
    }
    
    /* Hero */
    .hero-section {
        padding: 5rem 1rem 2rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .hero-content h1 {
        font-size: 1.875rem;
        line-height: 1.2;
    }
    
    .hero-content > p {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        padding-top: 1.5rem;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .stat-item strong {
        font-size: 1.5rem;
    }
    
    .dashboard-preview {
        max-width: 340px;
    }
    
    .preview-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .preview-card {
        padding: 1rem;
    }
    
    .preview-card i {
        font-size: 1.25rem;
    }
    
    .preview-card strong {
        font-size: 1rem;
    }
    
    /* Sections */
    .section-header h2,
    .about-text h2,
    .contact-info h2,
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .section-header p,
    .about-text > p,
    .contact-info > p {
        font-size: 1rem;
    }
    
    .features-section,
    .about-section,
    .how-it-works-section,
    .contact-section,
    .cta-section {
        padding: 4rem 0;
    }
    
    .section-container {
        padding: 0 1rem;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .feature-card h3 {
        font-size: 1.125rem;
    }
    
    /* About */
    .about-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .about-feature {
        padding: 0.625rem 0.875rem;
    }
    
    .about-card {
        padding: 2rem;
    }
    
    .about-card .card-icon {
        width: 60px;
        height: 60px;
    }
    
    .about-card .card-icon i {
        font-size: 1.5rem;
    }
    
    .about-card h4 {
        font-size: 1.25rem;
    }
    
    /* Steps */
    .step-card {
        padding: 1.5rem;
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    /* Contact */
    .contact-form .form-row-2 {
        grid-template-columns: 1fr;
    }
    
    .contact-form-card {
        padding: 1.5rem;
    }
    
    .contact-form-card h3 {
        font-size: 1.125rem;
    }
    
    .contact-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .contact-item i {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .contact-item div {
        flex: 1;
        min-width: 0;
    }
    
    .contact-item div strong {
        font-size: 0.875rem;
    }
    
    .contact-item div span {
        font-size: 0.8125rem;
        display: block;
        word-break: break-word;
    }
    
    .contact-details {
        gap: 1rem;
    }
    
    /* CTA */
    .cta-content p {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-column h4 {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
    }
    
    .landing-footer {
        padding: 3rem 0 0;
    }
    
    .footer-main {
        padding-bottom: 2rem;
    }
}

/* Mobile Portrait (max-width: 575px) */
@media (max-width: 575px) {
    .hero-content h1 {
        font-size: 1.625rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .preview-content {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Extra Small Screens (max-width: 375px) */
@media (max-width: 375px) {
    .nav-logo i {
        font-size: 1.5rem;
    }
    
    .nav-logo span {
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 4.5rem 0.75rem 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content > p {
        font-size: 0.9375rem;
    }
    
    .section-header h2,
    .about-text h2,
    .contact-info h2,
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .contact-form-card {
        padding: 1.25rem;
    }
    
    .contact-item {
        gap: 0.5rem;
    }
    
    .contact-item i {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    
    .contact-item div strong {
        font-size: 0.8125rem;
    }
    
    .contact-item div span {
        font-size: 0.75rem;
    }
    
    .about-card {
        padding: 1.5rem;
    }
    
    .step-card {
        padding: 1.25rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .feature-card:hover,
    .step-card:hover,
    .preview-card:hover {
        transform: none;
    }
    
    .dashboard-preview:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 48px;
    }
    
    .mobile-menu-btn {
        min-width: 48px;
        min-height: 48px;
    }
    
    .nav-links a,
    .mobile-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* High DPI / Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-gradient {
        background: linear-gradient(135deg, var(--primary-50) 0%, var(--white) 50%, var(--secondary-500) 200%);
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 5rem 1.5rem 2rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-image {
        display: none;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 2rem;
    }
}

/* Print Styles */
@media print {
    .landing-nav,
    .mobile-menu,
    .hero-image,
    .cta-section,
    .floating-elements {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .features-section,
    .about-section,
    .contact-section {
        padding: 2rem 0;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .float-element {
        animation: none;
    }
    
    .hero-badge {
        animation: none;
    }
}

/* ============================================
   COMPREHENSIVE LOADER STYLES
   ============================================ */

/* Page Loader - Full screen overlay */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader .loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.page-loader .loader-text {
    margin-top: 16px;
    color: var(--gray-600);
    font-size: 0.95rem;
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button Loader */
.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loader .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-outline .btn-loader .spinner {
    border-color: rgba(99, 102, 241, 0.3);
    border-top-color: var(--primary-600);
}

/* Content Loader */
.content-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.content-loader .loader-icon {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 16px;
}

.content-loader .loader-message {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Skeleton Loader */
.skeleton-container {
    padding: 15px;
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 12px;
}

.skeleton-text.full { width: 100%; }
.skeleton-text.medium { width: 75%; }
.skeleton-text.short { width: 50%; }

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* AI Brain Loader */
.ai-brain-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.ai-brain-loader .brain-icon {
    font-size: 3rem;
    color: var(--primary-500);
    animation: brain-pulse 1.5s ease-in-out infinite;
}

.ai-brain-loader .loader-title {
    margin-top: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.ai-brain-loader .loader-subtitle {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.ai-brain-loader .progress-bar {
    width: 200px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.ai-brain-loader .progress-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--primary-500), var(--secondary-500));
    border-radius: 2px;
    animation: progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes brain-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes progress-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* Dot Loader */
.dot-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
}

.dot-loader .dot {
    width: 10px;
    height: 10px;
    background: var(--primary-500);
    border-radius: 50%;
    animation: dot-bounce 1.4s ease-in-out infinite both;
}

.dot-loader .dot:nth-child(1) { animation-delay: -0.32s; }
.dot-loader .dot:nth-child(2) { animation-delay: -0.16s; }
.dot-loader .dot:nth-child(3) { animation-delay: 0; }

@keyframes dot-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Table Loading Row */
.table-loading-row td {
    text-align: center;
    padding: 40px 20px;
}

.table-loading-row .loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Inline Loader (for buttons/links) */
.inline-loader {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.inline-loader::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Card Loading State */
.card-loading {
    position: relative;
    pointer-events: none;
}

.card-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

.card-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    z-index: 11;
}

/* Toast/Notification Loader */
.toast-loader {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--gray-800);
    color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    animation: slideUp 0.3s ease;
}

.toast-loader .toast-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Overlay Loader */
.overlay-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: inherit;
}

.overlay-loader .loader-ring {
    width: 45px;
    height: 45px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.overlay-loader .loader-text {
    margin-top: 12px;
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Pulse Loader */
.pulse-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pulse-loader .pulse {
    width: 12px;
    height: 12px;
    background: var(--primary-500);
    border-radius: 50%;
    animation: pulse-scale 1s ease-in-out infinite;
}

.pulse-loader .pulse:nth-child(2) { animation-delay: 0.2s; }
.pulse-loader .pulse:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse-scale {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Form Submitting State */
form.submitting {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

form.submitting::after {
    content: 'Processing...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    color: var(--gray-700);
    z-index: 100;
}

/* Search Loading */
.search-loading {
    position: relative;
}

.search-loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Disabled state for buttons during loading */
button:disabled,
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mobile optimizations for loaders */
@media (max-width: 576px) {
    .page-loader .loader-spinner {
        width: 40px;
        height: 40px;
    }
    
    .ai-brain-loader .brain-icon {
        font-size: 2.5rem;
    }
    
    .ai-brain-loader .progress-bar {
        width: 160px;
    }
    
    .toast-loader {
        left: 20px;
        right: 20px;
        bottom: 10px;
    }
}

