/* SeaFleet Menu - Clean Modern CSS */

:root {
    --primary: #1a4d7a;
    --primary-light: #2d6ba8;
    --secondary: #1fb5a6;
    --secondary-light: #3bc9ba;
    --success: #1fb57e;
    --danger: #e74c3c;
    --warning: #f39c12;
    --dark: #0a2540;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --shadow-sm: 0 2px 4px rgba(26, 77, 122, 0.1);
    --shadow-md: 0 4px 8px rgba(26, 77, 122, 0.15);
    --shadow-lg: 0 8px 16px rgba(26, 77, 122, 0.2);
    
    --transition: all 0.2s ease;
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-800);
    background: var(--light);
    height: 100vh;
    overflow: hidden;
}

/* Container */
.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-200);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 40px;
    height: 40px;
}

.brand h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.brand p {
    font-size: 12px;
    color: var(--gray-600);
    margin: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px 0;
}

/* Progress Bar */
.progress-bar {
    margin-bottom: 30px;
}

.progress-fill {
    height: 4px;
    background: var(--gray-200);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: var(--progress, 0%);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: var(--transition);
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-600);
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--primary);
    color: var(--white);
}

.step-label {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
}

/* Form Container */
.form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}

/* Form Wrapper */
#wizardForm {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    padding-bottom: 80px; /* Space for fixed navigation */
    overflow-y: auto;
    overflow-x: hidden;
}

/* Form Steps */
.form-step {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100%;
}

.form-step.active {
    display: flex;
}

.form-step[data-step="2"] {
    align-items: stretch;
    text-align: left;
}

/* Step specific adjustments */
.form-step[data-step="1"] {
    justify-content: center;
}

.form-step[data-step="3"] {
    justify-content: center;
}

.form-step[data-step="4"] {
    justify-content: flex-start;
}

.form-step[data-step="4"] .summary {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Adjust step headers for scrollable content */
.form-step h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    background: var(--white);
    padding: 10px 0;
    z-index: 10;
}

/* Number Input Group */
.number-input-group {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 8px;
}

.btn-number {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--white);
    border-radius: var(--radius);
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.btn-number:hover {
    background: var(--primary);
    color: var(--white);
}

.number-input {
    width: 80px;
    height: 48px;
    border: none;
    background: transparent;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    color: var(--primary);
}

.number-input:focus {
    outline: none;
}

/* Marinai Container */
.marinai-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding-bottom: 20px;
}

.marinaio-card {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 16px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.marinaio-card.error {
    border-color: var(--danger);
}

.marinaio-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 13px;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Days Input */
.days-input-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.days-input {
    width: 100px;
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    border: none;
    border-bottom: 3px solid var(--primary);
    background: transparent;
}

.days-input:focus {
    outline: none;
}

.days-label {
    font-size: 20px;
    color: var(--gray-600);
}

.quick-days {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.quick-btn {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-700);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Summary */
.summary {
    width: 100%;
    margin-bottom: 24px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-item {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.summary-label {
    font-size: 11px;
    color: var(--gray-600);
    text-transform: uppercase;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-generate:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    border-color: var(--gray-400);
}

/* Generate Button */
.btn-generate {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Navigation */
.navigation {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 20px 40px;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.btn-nav {
    padding: 10px 20px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Results Container */
.results-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid var(--gray-200);
}

.results-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
}

.results-actions {
    display: flex;
    gap: 12px;
}

.diet-results {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Result Sections */
.result-section {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.result-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 11px;
    color: var(--gray-600);
    text-transform: uppercase;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-100);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary);
    color: var(--white);
}

.badge-success {
    background: var(--success);
    color: var(--white);
}

.badge-warning {
    background: var(--warning);
    color: var(--white);
}

/* Menu Day */
.menu-day {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.menu-day h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.meal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.meal {
    font-size: 12px;
}

.meal h5 {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.meal ul {
    list-style: none;
    color: var(--gray-600);
}

.meal li {
    padding-left: 12px;
    position: relative;
}

.meal li:before {
    content: "•";
    position: absolute;
    left: 0;
}

/* Menu Special Grid */
.menu-special-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.menu-special-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--gray-200);
}

.menu-special-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.meal-special {
    margin-bottom: 12px;
}

.meal-special h6 {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.meal-special ul {
    list-style: none;
    font-size: 11px;
    color: var(--gray-600);
}

.meal-special li {
    padding-left: 12px;
    position: relative;
}

.meal-special li:before {
    content: "•";
    position: absolute;
    left: 0;
}

/* Shopping List */
.shopping-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.shopping-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-info {
    background: #e7f3ff;
    color: #0066cc;
    border: 1px solid #b3d9ff;
}

.alert-warning {
    background: #fff4e5;
    color: #cc5200;
    border: 1px solid #ffd699;
}

.alert-success {
    background: #e6f7ed;
    color: #00663d;
    border: 1px solid #b3e0c9;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Toast */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-error .toast-icon {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.toast-success .toast-icon {
    background: rgba(31, 181, 126, 0.1);
    color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
    #wizardForm {
        padding: 20px;
        padding-bottom: 80px;
    }
    
    .navigation {
        padding: 15px 20px;
    }
    
    .marinai-container {
        grid-template-columns: 1fr;
    }
    
    .summary-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .meal-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .shopping-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .results-actions {
        width: 100%;
    }
    
    .results-actions button {
        flex: 1;
    }
    
    .diet-results {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .header,
    .navigation,
    .results-actions,
    .progress-bar {
        display: none !important;
    }
    
    .results-container {
        box-shadow: none;
        padding: 0;
    }
    
    .result-section {
        break-inside: avoid;
    }
}