/* ===============================
   DARK THEME - FITTRACK
   =============================== */

/* Base Styles */

.nav-item i {
    font-size: 24px !important;
}

.nav-item span {
    display: block !important;
    font-size: 12px !important;
}

body {
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 70px; /* Space for bottom nav */
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 1rem 80px 1rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: #242424;
    border-radius: 12px;
    border: 1px solid #333;
}

.header h1 {
    font-size: 1.5rem;
    margin: 0;
    color: #2196F3;
}

.header h1 span {
    color: #e0e0e0;
}

.date-badge {
    background: #333;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #888;
    border: 1px solid #444;
}

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

.quick-stat {
    background: #242424;
    padding: 0.75rem 0.25rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #333;
}

.quick-stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2196F3;
}

.quick-stat-value.success {
    color: #4CAF50;
}

.quick-stat-label {
    font-size: 0.7rem;
    color: #888;
    margin-top: 0.2rem;
}

/* Cards */
.dashboard-card {
    background: #242424;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #333;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i {
    color: #2196F3;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

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

/* Metrics */
.metric-row {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
}

.metric-label {
    color: #888;
    font-size: 0.9rem;
}

.metric-value {
    font-weight: 600;
    color: #e0e0e0;
}

.metric-value.success {
    color: #4CAF50;
}

.metric-value.danger {
    color: #f44336;
}

.metric-value.warning {
    color: #ff9800;
}

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

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

/* Stat Boxes */
.stat-box {
    background: #1a1a1a;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #333;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2196F3;
}

.stat-label {
    font-size: 0.7rem;
    color: #888;
    margin-top: 0.2rem;
}

/* Coffee Counter */
.coffee-counter {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.coffee-dot {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #444;
}

.coffee-dot.consumed {
    background: #4CAF50;
    color: white;
    border-color: #45a049;
}

.coffee-dot:hover {
    transform: scale(1.1);
    background: #444;
}

/* Fasting Timer */
.fasting-timer {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #2196F3;
    margin: 0.5rem 0;
}

/* Buttons */
.btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #1976D2;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-secondary {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #444;
}

.btn-secondary:hover {
    background: #404040;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Workout Items */
.workout-item {
    background: #1a1a1a;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #333;
    border-left: 4px solid #4CAF50;
}

.workout-item strong {
    color: #e0e0e0;
    display: block;
    margin-bottom: 0.25rem;
}

/* Compliance Grid - Matching your existing style */
.compliance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.compliance-item {
    background: #1a1a1a;
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid #333;
}

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

.compliance-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #e0e0e0;
}

.compliance-status {
    font-size: 1.1rem;
    font-weight: bold;
}

.compliance-status.success {
    color: #4CAF50;
}

.compliance-status.danger {
    color: #f44336;
}

.compliance-details {
    font-size: 0.8rem;
    color: #888;
}

.compliance-progress {
    margin-top: 0.5rem;
    height: 3px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
}

.compliance-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.compliance-progress-bar.success {
    background: #4CAF50;
}

.compliance-progress-bar.danger {
    background: #f44336;
}

.compliance-progress-bar.info {
    background: #2196F3;
}

/* Score Circle */
.compliance-score-container {
    text-align: center;
    margin: 1rem 0;
}

.compliance-score {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2196F3;
}

.compliance-score-label {
    font-size: 0.8rem;
    color: #888;
    margin-top: -0.3rem;
}

/* Protein specific */
.protein-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.protein-consumed {
    color: #f44336;
    font-weight: 600;
}

.protein-target {
    color: #888;
}

/* Bottom Navigation */
/* Bottom Navigation - Mobile Optimized */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #242424;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 2px;
    border-top: 1px solid #333;
    max-width: 600px;
    margin: 0 auto;
    z-index: 1000;
    height: 60px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    cursor: pointer;
    padding: 4px 0;
    border-radius: 8px;
    transition: all 0.2s;
    flex: 1;
    min-width: 0;
    margin: 0 2px;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
}

.nav-item span {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 2px;
}

.nav-item.active {
    color: #f39c12;
    background: #1a1a1a;
}

.nav-item:active {
    background: #333;
    transform: scale(0.95);
}

/* Update body padding for bottom nav */
body {
    padding-bottom: 70px;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #888;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #242424;
    border-radius: 12px;
    border: 1px solid #333;
}

.login-title {
    text-align: center;
    color: #2196F3;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 2rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196F3;
}

/* Food Grid */
.food-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
    padding: 0.25rem;
}

.food-item {
    background: #1a1a1a;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s;
}

.food-item:hover {
    border-color: #2196F3;
    background: #242424;
}

.food-item.selected {
    border-color: #4CAF50;
    background: #1e3a2a;
}

.food-name {
    font-weight: 600;
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.food-macro {
    font-size: 0.7rem;
    color: #888;
}

.food-category {
    font-size: 0.7rem;
    color: #2196F3;
    margin-top: 0.2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #242424;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #333;
}

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

.modal-header h3 {
    color: #e0e0e0;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
}

.close-btn:hover {
    color: #f44336;
}

/* Water Tracker */
.water-tracker {
    text-align: center;
}

/* Badge for workout count */
.badge {
    background: #4CAF50;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 480px) {
    .quick-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .quick-stat-value {
        font-size: 1rem;
    }
    
    .compliance-grid {
        grid-template-columns: 1fr;
    }
    
    .food-grid {
        grid-template-columns: 1fr;
    }

/* Interactive Meal Suggestions */
.meal-suggestion-card {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid #f39c12;
}

.meal-time {
    font-size: 1rem;
    font-weight: bold;
    color: #f39c12;
    margin-bottom: 0.5rem;
}

.meal-base {
    background: #2a2a2a;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #333;
}

.alternative-section {
    margin: 0.5rem 0;
}

.alternatives-list {
    display: none;
    background: #1a1a1a;
    border-radius: 6px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.alternative-item {
    padding: 0.5rem;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}

.alternative-item:hover {
    background: #333;
}

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

.macro-small {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.2rem;
}

.loading-spinner-small {
    padding: 0.5rem;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.no-alternatives {
    padding: 0.5rem;
    text-align: center;
    color: #888;
    font-style: italic;
}

/* Button adjustments */
.btn-small {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
}

details summary {
    cursor: pointer;
    color: #f39c12;
    font-weight: bold;
    padding: 0.5rem;
    background: #2a2a2a;
    border-radius: 6px;
}

details[open] summary {
    margin-bottom: 1rem;
}

/* Swap section styles */
.swap-section {
    margin: 10px 0;
}

.swap-results {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.swap-results.active {
    display: block;
}

.swap-item {
    padding: 12px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
}

.swap-item:hover {
    background: #2a2a2a;
}

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

.swap-item strong {
    color: #f39c12;
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.swap-item .macro-details {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.4;
}
/* Detailed Day Card Styles */
.day-card.detailed {
    background: #1e1e1e;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border-left: 4px solid #f39c12;
}

.day-header {
    font-size: 1.1rem;
    font-weight: bold;
    color: #f39c12;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
}

.time-block {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 2px solid #444;
}

.time {
    display: inline-block;
    font-weight: bold;
    color: #2196F3;
    width: 100px;
    font-size: 0.9rem;
}

.activity {
    color: #e0e0e0;
    font-weight: 500;
}

.activity-details {
    list-style: none;
    margin: 0.5rem 0 0.5rem 100px;
    padding: 0;
}

.activity-details li {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.activity-details .supplement {
    color: #4CAF50;
}

.activity-details .note {
    color: #f39c12;
    font-style: italic;
    font-size: 0.85rem;
}

.nutrition-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #2a2a2a;
    border-radius: 8px;
    font-size: 0.9rem;
}

.nutrition-note .warning {
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
/* Day Card Styles */
.day-card {
    background: #1e1e1e;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border-left: 4px solid #f39c12;
    overflow: hidden;
}

.day-card.detailed {
    border-left-color: #2196F3;
}

.day-header {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f39c12;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-badge {
    background: #2c3e50;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Time Block Styles - More Readable */
.time-block {
    background: #2a2a2a;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.time-block.supplement-block {
    border-left-color: #8e44ad;
}

.time-block.meal-block {
    border-left-color: #f39c12;
}

.time-block.run-block {
    border-left-color: #2196F3;
}

.time-block.sleep-block {
    border-left-color: #9b59b6;
}

.time-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.time-icon {
    font-size: 1.3rem;
    min-width: 40px;
}

.time {
    font-weight: bold;
    color: #2196F3;
    font-size: 1rem;
    min-width: 100px;
}

.activity {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 1rem;
}

/* Activity Details - Clean List */
.activity-details {
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-details li {
    color: #b0b0b0;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.activity-details li:before {
    content: "•";
    color: #f39c12;
    font-weight: bold;
    margin-right: 0.5rem;
}

.activity-details .supplement {
    color: #4CAF50;
}

.activity-details .supplement:before {
    content: "💊";
    color: #4CAF50;
    margin-right: 0.5rem;
}

.activity-details .note {
    color: #f39c12;
    font-style: italic;
    font-size: 0.9rem;
    background: #1e1e1e;
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.25rem;
}

.activity-details .warning {
    color: #f44336;
    font-size: 0.9rem;
    background: #2a1a1a;
    padding: 0.5rem;
    border-radius: 6px;
    border-left: 3px solid #f44336;
}

/* Nutrition Note */
.nutrition-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #2c3e50;
    border-radius: 8px;
    font-size: 0.95rem;
    border-left: 4px solid #4CAF50;
}

.nutrition-note strong {
    color: #e0e0e0;
    display: block;
    margin-bottom: 0.5rem;
}

.nutrition-note .warning {
    color: #f44336;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #444;
}

/* Weekly Schedule Grid */
.weekly-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .time-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .time-icon {
        display: none;
    }
    
    .time {
        min-width: auto;
    }
    
    .activity-details li {
        flex-direction: column;
        gap: 0.2rem;
    }
    
    .activity-details li:before {
        display: none;
    }

/* Collapsible Days Styling */
.weekly-schedule-collapsible {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.day-details {
    background: #1e1e1e;
    border-radius: 10px;
    border: 1px solid #333;
    overflow: hidden;
}

.day-summary {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #2a2a2a;
    list-style: none;
    transition: background 0.2s;
}

.day-summary:hover {
    background: #333;
}

.day-summary::-webkit-details-marker {
    display: none;
}

.day-icon {
    font-size: 1.2rem;
    min-width: 30px;
}

.day-name {
    font-weight: bold;
    color: #f39c12;
    min-width: 70px;
}

.day-workout {
    color: #e0e0e0;
    flex: 1;
    font-size: 0.95rem;
}

.expand-icon {
    color: #888;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.day-details[open] .expand-icon {
    transform: rotate(180deg);
}

.day-content {
    padding: 1rem;
    border-top: 1px solid #333;
    background: #1a1a1a;
}

/* Time blocks inside expanded view */
.day-content .time-block {
    background: #242424;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #4CAF50;
}

.day-content .time-block.meal-block {
    border-left-color: #f39c12;
}

.day-content .time-block.run-block {
    border-left-color: #2196F3;
}

.day-content .time-block.sleep-block {
    border-left-color: #9b59b6;
}

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

.day-content .time {
    color: #2196F3;
    font-weight: bold;
    font-size: 0.9rem;
}

.day-content .activity {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.95rem;
}

.day-content .activity-details {
    margin: 0.5rem 0 0 0;
    padding-left: 1rem;
}

.day-content .activity-details li {
    color: #b0b0b0;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.day-content .supplement {
    color: #4CAF50;
}

.day-content .note {
    color: #f39c12;
    font-style: italic;
}

.day-summary-box {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #2c3e50;
    border-radius: 6px;
    font-size: 0.9rem;
}
