/* CSS DESIGN SYSTEM FOR LOGISTICS & MEAL MANAGEMENT */

:root {
    /* Color Palette - Premium Military/Corporate Look */
    --primary-color: #1e3a8a;      /* Royal Navy Blue */
    --primary-light: #3b82f6;     /* Bright Blue */
    --primary-dark: #172554;      /* Deep Navy */
    --secondary-color: #f59e0b;    /* Gold / Amber */
    --secondary-hover: #d97706;    /* Dark Gold */
    --success-color: #10b981;      /* Emerald Green */
    --danger-color: #ef4444;       /* Crimson Red */
    
    /* Light Theme Colors */
    --bg-app: #f1f5f9;            /* Cool Slate Gray */
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --text-main: #0f172a;         /* Near Black */
    --text-muted: #64748b;        /* Medium Slate */
    --border-color: #e2e8f0;      /* Light Gray Border */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --card-glow: rgba(30, 58, 138, 0.03);
    
    /* Meal colors */
    --breakfast-color: #f59e0b;
    --lunch-color: #10b981;
    --dinner-color: #6366f1;
    --late-color: #8b5cf6;

    /* Theme transition */
    --transition-speed: 0.25s;
    
    /* Layout dims */
    --sidebar-width: 280px;
    --topbar-height: 80px;
}

/* Dark Theme Overrides */
body.dark-theme {
    --bg-app: #0b0f19;            /* Very dark space blue */
    --bg-sidebar: #111827;        /* Dark gray/blue */
    --bg-card: #1f2937;           /* Medium gray/blue */
    --text-main: #f3f4f6;         /* Off-white */
    --text-muted: #9ca3af;        /* Light gray */
    --border-color: #374151;      /* Charcoal border */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.2), 0 2px 4px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -2px rgba(0,0,0,0.2);
    --card-glow: rgba(59, 130, 246, 0.05);
    --primary-color: #3b82f6;
    --primary-dark: #1d4ed8;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', 'Sarabun', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* APP LAYOUT */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* SIDEBAR STYLES */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.sidebar-header {
    height: var(--topbar-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-area h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.logo-area p {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 300;
}

.logo-wrapper {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid var(--primary-light);
    padding: 3px;
    background-color: var(--bg-card);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

body.dark-theme .logo-wrapper {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.logo-wrapper .logo-icon {
    font-size: 22px;
    margin: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    color: var(--text-main);
    background-color: var(--bg-app);
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    color: var(--text-main);
    background-color: var(--bg-app);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
}

.user-profile .avatar {
    font-size: 32px;
    color: var(--text-muted);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* MAIN CONTENT STYLES */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* TOP BAR STYLES */
.topbar {
    height: var(--topbar-height);
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 90;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.topbar-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.date-badge {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.quick-stats-mini {
    display: flex;
    gap: 20px;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mini-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* SCREENS CONTAINER */
.screens-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.screen-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* GENERAL UI COMPONENTS */
.card-panel {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    transition: background-color var(--transition-speed), border-color var(--transition-speed), box-shadow 0.3s ease;
}

.card-panel:hover {
    box-shadow: var(--shadow-lg);
}

.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 20px 0;
}

.panel-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 24px 0;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: -8px;
    margin-bottom: 16px;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(30, 58, 138, 0.15);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(30, 58, 138, 0.25);
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: var(--text-muted);
    color: #ffffff;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    background-color: var(--border-color);
}

.btn-accent {
    background-color: var(--secondary-color);
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.15);
}
.btn-accent:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: #ffffff;
}
.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon-only {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon-only:hover {
    background-color: var(--border-color);
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.header-inline label {
    margin-bottom: 0;
}

.required {
    color: var(--danger-color);
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-control-inline {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    width: auto;
}

.form-control-date {
    max-width: 160px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* TABLES */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-modern th {
    background-color: var(--bg-app);
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.table-modern td {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.table-modern tbody tr {
    transition: background-color 0.15s ease;
}

.table-modern tbody tr:hover {
    background-color: rgba(30, 58, 138, 0.02);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* EMPTY PLACEHOLDER */
.empty-placeholder {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-placeholder i {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-placeholder p {
    font-size: 0.9rem;
}

/* --- 1. DASHBOARD SCREEN SPECIFICS --- */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.unit-card-icon {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
}

.personnel-card-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.meal-card-icon {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--secondary-color);
}

.doc-card-icon {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--late-color);
}

.stat-info h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-info .val {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-info p {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

.dash-panel {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.meal-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.meal-summary-card {
    border: 1px solid var(--border-color);
    background-color: var(--bg-app);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s ease;
}

.meal-summary-card:hover {
    transform: scale(1.02);
}

.meal-badge {
    align-self: flex-start;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
}

.meal-badge.breakfast { background-color: var(--breakfast-color); }
.meal-badge.lunch { background-color: var(--lunch-color); }
.meal-badge.dinner { background-color: var(--dinner-color); }
.meal-badge.late { background-color: var(--late-color); }

.meal-menu-name {
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meal-headcount {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meal-headcount .number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.meal-units {
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-actions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-docs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-doc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.recent-doc-item:hover {
    background-color: rgba(30, 58, 138, 0.03);
}

.doc-meta {
    display: flex;
    flex-direction: column;
}

.doc-ref {
    font-size: 0.85rem;
    font-weight: 600;
}

.doc-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.doc-arrow {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- 2. UNITS SCREEN SPECIFICS --- */
.units-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 992px) {
    .units-layout {
        grid-template-columns: 1fr;
    }
}

.personnel-names-editor {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    background-color: var(--bg-app);
}

.names-scroll-container {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-placeholder-names {
    padding: 20px 10px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.name-row-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.name-row-input input {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.remove-row-btn {
    color: var(--danger-color);
    cursor: pointer;
    padding: 4px;
}

.panel-header-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.panel-header-search h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    position: relative;
    max-width: 300px;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-box input {
    padding-left: 36px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.85rem;
}

.units-table-container {
    max-height: 500px;
    overflow-y: auto;
}

.badge-names {
    background-color: rgba(30, 58, 138, 0.08);
    color: var(--primary-color);
    font-size: 0.75rem;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.actions-cell {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* --- 3. MEAL PLANNER SCREEN SPECIFICS --- */
.planner-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}

.date-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-selector-wrapper label {
    font-weight: 600;
    font-size: 0.95rem;
}

.input-with-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 2px;
}

.input-with-nav input {
    border: none;
    padding: 6px;
}
.input-with-nav input:focus {
    box-shadow: none;
}

.summary-badge {
    background-color: var(--bg-card);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.summary-badge strong {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.meal-tabs-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .meal-tabs-container {
        grid-template-columns: 1fr;
    }
}

.meal-tab {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s ease;
}

.meal-tab:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.meal-tab.active {
    border-color: var(--primary-light);
    background-color: var(--card-glow);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.tab-icon-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tab-icon-title i {
    font-size: 1.4rem;
}

.meal-1-icon { color: var(--breakfast-color); }
.meal-2-icon { color: var(--lunch-color); }
.meal-3-icon { color: var(--dinner-color); }
.meal-4-icon { color: var(--late-color); }

.tab-icon-title span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.tab-icon-title h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.tab-badge {
    background-color: var(--border-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.meal-tab.active .tab-badge {
    background-color: var(--primary-color);
    color: #ffffff;
}

.planner-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .planner-layout {
        grid-template-columns: 1fr;
    }
}

.pane-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.panel-header-inline .pane-title {
    margin-bottom: 0;
}

.form-control-lg {
    font-size: 1rem;
    padding: 12px 16px;
}

.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--bg-app);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    min-height: 120px;
}

.ingredient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-color);
}
.ingredient-item:last-child {
    border-bottom: none;
}

.ing-name {
    font-weight: 500;
}

.ing-val {
    font-weight: 700;
    color: var(--primary-color);
}

.allocation-scroll-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    background-color: var(--bg-app);
}

.allocation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background-color: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.alloc-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
}

.alloc-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.alloc-count-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.alloc-count-wrapper span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.alloc-count-input {
    width: 80px;
    padding: 6px;
    font-size: 0.8rem;
    text-align: right;
}

.allocation-total-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 10px;
    background-color: var(--card-glow);
    border: 1px solid var(--primary-light);
    margin-bottom: 20px;
    font-weight: 600;
}

.total-badge {
    font-size: 1.3rem;
    color: var(--primary-color);
}

/* --- 4. DOCUMENTS MANAGEMENT SCREEN SPECIFICS --- */
.docs-tabs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
}

.doc-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-tab-btn:hover {
    color: var(--text-main);
}

.doc-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.doc-sub-screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.doc-sub-screen.active {
    display: block;
}

.mission-sub-screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.mission-sub-screen.active {
    display: block;
}

.doc-editor-card {
    max-width: 900px;
    margin: 0 auto;
}

.doc-verification-notice {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background-color: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--primary-light);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.doc-verification-notice i {
    font-size: 1.4rem;
    color: var(--primary-light);
}

.doc-verification-notice h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.doc-verification-notice p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* OFFICIAL GOVERNMENT DOCUMENT STYLING (FOR PRINT PREVIEW) */
.print-actions-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    background-color: var(--bg-card);
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.official-document-view {
    background-color: #ffffff;
    color: #000000;
    font-family: 'Sarabun', sans-serif;
    padding: 2.5cm 2cm;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    max-width: 21cm; /* A4 Width */
    margin: 0 auto;
    min-height: 29.7cm; /* A4 Height */
}

/* Set printing defaults to ensure Sarabun renders clearly */
.official-document-view * {
    color: #000000 !important;
}

.doc-header {
    display: flex;
    justify-content: center;
    position: relative;
    margin-bottom: 1.5cm;
}

.garuda-logo-wrapper {
    width: 2cm;
    height: 2cm;
    margin: 0 auto;
}

.garuda-svg {
    width: 100%;
    height: 100%;
}

.doc-title-main {
    position: absolute;
    bottom: -15px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
}

.doc-meta-info {
    border-bottom: 2px double #000000;
    padding-bottom: 8px;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.meta-col-full {
    width: 100%;
}

.doc-salutation {
    font-size: 16px;
    margin-bottom: 20px;
}

.doc-body-text {
    font-size: 16px;
    line-height: 1.7;
    text-align: justify;
}

.underlined {
    border-bottom: 1px dotted #000000;
    padding: 0 6px;
}

.table-title {
    font-size: 15px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 10px;
}

/* Official Document Tables */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 15px;
}

.doc-table th, 
.doc-table td {
    border: 1px solid #000000;
    padding: 6px 10px;
    line-height: 1.4;
}

.doc-table th {
    background-color: #f2f2f2;
    font-weight: 700;
    text-align: center;
}

.doc-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    font-size: 15px;
}

.signature-block {
    width: 45%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sig-space {
    height: 1.8cm;
}

.sig-name {
    font-weight: 600;
}

.appendix-section {
    margin-top: 1cm;
}

.doc-header-appendix {
    margin-bottom: 24px;
}

.doc-header-appendix h3 {
    font-size: 18px;
    font-weight: 700;
}

.appendix-unit-block {
    margin-bottom: 24px;
}

.appendix-unit-block h4 {
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px dashed #000000;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

.appendix-names-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    font-size: 14px;
}

/* --- 5. REPORTS & DATABASE SYSTEM --- */
.reports-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
}

.info-guide-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guide-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.guide-item .number {
    background-color: var(--primary-color);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.guide-item .desc h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.guide-item .desc p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.db-actions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.db-action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.db-action-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.db-action-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.db-action-item .btn {
    flex-shrink: 0;
}

.danger-item {
    border-color: rgba(239, 68, 68, 0.2);
    background-color: rgba(239, 68, 68, 0.02);
}

/* TOAST NOTIFICATION */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #1e2937;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 0.9rem;
    display: none;
    z-index: 200000;
    animation: slideIn 0.25s ease-out;
}

.toast-notification.success {
    background-color: var(--success-color);
}

.toast-notification.error {
    background-color: var(--danger-color);
}

@keyframes slideIn {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ========================================================
   PRINT STYLES (A4 Page formatting)
   ======================================================== */
@media print {
    /* Hide everything except the official-document-view container */
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    .sidebar, 
    .topbar, 
    .screens-container > *:not(#screen-documents),
    #screen-documents > *:not(#sub-doc-print),
    .print-actions-bar,
    .no-print {
        display: none !important;
    }

    .screens-container {
        padding: 0 !important;
        overflow: visible !important;
    }

    .main-content {
        overflow: visible !important;
    }

    .app-container {
        height: auto !important;
        overflow: visible !important;
    }

    #screen-documents {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #sub-doc-print {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .official-document-view {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
    }

    .page-break {
        page-break-before: always !important;
        height: 0;
        margin: 0;
        padding: 0;
        border: none;
    }

    .no-print-if-empty:empty {
        display: none !important;
    }
}

/* --- MISSION MEAL ALLOCATION GRID STYLING --- */
.allocation-unit-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.allocation-unit-card:hover {
    box-shadow: var(--shadow-md);
}

.unit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.unit-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.unit-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.meals-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meal-row {
    display: grid;
    grid-template-columns: 100px 110px 110px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background-color: var(--bg-app);
}

.meal-row label {
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin: 0;
}

.meal-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meal-input-group span {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.meal-input-group input {
    width: 60px;
    padding: 4px 6px;
    font-size: 0.8rem;
    text-align: center;
}

.meal-input-group input.restaurant-input {
    width: 100%;
    text-align: left;
}

@media (max-width: 768px) {
    .meal-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* --- EXCEL IMPORT DESIGN STYLES --- */
.mission-create-sub-screen {
    display: none;
}

.mission-create-sub-screen.active {
    display: block;
}

.excel-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background-color: var(--bg-app);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.excel-upload-zone:hover, .excel-upload-zone.dragover {
    border-color: #27ae60;
    background-color: rgba(39, 174, 96, 0.05);
}

.excel-upload-zone .upload-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    transition: transform 0.2s ease;
}

.excel-upload-zone:hover .upload-icon, .excel-upload-zone.dragover .upload-icon {
    color: #27ae60;
    transform: translateY(-5px);
}

/* READ-ONLY STATE STYLING */
input:disabled, textarea:disabled, select:disabled {
    background-color: var(--bg-app) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
    border-color: var(--border-color) !important;
    opacity: 0.85;
}

/* TABLE SORTING STYLING */
.table-modern th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

.table-modern th.sortable:hover {
    background-color: rgba(30, 58, 138, 0.05);
}

.sort-icon {
    margin-left: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
    transition: all 0.2s ease;
}

.sortable:hover .sort-icon {
    opacity: 1;
    color: var(--primary-color);
}

.sort-active {
    color: var(--primary-color) !important;
    opacity: 1 !important;
}

/* --- CUSTOM MODAL STYLES --- */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.custom-modal.show {
    display: flex;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- FIREBASE FILE ATTACHMENTS STYLES --- */
.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.attachment-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    text-decoration: none;
}

.attachment-info:hover {
    color: var(--primary-light);
}

.attachment-delete-btn {
    background: transparent;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.attachment-delete-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Firebase Status Badge Styles */
#firebaseStatusBadge.connected {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--success-color) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

/* Toggle Switch Styles */
.switch-container input[type="checkbox"] {
    width: 36px;
    height: 18px;
    appearance: none;
    background-color: var(--border-color);
    border-radius: 20px;
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.switch-container input[type="checkbox"]:checked {
    background-color: var(--primary-color);
}

.switch-container input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background-color: #ffffff;
    transition: transform 0.2s ease;
}

.switch-container input[type="checkbox"]:checked::before {
    transform: translateX(18px);
}

/* Modern File Upload Dropzone */
.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background-color: var(--bg-app);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05); /* slightly tinted primary color */
}

.upload-dropzone i {
    transition: transform 0.2s ease;
}

.upload-dropzone:hover i, .upload-dropzone.dragover i {
    transform: translateY(-5px);
}

/* ========================================================
   WELCOME & LOGIN SCREEN STYLES
   ======================================================== */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 30% 30%, var(--bg-card), var(--bg-app) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
    transition: opacity 0.3s ease;
}

body.dark-theme .login-container {
    background: radial-gradient(circle at 30% 30%, #2c3e50, #1a252f 75%);
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 40px 30px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.login-header {
    margin-bottom: 30px;
}

.login-logo {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(52, 152, 219, 0.2));
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.welcome-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 30px;
}

.google-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.google-login-btn:hover {
    background-color: var(--bg-app);
    border-color: var(--text-muted);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.login-footer {
    margin-top: 40px;
    font-size: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* User management specific tweaks */
#editUserUnitsCheckboxContainer label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

#editUserUnitsCheckboxContainer label:hover {
    background-color: var(--border-color);
}

/* Registration & User Edit Modals - MUST be above login screen (z-index: 100000) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 150000;
    padding: 40px 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 24px;
    width: 100%;
    position: relative;
    animation: slideDown 0.3s ease;
    color: var(--text-main);
    margin-top: auto;
    margin-bottom: auto;
}

/* Login status text area */
#loginStatusText {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--primary-color);
    min-height: 24px;
    text-align: center;
    animation: fadeInOut 1.5s ease-in-out infinite alternate;
}

#loginStatusText.error {
    color: var(--danger-color);
    animation: none;
}

@keyframes fadeInOut {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Reference Data Tabs and Layout Styles */
.ref-tab-content {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

.ref-tab-content.active {
    display: block;
}

/* Ensure layout spacing works nicely within tabs */
.ref-tab-content .units-layout {
    margin-top: 20px;
}

/* Toggle switch helper container */
.toggle-switch-container {
    user-select: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modalBounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

/* --- FLATPICKR CUSTOM OVERRIDES (PREMIUM LOOK) --- */
.flatpickr-calendar {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-lg) !important;
    font-family: 'Kanit', 'Sarabun', sans-serif !important;
    border-radius: 12px !important;
}

.flatpickr-months .flatpickr-month {
    color: var(--text-main) !important;
    fill: var(--text-main) !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--text-main) !important;
    fill: var(--text-main) !important;
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: var(--primary-color) !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:after {
    border-bottom-color: var(--text-main) !important;
}
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    border-top-color: var(--text-main) !important;
}

.flatpickr-current-month input.cur-year {
    color: var(--text-main) !important;
}

span.flatpickr-weekday {
    color: var(--text-muted) !important;
    font-weight: 500 !important;
}

.flatpickr-day {
    color: var(--text-main) !important;
    border-radius: 8px !important;
    transition: all 0.15s ease !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    background: var(--border-color) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

.flatpickr-day.today {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-weight: bold !important;
}
.flatpickr-day.today:hover {
    background: var(--primary-color) !important;
    color: #ffffff !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.selected.nextMonthDay {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay,
.flatpickr-day.notAllowed,
.flatpickr-day.notAllowed.prevMonthDay,
.flatpickr-day.notAllowed.nextMonthDay {
    color: var(--text-muted) !important;
    opacity: 0.4 !important;
}

.flatpickr-day.inRange {
    background: var(--border-color) !important;
    box-shadow: none !important;
}

/* Fix for altInput styling */
input[data-input] {
    cursor: pointer;
}

