:root {
    --primary: #DE9200;
    --primary-dark: #977045;
    --secondary: #060604;
    --accent: #F9D809;
    --info: #B9BABC;
    --success: #5FAF62;
    --warning: #E6A700;
    --light-bg: #F5F2EC;
    --card-bg: #FFFFFF;
    --text: #1E1E1E;
    --text-light: #6E6E6E;
    --border: #D5CBBE;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light-bg);
    color: var(--text);
    line-height: 1.6;
    max-width: 100%;
    overflow-x: hidden;
}

.tab-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    border-top: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.tab-btn i {
    font-size: 1.2rem;
}

.tab-btn.active {
    color: var(--primary);
    font-weight: 600;
}

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

.tab-content {
    display: none;
    padding: 20px;
    padding-bottom: 80px;
}

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

.mobile-header {
    background: linear-gradient(135deg, var(--secondary), #34495e);
    color: white;
    padding: 20px;
    margin: -20px -20px 20px -20px;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.table-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.table-name {
    font-size: 1.4rem;
    font-weight: 700;
}

.table-number {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.session-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.session-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px 15px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.category-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.category-title {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.category-count {
    font-size: 0.8rem;
    color: var(--text-light);
    background: rgba(222, 146, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.back-btn-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.back-to-categories {
    background: var(--light-bg);
    border: 1px solid var(--border);
    color: var(--secondary);
    padding: 10px 15px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.back-to-categories:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.menu-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    flex: 1;
}

.item-price {
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1rem;
    margin-left: 10px;
}

.item-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.item-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tag {
    background: rgba(212, 165, 116, 0.1);
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.add-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.add-btn:active {
    transform: scale(0.98);
}

.cart-panel {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.cart-panel h3 {
    font-size: 1.3rem;
    color: var(--secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(224, 214, 204, 0.5);
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--light-bg);
    color: var(--secondary);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-qty {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-summary {
    border-top: 2px solid var(--border);
    padding-top: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.total-row {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px dashed var(--border);
}

.send-order-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--success), #219653);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.send-order-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.status-section {
    padding: 20px 0;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.refresh-btn {
    background: var(--info);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-status-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--info);
}

.order-status-item.preparing {
    border-left-color: var(--warning);
}

.order-status-item.ready {
    border-left-color: var(--success);
}

.order-status-item.delivered {
    border-left-color: var(--text-light);
}

.order-status-item.cancelled {
    border-left-color: var(--accent);
}

.order-status-item.confirmed {
    border-left-color: var(--info);
}

.status-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-id {
    font-weight: 600;
    color: var(--secondary);
}

.order-time {
    color: var(--text-light);
    font-size: 0.9rem;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 5px;
}

.status-pending {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info);
}

.status-confirmed {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info);
}

.status-preparing {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

.status-ready {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.status-delivered {
    background: rgba(119, 119, 119, 0.1);
    color: var(--text-light);
}

.status-cancelled {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent);
}

.order-items {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text);
}

.order-total {
    margin-top: 10px;
    font-weight: 600;
    color: var(--secondary);
    text-align: right;
}

.no-orders {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-style: italic;
}

.no-orders i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 15px 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 90%;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.instructions {
    background: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ffc107;
    font-size: 0.9rem;
}

.instructions ol {
    margin-left: 20px;
    margin-top: 10px;
}

.instructions li {
    margin-bottom: 6px;
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-items-section {
    display: none;
}

.category-items-section.active {
    display: block;
}

.category-header {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Valodas izvēles CSS */
/* MOBILE ONLY valodu pārslēgšana */
.mobile-language-selector {
    position: relative;
    display: inline-block;
    margin-right: 10px;
}

.mobile-language-btn {
    background-color: #4a5568;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    width: 70px;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-language-btn:active {
    transform: scale(0.98);
    background-color: #2d3748;
}

.mobile-language-btn .mobile-language-flag {
    font-size: 1.3rem;
}

.mobile-language-flag img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    display: block;
}

.language-flag-img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.mobile-language-btn .mobile-language-code {
    font-weight: bold;
    font-size: 1rem;
}

/* Mobile language dropdown */
.mobile-language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    width: 150px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-language-dropdown.show {
    display: block;
}

.mobile-language-option {
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-language-option:last-child {
    border-bottom: none;
}

.mobile-language-option:active {
    background-color: #f1f5f9;
}

.mobile-language-option.active {
    background-color: #e2e8f0;
    font-weight: 600;
}

.mobile-language-option .mobile-flag {
    font-size: 1.4rem;
    width: 24px;
    text-align: center;
}

.mobile-language-option .mobile-lang-name {
    font-size: 1rem;
    color: #1a202c;
}

/* Mobile header optimizācija */
.mobile-header {
    padding: 12px 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.table-info {
    flex: 1;
    min-width: 0;
    /* Lai text-overflow strādātu */
}

.session-btn {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4a5568;
    color: white;
    border: none;
    cursor: pointer;
}

.session-btn:active {
    background-color: #2d3748;
    transform: scale(0.98);
}

/* Pielāgošana ļoti maziem ekrāniem */
@media (max-width: 380px) {
    .mobile-language-btn {
        width: 60px;
        padding: 10px 12px;
    }

    .mobile-language-btn .mobile-language-flag {
        font-size: 1.2rem;
    }

    .mobile-language-btn .mobile-language-code {
        font-size: 0.9rem;
    }

    .mobile-language-dropdown {
        width: 140px;
        right: -10px;
    }
}

/* Pielāgošana vertikālajam orientācijai */
@media (max-height: 600px) {
    .mobile-language-dropdown {
        position: fixed;
        top: 70px;
        right: 16px;
        width: 140px;
        max-height: 200px;
        overflow-y: auto;
    }
}