:root {
    --stocc-primary: #93D6BA;
    --stocc-dark: #1e1b4b;
    --stocc-light: #f8fafc;
    --stocc-button: #ffffff;
    --stocc-button-text: #0f172a;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--stocc-light);
    min-height: 100vh;
}

.logo-bar {
    background: #4c4d50;
    color: #fff;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-bar-branding {
    gap: 1.5rem;
    flex-wrap: wrap;
}

.logo-bar-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.logo-bar-text .store-name {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logo-bar-text .store-domain {
    font-size: 0.85rem;
    color: #d1d5db;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.logo-bar-pill {
    padding: 0.35rem 1.2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-header {
    background: var(--stocc-primary);
    color: #0f172a;
    border-bottom: 4px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.header-logo {
    height: 76px;
    width: auto;
    object-fit: contain;
    border-radius: 0.75rem;
    padding: 0.35rem 0.75rem;
}

.app-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.app-subtitle {
    margin: 0;
    color: #1f2937;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.app-user-chip {
    background: rgba(15, 23, 42, 0.08);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.hamburger-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
    cursor: pointer;
}

.hamburger-btn span {
    width: 22px;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
}

.app-nav {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.app-nav-link,
.app-nav-pill,
.app-nav-link-outline {
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-nav-link {
    background: rgba(255, 255, 255, 0.85);
    color: var(--stocc-button-text);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.app-nav-link:hover {
    background: #fff;
    color: #0f172a;
    transform: translateY(-1px);
}

.app-nav-pill {
    background: #0f172a;
    color: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

.app-nav-pill:hover {
    color: #fff;
    transform: translateY(-1px);
}

.app-nav-link-outline {
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.4);
    color: #0f172a;
}

.app-nav-link-outline:hover {
    background: rgba(15, 23, 42, 0.08);
}

.card {
    border: none;
    border-radius: 1rem;
}

.stat-tile {
    background-color: #fff;
    border-radius: 1rem;
    border: 1px solid #eef2ff;
}

table td,
table th {
    vertical-align: middle;
}

.table-responsive {
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f1f5f9;
    color: #0f172a;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
}

.table tbody tr:not(:last-child) td {
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table .badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.performance-bar {
    position: relative;
    width: 100%;
    height: 24px;
    background: #f1f5f9;
    border-radius: 999px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.performance-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.performance-bar span {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    font-weight: 600;
    color: #0f172a;
    font-size: 0.85rem;
}

.table-card {
    padding: 1.25rem;
    border-radius: 1rem;
    color: #fff;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.table-card-free {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.table-card-occupied {
    background: linear-gradient(135deg, #dc2626, #f87171);
}

.table-card form {
    margin: 0;
    flex: 0 0 auto;
}

.product-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.product-carousel.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.product-card {
    border: none;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0.5rem;
    width: 140px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.75rem;
}

.product-card-body {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.product-card-body strong {
    font-size: 0.95rem;
}

.product-card-body span {
    font-size: 0.85rem;
    color: #64748b;
}

.app-nav form {
    margin: 0;
}

.login-logo {
    max-width: 160px;
    border-radius: 1rem;
    padding: 0.5rem;
    background: #f8fafc;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}

.logo-bar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
}

.logo-bar-user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.logo-bar-user-name {
    font-size: 1.05rem;
    font-weight: 600;
}

.logo-bar-user-email {
    font-size: 0.85rem;
    color: #d1d5db;
}

.logo-bar-user-role {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    align-self: flex-end;
}

.user-panel-btn {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 0.8rem;
    padding: 0.65rem 1.1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.user-panel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.user-panel-btn-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-panel-btn-icon span {
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
}

.user-panel-wrapper {
    position: fixed;
    inset: 0;
    z-index: 1050;
    pointer-events: none;
}

.user-panel-wrapper.is-visible {
    pointer-events: auto;
}

.user-panel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-panel-wrapper.is-visible .user-panel-overlay {
    opacity: 1;
}

.user-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(420px, 100%);
    background: #fff;
    border-top-left-radius: 1.5rem;
    border-bottom-left-radius: 1.5rem;
    box-shadow: -15px 0 35px rgba(15, 23, 42, 0.2);
    padding: 2rem 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.user-panel-wrapper.is-visible .user-panel {
    transform: translateX(0);
}

.user-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.user-panel-close {
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    color: #0f172a;
}

.user-panel-profile {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-panel-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--stocc-primary);
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
}

.user-panel-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.user-panel-form .form-text {
    font-size: 0.75rem;
}

.user-panel-alert {
    border-radius: 0.85rem;
    padding: 0.65rem 0.9rem;
}

body.user-panel-open {
    overflow: hidden;
}

.log-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.log-toggle .btn {
    border-radius: 999px;
    font-weight: 600;
    min-width: 110px;
}

.log-toggle .btn.active {
    background: var(--stocc-primary);
    color: #0f172a;
    border-color: transparent;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.15);
}

.log-view + .log-view {
    margin-top: 1.5rem;
}

.log-payload {
    font-size: 0.8rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: #0f172a;
    max-height: 150px;
    overflow: auto;
}

.log-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.log-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.log-card-date {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
}

.log-card-meta {
    font-size: 0.9rem;
    color: #475569;
}

.log-card-ip {
    font-size: 0.85rem;
    color: #0f172a;
    font-weight: 600;
}

.log-card-payload {
    background: #f1f5f9;
    border: 1px dashed #cbd5f5;
    border-radius: 0.85rem;
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
    color: #0f172a;
}

.log-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    border: 1px dashed #cbd5f5;
    border-radius: 1rem;
    background: #fff;
}

.closed-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.closed-order-card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.closed-order-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.closed-order-code {
    font-weight: 600;
    font-size: 1.05rem;
}

.closed-order-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin: 0 0 0.5rem;
    padding: 0;
}

.closed-order-meta dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.15rem;
}

.closed-order-meta dd {
    margin: 0;
    font-weight: 600;
    color: #0f172a;
}

.closed-order-notes {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    color: #475569;
}

@media (min-width: 768px) {
    .log-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (max-width: 576px) {
    .log-card {
        padding: 1rem;
    }

    .log-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .log-toggle {
        width: 100%;
    }

    .log-toggle .btn {
        flex: 1;
    }
}

@media (max-width: 992px) {
    .logo-bar {
        text-align: center;
    }

    .logo-bar-pill {
        margin-top: 0.5rem;
    }

    .logo-bar-branding {
        justify-content: center;
    }

    .logo-bar-text {
        flex-basis: 100%;
        text-align: center;
        align-items: center;
        margin-top: 0.5rem;
    }

    .logo-bar-user {
        width: 100%;
        flex-direction: column;
    }

    .logo-bar-user-meta {
        text-align: center;
        align-items: center;
    }

    .logo-bar-user-role {
        align-self: center;
    }

    .user-panel {
        width: 100%;
        border-radius: 1.5rem 1.5rem 0 0;
    }

    .hamburger-btn {
        display: flex;
    }

    .app-nav {
        flex-direction: column;
        width: 100%;
        display: none;
    }

    .app-nav.open {
        display: flex;
    }

    .app-nav a,
    .app-nav button {
        width: 100%;
    }
}

@media (min-width: 993px) {
    .hamburger-btn {
        display: none;
    }

    .app-nav {
        display: flex !important;
    }
}
