/* GamaGama Mini App Styles */

:root {
    /* Telegram theme colors - will be overridden by Telegram WebApp */
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #222222;
    --tg-theme-hint-color: #8a8a8a;
    --tg-theme-link-color: #2678b6;
    --tg-theme-button-color: #2678b6;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #f1f1f1;

    /* Custom colors */
    --primary-color: #6c5ce7;
    --primary-dark: #5b4cdb;
    --success-color: #00b894;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #0984e3;

    /* Spacing */
    --header-height: 56px;
    --nav-height: 64px;
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark theme */
.dark-theme {
    --tg-theme-bg-color: #1a1a2e;
    --tg-theme-text-color: #ffffff;
    --tg-theme-hint-color: #aaaaaa;
    --tg-theme-link-color: #74b9ff;
    --tg-theme-button-color: #6c5ce7;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #16213e;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tg-theme-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* App container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--tg-theme-secondary-bg-color);
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn {
    background: none;
    border: none;
    color: var(--tg-theme-link-color);
    font-size: 20px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.session-badge {
    background: var(--success-color);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

/* Main content */
.main-content {
    flex: 1;
    margin-top: var(--header-height);
    margin-bottom: calc(var(--nav-height) + var(--safe-area-inset-bottom));
    padding: 16px;
    overflow-y: auto;
}

/* Bottom navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-area-inset-bottom));
    padding-bottom: var(--safe-area-inset-bottom);
    background: var(--tg-theme-secondary-bg-color);
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--tg-theme-hint-color);
    font-size: 12px;
    padding: 8px 16px;
    cursor: pointer;
    transition: color 0.2s;
    min-width: 64px;
}

.nav-item i {
    font-size: 20px;
}

.nav-item.active {
    color: var(--tg-theme-button-color);
}

/* Home screen */
.home-screen {
    padding: 0;
}

.greeting {
    margin-bottom: 24px;
}

.greeting h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.greeting p {
    color: var(--tg-theme-hint-color);
    font-size: 14px;
}

/* Menu cards */
.menu-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.menu-card {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.menu-card:active {
    transform: scale(0.98);
}

.menu-card i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.menu-card span {
    font-size: 14px;
    font-weight: 500;
}

.menu-card.book { color: var(--primary-color); }
.menu-card.my-bookings { color: var(--info-color); }
.menu-card.orders { color: var(--success-color); }
.menu-card.chat { color: var(--warning-color); }

/* Session card */
.session-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    padding: 20px;
    color: white;
    margin-bottom: 24px;
}

.session-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.session-card .zone {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.session-card .client-name {
    font-size: 14px;
    opacity: 0.9;
}

.session-card .disconnect-btn {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.session-card .session-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.session-card .session-actions .btn-primary,
.session-card .session-actions .btn-secondary {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.session-card .session-actions .btn-primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: none;
}

.session-card .session-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Connect card */
.connect-card {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.connect-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.connect-card p {
    color: var(--tg-theme-hint-color);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Buttons */
.btn-primary {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s;
}

.btn-primary:active {
    opacity: 0.8;
}

.btn-secondary {
    background: var(--tg-theme-secondary-bg-color);
    color: var(--tg-theme-text-color);
    border: 1px solid rgba(128, 128, 128, 0.3);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
}

.btn-success {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
}

/* Form elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    font-size: 16px;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--tg-theme-button-color);
}

/* Calendar */
.calendar {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-nav {
    background: none;
    border: none;
    color: var(--tg-theme-link-color);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.calendar-title {
    font-size: 16px;
    font-weight: 600;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    color: var(--tg-theme-hint-color);
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--tg-theme-text-color);
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: var(--tg-theme-secondary-bg-color);
}

.calendar-day.selected {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
}

.calendar-day.today {
    border: 2px solid var(--tg-theme-button-color);
}

.calendar-day.disabled {
    color: var(--tg-theme-hint-color);
    cursor: not-allowed;
}

.calendar-day.empty {
    cursor: default;
}

/* Time slots */
.time-slots {
    margin-bottom: 16px;
}

.time-section-title {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 12px;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.time-slot {
    padding: 12px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    background: transparent;
    color: var(--tg-theme-text-color);
}

.time-slot:hover:not(.disabled) {
    border-color: var(--tg-theme-button-color);
}

.time-slot.selected {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border-color: var(--tg-theme-button-color);
}

.time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Zone selection */
.zone-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.zone-section {
    margin-bottom: 16px;
}

.zone-section-title {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 12px;
}

.zone-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.zone-item {
    padding: 16px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    background: transparent;
    color: var(--tg-theme-text-color);
}

.zone-item:hover {
    border-color: var(--tg-theme-button-color);
}

.zone-item.selected {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border-color: var(--tg-theme-button-color);
}

.zone-item .zone-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.zone-item .zone-type {
    font-size: 12px;
    opacity: 0.8;
}

/* Duration selection */
.duration-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.duration-item {
    padding: 12px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    background: transparent;
    color: var(--tg-theme-text-color);
}

.duration-item:hover {
    border-color: var(--tg-theme-button-color);
}

.duration-item.selected {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border-color: var(--tg-theme-button-color);
}

/* Booking list */
.booking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.booking-card {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
}

.booking-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.booking-status {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.booking-status.new { background: #e3f2fd; color: #1976d2; }
.booking-status.reviewing { background: #fff3e0; color: #f57c00; }
.booking-status.modified { background: #fce4ec; color: #c2185b; }
.booking-status.approved { background: #e8f5e9; color: #388e3c; }
.booking-status.rejected { background: #ffebee; color: #d32f2f; }
.booking-status.cancelled { background: #f5f5f5; color: #757575; }

.booking-date {
    font-size: 16px;
    font-weight: 600;
}

.booking-details {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
}

.booking-zone {
    font-weight: 500;
    color: var(--tg-theme-text-color);
}

/* Product categories */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 12px;
    cursor: pointer;
}

.category-item:active {
    opacity: 0.8;
}

.category-emoji {
    font-size: 24px;
    margin-right: 12px;
}

.category-name {
    font-size: 16px;
    font-weight: 500;
}

.category-arrow {
    color: var(--tg-theme-hint-color);
}

/* Product list */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-card {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 12px;
}

.product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    background: #ddd;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-theme-button-color);
}

.product-stock {
    font-size: 12px;
    color: var(--tg-theme-hint-color);
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    background: transparent;
    color: var(--tg-theme-text-color);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-display {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

/* Product grid with images */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card-with-image {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card-with-image.clickable {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.product-card-with-image.clickable:active {
    transform: scale(0.97);
}

.product-card-with-image .product-image {
    width: 100%;
    height: 120px;
    border-radius: 0;
    margin-right: 0;
    overflow: hidden;
    background: var(--tg-theme-bg-color);
}

.product-card-with-image .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-with-image .product-details {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-with-image .product-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-with-image .product-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--tg-theme-button-color);
    margin-bottom: 2px;
}

.product-card-with-image .product-stock {
    font-size: 11px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 6px;
}

.product-qty-badge {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    margin-top: 4px;
}

.product-card-with-image .product-actions {
    margin-top: auto;
    justify-content: center;
}

.product-card-with-image .qty-btn {
    width: 36px;
    height: 36px;
}

.product-card-with-image .qty-btn.add {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border-color: var(--tg-theme-button-color);
    transition: transform 0.15s, background 0.15s;
}

.product-card-with-image .qty-btn.add:active {
    transform: scale(0.9);
}

/* Product added animation */
.product-card-with-image.product-added {
    animation: productFlash 0.5s ease-out;
}

@keyframes productFlash {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(38, 120, 182, 0.4);
    }
    50% {
        transform: scale(0.95);
        box-shadow: 0 0 0 8px rgba(38, 120, 182, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(38, 120, 182, 0);
    }
}

/* Single column on small screens */
@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card-with-image {
        flex-direction: row;
    }

    .product-card-with-image .product-image {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
    }

    .product-card-with-image .product-name {
        font-size: 14px;
    }
}

/* Cart */
.cart-summary {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-area-inset-bottom));
    left: 0;
    right: 0;
    background: var(--tg-theme-secondary-bg-color);
    padding: 16px;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total {
    font-size: 18px;
    font-weight: 600;
}

.cart-checkout-btn {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* Floating cart bar */
.floating-cart-bar {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-area-inset-bottom) + 16px);
    left: 16px;
    right: 16px;
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    padding: 14px 16px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 90;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cart-bar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-bar-count {
    font-size: 14px;
    opacity: 0.9;
}

.cart-bar-total {
    font-size: 18px;
    font-weight: 600;
}

.cart-bar-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--tg-theme-button-text-color);
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.cart-bar-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

/* Cart page */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: var(--tg-theme-hint-color);
    font-size: 14px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--tg-theme-link-color);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 12px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-delete {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(220, 53, 69, 0.3);
    background: transparent;
    color: #dc3545;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.cart-item-delete:active {
    background: rgba(220, 53, 69, 0.1);
}

.cart-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.cart-actions .btn-primary,
.cart-actions .btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Chat */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--nav-height) - var(--safe-area-inset-bottom));
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.chat-message {
    margin-bottom: 12px;
    max-width: 80%;
}

.chat-message.client {
    margin-left: auto;
}

.chat-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
}

.chat-message.client .chat-bubble {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border-bottom-right-radius: 4px;
}

.chat-message.manager .chat-bubble {
    background: var(--tg-theme-secondary-bg-color);
    color: var(--tg-theme-text-color);
    border-bottom-left-radius: 4px;
}

.chat-message.pending .chat-bubble {
    opacity: 0.7;
}

.chat-time {
    font-size: 11px;
    color: var(--tg-theme-hint-color);
    margin-top: 4px;
}

.chat-input-container {
    padding: 12px 16px;
    background: var(--tg-theme-secondary-bg-color);
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 24px;
    font-size: 14px;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
}

.chat-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border: none;
    font-size: 18px;
    cursor: pointer;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    left: 16px;
    right: 16px;
    z-index: 1000;
}

.toast {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--success-color);
    color: white;
}

.toast.error {
    background: var(--danger-color);
    color: white;
}

.toast.info {
    background: var(--info-color);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-content {
    background: var(--tg-theme-bg-color);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.modal-header h5 {
    font-size: 18px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--tg-theme-hint-color);
    cursor: pointer;
}

.modal-body {
    padding: 16px;
}

.modal-footer {
    padding: 16px;
    display: flex;
    gap: 8px;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state i {
    font-size: 48px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--tg-theme-hint-color);
    font-size: 14px;
}

/* Connection code input */
.code-input-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    text-transform: uppercase;
}

.code-input:focus {
    outline: none;
    border-color: var(--tg-theme-button-color);
}

/* Summary card */
.summary-card {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--tg-theme-hint-color);
}

.summary-value {
    font-weight: 500;
}

/* Modifications */
.modification-card {
    background: #fff3e0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.modification-card h4 {
    font-size: 14px;
    color: #f57c00;
    margin-bottom: 12px;
}

.modification-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modification-old,
.modification-new {
    font-size: 13px;
}

.modification-old {
    color: var(--tg-theme-hint-color);
}

.modification-new {
    color: #f57c00;
    font-weight: 500;
}

/* Order status */
.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.order-status.pending { background: #fff3e0; color: #f57c00; }
.order-status.processing { background: #e3f2fd; color: #1976d2; }
.order-status.completed { background: #e8f5e9; color: #388e3c; }
.order-status.cancelled { background: #ffebee; color: #d32f2f; }

/* Responsive */
@media (max-width: 360px) {
    .menu-cards {
        grid-template-columns: 1fr;
    }

    .time-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .duration-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
