/**
 * ============================================================================
 * PharmAssist Index Page Styles
 * ============================================================================
 * Location: css/index.css
 * Extracted from index.html for better maintainability
 * 
 * @version 1.0.0
 * @created January 2026
 * ============================================================================
 */

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 20px;
    transition: background 0.3s ease, color 0.3s ease;
    overscroll-behavior-y: contain;
    color: #ffffff;
}

body.light-mode {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1e293b;
}

/* ============================================================================
   USER INFO BAR
   ============================================================================ */

.user-info-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #111111;
    border-bottom: 1px solid #2a2a2a;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.user-info-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
}

body.light-mode .user-info-bar {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body.light-mode .user-info-bar::before {
    display: none;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.user-text-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.user-name-text {
    font-weight: 600;
    color: #ffffff;
}

.user-role {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Easter egg button */
.easter-egg-container {
    position: relative;
    display: flex;
    align-items: center;
}

.easter-egg-btn {
    transition: all 0.3s ease;
}

.easter-egg-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

.easter-egg-btn.playing {
    animation: bounce 0.5s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.easter-egg-message {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #00d4ff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #00d4ff;
    white-space: normal;
    max-width: 320px;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    display: none;
    animation: fadeInMessage 0.3s ease;
    line-height: 1.4;
}

.easter-egg-message.active {
    display: block;
}

.easter-egg-message::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: #1a1a2e;
    border-left: 1px solid #00d4ff;
    border-top: 1px solid #00d4ff;
    transform: rotate(45deg);
}

@keyframes fadeInMessage {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

body.light-mode .easter-egg-message {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: #7c3aed;
    color: #7c3aed;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

body.light-mode .easter-egg-message::before {
    background: #f8fafc;
    border-color: #7c3aed;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: translateY(-1px);
}

.dark-mode-btn {
    background: #141414;
    color: white;
    border: 1px solid #2a2a2a;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.dark-mode-btn:hover {
    background: #1a1a1a;
    border-color: #00d4ff;
    transform: translateY(-1px);
}

body.light-mode .dark-mode-btn {
    background: rgba(100, 116, 139, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

body.light-mode .dark-mode-btn:hover {
    background: rgba(100, 116, 139, 0.4);
}

/* ============================================================================
   GLOBAL SEARCH
   ============================================================================ */

.global-search-container {
    position: relative;
    flex: 0 1 400px;
    margin: 0 20px;
}

.global-search-input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid #2a2a2a;
    border-radius: 24px;
    background: #141414;
    color: white;
    font-size: 14px;
    transition: all 0.3s;
}

.global-search-input::placeholder {
    color: #60a5fa;
}

.global-search-input:focus {
    outline: none;
    background: #1a1a1a;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

body.light-mode .global-search-input {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .global-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

body.light-mode .global-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.global-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
}

.global-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #141414;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.global-search-results.active {
    display: block;
}

.search-result-group {
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
}

.search-result-group:last-child {
    border-bottom: none;
}

.search-result-group-title {
    padding: 4px 16px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #60a5fa;
    letter-spacing: 0.5px;
}

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:hover {
    background: #1a1a1a;
}

.search-result-icon {
    font-size: 20px;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.search-result-subtitle {
    font-size: 12px;
    color: #93c5fd;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #60a5fa;
}

body.light-mode .global-search-results {
    background: white;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body.light-mode .search-result-group {
    border-bottom-color: #e2e8f0;
}

body.light-mode .search-result-group-title {
    color: #6366f1;
}

body.light-mode .search-result-item:hover {
    background: #f1f5f9;
}

body.light-mode .search-result-title {
    color: #1e293b;
}

body.light-mode .search-result-subtitle {
    color: #6366f1;
}

body.light-mode .search-no-results {
    color: #6366f1;
}

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

.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 280px;
    height: calc(100vh - 60px);
    background: #111111;
    border-right: 1px solid #2a2a2a;
    z-index: 900;
    overflow-y: auto;
    transition: transform 0.3s ease;
    display: none; /* Hidden by default, shown when nav mode is 'sidebar' */
}

body.light-mode .sidebar {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
}

body.sidebar-mode .sidebar {
    display: block;
}

body.sidebar-mode.sidebar-collapsed .sidebar {
    transform: translateX(-280px);
}

/* Explicitly hide sidebar elements when not in sidebar mode */
body:not(.sidebar-mode) .sidebar {
    display: none !important;
}

body:not(.sidebar-mode) .sidebar-content {
    display: none !important;
}

body:not(.sidebar-mode) .sidebar-category,
body:not(.sidebar-mode) .sidebar-category-items {
    display: none !important;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #2a2a2a;
}

body.light-mode .sidebar-header {
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .sidebar-header h3 {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    color: #00d4ff;
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.3);
}

body.light-mode .sidebar-toggle-btn {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    color: #1e293b;
}

body.light-mode .sidebar-toggle-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: #7c3aed;
    color: #7c3aed;
}

/* Sidebar Expand Button (visible when collapsed) */
.sidebar-expand-btn {
    position: fixed;
    top: 70px;
    left: 12px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    z-index: 950;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4), 0 0 0 0 rgba(0, 212, 255, 0.7);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4), 0 0 0 0 rgba(0, 212, 255, 0.7);
    }
    50% {
        box-shadow: 0 4px 16px rgba(0, 212, 255, 0.6), 0 0 0 4px rgba(0, 212, 255, 0.3);
    }
}

.sidebar-expand-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 212, 255, 0.6);
    animation: none;
}

body.light-mode .sidebar-expand-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Show expand button only when sidebar is collapsed in sidebar mode */
body.sidebar-mode.sidebar-collapsed .sidebar-expand-btn {
    display: flex;
}

/* Sidebar Content */
.sidebar-content {
    padding: 8px 0;
}

/* Sidebar Categories */
.sidebar-category {
    margin-bottom: 4px;
}

.sidebar-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.sidebar-category-header:hover {
    background: #1a1a1a;
}

body.light-mode .sidebar-category-header:hover {
    background: #f3f4f6;
}

.sidebar-category-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-category-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

body.light-mode .sidebar-category-label {
    color: #1e293b;
}

.sidebar-category-arrow {
    font-size: 12px;
    color: #a0a0a0;
    transition: transform 0.2s;
}

body.light-mode .sidebar-category-arrow {
    color: #64748b;
}

.sidebar-category-header.collapsed .sidebar-category-arrow {
    transform: rotate(-90deg);
}

/* Sidebar Category Items */
.sidebar-category-items {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-category-items.collapsed {
    max-height: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 10px 52px;
    text-decoration: none;
    color: #a0a0a0;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background: #1a1a1a;
    color: #00d4ff;
    padding-left: 56px;
}

body.light-mode .sidebar-item {
    color: #64748b;
}

body.light-mode .sidebar-item:hover {
    background: #f3f4f6;
    color: #7c3aed;
}

.sidebar-item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-item-label {
    font-size: 13px;
    font-weight: 500;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 60px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 850;
    display: none;
}

body.sidebar-mode.mobile .sidebar-overlay {
    display: block;
}

body.sidebar-mode.mobile.sidebar-collapsed .sidebar-overlay {
    display: none;
}

/* Content Shift when Sidebar is Open */
body.sidebar-mode:not(.sidebar-collapsed) .container {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

body.sidebar-mode.sidebar-collapsed .container {
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

/* Hide sections when in sidebar mode */
body.sidebar-mode .section-header,
body.sidebar-mode .section-content {
    display: none;
}

/* Mobile Sidebar (Overlay/Drawer) */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    body.sidebar-mode:not(.sidebar-collapsed) .sidebar {
        transform: translateX(0);
    }
    
    body.sidebar-mode.sidebar-collapsed .sidebar {
        transform: translateX(-280px);
    }
    
    body.sidebar-mode:not(.sidebar-collapsed) .container {
        margin-left: 0;
    }
    
    body.mobile.sidebar-mode:not(.sidebar-collapsed) .sidebar-overlay {
        display: block;
    }
}

/* ============================================================================
   NOTIFICATION BADGE
   ============================================================================ */

.notification-btn-wrapper {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.notification-badge.hidden {
    display: none;
}

/* ============================================================================
   CONTAINER & HEADER
   ============================================================================ */

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: left;
    padding: 10px 0 20px 0;
    color: white;
}

.header h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #ffffff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.assist-text {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    font-weight: 900;
    /* Note: text-shadow doesn't work with transparent text-fill */
    /* Consider using filter: drop-shadow() on parent if glow is needed */
}

.header p {
    font-size: 16px;
    opacity: 0.7;
    font-weight: 500;
    color: #93c5fd;
}

.header-date {
    font-size: 14px;
    color: #93c5fd;
    opacity: 0.8;
    margin-top: 8px;
    font-weight: 500;
}

.header-time {
    font-size: 18px;
    color: #00d4ff;
    font-weight: 600;
    margin-top: 4px;
}

body.light-mode .header h1 {
    background: none;
    -webkit-text-fill-color: white;
}

body.light-mode .assist-text {
    background: linear-gradient(135deg, #7c3aed 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .header p {
    color: white;
    opacity: 0.9;
}

/* ============================================================================
   DASHBOARD
   ============================================================================ */

.dashboard {
    background: #141414;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid #2a2a2a;
}

.dashboard::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-radius: 3px 3px 0 0;
    margin: -24px -24px 20px -24px;
}

body.light-mode .dashboard {
    background: rgba(255, 255, 255, 0.95);
    border: none;
}

body.light-mode .dashboard::before {
    display: none;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.dashboard h2 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

body.light-mode .dashboard h2 {
    color: #1e293b;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(80px, auto); /* Allow natural growth while maintaining minimum */
    gap: 16px;
    grid-auto-flow: row; /* Allow widgets to flow naturally into rows */
    align-items: start; /* Prevent unwanted stretching */
}

/* Bento Grid Responsive Breakpoints */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(80px, auto); /* Maintain auto-sizing */
    }
    
    .dashboard-item {
        grid-column: span 2 !important;
        grid-row: auto !important; /* Let content determine height */
        min-height: 120px;
    }
}

/* ============================================================================
   DASHBOARD ITEMS (WIDGETS)
   ============================================================================ */

.dashboard-item {
    background: #111111;
    border-radius: 12px;
    padding: 0;
    border: 1px solid #2a2a2a;
    transition: all 0.3s;
    position: relative;
    /* Removed overflow: hidden to prevent content clipping */
    display: flex;
    flex-direction: column;
    height: auto; /* Allow natural sizing */
    min-height: 160px; /* Minimum 2 rows (80px × 2 + gaps) */
}

.dashboard-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.dashboard-item:hover::before {
    transform: scaleX(1);
}

body.light-mode .dashboard-item {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: rgba(148, 163, 184, 0.2);
}

body.light-mode .dashboard-item::before {
    display: none;
}

.dashboard-item.hidden {
    display: none !important;
}

.dashboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
}

body.light-mode .dashboard-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(148, 163, 184, 0.2);
}

.dashboard-item.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    cursor: grabbing;
    border: 2px dashed var(--border-color, #2a2a2a);
}

.dashboard-item.drag-over {
    border: 2px dashed var(--accent-primary, #00d4ff);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

body.light-mode .dashboard-item.drag-over {
    border: 2px dashed var(--accent-secondary, #7c3aed);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}

/* Drop position indicator */
.dashboard-grid .drop-indicator {
    background: rgba(0, 212, 255, 0.1);
    border: 2px dashed #00d4ff;
    border-radius: 12px;
    pointer-events: none;
    z-index: 10;
    transition: all 0.15s ease;
}

body.light-mode .dashboard-grid .drop-indicator {
    background: rgba(124, 58, 237, 0.08);
    border-color: #7c3aed;
}

.dashboard-item.collapsed .widget-content {
    display: none;
}

/* Bento Grid Widget Sizes (columns × rows) */
.dashboard-item {
    /* Default sizes will be set via data attributes */
}

/* Default widget sizes */
.dashboard-item[data-widget-id="datetime"] {
    grid-column: span 2;
    grid-row: span 4; /* Increased from 3 to 4 to accommodate mini-calendar */
}

.dashboard-item[data-widget-id="timer"] {
    grid-column: span 2;
    grid-row: span 4; /* Increased from 3 to 4 for better display */
}

.dashboard-item[data-widget-id="cs-date"] {
    grid-column: span 2;
    grid-row: span 4; /* Increased from 3 to 4 to show all content without scrolling */
}

.dashboard-item[data-widget-id="quick-actions"] {
    grid-column: span 2;
    grid-row: span 2;
}

.dashboard-item[data-widget-id="store-info"] {
    grid-column: span 2;
    grid-row: span 4; /* Increased from 3 to 4 for better store info display */
}

.dashboard-item[data-widget-id="fav-plans"] {
    grid-column: span 2;
    grid-row: span 3;
}

.dashboard-item[data-widget-id="day-supply"] {
    grid-column: span 3;
    grid-row: span 4;
}

.dashboard-item[data-widget-id="sig-codes"] {
    grid-column: span 3;
    grid-row: span 4; /* Increased from 3 to 4 for better SIG code display */
    max-height: 600px; /* Cap height for data-heavy widget */
}

.dashboard-item[data-widget-id="taper-sig"] {
    grid-column: span 2;
    grid-row: span 3; /* Increased from 2 to 3 for better taper display */
}

.dashboard-item[data-widget-id="fda-changes"] {
    grid-column: span 4;
    grid-row: span 3;
    max-height: 600px; /* Cap height for data-heavy widget */
}

.dashboard-item[data-widget-id="csa-calendar"] {
    grid-column: span 4;
    grid-row: span 4;
    max-height: 600px; /* Cap height for data-heavy widget */
}

/* Ensure scrolling for data-heavy widgets */
.dashboard-item[data-widget-id="sig-codes"] .widget-content,
.dashboard-item[data-widget-id="fda-changes"] .widget-content,
.dashboard-item[data-widget-id="csa-calendar"] .widget-content {
    overflow-y: auto; /* Ensure scrolling for these */
}

/* Custom size classes for user overrides - increased specificity to override [data-widget-id] defaults */
.dashboard-grid .dashboard-item.bento-2x2 {
    grid-column: span 2;
    grid-row: span 2;
}

.dashboard-grid .dashboard-item.bento-2x3 {
    grid-column: span 2;
    grid-row: span 3;
}

.dashboard-grid .dashboard-item.bento-3x3 {
    grid-column: span 3;
    grid-row: span 3;
}

.dashboard-grid .dashboard-item.bento-3x4 {
    grid-column: span 3;
    grid-row: span 4;
}

.dashboard-grid .dashboard-item.bento-4x2 {
    grid-column: span 4;
    grid-row: span 2;
}

.dashboard-grid .dashboard-item.bento-4x3 {
    grid-column: span 4;
    grid-row: span 3;
}

/* Responsive: Clamp widgets at 4-column breakpoint */
@media (max-width: 1200px) {
    .dashboard-item[data-widget-id="day-supply"],
    .dashboard-item[data-widget-id="fda-changes"],
    .dashboard-item.bento-4x2,
    .dashboard-item.bento-4x3 {
        grid-column: span 4;
    }
    
    .dashboard-item[data-widget-id="sig-codes"],
    .dashboard-item.bento-3x3,
    .dashboard-item.bento-3x4 {
        grid-column: span 3;
    }
}

/* Mobile: All widgets full width with natural height */
@media (max-width: 768px) {
    .dashboard-item {
        grid-column: span 2 !important;
        grid-row: auto !important;
    }
}

/* Legacy size classes (deprecated, map to bento sizes) */
.dashboard-item.size-small {
    grid-column: span 2;
    grid-row: span 2;
}

.dashboard-item.size-medium {
    grid-column: span 3;
    grid-row: span 3;
}

.dashboard-item.size-large {
    grid-column: span 4;
    grid-row: span 3;
}

body.widgets-locked .dashboard-item {
    cursor: default;
}

body.widgets-locked .widget-header {
    cursor: default;
}

/* ============================================================================
   WIDGET CATEGORY TABS
   ============================================================================ */

.widget-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: thin;
}

.widget-tabs::-webkit-scrollbar {
    height: 4px;
}

.widget-tab {
    padding: 10px 20px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 24px;
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.widget-tab:hover {
    background: #1a1a1a;
    border-color: #00d4ff;
    color: #00d4ff;
}

.widget-tab.active {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-color: transparent;
    color: #ffffff;
}

body.light-mode .widget-tab {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #64748b;
}

body.light-mode .widget-tab:hover {
    background: #f3f4f6;
    border-color: #7c3aed;
    color: #7c3aed;
}

body.light-mode .widget-tab.active {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-color: transparent;
    color: #ffffff;
}

/* Mobile tab scrolling */
@media (max-width: 768px) {
    .widget-tabs {
        gap: 6px;
        margin-bottom: 16px;
    }
    
    .widget-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    .dashboard-item.size-medium,
    .dashboard-item.size-large {
        grid-column: span 1;
    }
}

/* ============================================================================
   WIDGET HEADER & CONTROLS
   ============================================================================ */

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #2a2a2a;
    cursor: grab;
    position: relative;
    z-index: 10;
}

body.light-mode .widget-header {
    border-bottom-color: rgba(148, 163, 184, 0.15);
}

.widget-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-header-actions {
    display: flex;
    gap: 4px;
    position: relative;
}

.widget-collapse-btn,
.widget-size-btn {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #93c5fd;
    transition: all 0.2s;
}

.widget-collapse-btn:hover,
.widget-size-btn:hover {
    background: #2a2a2a;
    border-color: #00d4ff;
}

body.light-mode .widget-collapse-btn,
body.light-mode .widget-size-btn {
    background: rgba(100, 116, 139, 0.1);
    border: none;
    color: #6366f1;
}

body.light-mode .widget-collapse-btn:hover,
body.light-mode .widget-size-btn:hover {
    background: rgba(100, 116, 139, 0.2);
}

.widget-size-btn {
    font-size: 12px;
}

.widget-size-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #141414;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding: 4px;
    display: none;
    z-index: 200;
    min-width: 100px;
}

.widget-size-dropdown.active {
    display: block;
}

.widget-size-option {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s;
    color: #ffffff;
}

.widget-size-option:hover {
    background: #1a1a1a;
}

.widget-size-option.active {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
}

body.light-mode .widget-size-dropdown {
    background: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body.light-mode .widget-size-option {
    color: #1e293b;
}

body.light-mode .widget-size-option:hover {
    background: #f1f5f9;
}

body.light-mode .widget-size-option.active {
    background: #7c3aed;
    color: white;
}

.widget-content {
    padding: 16px;
    flex: 1;
    min-height: 0; /* Allow flex shrinking */
    display: flex;
    flex-direction: column;
    overflow-y: visible; /* Let content flow naturally */
    max-height: 600px; /* Only limit extremely tall widgets */
}

/* Enable scrolling only when content exceeds reasonable height */
.dashboard-item .widget-content:has(> *) {
    overflow-y: auto;
}

/* Restore visible overflow for widgets that should never scroll */
.dashboard-item[data-widget-id="datetime"] .widget-content,
.dashboard-item[data-widget-id="timer"] .widget-content,
.dashboard-item[data-widget-id="quick-actions"] .widget-content,
.dashboard-item[data-widget-id="store-info"] .widget-content {
    overflow-y: visible;
    max-height: none;
}

.dashboard-item h3 {
    color: #93c5fd;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.light-mode .dashboard-item h3 {
    color: #6366f1;
}

.dashboard-value {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 4px;
}

body.light-mode .dashboard-value {
    background: none;
    -webkit-text-fill-color: #1e293b;
    color: #1e293b;
}

.dashboard-subtext {
    font-size: 12px;
    color: #60a5fa;
    margin-top: 4px;
}

body.light-mode .dashboard-subtext {
    color: #818cf8;
}

/* ============================================================================
   STORE INFO WIDGET
   ============================================================================ */

.store-info-widget-content.store-info-compact .store-info-section {
    display: none;
}

.store-info-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.store-info-store-number {
    font-size: 22px;
    font-weight: 700;
    color: #00d4ff;
    cursor: pointer;
}

body.light-mode .store-info-store-number {
    color: #7c3aed;
}

.store-info-header-details {
    display: flex;
    gap: 16px;
}

.store-info-header-detail {
    display: flex;
    flex-direction: column;
}

.store-info-header-detail-label {
    font-size: 12px;
    color: #60a5fa;
    text-transform: uppercase;
}

body.light-mode .store-info-header-detail-label {
    color: #818cf8;
}

.store-info-header-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

body.light-mode .store-info-header-detail-value {
    color: #1e293b;
}

.store-info-compact-toggle {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #93c5fd;
}

body.light-mode .store-info-compact-toggle {
    background: rgba(100, 116, 139, 0.1);
    border: none;
    color: #6366f1;
}

.store-info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.store-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.store-info-label {
    font-size: 12px;
    color: #60a5fa;
    font-weight: 600;
}

body.light-mode .store-info-label {
    color: #818cf8;
}

.store-info-value {
    font-size: 15px;
    color: #ffffff;
    cursor: pointer;
}

body.light-mode .store-info-value {
    color: #1e293b;
}

.store-info-npi-badge,
.store-info-dea-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.store-info-npi-badge {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #1e40af 100%);
    color: white;
    border: 1px solid #1e3a8a;
}

.store-info-npi-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.store-info-dea-badge {
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 50%, #991b1b 100%);
    color: white;
    border: 1px solid #7f1d1d;
}

.store-info-dea-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.copyable-field {
    cursor: pointer;
    transition: all 0.2s;
}

.copyable-field:hover {
    opacity: 0.7;
}

.copyable-field.copied {
    background: #dcfce7 !important;
}

.store-select-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.store-select-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.floater-prompt {
    text-align: center;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 8px;
    margin-bottom: 10px;
}

.floater-prompt-title {
    font-weight: 700;
    color: #166534;
    font-size: 14px;
}

.floater-prompt-text {
    font-size: 12px;
    color: #15803d;
    margin-top: 4px;
}

.store-select-item {
    padding: 12px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #0a0a0a;
    color: #ffffff;
}

.store-select-item:hover {
    background: #141414;
    border-color: #00d4ff;
}

body.light-mode .store-select-item {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .store-select-item:hover {
    background: #f8fafc;
    border-color: #7c3aed;
}

/* ============================================================================
   TIMER CONTROLS
   ============================================================================ */

.timer-controls {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.timer-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.timer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.timer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.timer-btn.stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.timer-btn.stop:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.timer-btn.countdown {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.cs-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cs-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
}

.cs-checkbox-label {
    font-size: 12px;
    color: #93c5fd;
}

body.light-mode .cs-checkbox-label {
    color: #6366f1;
}

/* ============================================================================
   FORM INPUTS
   ============================================================================ */

.alarm-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 8px;
    transition: all 0.2s;
    background: #0a0a0a;
    color: #ffffff;
}

.alarm-input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

body.light-mode .alarm-input {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .alarm-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #93c5fd;
    margin-top: 10px;
    margin-bottom: 4px;
}

body.light-mode .input-label {
    color: #6366f1;
}

/* ============================================================================
   QUICK ACTIONS WIDGET
   ============================================================================ */

.quick-actions-wrapper {
    flex: 1;
    overflow-y: auto;
    min-height: 80px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* Quick Actions Grid - Responsive based on widget size */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.dashboard-item.bento-2x2 .quick-actions-grid,
.dashboard-item[data-widget-id="quick-actions"] .quick-actions-grid {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-item.bento-3x3 .quick-actions-grid,
.dashboard-item.bento-3x4 .quick-actions-grid {
    grid-template-columns: repeat(4, 1fr);
}

.dashboard-item.bento-4x2 .quick-actions-grid,
.dashboard-item.bento-4x3 .quick-actions-grid {
    grid-template-columns: repeat(6, 1fr);
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.quick-action-btn:hover {
    border-color: #00d4ff;
    background: #141414;
}

body.light-mode .quick-action-btn {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
}

body.light-mode .quick-action-btn:hover {
    border-color: #7c3aed;
    background: #faf5ff;
}

.quick-action-icon {
    font-size: 24px;
}

.quick-action-label {
    font-size: 11px;
    font-weight: 600;
    color: #93c5fd;
    text-align: center;
    line-height: 1.2;
}

body.light-mode .quick-action-label {
    color: #6366f1;
}

.quick-actions-config-btn {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px dashed #2a2a2a;
    border-radius: 8px;
    color: #93c5fd;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    flex-shrink: 0;
}

.quick-actions-config-btn:hover {
    border-color: #00d4ff;
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.05);
}

body.light-mode .quick-actions-config-btn {
    border-color: #818cf8;
    color: #6366f1;
}

body.light-mode .quick-actions-config-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.05);
}

/* ============================================================================
   FAVORITE PLANS WIDGET
   ============================================================================ */

.fav-plans-search {
    position: relative;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.fav-plans-search input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 13px;
    background: #0a0a0a;
    color: #ffffff;
}

.fav-plans-search input:focus {
    outline: none;
    border-color: #00d4ff;
}

body.light-mode .fav-plans-search input {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .fav-plans-search input:focus {
    border-color: #7c3aed;
}

.fav-plans-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

.fav-plans-list {
    flex: 1;
    overflow-y: auto;
    min-height: 80px;
}

.fav-plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.2s;
}

.fav-plan-item:hover {
    background: #141414;
    border-color: #00d4ff;
}

body.light-mode .fav-plan-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .fav-plan-item:hover {
    background: #f1f5f9;
}

.fav-plan-item.hidden {
    display: none;
}

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

.fav-plan-name {
    font-weight: 600;
    font-size: 13px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-mode .fav-plan-name {
    color: #1e293b;
}

.fav-plan-details {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.fav-plan-code {
    font-size: 11px;
    color: #00d4ff;
    font-weight: 600;
}

body.light-mode .fav-plan-code {
    color: #7c3aed;
}

.fav-plan-state {
    font-size: 11px;
    color: #93c5fd;
}

body.light-mode .fav-plan-state {
    color: #6366f1;
}

.fav-plan-actions {
    display: flex;
    gap: 4px;
}

.fav-plan-btn {
    background: rgba(0, 212, 255, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

body.light-mode .fav-plan-btn {
    background: rgba(124, 58, 237, 0.1);
}

.fav-plan-btn.remove {
    background: rgba(239, 68, 68, 0.1);
}

.fav-empty {
    text-align: center;
    padding: 20px;
    color: #60a5fa;
    font-size: 13px;
}

body.light-mode .fav-empty {
    color: #818cf8;
}

.fav-empty a {
    color: #00d4ff;
    text-decoration: none;
}

body.light-mode .fav-empty a {
    color: #7c3aed;
}

/* ============================================================================
   SIG CODES WIDGET
   ============================================================================ */

.sig-widget-header {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.sig-toggle-btn {
    flex: 1;
    padding: 8px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #93c5fd;
    cursor: pointer;
    transition: all 0.2s;
}

.sig-toggle-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-color: transparent;
    color: white;
}

.sig-toggle-btn:hover:not(.active) {
    border-color: #00d4ff;
}

body.light-mode .sig-toggle-btn {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #6366f1;
}

body.light-mode .sig-toggle-btn.active {
    background: #7c3aed;
    color: white;
}

.sig-search-wrapper {
    position: relative;
    margin: 10px 0;
    flex-shrink: 0;
}

.sig-search-wrapper input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 13px;
    background: #0a0a0a;
    color: #ffffff;
}

.sig-search-wrapper input:focus {
    outline: none;
    border-color: #00d4ff;
}

body.light-mode .sig-search-wrapper input {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .sig-search-wrapper input:focus {
    border-color: #7c3aed;
}

.sig-search-wrapper::before {
    content: '🔍';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

.sig-list {
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
    max-height: 300px;
}

.sig-item {
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.sig-item:hover {
    background: #141414;
    border-color: #00d4ff;
}

body.light-mode .sig-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .sig-item:hover {
    background: #f1f5f9;
    border-color: #7c3aed;
}

.sig-item-name {
    font-weight: 700;
    font-size: 13px;
    color: #00d4ff;
}

body.light-mode .sig-item-name {
    color: #7c3aed;
}

.sig-item-text {
    font-size: 12px;
    color: #93c5fd;
    margin-top: 4px;
}

body.light-mode .sig-item-text {
    color: #6366f1;
}

.sig-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sig-badge-shared {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.sig-badge-personal {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
}

body.light-mode .sig-badge-shared {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

body.light-mode .sig-badge-personal {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.sig-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #2a2a2a;
}

body.light-mode .sig-item-actions {
    border-top-color: #e2e8f0;
}

.sig-action-btn {
    background: transparent;
    border: none;
    color: #93c5fd;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.sig-action-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

.sig-action-btn.sig-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

body.light-mode .sig-action-btn {
    color: #6366f1;
}

body.light-mode .sig-action-btn:hover {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.sig-add-btn {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sig-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.sig-loading,
.sig-empty,
.sig-error {
    text-align: center;
    padding: 20px;
    color: #60a5fa;
    font-size: 13px;
}

.sig-error {
    color: #ef4444;
}

body.light-mode .sig-loading,
body.light-mode .sig-empty {
    color: #818cf8;
}

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

.sig-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

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

.sig-modal {
    background: #141414;
    border-radius: 16px;
    border: 1px solid #2a2a2a;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

body.light-mode .sig-modal {
    background: white;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sig-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #2a2a2a;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.light-mode .sig-modal-header {
    border-bottom-color: #e2e8f0;
    color: #1e293b;
}

.sig-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #60a5fa;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.sig-modal-close:hover {
    color: #ef4444;
}

.sig-modal-body {
    padding: 24px;
}

.sig-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    background: #0a0a0a;
    color: #ffffff;
}

.sig-modal-input:focus {
    outline: none;
    border-color: #00d4ff;
}

body.light-mode .sig-modal-input {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .sig-modal-input:focus {
    border-color: #7c3aed;
}

.sig-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

body.light-mode .sig-modal-footer {
    border-top-color: #e2e8f0;
}

.sig-modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sig-modal-btn.secondary {
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #93c5fd;
}

.sig-modal-btn.secondary:hover {
    border-color: #60a5fa;
    color: #ffffff;
}

body.light-mode .sig-modal-btn.secondary {
    border-color: #e2e8f0;
    color: #6366f1;
}

body.light-mode .sig-modal-btn.secondary:hover {
    border-color: #818cf8;
    color: #1e293b;
}

.sig-modal-btn.primary {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border: none;
    color: white;
}

.sig-modal-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.sig-modal-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.sig-modal-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
}

.sig-modal-checkbox label {
    font-size: 14px;
    color: #93c5fd;
}

body.light-mode .sig-modal-checkbox label {
    color: #6366f1;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.sig-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    z-index: 3000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
}

/* ============================================================================
   DAY SUPPLY CALCULATOR
   ============================================================================ */

.calc-mode-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.calc-mode-btn {
    flex: 1 1 auto;
    min-width: 60px;
    padding: 8px 6px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #93c5fd;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.calc-mode-btn.active {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-color: transparent;
    color: white;
}

body.light-mode .calc-mode-btn {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #6366f1;
}

body.light-mode .calc-mode-btn.active {
    background: #7c3aed;
    color: white;
}

.calc-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

/* Compact fields for day supply widget - 4 columns */
.calc-fields-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.calc-field-sm {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calc-field-sm label {
    font-size: 9px;
    color: #60a5fa;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-mode .calc-field-sm label {
    color: #818cf8;
}

.calc-field-sm input,
.calc-field-sm select {
    padding: 6px 4px;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    font-size: 12px;
    background: #0a0a0a;
    color: #ffffff;
    text-align: center;
    width: 100%;
    min-width: 0;
}

.calc-field-sm input:focus,
.calc-field-sm select:focus {
    outline: none;
    border-color: #00d4ff;
}

body.light-mode .calc-field-sm input,
body.light-mode .calc-field-sm select {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .calc-field-sm input:focus,
body.light-mode .calc-field-sm select:focus {
    border-color: #7c3aed;
}

/* Compact note style */
.calc-note-compact {
    font-size: 9px;
    color: #60a5fa;
    padding: 4px 6px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 4px;
    margin-top: 6px;
}

.calc-note-compact strong {
    color: #f59e0b;
}

body.light-mode .calc-note-compact {
    background: rgba(124, 58, 237, 0.1);
    color: #6366f1;
}

/* Info Reference Grid */
.info-ref-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.info-ref-card {
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 10px;
}

.info-ref-title {
    font-size: 11px;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 6px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 4px;
}

.info-ref-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    padding: 3px 0;
    gap: 4px;
}

.info-ref-item span {
    color: #7dd3fc;
    flex-shrink: 0;
}

.info-ref-item strong {
    color: #22c55e;
    text-align: right;
}

body.light-mode .info-ref-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .info-ref-title {
    color: #7c3aed;
    border-bottom-color: #e2e8f0;
}

body.light-mode .info-ref-item span {
    color: #6366f1;
}

body.light-mode .info-ref-item strong {
    color: #16a34a;
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calc-field label {
    font-size: 10px;
    color: #60a5fa;
    font-weight: 600;
}

body.light-mode .calc-field label {
    color: #818cf8;
}

.calc-field input {
    padding: 8px;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 13px;
    background: #0a0a0a;
    color: #ffffff;
    text-align: center;
}

.calc-field input:focus {
    outline: none;
    border-color: #00d4ff;
}

body.light-mode .calc-field input {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .calc-field input:focus {
    border-color: #7c3aed;
}

.insulin-presets {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.insulin-preset-btn {
    padding: 6px 10px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #93c5fd;
    cursor: pointer;
    transition: all 0.2s;
}

.insulin-preset-btn.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    color: #00d4ff;
}

.insulin-preset-btn:hover:not(.active) {
    border-color: #00d4ff;
}

body.light-mode .insulin-preset-btn {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #6366f1;
}

body.light-mode .insulin-preset-btn.active {
    background: rgba(124, 58, 237, 0.1);
    border-color: #7c3aed;
    color: #7c3aed;
}

.calc-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    margin-top: 12px;
    flex-shrink: 0;
}

.calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.calc-result {
    margin-top: 12px;
    padding: 12px;
    background: #0a0a0a;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    min-height: 44px;
}

.calc-result .result-value {
    font-size: 24px;
    font-weight: 700;
    color: #00d4ff;
}

.calc-result .result-label {
    font-size: 12px;
    color: #93c5fd;
    margin-top: 4px;
}

.calc-result .result-breakdown {
    font-size: 11px;
    color: #60a5fa;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #2a2a2a;
    text-align: left;
}

.calc-result .result-warning {
    color: #f59e0b;
    font-weight: 600;
    margin-top: 6px;
}

body.light-mode .calc-result {
    background: #f8fafc;
}

body.light-mode .calc-result .result-value {
    color: #7c3aed;
}

body.light-mode .calc-result .result-label {
    color: #6366f1;
}

body.light-mode .calc-result .result-breakdown {
    color: #818cf8;
    border-top-color: #e2e8f0;
}

.calc-section {
    margin-bottom: 8px;
}

.calc-subsection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.calc-subsection-label {
    font-size: 10px;
    font-weight: 700;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.light-mode .calc-subsection-label {
    color: #7c3aed;
}

.calc-ref-btn {
    padding: 4px 8px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid #00d4ff;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #00d4ff;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-ref-btn:hover {
    background: rgba(0, 212, 255, 0.2);
}

body.light-mode .calc-ref-btn {
    background: rgba(124, 58, 237, 0.1);
    border-color: #7c3aed;
    color: #7c3aed;
}

body.light-mode .calc-ref-btn:hover {
    background: rgba(124, 58, 237, 0.2);
}

.calc-note {
    font-size: 10px;
    color: #60a5fa;
    padding: 8px 10px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 6px;
    margin-top: 10px;
    line-height: 1.5;
}

.calc-note strong {
    color: #f59e0b;
}

body.light-mode .calc-note {
    background: rgba(124, 58, 237, 0.1);
    color: #6366f1;
}

/* Day Supply Widget Content */
.ds-widget-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
}

.ds-widget-content .calc-section {
    flex-shrink: 0;
}

.ds-widget-content .calc-result {
    flex-shrink: 0;
}

/* ============================================================================
   CSA CALENDAR WIDGET - 3-COLUMN LAYOUT
   ============================================================================ */

.dashboard-item[data-widget-id="csa-calendar"] .widget-content {
    overflow: hidden;
    padding: 12px;
}

.csa-widget-container {
    display: grid;
    grid-template-columns: 280px 320px 1fr;
    gap: 12px;
    height: 100%;
    min-height: 0;
    padding: 8px;
    box-shadow: inset 0 0 30px rgba(0, 212, 255, 0.08);
}

/* Settings Panel (Left Column) */
.csa-settings-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding: 12px;
    background: linear-gradient(135deg, var(--bg-tertiary, #1a1a1a) 0%, rgba(0, 212, 255, 0.02) 100%);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.csa-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.csa-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    line-height: 1.3;
}

.csa-spinner-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.csa-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-secondary, #111111);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 8px;
    color: var(--accent-primary, #00d4ff);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.csa-input:focus {
    outline: none;
    border-color: var(--accent-primary, #00d4ff);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.csa-suffix {
    color: var(--text-secondary, #a0a0a0);
    font-size: 13px;
    font-weight: 500;
}

body.light-mode .csa-settings-panel {
    background: #f9fafb;
    border-color: #e5e7eb;
}

body.light-mode .csa-input {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #1e293b;
}

body.light-mode .csa-suffix {
    color: #64748b;
}

/* Formula Section */
.csa-formula-section {
    padding: 12px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid var(--accent-primary, #00d4ff);
}

.csa-formula-section label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--accent-primary, #00d4ff);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.csa-formula-display {
    font-size: 12px;
    color: var(--text-primary, #ffffff);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Courier New', monospace;
    line-height: 1.5;
    font-weight: 500;
}

body.light-mode .csa-formula-section {
    background: rgba(124, 58, 237, 0.05);
    border-color: #7c3aed;
}

body.light-mode .csa-formula-section label {
    color: #7c3aed;
}

body.light-mode .csa-formula-display {
    color: #1e293b;
}

/* Store Hours Section */
.csa-store-hours-section {
    padding-top: 16px;
    border-top: 1px solid var(--border-color, #2a2a2a);
}

.csa-store-hours-section h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary, #ffffff);
    display: flex;
    align-items: center;
    gap: 6px;
}

.csa-toggle-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.csa-toggle-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: var(--bg-secondary, #111111);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 8px;
}

.csa-toggle-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.csa-toggle-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.csa-toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
}

.csa-toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.csa-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary, #1a1a1a);
    border: 1px solid var(--border-color, #2a2a2a);
    transition: 0.3s;
    border-radius: 20px;
}

.csa-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: var(--text-muted, #666666);
    transition: 0.3s;
    border-radius: 50%;
}

.csa-toggle-switch input:checked + .csa-toggle-slider {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-color: transparent;
}

.csa-toggle-switch input:checked + .csa-toggle-slider:before {
    transform: translateX(18px);
    background: white;
}

.csa-toggle-hint {
    font-size: 10px;
    color: var(--text-muted, #666666);
    font-weight: 500;
}

body.light-mode .csa-store-hours-section {
    border-color: #e5e7eb;
}

body.light-mode .csa-toggle-item {
    background: #ffffff;
    border-color: #e5e7eb;
}

body.light-mode .csa-toggle-text {
    color: #1e293b;
}

body.light-mode .csa-toggle-slider {
    background: #e5e7eb;
    border-color: #d1d5db;
}

body.light-mode .csa-toggle-slider:before {
    background: #94a3b8;
}

/* Calendar Panel (Middle Column) */
.csa-calendar-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding: 8px;
    background: var(--bg-tertiary, #1a1a1a);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 12px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.csa-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.csa-month-year {
    display: flex;
    gap: 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
}

.csa-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.csa-nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.4);
}

.csa-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.csa-calendar-weekdays div {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #666666);
    text-transform: uppercase;
    padding: 4px 0;
}

.csa-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    flex: 1;
    min-height: 0;
}

.csa-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color, #2a2a2a);
    background: var(--bg-secondary, #111111);
    color: var(--text-primary, #ffffff);
}

.csa-calendar-day:not(.empty):not(.disabled):hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    border-color: var(--accent-primary, #00d4ff);
    transform: scale(1.05);
}

.csa-calendar-day.selected {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%) !important;
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.csa-calendar-day.past {
    color: var(--text-secondary, #a0a0a0);
}

.csa-calendar-day.empty {
    cursor: default;
    background: transparent;
    border-color: transparent;
}

.csa-calendar-day.disabled {
    color: var(--text-muted, #666666);
    cursor: not-allowed;
    opacity: 0.5;
}

.csa-today-btn {
    width: 100%;
    padding: 8px;
    background: var(--bg-secondary, #111111);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 8px;
    color: var(--text-primary, #ffffff);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.csa-today-btn:hover {
    border-color: var(--accent-primary, #00d4ff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.csa-calendar-hint {
    text-align: center;
    font-size: 10px;
    color: var(--text-muted, #666666);
    font-weight: 500;
    margin-top: 4px;
}

body.light-mode .csa-calendar-panel {
    background: #f9fafb;
    border-color: #e5e7eb;
}

body.light-mode .csa-month-year {
    color: #1e293b;
}

body.light-mode .csa-calendar-day {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #1e293b;
}

body.light-mode .csa-today-btn {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #1e293b;
}

/* Results Panel (Right Column) */
.csa-results-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 8px;
    background: var(--bg-tertiary, #1a1a1a);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 12px;
}

.csa-closure-notice {
    display: none;
    padding: 8px 10px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fbbf24;
    align-items: center;
    gap: 6px;
}

.csa-closure-notice.visible {
    display: flex;
}

.csa-notice-icon {
    font-size: 14px;
}

.csa-result-card {
    padding: 10px 12px;
    background: var(--bg-secondary, #111111);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.csa-result-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.csa-result-card.csa-primary {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-color: #00d4ff;
    padding: 14px 12px;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
    transition: all 0.2s ease;
}

.csa-result-card label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #a0a0a0);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.csa-result-value {
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.csa-result-value.csa-large {
    font-size: 18px;
}

.csa-result-value.csa-medium {
    font-size: 16px;
}

.csa-result-day {
    font-size: 10px;
    color: var(--text-muted, #666666);
    font-weight: 500;
}

.csa-status-card {
    padding: 10px 12px;
    background: var(--bg-secondary, #111111);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.csa-status-card label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #a0a0a0);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.csa-status-value {
    font-size: 15px;
    font-weight: 700;
    padding: 8px;
    border-radius: 6px;
}

.csa-status-value.eligible {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid #10b981;
}

.csa-status-value.not-eligible {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.csa-button-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.csa-action-btn {
    padding: 8px 14px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 212, 255, 0.2);
}

.csa-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.csa-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.csa-quick-link {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color, #2a2a2a);
    margin-top: auto;
}

.csa-full-page-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-secondary, #111111);
    border: 1px solid var(--accent-primary, #00d4ff);
    border-radius: 8px;
    color: var(--accent-primary, #00d4ff);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
}

.csa-full-page-link:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

body.light-mode .csa-results-panel {
    background: #f9fafb;
    border-color: #e5e7eb;
}

body.light-mode .csa-result-card {
    background: #ffffff;
    border-color: #e5e7eb;
}

body.light-mode .csa-result-card.csa-primary {
    background: rgba(124, 58, 237, 0.05);
    border-color: #7c3aed;
}

body.light-mode .csa-result-value {
    background: none;
    -webkit-text-fill-color: #1e293b;
    color: #1e293b;
}

body.light-mode .csa-status-card {
    background: #ffffff;
    border-color: #e5e7eb;
}

body.light-mode .csa-quick-link {
    border-color: #e5e7eb;
}

body.light-mode .csa-full-page-link {
    background: #ffffff;
    border-color: #7c3aed;
    color: #7c3aed;
}

body.light-mode .csa-full-page-link:hover {
    background: rgba(124, 58, 237, 0.05);
}

/* Responsive Layout */
@media (max-width: 1400px) {
    .csa-widget-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }
    
    .csa-settings-panel,
    .csa-calendar-panel {
        max-height: 300px;
    }
}

/* Eye Drops Presets */
.eyedrop-presets {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.eyedrop-preset-btn {
    padding: 6px 10px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #93c5fd;
    cursor: pointer;
    transition: all 0.2s;
}

.eyedrop-preset-btn.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    color: #00d4ff;
}

.eyedrop-preset-btn:hover:not(.active) {
    border-color: #00d4ff;
}

body.light-mode .eyedrop-preset-btn {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #6366f1;
}

body.light-mode .eyedrop-preset-btn.active {
    background: rgba(124, 58, 237, 0.1);
    border-color: #7c3aed;
    color: #7c3aed;
}

/* Eye Drops Brand Presets */
.eyedrop-brand-presets {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.eyedrop-brand-btn {
    padding: 5px 8px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #93c5fd;
    cursor: pointer;
    transition: all 0.2s;
}

.eyedrop-brand-btn.active {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #22c55e;
}

.eyedrop-brand-btn:hover:not(.active) {
    border-color: #22c55e;
}

body.light-mode .eyedrop-brand-btn {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #6366f1;
}

body.light-mode .eyedrop-brand-btn.active {
    background: rgba(34, 197, 94, 0.1);
    border-color: #16a34a;
    color: #16a34a;
}

/* Calc Field Select */
.calc-field select {
    padding: 8px;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 12px;
    background: #0a0a0a;
    color: #ffffff;
    cursor: pointer;
}

.calc-field select:focus {
    outline: none;
    border-color: #00d4ff;
}

body.light-mode .calc-field select {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .calc-field select:focus {
    border-color: #7c3aed;
}

/* Reference Modal Styles */
.ref-modal {
    max-width: 600px;
    max-height: 80vh;
}

.ref-modal .sig-modal-body {
    padding: 0;
    overflow: hidden;
}

.ref-table-container {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0 16px;
}

.ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ref-table th {
    background: #1a1a1a;
    color: #00d4ff;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.ref-table td {
    padding: 8px;
    border-bottom: 1px solid #2a2a2a;
    color: #e0e0e0;
}

.ref-table tr:hover td {
    background: rgba(0, 212, 255, 0.05);
}

.ref-table tr.ref-category td {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    color: #00d4ff;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 8px;
}

body.light-mode .ref-table th {
    background: #f1f5f9;
    color: #7c3aed;
}

body.light-mode .ref-table td {
    border-bottom-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .ref-table tr:hover td {
    background: rgba(124, 58, 237, 0.05);
}

body.light-mode .ref-table tr.ref-category td {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    color: #7c3aed;
}

.ref-note {
    padding: 12px 16px;
    background: rgba(0, 212, 255, 0.1);
    border-top: 1px solid #2a2a2a;
    font-size: 11px;
    line-height: 1.6;
    color: #93c5fd;
}

.ref-note strong {
    color: #00d4ff;
}

body.light-mode .ref-note {
    background: rgba(124, 58, 237, 0.05);
    border-top-color: #e2e8f0;
    color: #6366f1;
}

body.light-mode .ref-note strong {
    color: #7c3aed;
}

/* ============================================================================
   MINI CALENDAR
   ============================================================================ */

.mini-calendar {
    margin-top: 12px;
}

.mini-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mini-calendar-title {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
}

body.light-mode .mini-calendar-title {
    color: #1e293b;
}

.mini-calendar-nav {
    display: flex;
    gap: 4px;
}

.mini-calendar-nav button {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #93c5fd;
}

.mini-calendar-nav button:hover {
    background: #2a2a2a;
}

body.light-mode .mini-calendar-nav button {
    background: rgba(100, 116, 139, 0.1);
    border: none;
    color: #6366f1;
}

body.light-mode .mini-calendar-nav button:hover {
    background: rgba(100, 116, 139, 0.2);
}

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

.mini-calendar-weekday {
    text-align: center;
    font-size: 9px;
    font-weight: 600;
    color: #60a5fa;
    padding: 4px 0;
}

body.light-mode .mini-calendar-weekday {
    color: #818cf8;
}

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

.mini-calendar-day {
    text-align: center;
    font-size: 11px;
    padding: 6px 0;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.mini-calendar-day:hover {
    background: #1a1a1a;
}

.mini-calendar-day.other-month {
    color: #444444;
}

.mini-calendar-day.today {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    font-weight: 700;
}

body.light-mode .mini-calendar-day {
    color: #1e293b;
}

body.light-mode .mini-calendar-day:hover {
    background: #f1f5f9;
}

body.light-mode .mini-calendar-day.other-month {
    color: #cbd5e1;
}

body.light-mode .mini-calendar-day.today {
    background: #7c3aed;
    color: white;
}

.open-calendar-btn {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px dashed #2a2a2a;
    border-radius: 8px;
    color: #93c5fd;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.open-calendar-btn:hover {
    border-color: #00d4ff;
    color: #00d4ff;
}

body.light-mode .open-calendar-btn {
    border-color: #818cf8;
    color: #6366f1;
}

body.light-mode .open-calendar-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

/* ============================================================================
   FULL CALENDAR MODAL
   ============================================================================ */

.calendar-modal .sig-modal {
    max-width: 600px;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-nav-btn {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    color: #93c5fd;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: #2a2a2a;
    border-color: #00d4ff;
}

body.light-mode .calendar-nav-btn {
    background: #f1f5f9;
    border: none;
    color: #6366f1;
}

body.light-mode .calendar-nav-btn:hover {
    background: #e2e8f0;
}

.calendar-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

body.light-mode .calendar-title {
    color: #1e293b;
}

.calendar-options {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.calendar-option-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #93c5fd;
    cursor: pointer;
}

body.light-mode .calendar-option-label {
    color: #6366f1;
}

.calendar-option-label input {
    width: 16px;
    height: 16px;
    accent-color: #7c3aed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #60a5fa;
    padding: 8px 0;
}

body.light-mode .calendar-weekday {
    color: #818cf8;
}

.week-num-header {
    font-size: 10px;
    color: #444444;
}

body.light-mode .week-num-header {
    color: #cbd5e1;
}

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

.calendar-week-num {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #444444;
    background: #0a0a0a;
    border-radius: 4px;
}

body.light-mode .calendar-week-num {
    color: #818cf8;
    background: #f8fafc;
}

.calendar-day {
    text-align: center;
    padding: 8px 4px;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.calendar-day:hover {
    background: #1a1a1a;
}

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

.calendar-day.today {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3) 0%, rgba(124, 58, 237, 0.3) 100%);
    border: 2px solid #00d4ff;
}

body.light-mode .calendar-day {
    color: #1e293b;
}

body.light-mode .calendar-day:hover {
    background: #f1f5f9;
}

body.light-mode .calendar-day.other-month {
    color: #cbd5e1;
}

body.light-mode .calendar-day.today {
    background: rgba(124, 58, 237, 0.1);
    border-color: #7c3aed;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 14px;
}

.calendar-day-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.calendar-holiday {
    font-size: 8px;
    background: #dc2626;
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
}

.calendar-holiday.minor {
    background: #7c3aed;
}

.calendar-lunar {
    font-size: 12px;
}

.calendar-legend {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #2a2a2a;
    flex-wrap: wrap;
}

body.light-mode .calendar-legend {
    border-top-color: #e2e8f0;
}

.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #93c5fd;
}

body.light-mode .calendar-legend-item {
    color: #6366f1;
}

.calendar-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.calendar-legend-dot.major {
    background: #dc2626;
}

.calendar-legend-dot.minor {
    background: #7c3aed;
}

.calendar-legend-dot.lunar {
    background: #1e293b;
}

.calendar-today-btn {
    margin-top: 16px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

/* ============================================================================
   TAPER SIG GENERATOR
   ============================================================================ */

.taper-sig-modal .sig-modal {
    max-width: 700px;
}

.taper-steps-container {
    margin-bottom: 16px;
}

.taper-step {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 10px;
    background: #0a0a0a;
    border-radius: 8px;
    flex-wrap: wrap;
}

body.light-mode .taper-step {
    background: #f8fafc;
}

.taper-step-label {
    font-size: 12px;
    font-weight: 600;
    color: #00d4ff;
    min-width: 50px;
}

body.light-mode .taper-step-label {
    color: #7c3aed;
}

.taper-step-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    background: #141414;
    color: #ffffff;
}

.taper-step-input:focus {
    outline: none;
    border-color: #00d4ff;
}

body.light-mode .taper-step-input {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .taper-step-input:focus {
    border-color: #7c3aed;
}

.taper-step-select {
    padding: 8px 12px;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 13px;
    background: #141414;
    color: #ffffff;
    cursor: pointer;
}

.taper-step-select:focus {
    outline: none;
    border-color: #00d4ff;
}

body.light-mode .taper-step-select {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

.taper-step-text {
    font-size: 12px;
    color: #93c5fd;
}

body.light-mode .taper-step-text {
    color: #6366f1;
}

.taper-po-text {
    font-size: 12px;
    color: #00d4ff;
    font-weight: 600;
}

body.light-mode .taper-po-text {
    color: #7c3aed;
}

.taper-step-remove {
    margin-left: auto;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    font-size: 12px;
}

.taper-step-remove:hover {
    background: rgba(239, 68, 68, 0.2);
}

.taper-add-step-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px dashed #2a2a2a;
    border-radius: 8px;
    color: #93c5fd;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.taper-add-step-btn:hover {
    border-color: #00d4ff;
    color: #00d4ff;
}

body.light-mode .taper-add-step-btn {
    border-color: #818cf8;
    color: #6366f1;
}

body.light-mode .taper-add-step-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

.taper-generated-sig {
    margin-top: 20px;
    padding: 16px;
    background: #0a0a0a;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.taper-generated-sig:hover {
    border-color: #00d4ff;
    background: #141414;
}

.taper-generated-sig.copied {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

body.light-mode .taper-generated-sig {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .taper-generated-sig:hover {
    border-color: #7c3aed;
    background: #faf5ff;
}

.taper-sig-output {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 14px;
    color: #ffffff;
    line-height: 1.5;
    word-break: break-word;
}

body.light-mode .taper-sig-output {
    color: #1e293b;
}

.taper-char-count {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.taper-char-count-text {
    font-size: 12px;
    color: #60a5fa;
}

.taper-char-count-text.over-limit {
    color: #ef4444;
    font-weight: 600;
}

body.light-mode .taper-char-count-text {
    color: #818cf8;
}

.taper-click-hint {
    font-size: 11px;
    color: #00d4ff;
}

body.light-mode .taper-click-hint {
    color: #7c3aed;
}

/* ============================================================================
   WIDGET CONFIGURATION MODAL
   ============================================================================ */

.widget-config-list {
    max-height: 400px;
    overflow-y: auto;
}

.widget-config-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.widget-config-item:hover {
    border-color: #00d4ff;
}

.widget-config-item.selected {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
}

body.light-mode .widget-config-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .widget-config-item:hover {
    border-color: #7c3aed;
}

body.light-mode .widget-config-item.selected {
    background: rgba(124, 58, 237, 0.1);
    border-color: #7c3aed;
}

.widget-config-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
    flex-shrink: 0;
}

.widget-config-icon {
    font-size: 24px;
    flex-shrink: 0;
}

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

.widget-config-name {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
}

body.light-mode .widget-config-name {
    color: #1e293b;
}

.widget-config-desc {
    font-size: 12px;
    color: #93c5fd;
    margin-top: 2px;
}

body.light-mode .widget-config-desc {
    color: #6366f1;
}

/* Widget Config - Main Row */
.widget-config-main {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

/* Widget Tab Assignments */
.widget-tab-assignments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #2a2a2a;
}

body.light-mode .widget-tab-assignments {
    border-top-color: #e2e8f0;
}

.widget-tab-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 12px;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.widget-tab-checkbox:hover {
    border-color: #00d4ff;
    background: #1a1a1a;
    color: #00d4ff;
}

.widget-tab-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #7c3aed;
    margin: 0;
}

.widget-tab-checkbox input[type="checkbox"]:checked + span {
    color: #00d4ff;
    font-weight: 600;
}

body.light-mode .widget-tab-checkbox {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #64748b;
}

body.light-mode .widget-tab-checkbox:hover {
    border-color: #7c3aed;
    background: #f8fafc;
    color: #7c3aed;
}

body.light-mode .widget-tab-checkbox input[type="checkbox"]:checked + span {
    color: #7c3aed;
}

.widget-lock-option {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #2a2a2a;
}

body.light-mode .widget-lock-option {
    border-top-color: #e2e8f0;
}

/* ============================================================================
   QUICK ACTIONS CONFIG MODAL
   ============================================================================ */

.quick-actions-config-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.quick-action-config-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-config-label:hover {
    border-color: #00d4ff;
}

.quick-action-config-label.selected {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
}

body.light-mode .quick-action-config-label {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .quick-action-config-label.selected {
    background: rgba(124, 58, 237, 0.1);
    border-color: #7c3aed;
}

.quick-action-config-label input {
    display: none;
}

.quick-action-config-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

body.light-mode .quick-action-config-name {
    color: #1e293b;
}

/* ============================================================================
   SECTION HEADERS
   ============================================================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #141414;
    border-radius: 12px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #2a2a2a;
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-radius: 12px 12px 0 0;
}

.section-header:hover {
    background: #1a1a1a;
    border-color: #00d4ff;
}

body.light-mode .section-header {
    background: rgba(255, 255, 255, 0.95);
    border: none;
}

body.light-mode .section-header::before {
    display: none;
}

body.light-mode .section-header:hover {
    background: rgba(255, 255, 255, 1);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

body.light-mode .section-title {
    color: #1e293b;
}

.section-card-count {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
}

.section-collapse-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #93c5fd;
    cursor: pointer;
    transition: transform 0.3s;
}

body.light-mode .section-collapse-btn {
    color: #6366f1;
}

.section-collapse-btn.collapsed {
    transform: rotate(-90deg);
}

.section-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

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

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cards-container.list-view {
    grid-template-columns: 1fr;
}

.cards-container.list-view .tool-card {
    flex-direction: row;
    padding: 16px 24px;
}

.cards-container.list-view .card-icon {
    font-size: 32px;
    margin-bottom: 0;
    margin-right: 16px;
}

.cards-container.list-view .tool-card h2 {
    font-size: 16px;
    margin-bottom: 0;
}

.cards-container.list-view .tool-card p {
    display: none;
}

.cards-container.list-view .card-button {
    margin-top: 0;
    margin-left: auto;
    padding: 8px 16px;
}

.tool-card {
    background: #141414;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid #2a2a2a;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00d4ff 0%, #7c3aed 100%);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
}

.tool-card:active {
    transform: translateY(-4px);
}

body.light-mode .tool-card {
    background: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.light-mode .tool-card::before {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

body.light-mode .tool-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: none;
}

.card-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.tool-card h2 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

body.light-mode .tool-card h2 {
    color: #1e293b;
}

.tool-card p {
    font-size: 14px;
    color: #93c5fd;
    line-height: 1.5;
    margin-bottom: 16px;
}

body.light-mode .tool-card p {
    color: #6366f1;
}

.card-button {
    display: inline-block;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    margin-top: auto;
    min-width: 140px;
    text-align: center;
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

body.light-mode .card-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.light-mode .card-button:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ============================================================================
   PWA INSTALL PROMPT
   ============================================================================ */

.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 16px 20px;
    display: none;
    align-items: center;
    gap: 16px;
    z-index: 1500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    max-width: 400px;
}

.pwa-install-prompt.active {
    display: flex;
}

body.light-mode .pwa-install-prompt {
    background: white;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.pwa-install-icon {
    font-size: 32px;
}

.pwa-install-text {
    flex: 1;
}

.pwa-install-title {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

body.light-mode .pwa-install-title {
    color: #1e293b;
}

.pwa-install-desc {
    font-size: 12px;
    color: #93c5fd;
}

body.light-mode .pwa-install-desc {
    color: #6366f1;
}

.pwa-install-actions {
    display: flex;
    gap: 8px;
}

.pwa-install-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-install-btn.install {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border: none;
    color: white;
}

.pwa-install-btn.dismiss {
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #93c5fd;
}

body.light-mode .pwa-install-btn.dismiss {
    border-color: #e2e8f0;
    color: #6366f1;
}

/* ============================================================================
   FLOATING ACTION BUTTON (MOBILE)
   ============================================================================ */

.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: none;
}

.fab-main {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transition: all 0.3s;
}

.fab-main:hover {
    transform: scale(1.05);
}

.fab-main.active {
    transform: rotate(45deg);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.fab-menu.active {
    display: flex;
}

.fab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 24px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    animation: fabSlideIn 0.2s ease;
}

body.light-mode .fab-item {
    background: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

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

/* ============================================================================
   PULL TO REFRESH
   ============================================================================ */

.pull-to-refresh {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 24px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999;
    transition: transform 0.3s;
    color: #93c5fd;
    font-size: 13px;
}

.pull-to-refresh.pulling {
    transform: translateX(-50%) translateY(10px);
}

.pull-to-refresh.refreshing {
    transform: translateX(-50%) translateY(10px);
}

.pull-to-refresh-icon {
    font-size: 18px;
    animation: none;
}

.pull-to-refresh.refreshing .pull-to-refresh-icon {
    animation: spin 1s linear infinite;
}

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

body.light-mode .pull-to-refresh {
    background: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #6366f1;
}

/* ============================================================================
   MOBILE NAVIGATION
   ============================================================================ */

.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111111;
    border-top: 1px solid #2a2a2a;
    padding: 8px 0;
    display: none;
    z-index: 1000;
}

body.light-mode .mobile-nav {
    background: white;
    border-top: 1px solid #e2e8f0;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    text-decoration: none;
    color: #93c5fd;
    transition: all 0.2s;
}

.mobile-nav-item.active {
    color: #00d4ff;
}

body.light-mode .mobile-nav-item {
    color: #6366f1;
}

body.light-mode .mobile-nav-item.active {
    color: #7c3aed;
}

.mobile-nav-icon {
    font-size: 20px;
}

.mobile-nav-label {
    font-size: 10px;
    font-weight: 600;
}

/* ============================================================================
   KEYBOARD SHORTCUTS MODAL
   ============================================================================ */

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

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #0a0a0a;
    border-radius: 8px;
}

body.light-mode .shortcut-item {
    background: #f8fafc;
}

.shortcut-key {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.shortcut-key kbd {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    color: #ffffff;
}

body.light-mode .shortcut-key kbd {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

.shortcut-desc {
    font-size: 13px;
    color: #93c5fd;
}

body.light-mode .shortcut-desc {
    color: #6366f1;
}

/* ============================================================================
   C-II ORDER DAYS WIDGET
   ============================================================================ */

.c2-order-days {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.c2-day-select {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.c2-day-select label {
    font-size: 11px;
    color: #60a5fa;
    font-weight: 600;
}

body.light-mode .c2-day-select label {
    color: #818cf8;
}

.c2-day-select select {
    padding: 10px 12px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 13px;
    background: #0a0a0a;
    color: #ffffff;
    cursor: pointer;
}

.c2-day-select select:focus {
    outline: none;
    border-color: #00d4ff;
}

body.light-mode .c2-day-select select {
    background: white;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .c2-day-select select:focus {
    border-color: #7c3aed;
}

/* ============================================================================
   RESPONSIVE STYLES
   ============================================================================ */

@media (max-width: 768px) {
    body {
        padding-top: 56px;
        padding-bottom: 70px;
    }
    
    .user-info-bar {
        padding: 10px 16px;
    }
    
    .global-search-container {
        display: none;
    }
    
    .container {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 32px;
    }
    
    .header p {
        font-size: 14px;
    }
    
    .dashboard {
        padding: 16px;
        border-radius: 12px;
    }
    
    .dashboard::before {
        margin: -16px -16px 16px -16px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile-optimized cards */
    .cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .tool-card {
        padding: 20px 16px;
        border-radius: 12px;
    }
    
    .card-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .tool-card h2 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .tool-card p {
        font-size: 13px;
        margin-bottom: 12px;
        line-height: 1.4;
    }
    
    .card-button {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
    }
    
    /* Mobile section headers */
    .section-header {
        padding: 12px 16px;
        border-radius: 10px;
        margin-bottom: 12px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .section-card-count {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .fab-container {
        display: block;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .sig-modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .timer-controls {
        flex-direction: column;
    }
    
    .timer-btn {
        width: 100%;
    }
    
    .calc-fields {
        grid-template-columns: 1fr;
    }
    
    .calc-fields-compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .calc-mode-toggle {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .calc-mode-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 60px;
        padding: 8px 4px;
        font-size: 10px;
    }
    
    .insulin-presets,
    .eyedrop-presets {
        justify-content: flex-start;
    }
    
    .insulin-preset-btn,
    .eyedrop-preset-btn {
        flex: 1 1 auto;
        min-width: 50px;
        text-align: center;
        font-size: 10px;
        padding: 6px 6px;
    }
    
    .eyedrop-brand-presets {
        flex-wrap: wrap;
    }
    
    .eyedrop-brand-btn {
        flex: 1 1 auto;
        min-width: 45px;
        text-align: center;
        font-size: 9px;
        padding: 5px 4px;
    }
    
    .calc-subsection-header {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .calc-ref-btn {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    .info-ref-grid {
        grid-template-columns: 1fr;
    }
    
    .info-ref-card {
        padding: 8px;
    }
    
    .info-ref-title {
        font-size: 10px;
    }
    
    .info-ref-item {
        font-size: 9px;
    }
    
    .dashboard-item.size-medium,
    .dashboard-item.size-large {
        grid-column: span 1;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .taper-step {
        flex-wrap: wrap;
    }
    
    .taper-step-input,
    .taper-step-select {
        flex: 1;
        min-width: 60px;
    }
    
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-config-list {
        grid-template-columns: 1fr;
    }
    
    .pwa-install-prompt {
        left: 10px;
        right: 10px;
        transform: none;
        max-width: none;
        flex-direction: column;
        text-align: center;
    }
    
    .pwa-install-actions {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile CSA calendar button */
    .csa-calendar-btn {
        padding: 12px 14px;
    }
    
    .csa-calendar-btn-icon {
        font-size: 24px;
    }
    
    .csa-calendar-btn-title {
        font-size: 14px;
    }
    
    .csa-calendar-btn-subtitle {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .user-details {
        gap: 8px;
    }
    
    .user-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .user-role {
        display: none;
    }
    
    .logout-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .dark-mode-btn {
        padding: 4px 8px;
        font-size: 14px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fav-plan-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .fav-plan-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Extra small mobile cards */
    .tool-card {
        padding: 16px 14px;
    }
    
    .card-icon {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .tool-card h2 {
        font-size: 15px;
    }
    
    .tool-card p {
        font-size: 12px;
    }
}

/* ============================================================================
   SCROLLBAR STYLES
   ============================================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

body.light-mode ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================================
   CSA CALENDAR BUTTON (Polished Prominent Version)
   ============================================================================ */

.csa-calendar-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.csa-calendar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.csa-calendar-btn:hover::before {
    left: 100%;
}

.csa-calendar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
    border-color: #7c3aed;
    background: linear-gradient(135deg, #1e1e3f 0%, #1a2744 100%);
}

.csa-calendar-btn-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.csa-calendar-btn-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.csa-calendar-btn-title {
    font-size: 15px;
    font-weight: 700;
    color: #00d4ff;
    letter-spacing: 0.3px;
}

.csa-calendar-btn-subtitle {
    font-size: 11px;
    color: #93c5fd;
}

.csa-calendar-btn-arrow {
    font-size: 20px;
    color: #00d4ff;
    transition: transform 0.3s ease;
}

.csa-calendar-btn:hover .csa-calendar-btn-arrow {
    transform: translateX(4px);
}

body.light-mode .csa-calendar-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: #7c3aed;
}

body.light-mode .csa-calendar-btn:hover {
    background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

body.light-mode .csa-calendar-btn-title {
    color: #7c3aed;
}

body.light-mode .csa-calendar-btn-subtitle {
    color: #6366f1;
}

body.light-mode .csa-calendar-btn-arrow {
    color: #7c3aed;
}
/* ============================================================================
   FLOATING FEEDBACK BUTTON
   ============================================================================ */

.floating-feedback-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    cursor: pointer;
}

.floating-feedback-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.6);
}

.floating-feedback-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .floating-feedback-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* Accessibility for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .floating-feedback-btn {
        transition: none;
    }
    
    .floating-feedback-btn:hover {
        transform: none;
    }
}

/* ============================================================================
   QUICK SIG FULLSCREEN MODE
   ============================================================================ */

.sig-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

.sig-fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.fullscreen-active {
    overflow: hidden;
}

.sig-fullscreen-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sig-fullscreen-overlay.active .sig-fullscreen-container {
    transform: scale(1);
    opacity: 1;
}

.sig-fullscreen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sig-fullscreen-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.sig-fullscreen-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sig-fullscreen-close:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: scale(1.05);
}

.sig-fullscreen-body {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sig-fullscreen-search {
    width: 100%;
}

.sig-fullscreen-search input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    transition: all 0.2s ease;
}

.sig-fullscreen-search input:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.08);
}

.sig-fullscreen-tabs {
    display: flex;
    gap: 10px;
}

.sig-fullscreen-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sig-fullscreen-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.sig-fullscreen-tab.active {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-color: transparent;
    color: #fff;
}

.sig-fullscreen-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.sig-fullscreen-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.sig-fullscreen-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateX(4px);
}

.sig-fullscreen-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sig-fullscreen-item-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.sig-fullscreen-item-badge {
    display: flex;
    gap: 6px;
}

.sig-share-badge {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.85rem;
}

.sig-fullscreen-item-desc {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.sig-fullscreen-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sig-action-btn {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sig-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.sig-action-btn.copy:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.sig-action-btn.edit:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: #7c3aed;
}

.sig-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.sig-fullscreen-footer {
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

.sig-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sig-fullscreen-header,
    .sig-fullscreen-body,
    .sig-fullscreen-footer {
        padding: 15px 20px;
    }
    
    .sig-fullscreen-header h2 {
        font-size: 1.25rem;
    }
    
    .sig-fullscreen-search input {
        font-size: 1rem;
        padding: 12px 16px;
    }
    
    .sig-fullscreen-tabs {
        flex-wrap: wrap;
    }
    
    .sig-fullscreen-tab {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
    
    .sig-fullscreen-item-text {
        font-size: 1rem;
    }
}

/* Fullscreen button in widget header */
.widget-fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #00d4ff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.widget-fullscreen-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    transform: scale(1.05);
}

/* ============================================================================
   FDA SHORTAGE CHANGES WIDGET
   ============================================================================ */

.fda-widget-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.fda-stat-item {
    text-align: center;
    padding: 10px 8px;
    background: var(--bg-tertiary, #f8fafc);
    border-radius: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    transition: all 0.2s ease;
}

.fda-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fda-stat-item.new {
    border-left: 3px solid #22c55e;
}

.fda-stat-item.resolved {
    border-left: 3px solid #3b82f6;
}

.fda-stat-item.status {
    border-left: 3px solid #f59e0b;
}

.fda-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary, #1e293b);
    line-height: 1;
    margin-bottom: 4px;
}

.fda-stat-label {
    font-size: 11px;
    color: var(--text-secondary, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fda-widget-changes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.fda-change-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--bg-tertiary, #f8fafc);
    border-radius: 6px;
    border-left: 3px solid var(--border-color, #e2e8f0);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fda-change-item:hover {
    background: var(--bg-secondary, #f1f5f9);
    border-left-color: var(--accent-primary, #00d4ff);
    transform: translateX(2px);
}

.fda-change-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.fda-change-text {
    flex: 1;
    min-width: 0;
}

.fda-change-drug {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fda-change-time {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    margin-top: 2px;
}

.fda-widget-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.fda-last-sync {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}

.fda-view-all {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary, #00d4ff);
    text-decoration: none;
    transition: all 0.2s ease;
}

.fda-view-all:hover {
    color: var(--accent-secondary, #7c3aed);
    transform: translateX(2px);
}

.fda-widget-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary, #64748b);
}

/* Dark mode adjustments */
body.light-mode .fda-stat-item,
body.light-mode .fda-change-item {
    background: #ffffff;
    border-color: #e5e7eb;
}

body.light-mode .fda-stat-value,
body.light-mode .fda-change-drug {
    color: #1e293b;
}

body.light-mode .fda-stat-label,
body.light-mode .fda-change-time,
body.light-mode .fda-last-sync {
    color: #64748b;
}

body.light-mode .fda-change-item:hover {
    background: #f9fafb;
}

body.light-mode .fda-widget-footer {
    border-top-color: #e5e7eb;
}

/* Widget message states - reusable across all widgets */
.widget-message {
    padding: 12px;
    text-align: center;
    color: var(--text-secondary, #a0a0a0);
    font-size: 14px;
}

.widget-error {
    padding: 12px;
    color: var(--error, #ef4444);
    text-align: center;
    font-size: 14px;
}

body.light-mode .widget-message {
    color: #64748b;
}

body.light-mode .widget-error {
    color: #dc2626;
}

/* ============================================================================
   NDC LOOKUP WIDGET STYLES
   ============================================================================ */

.ndc-widget-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ndc-widget-search-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-tertiary, #1a1a1a);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 6px;
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    transition: all 0.2s ease;
}

.ndc-widget-search-input:focus {
    outline: none;
    border-color: var(--accent-primary, #00d4ff);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.ndc-widget-search-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-primary, #00d4ff) 0%, var(--accent-secondary, #7c3aed) 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ndc-widget-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.ndc-widget-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.ndc-result-item {
    padding: 12px;
    background: var(--bg-tertiary, #1a1a1a);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ndc-result-item:hover {
    border-color: var(--accent-primary, #00d4ff);
    background: var(--bg-secondary, #111111);
}

.ndc-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-primary, #ffffff);
    font-size: 14px;
}

.ndc-brand {
    color: var(--text-secondary, #a0a0a0);
    font-weight: normal;
}

.ndc-result-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary, #a0a0a0);
}

.ndc-result-details strong {
    color: var(--text-primary, #ffffff);
}

.ndc-widget-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #2a2a2a);
    text-align: center;
}

.dashboard-item[data-widget-id="ndc-lookup-widget"] .widget-content {
    overflow-y: auto;
}

body.light-mode .ndc-widget-search-input {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #1e293b;
}

body.light-mode .ndc-result-item {
    background: #f9fafb;
    border-color: #e5e7eb;
}

body.light-mode .ndc-result-item:hover {
    background: #ffffff;
    border-color: #00d4ff;
}

/* ============================================================================
   RUGBY/MAJOR OTC LOOKUP WIDGET STYLES
   ============================================================================ */

.rugby-widget-search {
    margin-bottom: 12px;
}

.rugby-widget-search-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary, #1a1a1a);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 6px;
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    transition: all 0.2s ease;
}

.rugby-widget-search-input:focus {
    outline: none;
    border-color: var(--accent-primary, #00d4ff);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.rugby-widget-results {
    min-height: 200px; /* Prevent collapse during search transitions */
    position: relative;
    contain: layout; /* Prevent layout thrashing */
}

.rugby-widget-results.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    z-index: 10;
}

.rugby-widget-results.loading::after {
    content: '⏳';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 11;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.rugby-widget-results-table {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 6px;
}

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

.rugby-widget-results-table thead {
    background: var(--bg-tertiary, #1a1a1a);
    position: sticky;
    top: 0;
    z-index: 1;
}

.rugby-widget-results-table th {
    padding: 8px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    border-bottom: 1px solid var(--border-color, #2a2a2a);
}

.rugby-widget-results-table td {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--text-secondary, #a0a0a0);
    border-bottom: 1px solid var(--border-color, #2a2a2a);
}

.rugby-widget-results-table tbody tr:hover {
    background: var(--bg-tertiary, #1a1a1a);
}

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

.rugby-widget-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #2a2a2a);
    text-align: center;
}

.dashboard-item[data-widget-id="rugby-lookup-widget"] .widget-content {
    overflow-y: auto;
}

body.light-mode .rugby-widget-search-input {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #1e293b;
}

body.light-mode .rugby-widget-results.loading::before {
    background: rgba(255, 255, 255, 0.7);
}

body.light-mode .rugby-widget-results-table {
    border-color: #e5e7eb;
}

body.light-mode .rugby-widget-results-table thead {
    background: #f3f4f6;
}

body.light-mode .rugby-widget-results-table th,
body.light-mode .rugby-widget-results-table td {
    border-color: #e5e7eb;
}

body.light-mode .rugby-widget-results-table tbody tr:hover {
    background: #f9fafb;
}

/* Widget link styles for both widgets */
.widget-link {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-tertiary, #1a1a1a);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 6px;
    color: var(--accent-primary, #00d4ff);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.widget-link:hover {
    background: var(--bg-secondary, #111111);
    border-color: var(--accent-primary, #00d4ff);
    transform: translateY(-1px);
}

body.light-mode .widget-link {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #7c3aed;
}

body.light-mode .widget-link:hover {
    background: #ffffff;
    border-color: #7c3aed;
}

/* ============================================================================
   HEADER DATE/TIME DISPLAY
   ============================================================================ */

.header-datetime {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 240px;
}

.header-datetime:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.header-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.header-time {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* ============================================================================
   CS FILL DATE TABLE
   ============================================================================ */

.cs-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.cs-setting-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cs-setting-toggles {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cs-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.cs-toggle-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.cs-toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
}

.cs-toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.cs-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    transition: 0.3s;
    border-radius: 20px;
}

.cs-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    transition: 0.3s;
    border-radius: 50%;
}

.cs-toggle-switch input:checked + .cs-toggle-slider {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-color: transparent;
}

.cs-toggle-switch input:checked + .cs-toggle-slider:before {
    transform: translateX(20px);
    background: white;
}

.cs-fill-table-container {
    margin-bottom: 10px;
    overflow-x: auto;
}

.cs-fill-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.cs-fill-table thead {
    background: var(--bg-tertiary);
}

.cs-fill-table th {
    padding: 8px 6px;
    text-align: center;
    font-weight: 700;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 12px;
}

.cs-fill-table td {
    padding: 10px 6px;
    text-align: center;
    font-weight: 600;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
    font-size: 13px;
}

.cs-row-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: left;
    padding-left: 8px !important;
    background: var(--bg-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cs-fill-table tbody tr {
    transition: background 0.2s ease;
}

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

/* Light mode adjustments */
body.light-mode .header-datetime {
    background: var(--bg-secondary);
}

body.light-mode .header-datetime:hover {
    background: var(--bg-tertiary);
}

body.light-mode .cs-settings {
    background: var(--bg-secondary);
}

body.light-mode .cs-fill-table thead {
    background: var(--bg-secondary);
}

body.light-mode .cs-toggle-text {
    color: var(--text-primary);
}

body.light-mode .cs-toggle-slider {
    background: #e5e7eb;
    border-color: #d1d5db;
}

body.light-mode .cs-toggle-slider:before {
    background: #94a3b8;
}

body.light-mode .cs-row-label {
    background: var(--bg-secondary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-datetime {
        min-width: 180px;
        padding: 6px 12px;
    }
    
    .header-date {
        font-size: 11px;
    }
    
    .header-time {
        font-size: 16px;
    }
    
    .cs-fill-table {
        font-size: 11px;
    }
    
    .cs-fill-table th,
    .cs-fill-table td {
        padding: 8px 4px;
    }
}

