/* ==========================================================================
   HotelBuddy Enterprise UI Design System
   Shared, compact, high-density styling for all list/workspace pages.
   Do not duplicate these rules per-page — reference these classes instead.
   ========================================================================== */

:root {
    --eb-control-h: 34px;
    --eb-toolbar-h: 38px;
    --eb-gap: 10px;
    --eb-radius: 6px;
    --eb-font: 13.5px;
    --eb-font-sm: 12.5px;
    --eb-border: #dee2e6;
}

/* ---------- Page shell ---------- */
.eb-page {
    padding: 0 14px 16px;
}

.eb-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--eb-font-sm);
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--muted, #6c757d);
    width: fit-content;
}

.eb-breadcrumb-home {
    color: var(--muted, #6c757d);
    display: inline-flex;
    text-decoration: none;
}

.eb-breadcrumb-home:hover {
    color: var(--primary-color, #1b6ec2);
}

.eb-breadcrumb-sep {
    font-size: 10px;
    color: var(--muted, #6c757d);
    opacity: 0.6;
}

.eb-breadcrumb .e-breadcrumb,
.eb-breadcrumb .rz-breadcrumb {
    background: transparent;
    padding: 0;
}

.eb-page-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.3;
    color: var(--text, #212529);
}

/* ---------- Single compact toolbar ---------- */
.eb-toolbar-bar {
    margin: 0 -14px 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--eb-border);
}

.eb-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--eb-gap);
    min-height: var(--eb-toolbar-h);
    flex-wrap: wrap;
}

.eb-toolbar-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.eb-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.eb-toolbar .form-control,
.eb-toolbar .form-select {
    height: var(--eb-control-h);
    font-size: var(--eb-font);
    padding: 4px 10px;
}

.eb-search-box {
    position: relative;
    width: 220px;
}

.eb-search-box input {
    padding-left: 30px;
}

.eb-search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted, #6c757d);
    font-size: 13px;
}

/* ---------- Compact buttons ---------- */
.eb-btn,
.eb-toolbar .btn,
.eb-page .btn {
    height: var(--eb-control-h);
    font-size: var(--eb-font);
    padding: 4px 12px;
    border-radius: var(--eb-radius);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.eb-btn-active {
    background: var(--surface, #f8f9fa);
    border-color: var(--primary-color, #1b6ec2);
    color: var(--primary-color, #1b6ec2);
}

.eb-btn-add {
    background: var(--success-color, #26b050);
    border-color: var(--success-color, #26b050);
    color: #fff;
}

.eb-btn-add:hover {
    background: #1f9744;
    border-color: #1f9744;
    color: #fff;
}

.eb-btn-more {
    background: var(--primary-color, #1b6ec2);
    border-color: var(--primary-color, #1b6ec2);
    color: #fff;
}

.eb-btn-more:hover {
    background: var(--primary-hover, #1861ac);
    border-color: var(--primary-hover, #1861ac);
    color: #fff;
}

.eb-btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--eb-radius);
    border: 1px solid var(--eb-border);
    background: #fff;
    color: var(--text, #212529);
}

.eb-btn-icon:hover {
    background: var(--surface, #f8f9fa);
}

.eb-grid-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.eb-grid-actions .eb-btn-icon {
    width: 26px;
    height: 26px;
    font-size: 12.5px;
}

/* ---------- Collapsible filter panel ---------- */
.eb-filters-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.22s ease, opacity 0.18s ease, margin 0.22s ease;
    margin-bottom: 0;
}

.eb-filters-panel.eb-open {
    max-height: 260px;
    opacity: 1;
    margin-bottom: 10px;
}

.eb-filters-panel-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--eb-gap);
    padding: 10px 12px;
    background: var(--surface, #f8f9fa);
    border: 1px solid var(--eb-border);
    border-radius: var(--eb-radius);
}

.eb-filter-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 150px;
}

.eb-filter-field label {
    font-size: var(--eb-font-sm);
    font-weight: 600;
    color: var(--muted, #6c757d);
    margin: 0;
}

.eb-filter-field .form-control,
.eb-filter-field .form-select {
    height: var(--eb-control-h);
    font-size: var(--eb-font);
}

.eb-filter-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

/* ---------- Typography consistency ---------- */
.eb-page,
.eb-page .form-label,
.eb-page label,
.eb-page .e-grid,
.eb-page .btn,
.eb-page .form-control,
.eb-page .form-select {
    font-size: var(--eb-font);
}

.eb-page h1, .eb-page h2, .eb-page h3, .eb-page h4, .eb-page h5, .eb-page h6 {
    font-size: 1.05rem;
    font-weight: 600;
}

/* ---------- Compact Syncfusion grid ---------- */
.eb-grid.e-grid,
.eb-page .e-grid {
    font-size: var(--eb-font);
}

.eb-grid.e-grid .e-gridheader .e-headercell,
.eb-page .e-grid .e-gridheader .e-headercell {
    height: 34px;
    padding: 0 8px;
    font-weight: 600;
}

.eb-grid.e-grid .e-rowcell,
.eb-page .e-grid .e-rowcell {
    padding: 5px 8px;
    font-size: var(--eb-font);
    line-height: 1.3;
}

.eb-grid.e-grid .e-row,
.eb-page .e-grid .e-row {
    height: 30px;
}

.eb-grid.e-grid .e-toolbar,
.eb-page .e-grid .e-toolbar {
    min-height: var(--eb-toolbar-h);
}

.eb-grid .e-grid .e-icon-filter,
.eb-page .e-grid .e-icon-filter {
    font-size: 11px;
}

/* Compact badges used across grids */
.eb-page .badge {
    font-size: var(--eb-font-sm);
    font-weight: 500;
    padding: 3px 7px;
}

/* ---------- Status as plain colored text (preferred over badges/pills) ----------
   Use these for grid status columns instead of a colored background badge:
   <span class="eb-status eb-status-success">Active</span> */
.eb-status {
    font-size: var(--eb-font);
    font-weight: 600;
}

.eb-status-success { color: var(--success-color, #1e7e34); }
.eb-status-danger { color: var(--danger-color, #c0392b); }
.eb-status-warning { color: #b8860b; }
.eb-status-info { color: var(--info-color, #117a8b); }
.eb-status-muted { color: var(--muted, #6c757d); }
.eb-status-primary { color: var(--primary-color, #1b6ec2); }

/* ---------- KPI strip (reference standard for all dashboard/summary tiles) ----------
   Compact pastel-tint tiles: icon + bold number + small caption. Use for any
   page-level KPI/summary row (Rooms, Group Dashboard, Finance summaries, etc.)
   instead of large gradient banners or oversized cards.
   <div class="eb-kpi-strip">
     <div class="eb-kpi-tile eb-kpi-blue"><i class="bi bi-door-open"></i><div><div class="eb-kpi-value">21</div><div class="eb-kpi-label">Total</div></div></div>
   </div> */
.eb-kpi-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}

.eb-kpi-tile {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 140px;
    min-width: 120px;
    padding: 8px 12px;
    border-radius: var(--eb-radius);
    font-size: var(--eb-font);
}

.eb-kpi-tile i {
    font-size: 1.1rem;
    line-height: 1;
}

.eb-kpi-value {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.15;
}

.eb-kpi-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--muted, #6c757d);
}

.eb-kpi-blue { background: #e7f1fc; color: #1b6ec2; }
.eb-kpi-blue .eb-kpi-value { color: #1b6ec2; }
.eb-kpi-green { background: #e6f7ec; color: #1e7e34; }
.eb-kpi-green .eb-kpi-value { color: #1e7e34; }
.eb-kpi-red { background: #fdeceb; color: #c0392b; }
.eb-kpi-red .eb-kpi-value { color: #c0392b; }
.eb-kpi-amber { background: #fdf3e0; color: #b8860b; }
.eb-kpi-amber .eb-kpi-value { color: #b8860b; }
.eb-kpi-yellow { background: #fdf8e1; color: #a68b00; }
.eb-kpi-yellow .eb-kpi-value { color: #a68b00; }
.eb-kpi-purple { background: #f2ecfb; color: #6c3fc5; }
.eb-kpi-purple .eb-kpi-value { color: #6c3fc5; }
.eb-kpi-gray { background: #eef0f2; color: #495057; }
.eb-kpi-gray .eb-kpi-value { color: #495057; }

@media (max-width: 900px) {
    .eb-kpi-tile { flex: 1 1 45%; }
}

/* Result-count / footer strip */
.eb-grid-footnote {
    font-size: var(--eb-font-sm);
    color: var(--muted, #6c757d);
    margin-top: 6px;
}

/* ---------- Empty state (no data / not linked) ---------- */
.eb-empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--muted, #6c757d);
    font-size: var(--eb-font);
}

/* ---------- Panel body used inside tabs (Messaging, and any future SfTab content) ----------
   Zero top padding so the tab strip sits flush; content fills the full width at 100% zoom
   with no wasted margin. */
.eb-panel {
    padding: 8px 0 0;
}

/* ---------- Compact view-switch (Usage/Recharge/Transactions toggle inside a panel) ----------
   Same eb-btn/eb-btn-active tokens as the rest of the app, tight gap, no extra margin. */
.eb-view-switch {
    display: flex;
    gap: 6px;
    margin: 0 0 8px;
}

/* ---------- SfTab compact override ----------
   Removes Syncfusion's default outer chrome/padding so the tab strip and content
   sit flush with the page, matching the eb-page zero-padding-first layout. */
.eb-tab-compact.e-tab .e-tab-header {
    margin-bottom: 8px;
}

.eb-tab-compact.e-tab .e-content {
    padding: 0;
}

.eb-tab-compact.e-tab .e-tab-header .e-toolbar-item {
    font-size: var(--eb-font);
}

/* ---------- Nested tab (Usage/Recharge/Transactions inside a channel panel) ----------
   Slightly smaller header so it visually reads as a sub-level of the outer
   WhatsApp/SMS tab, same tight spacing philosophy. */
.eb-tab-inner.e-tab .e-tab-header {
    margin-bottom: 6px;
}

.eb-tab-inner.e-tab .e-tab-header .e-toolbar-item {
    font-size: var(--eb-font-sm);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .eb-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .eb-toolbar-right {
        justify-content: flex-start;
    }

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

    .eb-filter-field {
        flex: 1 1 45%;
        min-width: 130px;
    }
}
