/* ==================== RESET ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    background: #f5f5f5;
    overflow-x: hidden;
    width: 100vw;
    box-sizing: border-box;
}

/* ==================== SIDE MENU ==================== */
.side-menu {
    width: 260px;
    height: 100vh;
    background: #34495e;
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    transform: translateX(-260px);
}

.side-menu:not(.collapsed) {
    transform: translateX(0);
}

.side-menu-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.side-menu-header h2 {
    font-size: 1em;
    color: white;
    margin-top: 10px;
}

.menu-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 8px;
}

.menu-items {
    padding: 20px 0;
    flex: 1;
}

.menu-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.menu-item:hover {
    background: rgba(255,255,255,0.1);
}

.menu-item.active {
    background: #d0082c;
    font-weight: bold;
}

.menu-icon {
    font-size: 18px;
}

/* ==================== MENU TOGGLE ==================== */
.menu-toggle {
    position: fixed;
    left: 10px;
    top: 10px;
    transform: none;
    background: #34495e;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 201;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    margin: 2px 0;
    transition: transform 0.3s, opacity 0.3s;
}

.side-menu:not(.collapsed) ~ .menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.side-menu:not(.collapsed) ~ .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.side-menu:not(.collapsed) ~ .menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    padding-bottom: 40px;
    position: relative;
    z-index: 1;
}

.side-menu.collapsed ~ .main-content {
    margin-left: 50px;
}

/* ==================== PAGES ==================== */
.page {
    display: none;
}

.page.active {
    display: block;
}

.container {
    max-width: 100%;
    padding-top: 20px;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}

/* ==================== HEADER ==================== */
.header-group {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.header-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

h1 {
    color: #2c3e50;
    font-size: 1.6em;
    margin: 0;
}

/* ==================== FORMS ==================== */
.form-header {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row label {
    font-weight: 500;
    color: #34495e;
    min-width: 100px;
}

.form-header h3 {
    color: #d0082c;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    font-size: 1.1em;
}

.form-header h4 {
    color: #34495e;
    margin: 15px 0 10px;
    font-size: 1em;
}

.date-input,
.number-input,
.select-input,
.text-input {
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 14px;
}

.text-input {
    flex-grow: 1;
    min-width: 200px;
}

.select-input {
    min-width: 200px;
}

.number-input.small {
    width: 70px;
}

.date-input {
    width: 160px;
    display: inline-block;
}

.aircraft-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    overflow: hidden;
}

.prefix {
    background: #f8f9fa;
    padding: 10px;
    border-right: 1px solid #bdc3c7;
    color: #34495e;
    font-weight: 500;
}

.aircraft-input {
    border: none;
    border-radius: 0;
}

input[type="text"] {
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 14px;
}

/* ==================== CALCULATOR PRODUCTS ==================== */
.product-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 15px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.group-header {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin: 25px 0 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #d0082c;
}

.product-name {
    font-weight: 500;
    color: #34495e;
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    flex-wrap: nowrap;
    overflow: hidden;
    box-sizing: border-box;
}

.input-group button {
    width: 44px;
    height: 45px;
    flex-shrink: 0;
    font-size: 20px;
    font-weight: bold;
    background: #d0082c;
    color: white;
    border: none;
    border-radius: 8px;
}

.input-group .count-input {
    flex-grow: 1;
    height: 45px;
    min-width: 60px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: 2px solid #d0082c;
    border-radius: 8px;
    padding: 0 10px;
    box-sizing: border-box;
}

.multiplier-info {
    color: #34495e;
    font-weight: 500;
    display: inline-block;
    margin: 0 5px;
}

.pack-input {
    width: 60px;
    height: 45px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border: 2px solid #d0082c;
    border-radius: 8px;
    background: white;
    flex-shrink: 0;
    padding: 0 6px;
    box-sizing: border-box;
}

.sum-input {
    width: 90px;
    height: 45px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border: 2px solid #d0082c;
    border-radius: 8px;
    flex-shrink: 0;
}

/* ==================== BUTTONS ==================== */
.buttons-row {
    display: flex;
    gap: 15px;
    margin: 25px 0;
}

.calculate-btn, .reset-btn, .configure-btn {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.calculate-btn {
    background: #2980b9;
}

.calculate-btn:hover {
    background: #2471a3;
}

.reset-btn {
    background: #e74c3c;
}

.reset-btn:hover {
    background: #c0392b;
}

.configure-btn {
    background: #27ae60;
}

.configure-btn:hover {
    background: #219653;
}

/* ==================== RESULTS ==================== */
.total-results {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: none;
}

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

.total-results h2 {
    color: #2c3e50;
    font-size: 1.4em;
    margin-bottom: 15px;
    border-bottom: 2px solid #d0082c;
    padding-bottom: 10px;
}

.total-field {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.total-field:last-child {
    border-bottom: none;
}

.total-label {
    font-weight: 500;
    color: #34495e;
}

.total-value {
    font-weight: bold;
    color: #2c3e50;
}

.total-products {
    margin-top: 20px;
}

.total-products h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.total-products-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.total-products-item.zero-value {
    opacity: 0.6;
}

.total-products-item.zero-value strong {
    color: #666;
}

.total-seals h3 {
    margin: 15px 0 10px;
    color: #2c3e50;
}

/* ==================== MENU BLOCK (Orders) ==================== */
.menu-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.menu-item-label {
    min-width: 100px;
    font-weight: 500;
    color: #34495e;
}

/* ==================== SEATS (Orders) ==================== */
.seats-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.placeholder-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.seat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ccc;
}

.seat-block {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.seat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.seat-number {
    font-weight: bold;
    color: #d0082c;
    font-size: 1.2em;
}

.passenger-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.seat-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.seat-form-row label {
    min-width: 120px;
    font-weight: 500;
    color: #34495e;
}

.seat-form-row select,
.seat-form-row input {
    flex-grow: 1;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkbox-wrapper label {
    min-width: auto;
}

.special-meal-text.text-input {
    margin-top: 5px;
}

/* ==================== OFFLINE WARNING ==================== */
.offline-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffc107;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    display: none;
    z-index: 300;
}

/* ==================== FOOTER ==================== */
.footer-signature {
    text-align: center;
    color: #666;
    font-size: 0.8em;
    margin-top: 30px;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

/* ==================== NUMBER INPUTS ==================== */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .side-menu {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
    }

    .side-menu.collapsed ~ .main-content {
        margin-left: 0;
    }

    .header-group {
        gap: 15px;
        flex-direction: column;
        text-align: center;
    }

    .header-logo {
        height: 60px;
    }

    h1 {
        font-size: 1.4em;
    }

    .buttons-row {
        flex-direction: column;
    }

    .passenger-details {
        grid-template-columns: 1fr;
    }

    .seat-block {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .side-menu {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
    }

    .side-menu.collapsed ~ .main-content {
        margin-left: 0;
    }

    .date-input {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .form-row label {
        margin-bottom: 5px;
    }

    .date-input, .number-input {
        width: 100%;
    }

    .select-input, .text-input {
        min-width: auto;
        width: 100%;
    }

    button {
        padding: 10px;
        font-size: 14px;
    }

    .sum-input {
        font-size: 16px;
    }

    .group-header {
        font-size: 1.2em;
        padding: 10px;
    }

    .header-group {
        padding: 10px;
    }

    .multiplier-info {
        display: none;
    }

    .footer-signature {
        font-size: 0.7em;
        padding: 10px 0;
    }

    .seat-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .seat-form-row label {
        min-width: auto;
        margin-bottom: 4px;
    }
}