:root{
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-muted: #f9fafb;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-soft: #6b7280;
    --primary: #1677e6;
    --primary-dark: #0f5fc0;
    --success: #1f9d68;
    --warning: #d97706;
    --danger: #dc2626;
    --radius: 14px;
    --sidebar-width: 250px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 18px 14px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    padding: 8px 10px 18px;
}

.brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.nav-section {
    margin-top: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--text);
    margin-bottom: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background: #f3f4f6;
}

.nav-link.active {
    background: var(--primary);
    color: #fff;
}

.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
}

.topbar {
    height: 76px;
    background: rgba(255,255,255,0.9);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    backdrop-filter: blur(8px);
    z-index: 20;
}

.topbar-title {
    font-size: 22px;
    font-weight: 700;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    width: 320px;
    max-width: 40vw;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    outline: none;
}

.page {
    padding: 28px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-title {
    margin: 0;
    font-size: 36px;
    line-height: 1.1;
}

.page-subtitle {
    color: var(--text-soft);
    margin-top: 6px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-value {
    font-size: 34px;
    font-weight: 700;
    margin-top: 8px;
}

.stat-label {
    color: var(--text-soft);
    font-size: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

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

.btn-danger {
    background: #fff;
    border-color: #f0c2c2;
    color: var(--danger);
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 119, 230, 0.10);
}

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

.form-label {
    display: inline-block;
    margin-bottom: 7px;
    font-weight: 600;
}

.form-help {
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 14px;
}

.table-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #eef0f2;
    vertical-align: top;
}

.table th {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 700;
    background: #fbfbfc;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.badge-confirmed {
    background: #eef4ff;
    color: #245fcb;
}

.badge-checked-in {
    background: #eaf8f1;
    color: #1f9d68;
}

.badge-checked-out {
    background: #f3f4f6;
    color: #4b5563;
}

.badge-cancelled {
    background: #fef0f0;
    color: #c0392b;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    border: 1px solid;
}

.alert-error {
    background: #fff1f1;
    border-color: #f3c0c0;
    color: #9f1d1d;
}

.alert-success {
    background: #effaf3;
    border-color: #bfe5ca;
    color: #166534;
}

@media (max-width: 980px) {
    .sidebar {
        position: static;
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .app-shell {
        display: block;
    }

    .main {
        margin-left: 0;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 16px;
        height: auto;
        flex-wrap: wrap;
    }

    .page {
        padding: 18px;
    }

    .search-box {
        width: 100%;
        max-width: 100%;
    }
}

.page-subtitle {
    color: var(--text-soft);
    margin-top: 6px;
    font-size: 15px;
}

.table td strong {
    font-weight: 700;
}

.card + .card,
.table-wrap + .card {
    margin-top: 18px;
}
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
}

.brand-logo {
    height: 32px;        /* controls size */
    width: auto;
    max-width: 160px;    /* prevents overflow */
    object-fit: contain;
}

.table-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #eef0f2;
    vertical-align: top;
}

.table th {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 700;
    background: #fbfbfc;
}

.table th:first-child,
.table td:first-child {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
}

.table thead th:first-child {
    z-index: 4;
    background: #fbfbfc;
}

.table thead th {
    position: sticky;
    top: 0;
    background: #fbfbfc;
    z-index: 3;
}
.pricing-cell {
    width: 90px;
    height: 36px;
    padding: 6px 10px;
    text-align: center;
    font-weight: 600;
    border-radius: 10px;
}
.pricing-cell:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}