/* CRM Template - Bootstrap 5.3 Custom Styles */
/* Fonts loaded in head.php */

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
    --bs-body-font-size: 0.9375rem;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f0f0;
    font-size: 0.9375rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    body {
        font-size: 0.9375rem;
    }
}

/* Disable all animations and transitions */
*, *::before, *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

/* Sidebar */
.app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: #0f172a;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.app-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.app-sidebar.collapsed .sidebar-logo-text,
.app-sidebar.collapsed .sidebar-section-title,
.app-sidebar.collapsed .sidebar-menu-link span,
.app-sidebar.collapsed .sidebar-menu-arrow,
.app-sidebar.collapsed .sidebar-submenu,
.app-sidebar.collapsed .sidebar-footer span,
.app-sidebar.collapsed .theme-switcher-label,
.app-sidebar.collapsed .sidebar-help-btn span {
    display: none;
}

/* Sidebar toggle icon rotation when collapsed */
.app-sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.app-sidebar.collapsed .sidebar-header {
    padding: 1rem 0.75rem;
    justify-content: center;
}

.app-sidebar.collapsed .sidebar-logo {
    justify-content: center;
}

.app-sidebar.collapsed .sidebar-toggle {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

.app-sidebar.collapsed .sidebar-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.sidebar-header {
    padding: 1rem 1rem 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo-text {
    color: #fff;
    font-size: 1.375rem;
    font-weight: 700;
}

.sidebar-logo-text span {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

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

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.sidebar-section {
    margin-bottom: 1.25rem;
}

.sidebar-section-title {
    color: #475569;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 1.25rem;
    margin-bottom: 0.5rem;
}

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

.sidebar-menu-item {
    margin: 2px 0.5rem;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.95rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.sidebar-menu-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.sidebar-menu-link.active {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

.sidebar-menu-link i:first-child {
    font-size: 1.25rem;
    width: 20px;
    text-align: center;
}

.sidebar-menu-arrow {
    margin-left: auto;
    font-size: 0.625rem;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.sidebar-menu-item.open > .sidebar-menu-link .sidebar-menu-arrow {
    transform: rotate(90deg);
}

.sidebar-submenu {
    list-style: none;
    padding: 0.25rem 0 0.25rem 0;
    margin: 0;
    display: none;
}

.sidebar-menu-item.open > .sidebar-submenu {
    display: block;
}

.sidebar-submenu-link {
    display: block;
    padding: 0.55rem 0.95rem 0.55rem 3.25rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    margin: 1px 0.5rem;
    transition: all 0.15s ease;
}

.sidebar-submenu-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.sidebar-submenu-link.active {
    color: #60a5fa;
}

/* 3rd level submenu */
.sidebar-submenu-item {
    position: relative;
}

.sidebar-submenu-item > .sidebar-submenu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-submenu-item > .sidebar-submenu-link .sidebar-menu-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s;
    opacity: 0.6;
}

.sidebar-submenu-item.open > .sidebar-submenu-link .sidebar-menu-arrow {
    transform: rotate(90deg);
}

.sidebar-submenu-item > .sidebar-submenu {
    display: none;
    padding-left: 0.75rem;
}

.sidebar-submenu-item.open > .sidebar-submenu {
    display: block;
}

.sidebar-submenu-item .sidebar-submenu .sidebar-submenu-link {
    padding-left: 3.75rem;
    font-size: 0.85rem;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-help-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.7rem 0.95rem;
    background: rgba(59,130,246,0.1);
    border: none;
    border-radius: 8px;
    color: #60a5fa;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sidebar-help-btn:hover {
    background: rgba(59,130,246,0.2);
}

/* Theme Switcher in Sidebar */
.theme-switcher {
    margin-bottom: 0.75rem;
}

.theme-switcher-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.theme-switcher-options {
    display: flex;
    gap: 0.5rem;
}

.theme-switch-btn {
    flex: 1;
    height: 28px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    padding: 3px;
    transition: all 0.2s ease;
}

.theme-switch-btn:hover {
    border-color: rgba(255,255,255,0.3);
}

.theme-switch-btn.active {
    border-color: #fff;
}

.theme-color {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
}

/* Main Content */
.app-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.app-sidebar.collapsed ~ .app-main {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.app-header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

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

.header-search input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #f8fafc;
}

.header-search input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

.header-search i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

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

.header-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.header-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.header-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    font-size: 0.625rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 0.5rem;
}

.header-user:hover {
    background: #f1f5f9;
}

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

.header-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* =====================================================
   NOTES PANEL (Slide-out)
   ===================================================== */
.notes-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
}

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

.notes-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 1201;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
}

.notes-panel.show {
    right: 0;
}

.notes-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
}

.notes-panel-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-panel-header h3 i {
    color: #f59e0b;
}

.notes-panel-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
}

.notes-panel-close:hover {
    background: #ef4444;
    color: #fff;
}

.notes-panel-context {
    padding: 0.75rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    color: #64748b;
}

.notes-panel-context strong {
    color: #1e293b;
}

.notes-panel-add {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.notes-panel-add textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.875rem;
    resize: vertical;
    font-family: inherit;
}

.notes-panel-add textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.notes-panel-add-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.note-pin-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #64748b;
    cursor: pointer;
}

.note-pin-toggle input {
    display: none;
}

.note-pin-toggle input:checked + i {
    color: #f59e0b;
}

.notes-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.note-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.note-item.pinned {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.note-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.note-item-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-item-avatar {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
}

.note-item-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1e293b;
}

.note-item-time {
    font-size: 0.6875rem;
    color: #94a3b8;
}

.note-item-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
}

.note-item:hover .note-item-actions {
    opacity: 1;
}

.note-item-actions button {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
}

.note-item-actions button:hover {
    background: #f1f5f9;
    color: #64748b;
}

.note-item-actions button.delete:hover {
    background: #fee2e2;
    color: #ef4444;
}

.note-item-content {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
}

.notes-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: #94a3b8;
}

.notes-empty i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    color: #cbd5e1;
}

/* Mobile Notifications */
@media (max-width: 576px) {
    .notifications-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 20px 20px 0 0;
    }

    .notes-panel {
        width: 100%;
        right: -100%;
    }
}

/* App Content */
.app-content {
    padding: 1.5rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.blue { background: rgba(59,130,246,0.1); color: #3b82f6; }
.stat-icon.green { background: rgba(16,185,129,0.1); color: #10b981; }
.stat-icon.orange { background: rgba(245,158,11,0.1); color: #f59e0b; }
.stat-icon.purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.stat-icon.red { background: rgba(239,68,68,0.1); color: #ef4444; }

/* ============================================
   CARD COMPONENT - STANDARDIZED
   ============================================ */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.card-title i {
    color: #64748b;
}

.card-body {
    padding: 1.25rem;
}

.card-body.p-0 {
    padding: 0;
}

.card-body.p-lg {
    padding: 1.5rem;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .card-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 16px;
    padding: 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.welcome-card p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.welcome-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.welcome-stat {
    text-align: center;
}

.welcome-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.welcome-stat-label {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* Task List */
.task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.task-check {
    width: 22px;
    height: 22px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-check.done {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

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

.task-info h4 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.task-info p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.task-priority {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.task-priority.high { background: #fee2e2; color: #dc2626; }
.task-priority.medium { background: #fef3c7; color: #d97706; }
.task-priority.low { background: #dbeafe; color: #2563eb; }

/* Activity List */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.blue { background: rgba(59,130,246,0.1); color: #3b82f6; }
.activity-icon.green { background: rgba(16,185,129,0.1); color: #10b981; }
.activity-icon.orange { background: rgba(245,158,11,0.1); color: #f59e0b; }
.activity-icon.purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-content h4 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.activity-content p {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
}

.activity-time {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* Progress Items */
.progress-item {
    margin-bottom: 1.25rem;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-label {
    font-size: 0.8125rem;
    font-weight: 500;
}

.progress-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
}

/* Data Table */
.data-table {
    width: 100%;
}

.data-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

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

.cell-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cell-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #fff;
    flex-shrink: 0;
}

.cell-avatar.primary { background: #3b82f6; }
.cell-avatar.success { background: #10b981; }
.cell-avatar.warning { background: #f59e0b; }
.cell-avatar.danger { background: #ef4444; }

.cell-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.cell-info h4 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.cell-info h4 a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.cell-info h4 a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.cell-info p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 2px rgba(currentColor, 0.2);
}

.status-badge.active { background: #d1fae5; color: #059669; }
.status-badge.inactive { background: #f1f5f9; color: #64748b; }
.status-badge.pending { background: #fef3c7; color: #d97706; }
.status-badge.completed { background: #dbeafe; color: #2563eb; }

.chart-filters {
    display: flex;
    gap: 0.375rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 8px;
}

.chart-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-filter-btn:hover {
    color: #3b82f6;
}

.chart-filter-btn.active {
    background: #fff;
    color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Dashboard Grid */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.row-2-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.quick-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.quick-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.quick-stat-info h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
}

.quick-stat-info p {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .quick-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .row-2-cols { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.mobile-open {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .header-search {
        display: none;
    }
    .quick-stats-grid { grid-template-columns: 1fr; }
    .welcome-stats { justify-content: space-around; }
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-column {
    min-width: 320px;
    flex-shrink: 0;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.kanban-column-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.kanban-column-count {
    width: 24px;
    height: 24px;
    background: #f1f5f9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kanban-card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: grab;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
}

/* Forms */
.form-label.required::after {
    content: ' *';
    color: #ef4444;
}

/* ============================================
   iOS STYLE SWITCH - Override Bootstrap
   ============================================ */

/* Reset Bootstrap form-check */
.form-check,
.form-check.form-switch {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    padding-left: 0 !important;
    min-height: auto !important;
    margin-bottom: 0 !important;
}

/* iOS Switch Input */
.form-check-input,
.form-check-input[type="checkbox"],
.form-switch .form-check-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 51px !important;
    height: 31px !important;
    background-color: #e9e9eb !important;
    background-image: none !important;
    border-radius: 31px !important;
    border: none !important;
    position: relative !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    margin-top: 2px !important;
    float: none !important;
}

/* iOS Switch Knob */
.form-check-input::before,
.form-check-input[type="checkbox"]::before,
.form-switch .form-check-input::before {
    content: '' !important;
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    width: 27px !important;
    height: 27px !important;
    background: #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), width 0.2s ease !important;
}

/* Hide Bootstrap's pseudo-element */
.form-check-input::after,
.form-switch .form-check-input::after {
    display: none !important;
}

/* Checked State */
.form-check-input:checked,
.form-check-input[type="checkbox"]:checked,
.form-switch .form-check-input:checked {
    background-color: var(--primary, #34c759) !important;
    background-image: none !important;
    border-color: transparent !important;
}

.form-check-input:checked::before,
.form-switch .form-check-input:checked::before {
    transform: translateX(20px) !important;
}

/* Focus State */
.form-check-input:focus,
.form-switch .form-check-input:focus {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
    border-color: transparent !important;
}

/* Active/Press State - iOS stretch effect */
.form-check-input:active::before,
.form-switch .form-check-input:active::before {
    width: 33px !important;
}

.form-check-input:checked:active::before,
.form-switch .form-check-input:checked:active::before {
    transform: translateX(14px) !important;
}

/* Label Styles */
.form-check-label {
    cursor: pointer !important;
    font-size: 0.9375rem !important;
    color: #334155 !important;
    line-height: 1.4 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
}

.form-check-label strong {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.125rem;
}

.form-check-label small {
    font-size: 0.8125rem;
    color: #64748b;
}

/* Disabled state */
.form-check-input:disabled,
.form-switch .form-check-input:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.form-check-input:disabled + .form-check-label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn i {
    font-size: 1rem;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.3);
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-warning:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}

/* Button Sizes */
.btn-sm {
    padding: 0.4375rem 0.875rem;
    font-size: 0.8125rem;
    border-radius: 8px;
}

.btn-sm i {
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    border-radius: 12px;
}

.btn-lg i {
    font-size: 1.125rem;
}

/* Utilities */
.text-success { color: #10b981 !important; }
.text-warning { color: #f59e0b !important; }
.text-danger { color: #ef4444 !important; }
.bg-success-subtle { background-color: rgba(16,185,129,0.1) !important; }
.bg-warning-subtle { background-color: rgba(245,158,11,0.1) !important; }
.bg-danger-subtle { background-color: rgba(239,68,68,0.1) !important; }
.bg-primary-subtle { background-color: rgba(59,130,246,0.1) !important; }
.bg-purple-subtle { background-color: rgba(139,92,246,0.1) !important; }
.text-purple { color: #8b5cf6 !important; }

/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.filter-tab.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* Calendar */
.fc .fc-button-primary {
    background: #3b82f6;
    border-color: #3b82f6;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: #2563eb;
    border-color: #2563eb;
}

/* Avatar Group */
.avatar-group {
    display: flex;
}

.avatar-group .avatar {
    margin-left: -0.5rem;
    border: 2px solid #fff;
}

.avatar-group .avatar:first-child {
    margin-left: 0;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

/* Right Sidebar */
.app-right-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    z-index: 1030;
    display: flex;
    flex-direction: column;
}

.right-sidebar-title {
    padding: 0.75rem 0.5rem;
    margin-top: var(--header-height);
    text-align: center;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    border-bottom: 1px solid #e2e8f0;
}

.right-sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0;
    gap: 0.25rem;
}

.right-sidebar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.625rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    width: 64px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.right-sidebar-btn i {
    font-size: 1.25rem;
}

.right-sidebar-btn span {
    font-size: 0.625rem;
    font-weight: 500;
}

.right-sidebar-btn:hover {
    background: var(--primary-100, #eff6ff);
    color: var(--primary, #3b82f6);
}

.right-sidebar-btn.quick-action {
    position: relative;
}

.right-sidebar-btn.quick-action::before {
    content: '+';
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--primary, #3b82f6);
    opacity: 0;
    transition: opacity 0.2s;
}

.right-sidebar-btn.quick-action:hover::before {
    opacity: 1;
}

/* Quick action colors */
.right-sidebar-btn[data-action="lead"]:hover {
    background: #fef3c7;
    color: #d97706;
}
.right-sidebar-btn[data-action="lead"]:hover::before { color: #d97706; }

.right-sidebar-btn[data-action="client"]:hover {
    background: #dbeafe;
    color: #2563eb;
}
.right-sidebar-btn[data-action="client"]:hover::before { color: #2563eb; }

.right-sidebar-btn[data-action="task"]:hover {
    background: #dcfce7;
    color: #16a34a;
}
.right-sidebar-btn[data-action="task"]:hover::before { color: #16a34a; }

.right-sidebar-btn[data-action="meet"]:hover {
    background: #f3e8ff;
    color: #9333ea;
}
.right-sidebar-btn[data-action="meet"]:hover::before { color: #9333ea; }

.right-sidebar-btn[data-action="call"]:hover {
    background: #d1fae5;
    color: #059669;
}
.right-sidebar-btn[data-action="call"]:hover::before { color: #059669; }

.right-sidebar-btn.active {
    background: rgba(59,130,246,0.1);
    color: #3b82f6;
}

.

/* Right Sidebar Overlay (Mobile) */
.right-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1039;
}

.right-sidebar-overlay.active {
    display: block;
}

@media (max-width: 1200px) {
    .app-right-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    .app-right-sidebar.mobile-open {
        transform: translateX(0);
    }
    .app-main {
        margin-right: 0;
    }
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1060;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.modal-container {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.modal-container.modal-lg {
    max-width: 720px;
}

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

.modal-title i {
    color: #3b82f6;
}

/* Input with Action Button (CUI fetch) */
.input-with-action {
    display: flex;
    gap: 0.5rem;
}

.input-with-action .form-control {
    flex: 1;
}

.fetch-company-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.fetch-company-btn i {
    font-size: 1rem;
}

@media (max-width: 576px) {
    .input-with-action {
        flex-direction: column;
    }

    .fetch-company-btn {
        width: 100%;
        justify-content: center;
    }
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.375rem;
}

.form-hint i {
    margin-right: 0.25rem;
}

/* Fetch Status */
.fetch-status {
    margin-bottom: 1rem;
}

.fetch-status-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.fetch-status-content.loading {
    background: #f8fafc;
    color: #64748b;
}

.fetch-status-content.success {
    background: #ecfdf5;
    color: #059669;
}

.fetch-status-content.error {
    background: #fef2f2;
    color: #dc2626;
}

.fetch-status-content i.spin {
    animation: spin 1s linear infinite;
}

.form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.required {
    color: #ef4444;
}

.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
}

.modal-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

.modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #ef4444;
}

.modal-error i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

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

/* Header User Avatar */
.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Header Divider */
.header-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 0.5rem;
}

/* Search Input Wrapper */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-input-wrapper .search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #f8fafc;
}

.search-input-wrapper .search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

/* Task List (unstyled) */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

/* Progress List */
.progress-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Progress Bar Custom */
.progress-bar-custom {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.blue { background: #3b82f6; }
.progress-fill.green { background: #10b981; }
.progress-fill.purple { background: #8b5cf6; }
.progress-fill.orange { background: #f59e0b; }

/* Project Cards List (Dashboard) */
.project-cards-list {
    display: flex;
    flex-direction: column;
}

.project-card-item {
    display: block;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

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

.project-card-item:hover {
    background: #f8fafc;
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.project-card-title h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.project-client {
    font-size: 0.8125rem;
    color: #64748b;
}

.project-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #64748b;
}

.project-meta-item i {
    font-size: 0.875rem;
    color: #94a3b8;
}

.project-card-progress {
    margin-bottom: 0.75rem;
}

.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-bar-wrapper .progress-bar {
    flex: 1;
}

.progress-percent {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    min-width: 36px;
    text-align: right;
}

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-team {
    display: flex;
    align-items: center;
}

.team-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #fff;
    border: 2px solid #fff;
    margin-left: -8px;
}

.team-avatar:first-child {
    margin-left: 0;
}

.team-avatar.more {
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.625rem;
}

.project-budget {
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
}

@media (max-width: 576px) {
    .project-card-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Project List Compact (Dashboard) */
.project-list-compact {
    display: flex;
    flex-direction: column;
}

.project-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.project-row:last-child {
    border-bottom: none;
}

.project-row:hover {
    background: #f8fafc;
}

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

.project-row-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-row-client {
    font-size: 0.75rem;
    color: #64748b;
}

.project-row-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
}

.progress-mini {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-mini-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-mini-fill.blue { background: #3b82f6; }
.progress-mini-fill.green { background: #10b981; }
.progress-mini-fill.orange { background: #f59e0b; }
.progress-mini-fill.red { background: #ef4444; }
.progress-mini-fill.purple { background: #8b5cf6; }

.progress-mini-text {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    min-width: 28px;
    text-align: right;
}

.status-badge.sm {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 576px) {
    .project-row {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.625rem 1rem;
    }

    .project-row-info {
        width: 100%;
        order: 1;
    }

    .project-row-progress {
        order: 2;
        flex: 1;
    }

    .status-badge.sm {
        order: 3;
    }
}

/* =====================================================
   DASHBOARD COMPACT COMPONENTS
   ===================================================== */

/* Task List Compact */
.task-list-compact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.task-row:last-child {
    border-bottom: none;
}

.task-row:hover {
    background: #f8fafc;
}

.task-row.done {
    opacity: 0.6;
}

.task-row.done .task-row-info h4 {
    text-decoration: line-through;
}

.task-row .task-check {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.task-row .task-check:hover {
    border-color: var(--primary);
}

.task-row .task-check.done {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
    font-size: 0.625rem;
}

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

.task-row-info h4 {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-row-info span {
    font-size: 0.6875rem;
    color: #94a3b8;
}

.task-row-info span i {
    font-size: 0.625rem;
    margin-right: 0.25rem;
}

.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority-dot.urgent { background: #ef4444; }
.priority-dot.high { background: #f59e0b; }
.priority-dot.medium { background: #3b82f6; }
.priority-dot.low { background: #94a3b8; }

/* Schedule List Compact */
.schedule-list-compact {
    display: flex;
    flex-direction: column;
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.schedule-row:last-child {
    border-bottom: none;
}

.schedule-time {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    min-width: 42px;
}

.schedule-info {
    flex: 1;
    padding-left: 0.75rem;
    border-left: 3px solid #e2e8f0;
}

.schedule-info.meeting { border-left-color: #3b82f6; }
.schedule-info.call { border-left-color: #10b981; }
.schedule-info.reminder { border-left-color: #8b5cf6; }

.schedule-info h4 {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0;
}

.schedule-info span {
    font-size: 0.6875rem;
    color: #94a3b8;
}

/* Leads List Compact */
.leads-list-compact {
    display: flex;
    flex-direction: column;
}

.lead-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.lead-row:last-child {
    border-bottom: none;
}

.lead-row:hover {
    background: #f8fafc;
}

.lead-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

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

.lead-row-info h4 {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0;
}

.lead-row-info span {
    font-size: 0.6875rem;
    color: #94a3b8;
}

.lead-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #10b981;
}

/* Pipeline Funnel */
.pipeline-funnel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pipeline-stage {
    display: flex;
    justify-content: center;
}

.pipeline-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark, #2563eb) 100%);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 36px;
    transition: all 0.3s ease;
}

.pipeline-bar.won {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.pipeline-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.pipeline-count {
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.85);
}

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

.activity-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

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

.activity-icon-sm {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.activity-icon-sm.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.activity-icon-sm.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.activity-icon-sm.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.activity-icon-sm.orange { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.activity-icon-sm.red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

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

.activity-row-info span {
    font-size: 0.8125rem;
    color: #475569;
}

.activity-row-info strong {
    color: #1e293b;
}

.activity-row-time {
    font-size: 0.6875rem;
    color: #94a3b8;
    flex-shrink: 0;
}

/* Contracts List Compact */
.contracts-list-compact {
    display: flex;
    flex-direction: column;
}

.contract-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.contract-row:last-child {
    border-bottom: none;
}

.contract-row:hover {
    background: #f8fafc;
}

.contract-row.urgent {
    background: rgba(239, 68, 68, 0.03);
}

.contract-row.warning {
    background: rgba(245, 158, 11, 0.03);
}

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

.contract-row-info h4 {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0;
}

.contract-row-info span {
    font-size: 0.6875rem;
    color: #94a3b8;
}

.contract-expiry {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.expiry-days {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    background: #f1f5f9;
    color: #64748b;
}

.expiry-days.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.expiry-days.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.contract-value {
    font-size: 0.6875rem;
    color: #64748b;
}

/* Deadlines List Compact */
.deadlines-list-compact {
    display: flex;
    flex-direction: column;
}

.deadline-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.deadline-row:last-child {
    border-bottom: none;
}

.deadline-row.urgent .deadline-date {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.deadline-row.warning .deadline-date {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.deadline-date {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.deadline-day {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.deadline-month {
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
}

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

.deadline-info h4 {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deadline-info span {
    font-size: 0.6875rem;
    color: #94a3b8;
}

/* Mobile Responsive for Dashboard Compact */
@media (max-width: 576px) {
    .task-row,
    .schedule-row,
    .lead-row,
    .activity-row,
    .contract-row,
    .deadline-row {
        padding: 0.5rem 0.75rem;
    }

    .pipeline-bar {
        padding: 0.375rem 0.5rem;
        min-height: 32px;
    }

    .pipeline-label {
        font-size: 0.6875rem;
    }

    .pipeline-count {
        font-size: 0.625rem;
    }

    .deadline-date {
        width: 38px;
        height: 38px;
    }

    .deadline-day {
        font-size: 0.875rem;
    }
}

/* Button Outline */
.btn-outline {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.btn-outline:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    border: none;
    color: #64748b;
    box-shadow: none;
}

.btn-ghost:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

/* Soft Buttons */
.btn-soft-primary {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: none;
}

.btn-soft-primary:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.btn-soft-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: none;
}

.btn-soft-success:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
}

.btn-soft-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: none;
}

.btn-soft-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

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

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.page-subtitle {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
}

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

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

@media (max-width: 576px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}

/* Stat Card Enhanced */
.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card-icon.primary { background: rgba(59,130,246,0.1); color: #3b82f6; }
.stat-card-icon.success { background: rgba(16,185,129,0.1); color: #10b981; }
.stat-card-icon.warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.stat-card-icon.purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.stat-card-icon.danger { background: rgba(239,68,68,0.1); color: #ef4444; }
.stat-card-icon.cyan { background: rgba(6,182,212,0.1); color: #06b6d4; }

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card-label {
    font-size: 0.8125rem;
    color: #64748b;
}

.stat-card-change {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.stat-card-change.positive { color: #10b981; }
.stat-card-change.negative { color: #ef4444; }

/* Filters Section */
.filters-section {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.filter-search i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.filter-search input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #f8fafc;
}

.filter-search input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

.filter-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem 2rem 0.5rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.75rem center/12px 12px;
    cursor: pointer;
    min-width: 150px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.filter-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-date input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
}

.filter-date span {
    color: #94a3b8;
}

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

/* Pagination */
.pagination-info {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

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

.pagination-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.pagination-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Pagination Responsive */
@media (max-width: 768px) {
    .card-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .pagination-info {
        order: 2;
        font-size: 0.75rem;
    }

    .pagination {
        order: 1;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .pagination-btn.page-number {
        display: none;
    }

    .pagination-btn.page-number.active {
        display: flex;
    }
}

/* Action Buttons */
.actions-cell {
    display: flex;
    gap: 0.25rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    color: #3b82f6;
}

.action-btn.edit:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background: #fffbeb;
}

.action-btn.delete:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.action-btn.notes-btn:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background: #fffbeb;
}

.action-btn.notes-btn.has-notes {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.action-btn.notes-btn.has-notes:hover {
    background: #fee2e2;
}

/* Cell Avatar Colors */
.cell-avatar.purple { background: #8b5cf6; }
.cell-avatar.cyan { background: #06b6d4; }

/* Status Badge Gray */
.status-badge.gray { background: #f1f5f9; color: #64748b; }
.status-badge.primary { background: #dbeafe; color: #2563eb; }
.status-badge.success { background: #d1fae5; color: #059669; }
.status-badge.warning { background: #fef3c7; color: #d97706; }

/* Client Detail Page */
.client-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.client-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.client-header-info {
    flex: 1;
    min-width: 200px;
}

.client-header-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.client-header-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.875rem;
}

.client-header-meta i {
    margin-right: 0.375rem;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.detail-main {
    display: flex;
    flex-direction: column;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
}

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

/* Info Row */
.info-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    width: 180px;
    font-size: 0.8125rem;
    color: #64748b;
    flex-shrink: 0;
}

.info-value {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

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

.timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-content h4 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.timeline-content p {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
}

.timeline-time {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* CSS Variables for timeline icons */
:root {
    --success-light: rgba(16,185,129,0.1);
    --success: #10b981;
    --primary-100: rgba(59,130,246,0.1);
    --primary: #3b82f6;
    --warning-light: rgba(245,158,11,0.1);
    --warning: #f59e0b;
}

/* Progress Cell (Projects Table) */
.progress-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar-mini {
    width: 80px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    border-radius: 3px;
}

.progress-fill-mini.primary { background: #3b82f6; }
.progress-fill-mini.success { background: #10b981; }
.progress-fill-mini.warning { background: #f59e0b; }

.progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    min-width: 35px;
}

/* Task Count */
.tasks-count {
    font-size: 0.8125rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.tasks-count i {
    color: #3b82f6;
}

/* Deadline */
.deadline {
    font-size: 0.8125rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.deadline.overdue {
    color: #ef4444;
}

/* Small Avatar */
.cell-avatar.small {
    width: 28px;
    height: 28px;
    font-size: 0.6875rem;
}

/* Tasks Layout */
.tasks-layout {
    display: flex;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
}

.tasks-layout .app-content {
    display: none;
}

/* Projects Sidebar */
.projects-sidebar {
    width: 280px;
    height: 100%;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.projects-header {
    padding: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.projects-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.projects-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.projects-user-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
}

.projects-user-info p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.projects-search {
    position: relative;
}

.projects-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.875rem;
}

.projects-search input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8125rem;
    background: #f8fafc;
}

.projects-search input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

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

.projects-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.projects-section:last-child {
    border-bottom: none;
}

.projects-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 0.5rem 1.25rem;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

.project-item:hover {
    background: #f8fafc;
}

.project-item.active {
    background: #eff6ff;
}

.project-item i {
    color: #64748b;
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

.project-item span {
    font-size: 0.875rem;
    color: #334155;
}

.project-count {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

.project-icon {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.project-icon.blue { background: #3b82f6; }
.project-icon.purple { background: #8b5cf6; }
.project-icon.green { background: #10b981; }
.project-icon.orange { background: #f59e0b; }
.project-icon.cyan { background: #06b6d4; }
.project-icon.red { background: #ef4444; }
.project-icon.gray { background: #94a3b8; }

.project-item:has(.project-item-content) {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
    margin-bottom: 0.25rem;
}

.project-item:has(.project-item-content):last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.project-item-content {
    flex: 1;
    min-width: 0;
}

.project-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-item-name {
    font-size: 0.875rem;
    color: #334155;
}

.project-progress {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 0.375rem;
    overflow: hidden;
}

.project-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.project-progress-bar.progress-danger { background: #ef4444; }
.project-progress-bar.progress-warning-low { background: #f97316; }
.project-progress-bar.progress-warning { background: #f59e0b; }
.project-progress-bar.progress-warning-high { background: #eab308; }
.project-progress-bar.progress-success-low { background: #84cc16; }
.project-progress-bar.progress-success { background: #22c55e; }
.project-progress-bar.progress-complete { background: #10b981; }

.projects-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.new-list-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px dashed #e2e8f0;
    background: transparent;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.new-list-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

/* Tasks Panel */
.tasks-panel {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    padding: 1.5rem;
    overflow: hidden;
}

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

.tasks-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.tasks-header-actions {
    display: flex;
    gap: 0.25rem;
}

.tasks-header-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.tasks-header-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.tasks-list-container {
    flex: 1;
    overflow-y: auto;
}

.tasks-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.task-item-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.2s;
}

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

.task-item-row:hover {
    background: #f8fafc;
}

.task-item-row.completed .task-item-title {
    text-decoration: line-through;
    color: #94a3b8;
}

.task-check {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.task-check:hover {
    border-color: #3b82f6;
}

.task-check.checked {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.task-check.checked::after {
    content: '\F272';
    font-family: 'bootstrap-icons';
    font-size: 0.625rem;
}

.task-item-content {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    padding: 0.25rem 0;
}

.task-item-content:hover .task-item-title {
    color: var(--primary);
}

.task-item-title {
    font-size: 0.875rem;
    color: #334155;
}

/* Task Priority Icon */
.task-priority {
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s, transform 0.2s;
}

.task-priority:hover {
    transform: scale(1.15);
}

/* Priority Colors */
.task-priority[data-priority="low"] {
    color: #94a3b8;
}

.task-priority[data-priority="medium"] {
    color: #3b82f6;
}

.task-priority[data-priority="high"] {
    color: #f59e0b;
}

.task-priority[data-priority="urgent"] {
    color: #ef4444;
}

/* Tasks Section Header */
.tasks-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    margin-top: 1.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    background: #fff;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tasks-section-header i {
    transition: transform 0.2s;
}

.tasks-section-header.collapsed i {
    transform: rotate(-90deg);
}

.tasks-section-header .count {
    background: #f1f5f9;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

.completed-tasks {
    border-radius: 0 0 12px 12px;
    margin-top: 0;
}

.completed-tasks.hidden {
    display: none;
}

/* Add Task */
.add-task-container {
    margin-top: 1rem;
    flex-shrink: 0;
}

.add-task-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: #fff;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
    width: 100%;
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.add-task-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.add-task-input-container {
    display: none;
    margin-top: 1rem;
    flex-shrink: 0;
}

.add-task-input-container.active {
    display: block;
}

.add-task-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.add-task-input-wrapper input {
    flex: 1;
    border: none;
    font-size: 0.875rem;
    padding: 0.25rem;
}

.add-task-input-wrapper input:focus {
    outline: none;
}

/* Mobile Projects Toggle Button */
.projects-mobile-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
}

.projects-mobile-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.projects-mobile-toggle i {
    font-size: 1.1rem;
}

.projects-mobile-toggle .current-project {
    color: var(--primary);
    font-weight: 600;
}

/* Mobile Projects Overlay */
.projects-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

/* Hide close button on desktop by default */
.projects-mobile-close {
    display: none;
}

@media (max-width: 768px) {
    .tasks-layout {
        flex-direction: column;
        position: relative;
        overflow: visible;
    }

    .projects-mobile-toggle {
        display: inline-flex;
    }

    .tasks-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .tasks-header h1 {
        order: 1;
        width: auto;
        font-size: 1.25rem;
    }

    .tasks-header-actions {
        order: 2;
        margin-left: auto;
    }

    .tasks-header .projects-mobile-toggle {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border: 1px solid #e2e8f0;
        position: relative;
        z-index: 5;
    }

    .tasks-header .projects-mobile-toggle i:last-child {
        margin-left: auto;
        transition: transform 0.2s;
    }

    .projects-sidebar .projects-header {
        padding-right: 3.5rem;
    }

    .projects-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        max-height: 100vh;
        border-right: none;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

    /* Close button for mobile sidebar */
    .projects-mobile-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 32px;
        height: 32px;
        background: #f1f5f9;
        border: none;
        border-radius: 8px;
        color: #64748b;
        cursor: pointer;
        z-index: 10;
    }

    .projects-mobile-close:hover {
        background: #e2e8f0;
        color: #334155;
    }

    .tasks-panel {
        width: 100%;
        height: calc(100vh - var(--header-height));
    }
}

@media (min-width: 769px) {
    .projects-mobile-close {
        display: none;
    }
}

/* Task Offcanvas */
.task-offcanvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.task-offcanvas-overlay.active {
    opacity: 1;
    visibility: visible;
}

.task-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1051;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.task-offcanvas.open {
    transform: translateX(0);
}

.task-offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.task-offcanvas-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #1e293b;
}

.task-offcanvas-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.task-offcanvas-close:hover {
    background: #e2e8f0;
    color: #334155;
}

.task-offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.task-offcanvas-body .form-group {
    margin-bottom: 1.25rem;
}

.task-offcanvas-body .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

.task-offcanvas-body .form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.task-offcanvas-body .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.task-offcanvas-body select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.file-upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.file-upload-area i {
    font-size: 2rem;
    color: #94a3b8;
    display: block;
    margin-bottom: 0.5rem;
}

.file-upload-area span {
    font-size: 0.875rem;
    color: #64748b;
}

.file-upload-area.dragover {
    border-color: var(--primary);
    background: #eff6ff;
}

.file-list {
    margin-top: 0.75rem;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-list-item i {
    color: #64748b;
    font-size: 1.25rem;
}

.file-list-item .file-name {
    flex: 1;
    font-size: 0.875rem;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-list-item .file-size {
    font-size: 0.75rem;
    color: #94a3b8;
}

.file-list-item .file-remove {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-list-item .file-remove:hover {
    background: #fee2e2;
}

.task-offcanvas-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.task-offcanvas-footer .btn {
    flex: 1;
}

@media (max-width: 480px) {
    .task-offcanvas {
        width: 100%;
    }
}

/* Calendar Layout */
.calendar-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .calendar-layout { grid-template-columns: 1fr; }
}

.calendar-main {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.calendar-nav button {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.calendar-nav button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.calendar-body {
    padding: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
}

.calendar-day {
    min-height: 100px;
    padding: 0.5rem;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-day:hover {
    background: #f8fafc;
}

.calendar-day.other-month {
    background: #fafafa;
}

.calendar-day.other-month .calendar-day-number {
    color: #cbd5e1;
}

.calendar-day.today {
    background: #eff6ff;
    border-color: #3b82f6;
}

.calendar-day.today .calendar-day-number {
    background: #3b82f6;
    color: #fff;
}

.calendar-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 50%;
}

.calendar-event {
    font-size: 0.6875rem;
    padding: 0.25rem 0.375rem;
    border-radius: 4px;
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event.meeting { background: #dbeafe; color: #1d4ed8; }
.calendar-event.task { background: #fef3c7; color: #b45309; }
.calendar-event.reminder { background: #f3e8ff; color: #7c3aed; }

.calendar-sidebar .upcoming-events {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.upcoming-header {
    padding: 1rem 1.25rem;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.upcoming-list {
    padding: 0.5rem 0;
}

.upcoming-item {
    display: flex;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
}

.upcoming-time {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #3b82f6;
    width: 48px;
}

.upcoming-content h4 {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.125rem 0;
}

.upcoming-content p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

/* Activity Log Styles */
.timestamp {
    display: flex;
    flex-direction: column;
}

.timestamp-date {
    font-size: 0.8125rem;
    font-weight: 500;
}

.timestamp-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.action-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.action-badge.create { background: #d1fae5; color: #059669; }
.action-badge.update { background: #dbeafe; color: #2563eb; }
.action-badge.delete { background: #fee2e2; color: #dc2626; }
.action-badge.login { background: #e0e7ff; color: #4f46e5; }
.action-badge.logout { background: #f1f5f9; color: #64748b; }
.action-badge.export { background: #fef3c7; color: #d97706; }
.action-badge.view { background: #f3e8ff; color: #7c3aed; }
.action-badge.settings { background: #e0f2fe; color: #0284c7; }

.activity-details-text {
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.activity-details-meta {
    font-size: 0.75rem;
    color: #64748b;
}

.activity-details-meta a {
    color: #3b82f6;
    text-decoration: none;
}

.ip-address {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    color: #64748b;
}

/* Settings Layout */
.settings-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .settings-layout { grid-template-columns: 1fr; }
}

.settings-nav {
    background: #fff;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: fit-content;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.settings-nav-item:hover {
    background: #f8fafc;
    color: #334155;
}

.settings-nav-item.active {
    background: #eff6ff;
    color: #3b82f6;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* AI Settings */
.ai-provider-settings {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-left: none;
}

.form-range {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.form-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.ai-connection-test {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.ai-status.loading {
    background: #f8fafc;
    color: #64748b;
}

.ai-status.success {
    background: #ecfdf5;
    color: #059669;
}

.ai-status.error {
    background: #fef2f2;
    color: #dc2626;
}

.ai-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ai-status.loading .ai-status-indicator {
    background: #94a3b8;
    animation: pulse 1s infinite;
}

.ai-status.success .ai-status-indicator {
    background: #10b981;
}

.ai-status.error .ai-status-indicator {
    background: #ef4444;
}

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

.spin {
    animation: spin 1s linear infinite;
}

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

.ai-features-section .form-group {
    margin-bottom: 1rem;
}

.ai-features-section .form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .form-row { grid-template-columns: 1fr; }
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Required label */
.form-label.required::after {
    content: ' *';
    color: #ef4444;
}

/* Validation states */
.form-control.is-valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2310b981' viewBox='0 0 16 16'%3E%3Cpath d='M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    padding-right: 2.5rem;
}

.form-control.is-invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ef4444' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    padding-right: 2.5rem;
}

.form-control.is-valid:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-control.is-invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Validation for select */
select.form-control.is-valid,
select.form-control.is-invalid {
    background-position: right 0.75rem center, right 2.25rem center;
    padding-right: 3.5rem;
}

/* Validation for textarea */
textarea.form-control.is-valid,
textarea.form-control.is-invalid {
    background-position: top 0.75rem right 0.75rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.content-grid .full-width {
    grid-column: 1 / -1;
}

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

/* Company Logo Section */
.company-logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.company-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.company-logo-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.company-logo-info p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* Bank Accounts */
.bank-account {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.bank-account:last-child {
    border-bottom: none;
}

.bank-account-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.25rem;
}

.bank-account-info {
    flex: 1;
}

.bank-account-name {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.bank-account-iban {
    font-family: ui-monospace, monospace;
    font-size: 0.8125rem;
    color: #64748b;
}

.bank-account-currency {
    font-size: 0.75rem;
    font-weight: 600;
    background: #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #64748b;
}

/* Users Page */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.role-badge.admin { background: #fee2e2; color: #dc2626; }
.role-badge.manager { background: #dbeafe; color: #2563eb; }
.role-badge.user { background: #f1f5f9; color: #64748b; }

.last-active {
    font-size: 0.8125rem;
    color: #64748b;
}

.last-active.online {
    color: #10b981;
    font-weight: 500;
}

.last-active.online::before {
    content: '●';
    margin-right: 0.375rem;
}

/* Tabs */
.tabs-container {
    margin-bottom: 1.5rem;
}

.tabs-nav {
    display: flex;
    gap: 0.25rem;
    background: #fff;
    padding: 0.375rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f8fafc;
    color: #334155;
}

.tab-btn.active {
    background: #3b82f6;
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

code {
    font-family: ui-monospace, monospace;
    font-size: 0.8125rem;
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

/* Theme Selector */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1200px) {
    .theme-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.theme-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.theme-card:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.theme-card.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.theme-preview {
    display: flex;
    height: 100px;
    overflow: hidden;
}

.theme-preview-sidebar {
    width: 40px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.theme-preview-menu {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 12px;
}

.theme-preview-item {
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 0 4px;
}

.theme-preview-item.active {
    background: rgba(255,255,255,0.9);
}

.theme-preview-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.theme-preview-header {
    height: 16px;
    background: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.theme-preview-content {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.theme-preview-card {
    height: 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.theme-info {
    padding: 1rem;
    border-top: 1px solid #f1f5f9;
}

.theme-name {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.theme-description {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.theme-active-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #10b981;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.theme-active-badge i {
    font-size: 0.75rem;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive-load thead {
        display: none;
    }

    .table-responsive-load tbody {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .table-responsive-load tbody tr {
        display: block;
        background: #fff;
        border-radius: 8px;
        padding: 0.75rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .table-responsive-load tbody td {
        display: flex;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid #f1f5f9;
    }

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

    .table-responsive-load tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.025em;
        width: 50%;
        flex-shrink: 0;
    }

    .table-responsive-load tbody td:empty::before {
        content: none;
    }

    /* Actions column - make it full width */
    .table-responsive-load tbody td[data-label="Acțiuni"],
    .table-responsive-load tbody td[data-label="Actions"] {
        justify-content: flex-end;
        padding-top: 0.75rem;
    }

    .table-responsive-load tbody td[data-label="Acțiuni"]::before,
    .table-responsive-load tbody td[data-label="Actions"]::before {
        display: none;
    }
}

/* Integrations Page */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.integration-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.2s ease;
}

.integration-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.integration-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.integration-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.integration-icon.ai { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.integration-icon.anaf { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.integration-icon.vies { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.integration-icon.google { background: linear-gradient(135deg, #ea4335, #fbbc05); }
.integration-icon.slack { background: linear-gradient(135deg, #4a154b, #611f69); }
.integration-icon.stripe { background: linear-gradient(135deg, #635bff, #0a2540); }
.integration-icon.mailchimp { background: linear-gradient(135deg, #ffe01b, #241c15); color: #241c15; }
.integration-icon.twilio { background: linear-gradient(135deg, #f22f46, #0d122b); }

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

.integration-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1e293b;
}

.integration-info p {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.integration-status {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    flex-shrink: 0;
}

.integration-status i {
    font-size: 0.5rem;
}

.integration-status.connected {
    background: #ecfdf5;
    color: #059669;
}

.integration-status.disconnected {
    background: #f1f5f9;
    color: #64748b;
}

.integration-card-body {
    padding: 1rem 1.25rem;
}

.integration-card-body p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.integration-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

/* Integration Settings Panels */
.integration-settings-container {
    margin-top: 2rem;
}

.integration-settings {
    margin-bottom: 1.5rem;
}

.integration-settings .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.integration-settings .close-settings {
    padding: 0.25rem 0.5rem;
}

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

    .integration-card-header {
        flex-wrap: wrap;
    }

    .integration-status {
        width: 100%;
        justify-content: center;
        margin-top: 0.75rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: #fff !important;
        font-size: 12pt;
    }

    .app-sidebar,
    .app-right-sidebar,
    .app-header,
    .sidebar-overlay,
    .right-sidebar-overlay,
    .page-actions,
    .modal-overlay,
    .filters-section,
    .btn,
    .action-btn,
    .status-badge,
    .bank-account-currency {
        display: none !important;
    }

    .app-wrapper {
        display: block !important;
    }

    .app-main {
        margin: 0 !important;
        padding: 0 !important;
    }

    .app-content {
        padding: 0 !important;
    }

    .page-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #000;
    }

    .page-title {
        font-size: 18pt;
        color: #000 !important;
    }

    .page-subtitle {
        font-size: 10pt;
        color: #666 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 1rem;
    }

    .card-header {
        background: #f5f5f5 !important;
        border-bottom: 1px solid #ddd;
        padding: 0.75rem 1rem !important;
    }

    .card-title {
        font-size: 11pt;
        color: #000 !important;
    }

    .card-title i {
        color: #333 !important;
    }

    .card-body {
        padding: 1rem !important;
    }

    .content-grid {
        display: block !important;
    }

    /* Company logo section for print */
    .company-logo-section {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #ddd;
    }

    .company-logo {
        width: 60px !important;
        height: 60px !important;
        background: #f0f0f0 !important;
        color: #333 !important;
    }

    .company-logo-info h3 {
        font-size: 14pt;
        color: #000 !important;
    }

    .company-logo-info p {
        font-size: 10pt;
        color: #666 !important;
    }

    /* Info rows */
    .info-row {
        padding: 0.5rem 0 !important;
        border-bottom: 1px dotted #ccc;
    }

    .info-row:last-child {
        border-bottom: none;
    }

    .info-label {
        font-size: 9pt;
        color: #666 !important;
    }

    .info-value {
        font-size: 10pt;
        color: #000 !important;
    }

    /* Bank accounts */
    .bank-account {
        padding: 0.5rem 0 !important;
        border-bottom: 1px dotted #ccc;
    }

    .bank-account:last-child {
        border-bottom: none;
    }

    .bank-account-icon {
        display: none !important;
    }

    .bank-account-name {
        font-weight: 600;
        color: #000 !important;
    }

    .bank-account-iban {
        font-family: monospace;
        font-size: 10pt;
        color: #333 !important;
    }

    a {
        text-decoration: none;
        color: #000 !important;
    }
}

/* ============================================
   Searchable Select Component
   ============================================ */
.searchable-select {
    position: relative;
}

.searchable-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 38px;
}

.searchable-select-trigger:hover {
    border-color: #cbd5e1;
}

.searchable-select.open .searchable-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.searchable-select-value {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1e293b;
}

.searchable-select-value.placeholder {
    color: #94a3b8;
}

.searchable-select-arrow {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.searchable-select.open .searchable-select-arrow {
    transform: rotate(180deg);
}

.searchable-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--primary);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow: hidden;
}

.searchable-select.open .searchable-select-dropdown {
    display: block;
}

.searchable-select-search {
    padding: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #fff;
}

.searchable-select-search input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    padding-left: 2.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8125rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
}

.searchable-select-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.searchable-select-options {
    max-height: 240px;
    overflow-y: auto;
}

.searchable-select-option {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.searchable-select-option:hover,
.searchable-select-option.highlighted {
    background: #f1f5f9;
}

.searchable-select-option.selected {
    background: var(--primary-100);
    color: var(--primary);
    font-weight: 500;
}

.searchable-select-option.selected::after {
    content: '\2713';
    margin-left: auto;
    font-weight: 600;
}

.searchable-select-option.disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.searchable-select-option.disabled:hover {
    background: transparent;
}

.searchable-select-no-results {
    padding: 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8125rem;
}

.searchable-select-option-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.searchable-select-option-content {
    flex: 1;
    min-width: 0;
}

.searchable-select-option-label {
    font-weight: 500;
    color: #1e293b;
}

.searchable-select-option-sublabel {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.125rem;
}

/* Validation states for searchable select */
.searchable-select.is-valid .searchable-select-trigger {
    border-color: #10b981;
}

.searchable-select.is-invalid .searchable-select-trigger {
    border-color: #ef4444;
}

/* When inside a form-group with required label */
.form-group .searchable-select.is-valid .searchable-select-trigger,
.form-group .searchable-select.is-invalid .searchable-select-trigger {
    padding-right: 2.5rem;
}

.searchable-select.is-valid .searchable-select-trigger::after {
    content: '';
    position: absolute;
    right: 2.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2310b981' viewBox='0 0 16 16'%3E%3Cpath d='M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z'/%3E%3C/svg%3E");
}

.searchable-select.is-invalid .searchable-select-trigger::after {
    content: '';
    position: absolute;
    right: 2.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ef4444' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

/* ============================================
   Dropdown Menu (Custom Styles)
   ============================================ */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle::after {
    display: none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    display: none;
    min-width: 200px;
    padding: 0.5rem 0;
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #334155;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 1rem;
    clear: both;
    font-weight: 400;
    color: #334155;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    transition: background-color 0.15s;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #1e293b;
    background-color: #f1f5f9;
}

.dropdown-item i {
    font-size: 1rem;
    color: #64748b;
}

.dropdown-item:hover i {
    color: var(--primary);
}

.dropdown-item.text-danger {
    color: #ef4444;
}

.dropdown-item.text-danger:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

.dropdown-item.text-danger i {
    color: #ef4444;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #e2e8f0;
}

/* ============================================
   Custom Datepicker Component
   ============================================ */
.datepicker-wrapper {
    position: relative;
}

.datepicker-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 38px;
}

.datepicker-input:hover {
    border-color: #cbd5e1;
}

.datepicker-wrapper.open .datepicker-input {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.datepicker-value {
    flex: 1;
    color: #1e293b;
}

.datepicker-value.placeholder {
    color: #94a3b8;
}

.datepicker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1rem;
    margin-left: 0.5rem;
}

.datepicker-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #94a3b8;
    font-size: 0.875rem;
    margin-left: 0.25rem;
    border-radius: 50%;
    transition: all 0.15s;
    cursor: pointer;
}

.datepicker-clear:hover {
    background: #f1f5f9;
    color: #64748b;
}

/* Datepicker Dropdown */
.datepicker-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 1rem;
    display: none;
    min-width: 280px;
}

.datepicker-wrapper.open .datepicker-dropdown {
    display: block;
}

/* Datepicker Header */
.datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.datepicker-nav {
    display: flex;
    gap: 0.25rem;
}

.datepicker-nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.datepicker-nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-100);
}

.datepicker-month-year {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.datepicker-month-select,
.datepicker-year-select {
    padding: 0.375rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s;
}

.datepicker-month-select:hover,
.datepicker-year-select:hover {
    border-color: var(--primary);
}

.datepicker-month-select:focus,
.datepicker-year-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Datepicker Weekdays */
.datepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0.5rem;
}

.datepicker-weekday {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

/* Datepicker Days Grid */
.datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.datepicker-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid transparent;
}

.datepicker-day:hover {
    background: #f1f5f9;
}

.datepicker-day.other-month {
    color: #cbd5e1;
}

.datepicker-day.other-month:hover {
    background: #f8fafc;
    color: #94a3b8;
}

.datepicker-day.today {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.datepicker-day.selected {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.datepicker-day.selected:hover {
    background: var(--primary-dark, #2563eb);
}

.datepicker-day.disabled {
    color: #e2e8f0;
    cursor: not-allowed;
}

.datepicker-day.disabled:hover {
    background: transparent;
}

/* Datepicker Footer */
.datepicker-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.datepicker-today-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-100);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.datepicker-today-btn:hover {
    background: var(--primary);
    color: #fff;
}

.datepicker-clear-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.datepicker-clear-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Validation states for datepicker */
.datepicker-wrapper.is-valid .datepicker-input {
    border-color: #10b981;
}

.datepicker-wrapper.is-invalid .datepicker-input {
    border-color: #ef4444;
}

/* Datepicker positioning when near bottom */
.datepicker-wrapper.drop-up .datepicker-dropdown {
    top: auto;
    bottom: calc(100% + 4px);
}

/* =====================================================
   MOBILE APP EXPERIENCE
   Transforms the CRM into a native mobile app feel
   ===================================================== */

/* CSS Variables for Mobile */
:root {
    --mobile-nav-height: 64px;
    --mobile-header-height: 56px;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

/* Mobile App Wrapper */
@media (max-width: 768px) {
    html {
        /* Prevent pull-to-refresh on Chrome */
        overscroll-behavior-y: contain;
    }

    body {
        /* Full viewport height accounting for mobile browser chrome */
        min-height: 100dvh;
        min-height: -webkit-fill-available;
        background: #f5f5f5;
        /* Prevent text selection on long press */
        -webkit-user-select: none;
        user-select: none;
        /* Smooth scrolling */
        -webkit-overflow-scrolling: touch;
    }

    /* Allow text selection in form inputs */
    input, textarea, [contenteditable="true"] {
        -webkit-user-select: auto;
        user-select: auto;
    }

    /* Hide desktop sidebar completely */
    .app-sidebar {
        display: none !important;
    }

    .sidebar-overlay {
        display: none !important;
    }

    /* Main content takes full width */
    .app-main {
        margin-left: 0 !important;
        padding-bottom: calc(var(--mobile-nav-height) + var(--safe-area-bottom) + 16px);
    }

    /* Mobile Header Styles */
    .app-header {
        height: calc(var(--mobile-header-height) + var(--safe-area-top));
        padding: var(--safe-area-top) 1rem 0 1rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    /* Mobile header content */
    .app-header .header-search {
        display: none;
    }

    .app-header .header-divider {
        display: none;
    }

    .app-header .header-btn {
        width: 44px;
        height: 44px;
        font-size: 1.375rem;
    }

    .app-header .header-user {
        padding: 0;
        margin-left: 0.25rem;
    }

    .app-header .header-user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8125rem;
    }

    .app-header .header-user > i.bi-chevron-down {
        display: none;
    }

    /* App Content Area */
    .app-content {
        padding: 1rem;
        padding-top: calc(var(--mobile-header-height) + var(--safe-area-top) + 1rem);
        padding-bottom: 1rem;
        min-height: calc(100dvh - var(--mobile-nav-height) - var(--safe-area-bottom));
    }

    /* Hide right sidebar on mobile */
    .app-right-sidebar {
        display: none !important;
    }

    .right-sidebar-overlay {
        display: none !important;
    }

    /* Page Header Mobile */
    .page-header {
        margin-bottom: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .page-header-info {
        width: 100%;
    }

    .page-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .page-subtitle {
        font-size: 0.8125rem;
    }

    .page-header-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .page-header-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

/* =====================================================
   BOTTOM NAVIGATION BAR
   ===================================================== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(var(--mobile-nav-height) + var(--safe-area-bottom));
        padding-bottom: var(--safe-area-bottom);
        background: #fff;
        border-top: 1px solid #e5e5e5;
        z-index: 1000;
        justify-content: space-around;
        align-items: stretch;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        padding: 0.5rem 0;
        text-decoration: none;
        color: #64748b;
        font-size: 0.625rem;
        font-weight: 500;
        background: transparent;
        border: none;
        cursor: pointer;
        position: relative;
        transition: color 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-item i {
        font-size: 1.375rem;
        line-height: 1;
        transition: transform 0.15s ease;
    }

    .mobile-nav-item span {
        line-height: 1;
    }

    .mobile-nav-item:active i {
        transform: scale(0.9);
    }

    .mobile-nav-item.active {
        color: var(--primary, #3b82f6);
    }

    .mobile-nav-item.active i {
        font-weight: 700;
    }

    /* Active indicator line */
    .mobile-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 3px;
        background: var(--primary, #3b82f6);
        border-radius: 0 0 3px 3px;
    }

    /* Badge on nav item */
    .mobile-nav-item .nav-badge {
        position: absolute;
        top: 4px;
        right: calc(50% - 20px);
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        background: #ef4444;
        color: #fff;
        font-size: 0.625rem;
        font-weight: 600;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* =====================================================
   MOBILE MORE MENU (Bottom Sheet)
   ===================================================== */

/* Hide on desktop */
.mobile-more-menu,
.mobile-more-overlay {
    display: none;
}

@media (max-width: 768px) {
    .mobile-more-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1100;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .mobile-more-overlay.active {
        display: block;
        opacity: 1;
    }

    .mobile-more-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-radius: 20px 20px 0 0;
        z-index: 1101;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
        max-height: 85vh;
        overflow: hidden;
        padding-bottom: var(--safe-area-bottom);
    }

    .mobile-more-menu.active {
        display: block;
        transform: translateY(0);
    }

    .mobile-more-handle {
        width: 36px;
        height: 5px;
        background: #e2e8f0;
        border-radius: 3px;
        margin: 12px auto;
    }

    .mobile-more-header {
        padding: 0 1.25rem 1rem;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-more-title {
        font-size: 1.125rem;
        font-weight: 600;
        color: #1e293b;
        margin: 0;
    }

    .mobile-more-close {
        width: 32px;
        height: 32px;
        border: none;
        background: #f1f5f9;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #64748b;
        font-size: 1.125rem;
    }

    .mobile-more-content {
        padding: 1rem;
        overflow-y: auto;
        max-height: calc(85vh - 80px);
        -webkit-overflow-scrolling: touch;
    }

    .mobile-more-section {
        margin-bottom: 1.5rem;
    }

    .mobile-more-section:last-child {
        margin-bottom: 0;
    }

    .mobile-more-section-title {
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #94a3b8;
        margin-bottom: 0.75rem;
        padding: 0 0.25rem;
    }

    .mobile-more-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .mobile-more-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
        text-decoration: none;
        color: #334155;
        font-size: 0.75rem;
        font-weight: 500;
        text-align: center;
        border-radius: 12px;
        background: #f8fafc;
        transition: all 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-more-item:active {
        background: #e2e8f0;
        transform: scale(0.95);
    }

    .mobile-more-item i {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.375rem;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .mobile-more-item span {
        line-height: 1.2;
    }

    /* Quick actions row */
    .mobile-more-quick {
        display: flex;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .mobile-quick-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.875rem;
        background: linear-gradient(135deg, var(--primary, #3b82f6) 0%, var(--primary-dark, #2563eb) 100%);
        color: #fff;
        font-size: 0.875rem;
        font-weight: 600;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-quick-btn:active {
        opacity: 0.9;
        transform: scale(0.98);
    }

    .mobile-quick-btn i {
        font-size: 1.125rem;
    }
}

/* =====================================================
   MOBILE PAGE TITLE (In Header)
   ===================================================== */
@media (max-width: 768px) {
    .mobile-page-title {
        flex: 1;
        font-size: 1.125rem;
        font-weight: 600;
        color: #1e293b;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Hide desktop menu toggle on mobile */
    #mobileMenuToggle {
        display: none !important;
    }
}

/* =====================================================
   MOBILE CARDS & LISTS
   ===================================================== */
@media (max-width: 768px) {
    /* Cards */
    .card {
        border-radius: 16px;
        margin-bottom: 1rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    .card-header {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-title {
        font-size: 1rem;
    }

    /* Stat Cards */
    .quick-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.875rem;
        border-radius: 12px;
        gap: 0.5rem;
    }

    .stat-card-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .stat-card-value {
        font-size: 1.25rem;
    }

    .stat-card-label {
        font-size: 0.6875rem;
        line-height: 1.3;
    }

    /* Welcome Card */
    .welcome-card {
        border-radius: 16px;
        padding: 1.25rem;
    }

    .welcome-card h2 {
        font-size: 1.25rem;
    }

    .welcome-stats {
        gap: 1.25rem;
    }

    /* Filters */
    .filters-section {
        padding: 0.75rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .filters-section .filters-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filters-section .filter-search {
        width: 100%;
    }

    .filters-section .filter-selects {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }

    .filters-section select {
        width: 100%;
    }
}

/* =====================================================
   MOBILE TOUCH INTERACTIONS
   ===================================================== */
@media (max-width: 768px) {
    /* Touch-friendly buttons */
    .btn {
        min-height: 44px;
        padding: 0.625rem 1rem;
    }

    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 0.875rem;
    }

    /* Touch-friendly form controls */
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 10px;
    }

    select.form-control {
        font-size: 16px;
    }

    /* Touch-friendly action buttons */
    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    /* Touch ripple effect placeholder */
    .touch-ripple {
        position: relative;
        overflow: hidden;
    }

    /* Pull to refresh indicator */
    .pull-refresh-indicator {
        display: none;
        position: fixed;
        top: calc(var(--mobile-header-height) + var(--safe-area-top));
        left: 50%;
        transform: translateX(-50%);
        padding: 0.5rem 1rem;
        background: #fff;
        border-radius: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        font-size: 0.75rem;
        color: #64748b;
        z-index: 1050;
    }
}

/* =====================================================
   MOBILE SEARCH OVERLAY
   ===================================================== */

/* Hide on desktop */
.mobile-search-overlay {
    display: none;
}

@media (max-width: 768px) {
    .mobile-search-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: #fff;
        z-index: 1200;
        padding-top: var(--safe-area-top);
    }

    .mobile-search-overlay.active {
        display: block;
    }

    .mobile-search-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e5e5e5;
    }

    .mobile-search-input {
        flex: 1;
        height: 44px;
        padding: 0 1rem;
        border: none;
        background: #f5f5f5;
        border-radius: 10px;
        font-size: 16px;
        outline: none;
    }

    .mobile-search-cancel {
        padding: 0.5rem;
        background: none;
        border: none;
        color: var(--primary, #3b82f6);
        font-size: 0.9375rem;
        font-weight: 500;
        cursor: pointer;
    }

    .mobile-search-results {
        padding: 1rem;
        overflow-y: auto;
        height: calc(100vh - 70px);
        -webkit-overflow-scrolling: touch;
    }
}

/* =====================================================
   THEME COLORS FOR MOBILE NAV
   ===================================================== */
/* These ensure the bottom nav respects theme colors */
.theme-shine .mobile-nav-item.active {
    color: var(--primary, #10b981);
}

.theme-shine .mobile-nav-item.active::before {
    background: var(--primary, #10b981);
}

.theme-dark .mobile-bottom-nav {
    background: #1e293b;
    border-color: #334155;
}

.theme-dark .mobile-nav-item {
    color: #94a3b8;
}

.theme-dark .mobile-nav-item.active {
    color: #60a5fa;
}

.theme-dark .mobile-nav-item.active::before {
    background: #60a5fa;
}

.theme-dark .mobile-more-menu {
    background: #1e293b;
}

.theme-dark .mobile-more-handle {
    background: #475569;
}

.theme-dark .mobile-more-title {
    color: #f1f5f9;
}

.theme-dark .mobile-more-item {
    background: #334155;
    color: #e2e8f0;
}

.theme-dark .mobile-more-item i {
    background: #475569;
}

.theme-fruity .mobile-nav-item.active {
    color: var(--primary, #a855f7);
}

.theme-fruity .mobile-nav-item.active::before {
    background: var(--primary, #a855f7);
}

/* =====================================================
   MOBILE SPECIFIC PAGE STYLES
   ===================================================== */
@media (max-width: 768px) {
    /* Tasks page */
    .tasks-layout {
        padding-bottom: 0;
    }

    /* Calendar page */
    .calendar-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Settings page */
    .settings-layout {
        gap: 1rem;
    }

    .settings-nav {
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .settings-nav-item {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Data tables as cards */
    .data-table {
        background: transparent;
        box-shadow: none;
    }

    /* Modal fullscreen on mobile */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
    }

    .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }

    .modal-header {
        padding-top: calc(var(--safe-area-top) + 1rem);
    }
}

/* =====================================================
   ORIENTATION SPECIFIC
   ===================================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-bottom-nav {
        height: 56px;
        padding-bottom: 0;
    }

    .mobile-nav-item {
        flex-direction: row;
        gap: 0.5rem;
    }

    .mobile-nav-item span {
        font-size: 0.75rem;
    }

    .app-content {
        padding-bottom: 1rem;
    }

    .app-main {
        padding-bottom: calc(56px + 16px);
    }
}

/* =====================================================
   HIDE ELEMENTS ON MOBILE
   ===================================================== */
@media (max-width: 768px) {
    /* Hide sidebar toggle since we have bottom nav */
    .sidebar-toggle {
        display: none !important;
    }

    /* Hide right sidebar toggle in header */
    #rightSidebarToggle {
        display: none !important;
    }

    /* Elements that should only show on desktop */
    .desktop-only {
        display: none !important;
    }
}

/* Elements that should only show on mobile */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex;
    }
}

