/* CSS Stylesheet for Kampo Clinical Selector */

/* Theme Variables */
:root {
    --primary-color: #1a4d38; /* Muted deep sage green */
    --primary-light: #e8efe9;
    --primary-dark: #123325;
    
    --accent-gold: #c29d53; /* Soft warm gold */
    --accent-gold-light: #f7f3e8;
    
    --bg-main: #f8faec; /* Soft warm ivory background */
    --card-bg: rgba(255, 255, 255, 0.95);
    
    --text-main: #2b332d;
    --text-muted: #647568;
    --border-color: #d1dbd3;
    
    /* Syndrome Colors */
    --color-qi_xu: #e09f3e;     /* Amber */
    --color-qi_ni: #d90429;     /* Crimson */
    --color-qi_yu: #7209b7;     /* Purple */
    --color-xue_xu: #f25c54;    /* Terracotta Red */
    --color-yu_xue: #3f37c9;    /* Dark Indigo */
    --color-shui_zhi: #4cc9f0;  /* Water Blue */
    
    --font-heading: 'Noto Sans TC', system-ui, sans-serif;
    --font-body: 'Noto Sans TC', 'Outfit', sans-serif;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px rgba(26, 77, 56, 0.08);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* App Layout */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: var(--primary-dark);
    color: white;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.brand-icon {
    font-size: 2.2rem;
    color: var(--accent-gold);
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.brand-text span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem 1.2rem;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
}

.nav-item:hover, .nav-item.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
    box-shadow: inset 4px 0 0 var(--accent-gold);
}

.nav-item .badge {
    margin-left: auto;
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* Main Content area */
.main-content {
    padding: 2.5rem 3rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Section Header */
.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon {
    font-size: 1.5rem;
    color: var(--accent-gold);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* General Card Design */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Patient Card */
.patient-card {
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 100%);
    border-left: 5px solid var(--primary-color);
}

.patient-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.required-star {
    color: var(--color-qi_ni);
}

.form-group input[type="text"], 
.form-group input[type="number"],
.form-group select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background-color: white;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 77, 56, 0.15);
}

/* Gender Toggle Group */
.gender-toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.gender-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem;
    cursor: pointer;
    background-color: white;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.25s ease;
    user-select: none;
}

.gender-btn input[type="radio"] {
    display: none;
}

.gender-btn:hover {
    background-color: #f1f5f2;
}

.gender-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Diagnostic Layout */
.diagnostic-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    align-items: start;
}

/* Tab Container */
.tab-container {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-scroll-wrapper {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 2px;
}

.tab-scroll-wrapper::-webkit-scrollbar {
    height: 4px;
}

.tab-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Syndrome Panel */
.syndrome-panel {
    display: none;
}

.syndrome-panel.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

.panel-info-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.banner-title {
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Specific Border Colors for banners */
.border-qi_xu { border-left-color: var(--color-qi_xu); }
.border-qi_ni { border-left-color: var(--color-qi_ni); }
.border-qi_yu { border-left-color: var(--color-qi_yu); }
.border-xue_xu { border-left-color: var(--color-xue_xu); }
.border-yu_xue { border-left-color: var(--color-yu_xue); }
.border-shui_zhi { border-left-color: var(--color-shui_zhi); }

.text-qi_xu { color: var(--color-qi_xu); }
.text-qi_ni { color: var(--color-qi_ni); }
.text-qi_yu { color: var(--color-qi_yu); }
.text-xue_xu { color: var(--color-xue_xu); }
.text-yu_xue { color: var(--color-yu_xue); }
.text-shui_zhi { color: var(--color-shui_zhi); }

/* Checklist */
.symptom-checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.symptom-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
    transition: all 0.25s ease;
}

.symptom-item:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.symptom-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    transition: all 0.2s ease;
}

.symptom-item input[type="checkbox"]::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    color: white;
    display: none;
}

.symptom-item input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.symptom-item input[type="checkbox"]:checked::before {
    display: block;
}

.symptom-label {
    font-size: 0.95rem;
    font-weight: 500;
    flex-grow: 1;
}

.symptom-score {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    background-color: #f1f5f2;
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 10px;
}

.symptom-item.checked {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.symptom-item.checked .symptom-score {
    background-color: var(--primary-color);
    color: white;
}

/* Sticky Right Column */
.sticky-card {
    position: sticky;
    top: 2rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
}

.card-header-accent {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.card-header-accent h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gauge-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gauge-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

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

.gauge-name {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gauge-score {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
}

.gauge-bar-bg {
    height: 8px;
    background-color: #f1f5f2;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.gauge-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.gauge-threshold {
    position: absolute;
    width: 2px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.gauge-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.status-inactive {
    background-color: #f1f5f2;
    color: var(--text-muted);
}

.status-active {
    animation: pulse 2s infinite;
}

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

/* Diagnostic active colors for gauges */
.bg-qi_xu { background-color: var(--color-qi_xu); }
.bg-qi_ni { background-color: var(--color-qi_ni); }
.bg-qi_yu { background-color: var(--color-qi_yu); }
.bg-xue_xu { background-color: var(--color-xue_xu); }
.bg-yu_xue { background-color: var(--color-yu_xue); }
.bg-shui_zhi { background-color: var(--color-shui_zhi); }

.badge-qi_xu { background-color: rgba(224, 159, 62, 0.15); color: var(--color-qi_xu); }
.badge-qi_ni { background-color: rgba(217, 4, 41, 0.15); color: var(--color-qi_ni); }
.badge-qi_yu { background-color: rgba(114, 9, 183, 0.15); color: var(--color-qi_yu); }
.badge-xue_xu { background-color: rgba(242, 92, 84, 0.15); color: var(--color-xue_xu); }
.badge-yu_xue { background-color: rgba(63, 55, 201, 0.15); color: var(--color-yu_xue); }
.badge-shui_zhi { background-color: rgba(76, 201, 240, 0.15); color: var(--color-shui_zhi); }

.gauge-item.diagnosed {
    border-color: currentColor;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Summary Box */
.summary-box {
    background-color: var(--accent-gold-light);
    border: 1px dashed var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.summary-heading {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-list {
    list-style: none;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.summary-list li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-list li i {
    font-size: 0.8rem;
}

/* Five Organs Section Layout */
.organ-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

.organ-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.organ-tab-btn {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.organ-tab-btn i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.organ-tab-btn:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.organ-tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.organ-panel-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.organ-panel-title h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.organ-panel-title p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.organ-pathology-status {
    text-align: right;
}

.organ-pathology-status span {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.organ-pathology-status p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.organ-checklist {
    grid-template-columns: 1fr; /* Single column inside organ layout card */
}

/* Rx Recommendations Layout */
.filter-card {
    background-color: var(--primary-light);
    border-color: rgba(26, 77, 56, 0.2);
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
}

.search-wrapper input {
    width: 100%;
    padding-left: 2.5rem !important;
}

.rx-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.rx-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    border-top: 5px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.3s ease;
}

.rx-card.matched {
    border-top-color: var(--accent-gold);
    box-shadow: var(--shadow-md);
    background: linear-gradient(to bottom, #ffffff 0%, var(--accent-gold-light) 100%);
}

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

.rx-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.rx-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.tag-excess { background-color: rgba(217, 4, 41, 0.1); color: var(--color-qi_ni); }
.tag-mixed { background-color: rgba(220, 160, 50, 0.1); color: var(--color-qi_xu); }
.tag-deficiency { background-color: rgba(26, 77, 56, 0.1); color: var(--primary-color); }

.rx-source {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rx-indications {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.rx-matched-symptoms {
    font-size: 0.8rem;
    background-color: white;
    border: 1px solid rgba(194, 157, 83, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    margin-top: auto;
}

.rx-matched-symptoms strong {
    color: var(--accent-gold);
}

.rx-score-badge {
    position: absolute;
    top: -12px;
    right: 1.5rem;
    background-color: var(--accent-gold);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(194, 157, 83, 0.4);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: white;
}

.btn-primary:hover {
    background-color: #ae8b45;
    box-shadow: 0 4px 8px rgba(194, 157, 83, 0.2);
}

.btn-secondary {
    background-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.18);
    color: white;
}

.btn-full {
    width: 100%;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.p-4 { padding: 1.5rem; }

/* Hide Mobile Elements by default */
.mobile-header {
    display: none;
}
.mobile-bottom-nav {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .diagnostic-layout {
        grid-template-columns: 1fr;
    }
    
    .dashboard-column {
        position: static;
    }
    
    .sticky-card {
        position: static;
    }
    
    .rx-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: var(--primary-dark);
        color: white;
        padding: 0 1.25rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.15);
        z-index: 1000;
    }
    
    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .mobile-brand-icon {
        font-size: 1.4rem;
        color: var(--accent-gold);
    }
    
    .mobile-brand-text {
        font-family: var(--font-heading);
        font-size: 1.1rem;
        font-weight: 700;
        letter-spacing: 0.5px;
    }
    
    .mobile-actions {
        display: flex;
        gap: 0.5rem;
    }
    
    .mobile-action-btn {
        background-color: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,255,255,0.15);
        color: rgba(255,255,255,0.9);
        padding: 0.4rem 0.8rem;
        border-radius: var(--radius-md);
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        transition: all 0.2s ease;
    }
    
    .mobile-action-btn:hover {
        background-color: rgba(255,255,255,0.15);
        color: white;
    }
    
    .mobile-action-btn.btn-primary-mobile {
        background-color: var(--accent-gold);
        border-color: var(--accent-gold);
        color: white;
    }
    
    .mobile-action-btn.btn-primary-mobile:hover {
        background-color: #ae8b45;
    }
    
    /* Mobile Bottom Nav Styles */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background-color: rgba(26, 77, 56, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
        z-index: 1000;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    
    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        background: none;
        border: none;
        color: rgba(255,255,255,0.6);
        cursor: pointer;
        transition: all 0.25s ease;
        padding: 5px 0;
    }
    
    .mobile-nav-item i {
        font-size: 1.25rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.75rem;
        font-weight: 500;
    }
    
    .mobile-nav-item:hover, .mobile-nav-item.active {
        color: white;
    }
    
    .mobile-nav-item.active {
        color: var(--accent-gold);
    }
    
    .mobile-icon-wrapper {
        position: relative;
        display: inline-block;
    }
    
    .mobile-icon-wrapper .badge {
        position: absolute;
        top: -6px;
        right: -10px;
        background-color: var(--accent-gold);
        color: var(--primary-dark);
        font-size: 0.7rem;
        font-weight: 700;
        padding: 1px 6px;
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    }
    
    .main-content {
        padding: 5.5rem 1.5rem 6.5rem 1.5rem;
    }
    
    .organ-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    /* Horizontal scrolling for organ tabs */
    .organ-tabs {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    
    .organ-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .organ-tab-btn {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 0.6rem 1.1rem;
        font-size: 0.9rem;
    }
    
    .organ-tab-btn i {
        font-size: 1rem;
        width: auto;
    }
}

@media (max-width: 600px) {
    .patient-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .symptom-checklist {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .main-content {
        padding: 5rem 1rem 6rem 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .panel-info-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 0.6rem 1rem;
    }
    
    .symptom-item {
        padding: 0.75rem 0.85rem;
    }
    
    .symptom-label {
        font-size: 0.9rem;
    }
}

/* Print Specific layout */
.print-only {
    display: none;
}

@media print {
    body {
        background-color: white !important;
        color: black !important;
        font-size: 11pt !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    .app-container {
        display: block !important;
    }
    
    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    .content-section {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    .print-header {
        border-bottom: 3px double #333;
        padding-bottom: 0.75rem;
        margin-bottom: 2rem;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }
    
    .print-title {
        font-size: 18pt;
        font-weight: bold;
        font-family: serif;
    }
    
    .print-meta {
        font-size: 10pt;
        text-align: right;
    }
    
    .print-section {
        margin-bottom: 2rem;
        page-break-inside: avoid;
    }
    
    .print-section-title {
        font-size: 13pt;
        font-weight: bold;
        border-bottom: 1.5px solid #333;
        padding-bottom: 4px;
        margin-bottom: 1rem;
        font-family: serif;
    }
    
    .print-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 1.5rem;
    }
    
    .print-table th, .print-table td {
        border: 1px solid #999;
        padding: 6px 10px;
        font-size: 10pt;
        text-align: left;
    }
    
    .print-table th {
        background-color: #f0f0f0;
        font-weight: bold;
    }
    
    .print-badge-active {
        font-weight: bold;
        color: #d90429;
    }
    
    .print-prescription-card {
        border: 1px solid #ccc;
        padding: 10px 15px;
        margin-bottom: 10px;
        border-left: 4px solid #1a4d38;
        page-break-inside: avoid;
    }
    
    .print-prescription-name {
        font-size: 12pt;
        font-weight: bold;
        margin-bottom: 4px;
    }
    
    .print-prescription-details {
        font-size: 10pt;
    }
    
    .print-signature-section {
        margin-top: 3rem;
        display: flex;
        justify-content: space-between;
        page-break-inside: avoid;
    }
    
    .signature-line, .date-line {
        font-size: 11pt;
    }
}
