/* ResSys frontend-demo lapas komponenti — balstīti uz landing.css marķieriem (tokens) */

.demo-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: hsl(210 25% 16%);
    color: #fff;
    border-bottom: 2px solid hsl(var(--primary));
    padding: 0.85rem 0;
}
.demo-header .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.demo-header .logo { color: #fff; }
.demo-header .logo .accent { color: hsl(var(--primary)); }

.demo-badge {
    display: inline-flex;
    align-items: center;
    background: hsl(var(--primary) / .2);
    border: 1px solid hsl(var(--primary) / .4);
    color: hsl(24 90% 75%);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tab-switcher {
    display: flex;
    background: hsl(0 0% 100% / .08);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    gap: 0.25rem;
}
.tab-btn {
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: hsl(0 0% 100% / .75);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    font-family: inherit;
    transition: background-color .15s ease, color .15s ease;
}
.tab-btn:hover { color: #fff; background: hsl(0 0% 100% / .06); }
.tab-btn.active { background: hsl(var(--primary)); color: #fff; }

.back-link { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; color: hsl(0 0% 100% / .7); }
.back-link:hover { color: #fff; }

.demo-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

/* Footer piespiests viewport apakšai, ja lapa īsāka par ekrānu */
body:has(.demo-footer) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.demo-footer {
    background: hsl(210 25% 16%);
    color: hsl(210 15% 60%);
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.78rem;
    margin-top: auto;
}

.hidden { display: none !important; }

/* Info banner */
.info-banner {
    background: hsl(var(--card));
    border-left: 4px solid hsl(var(--accent));
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.info-banner h1 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.info-banner p { font-size: 0.8rem; color: hsl(var(--muted-foreground)); margin: 0; max-width: 42rem; }
.info-user { display: flex; align-items: center; gap: 0.75rem; }
.info-user .meta { text-align: right; font-size: 0.75rem; }
.info-user .meta .label { display: block; color: hsl(var(--muted-foreground)); text-transform: uppercase; font-weight: 700; font-size: 0.65rem; }
.info-user .avatar { width: 2.25rem; height: 2.25rem; border-radius: var(--radius-sm); background: hsl(var(--secondary)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }

/* Generic panel/card */
.panel {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid hsl(var(--border));
    padding-bottom: 0.85rem;
    margin-bottom: 1rem;
}
.panel-head h2, .panel-head h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0;
}
.panel-head h2 svg, .panel-head h3 svg { width: 1rem; height: 1rem; color: hsl(var(--primary)); }
.panel-head .hint { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }

/* Filter grid */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}
.filter-field label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.35rem;
}
.filter-field select, .filter-field input, .modal-box input {
    width: 100%;
    border: 2px solid hsl(var(--border));
    background: hsl(var(--background));
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease;
}
.filter-field select:focus, .filter-field input:focus, .modal-box input:focus { border-color: hsl(var(--primary)); }

.breadcrumb-path {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    font-size: 0.78rem;
}
.breadcrumb-path .label { font-weight: 700; text-transform: uppercase; font-size: 0.65rem; color: hsl(var(--muted-foreground)); margin-right: 0.5rem; }
.breadcrumb-path .path { font-weight: 600; color: hsl(var(--foreground)); }

/* Two-column booking layout */
.booking-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 900px) { .booking-grid { grid-template-columns: 1fr; } }

.calendar-nav { display: flex; align-items: center; gap: 0.5rem; }
.calendar-nav button {
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.calendar-nav button:hover { background: hsl(var(--background)); }
.calendar-nav .date-label { font-size: 0.78rem; font-weight: 700; padding: 0 0.35rem; }

.slot-legend { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.78rem; font-weight: 600; margin: 0.75rem 0; }
.slot-legend .swatch { width: 0.85rem; height: 0.85rem; border-radius: 0.2rem; display: inline-block; margin-right: 0.4rem; vertical-align: -1px; }
.slot-legend .swatch.free { background: hsl(var(--background)); border: 1px solid hsl(var(--secondary) / .5); }
.slot-legend .swatch.selected { background: hsl(var(--primary)); }
.slot-legend .swatch.taken { background: hsl(var(--border)); }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.65rem; }
.slot-btn {
    padding: 0.65rem;
    text-align: left;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s ease, background-color .15s ease;
}
.slot-btn:hover { border-color: hsl(var(--primary)); }
.slot-btn .time { display: block; font-weight: 700; font-size: 0.8rem; color: hsl(var(--foreground)); }
.slot-btn .price { font-size: 0.72rem; font-weight: 700; color: hsl(var(--secondary-dark)); font-family: monospace; }
.slot-btn.selected { background: hsl(var(--primary)); border-color: hsl(var(--primary)); }
.slot-btn.selected .time, .slot-btn.selected .price { color: #fff; }
.slot-btn[disabled] { background: hsl(var(--border) / .5); color: hsl(var(--muted-foreground)); cursor: not-allowed; }
.slot-btn[disabled] .time { color: hsl(var(--muted-foreground)); text-decoration: line-through; }
.slot-btn[disabled] .price { color: hsl(var(--muted-foreground)); text-transform: uppercase; }

/* Summary panel */
.summary-row { display: flex; justify-content: space-between; font-size: 0.8rem; color: hsl(var(--muted-foreground)); padding: 0.25rem 0; }
.summary-row strong { color: hsl(var(--foreground)); }

.selected-slots-box {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin: 0.75rem 0;
}
.selected-slots-box .label { display: block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: hsl(var(--muted-foreground)); margin-bottom: 0.5rem; }
.selected-slots-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.selected-slots-box li { display: flex; justify-content: space-between; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius-sm); padding: 0.4rem 0.6rem; font-size: 0.78rem; font-weight: 700; }
.selected-slots-box li span:last-child { font-family: monospace; color: hsl(var(--secondary-dark)); }
.selected-slots-box .empty { color: hsl(var(--muted-foreground)); font-style: italic; font-weight: 500; }

.total-row { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid hsl(var(--border)); padding-top: 0.75rem; margin-top: 0.5rem; }
.total-row .label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.total-price { font-size: 1.3rem; font-weight: 800; color: hsl(var(--primary-dark)); }
.total-note { font-size: 0.68rem; color: hsl(var(--muted-foreground)); margin-top: 0.35rem; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .dashboard-grid { grid-template-columns: 1fr; } }

.profile-head { display: flex; align-items: center; gap: 0.85rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid hsl(var(--border)); }
.profile-head .avatar { width: 3rem; height: 3rem; border-radius: var(--radius-sm); background: hsl(var(--primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: 'Instrument Sans', sans-serif; }
.profile-head h3 { font-size: 0.95rem; margin-bottom: 0.15rem; }
.profile-head span { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }

.profile-row { display: flex; justify-content: space-between; font-size: 0.78rem; padding: 0.5rem 0; border-bottom: 1px solid hsl(var(--border)); }
.profile-row .label { color: hsl(var(--muted-foreground)); }
.profile-row .value { font-weight: 700; }
.profile-row.balance .value { color: hsl(var(--secondary-dark)); font-size: 0.9rem; font-weight: 800; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.data-table thead { background: hsl(var(--background)); }
.data-table th { text-align: left; padding: 0.6rem; font-size: 0.65rem; text-transform: uppercase; font-weight: 700; color: hsl(var(--muted-foreground)); }
.data-table td { padding: 0.6rem; border-top: 1px solid hsl(var(--border)); font-weight: 600; }
.data-table .id { font-family: monospace; color: hsl(var(--muted-foreground)); }
.data-table .sub { display: block; font-size: 0.7rem; color: hsl(var(--muted-foreground)); font-weight: 500; }

.status-badge { display: inline-flex; padding: 0.2rem 0.55rem; border-radius: var(--radius-sm); font-size: 0.63rem; font-weight: 700; text-transform: uppercase; }
.status-badge.confirmed { background: hsl(var(--secondary) / .18); color: hsl(var(--secondary-dark)); border: 1px solid hsl(var(--secondary) / .4); }
.status-badge.pending { background: hsl(var(--accent) / .2); color: hsl(var(--accent-dark)); border: 1px solid hsl(var(--accent) / .4); }
.status-badge.done { background: hsl(var(--border)); color: hsl(var(--muted-foreground)); border: 1px solid hsl(var(--border)); }

/* Iframe tab */
.iframe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 860px) { .iframe-grid { grid-template-columns: 1fr; } }

.browser-preview { border: 2px solid hsl(var(--foreground) / .8); border-radius: var(--radius-sm); padding: 1rem; background: hsl(var(--card)); }
.browser-bar { display: flex; justify-content: space-between; align-items: center; background: hsl(210 25% 16%); color: #fff; padding: 0.5rem 0.75rem; font-size: 0.72rem; font-weight: 700; border-radius: var(--radius-sm); margin-bottom: 0.85rem; }
.browser-bar .tag { color: hsl(var(--primary)); font-size: 0.65rem; }

.embed-widget { border: 1px dashed hsl(var(--primary)); border-radius: var(--radius-sm); padding: 0.85rem; background: hsl(var(--background)); }
.embed-widget .title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: hsl(var(--primary-dark)); margin-bottom: 0.65rem; }
.embed-widget .widget-card { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius-sm); padding: 0.65rem; font-size: 0.78rem; }
.embed-widget .scope-note { background: hsl(var(--secondary) / .12); color: hsl(var(--secondary-dark)); padding: 0.4rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.7rem; font-weight: 600; margin: 0.5rem 0; }

.code-block { background: hsl(210 25% 16%); color: hsl(150 55% 65%); padding: 1rem; border-radius: var(--radius-sm); font-family: monospace; font-size: 0.72rem; line-height: 1.6; overflow-x: auto; white-space: pre; }

/* Modal + toast */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: hsl(210 25% 16% / .7);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 100;
}
.modal-box {
    background: hsl(var(--card));
    max-width: 26rem;
    width: 100%;
    border-radius: var(--radius);
    border-top: 4px solid hsl(var(--primary));
    box-shadow: var(--shadow-elevated);
    padding: 1.5rem;
}
.modal-box .modal-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid hsl(var(--border)); padding-bottom: 0.75rem; margin-bottom: 1rem; }
.modal-box h3 { font-size: 0.95rem; margin: 0; }
.modal-box .modal-close { border: none; background: none; font-size: 1.3rem; line-height: 1; color: hsl(var(--muted-foreground)); cursor: pointer; }
.modal-summary { background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: var(--radius-sm); padding: 0.75rem; margin-bottom: 0.85rem; }
.modal-summary .label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.modal-summary strong { display: block; font-size: 0.95rem; margin: 0.15rem 0; }
.modal-summary .slots { color: hsl(var(--primary-dark)); font-weight: 700; font-size: 0.8rem; }
.modal-box .field-label { display: block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: hsl(var(--muted-foreground)); margin-bottom: 0.35rem; }
.modal-total { display: flex; justify-content: space-between; align-items: center; margin: 0.85rem 0; }
.modal-total .label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.modal-actions { display: flex; gap: 0.6rem; margin-top: 0.5rem; }
.modal-actions .btn { flex: 1; padding: 0.6rem; font-size: 0.8rem; }

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    max-width: 20rem;
    background: hsl(210 25% 16%);
    color: #fff;
    border-left: 4px solid hsl(var(--secondary));
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-elevated);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 100;
}
.toast .check-icon { width: 2rem; height: 2rem; border-radius: 999px; background: hsl(var(--secondary) / .2); color: hsl(var(--secondary)); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.toast h4 { margin: 0; font-size: 0.8rem; }
.toast p { margin: 0.2rem 0 0; font-size: 0.72rem; color: hsl(210 15% 70%); }
