:root {
    --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

    /*
     * Primitívy – neutrálna škála (slate, Tailwind-compatible)
     * Odporúčanie: 8–10 krokov, text 700–900 na pozadí 50–100
     */
    --neutral-0: #ffffff;
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-900: #0f172a;

    /* Brand – teal, len akcenty (~10–20 % UI) */
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-500: #14b8a6;

    /* Status primitívy */
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-600: #059669;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --red-50: #fef2f2;
    --red-600: #dc2626;
    --sky-600: #0284c7;

    /*
     * Sémantické povrchy (Material 3 light / design tokens)
     * page < container-low < elevated; hierarchia cez neutrál, nie farbu brandu
     */
    --surface-page: var(--neutral-100);
    --surface-elevated: var(--neutral-0);
    --surface-container-lowest: var(--neutral-0);
    --surface-container-low: var(--neutral-50);
    --surface-container: var(--neutral-100);
    --surface-container-high: var(--neutral-200);

    --border-default: var(--neutral-200);
    --border-subtle: var(--neutral-100);
    --border-strong: var(--neutral-300);

    --text-primary: var(--neutral-900);
    --text-secondary: var(--neutral-500);
    --text-tertiary: var(--neutral-400);

    --brand: var(--teal-600);
    --brand-hover: var(--teal-700);
    --brand-muted: var(--teal-500);
    --brand-container: #ccfbf1;
    --brand-on-container: var(--teal-700);
    --brand-ring: rgba(13, 148, 136, 0.2);

    /* Spätná kompatibilita existujúcich komponentov */
    --palette-slate-25: var(--neutral-0);
    --palette-slate-50: var(--neutral-50);
    --palette-slate-100: var(--neutral-100);
    --palette-slate-200: var(--neutral-200);
    --palette-slate-300: var(--neutral-300);
    --palette-slate-400: var(--neutral-400);
    --palette-slate-500: var(--neutral-500);
    --palette-slate-700: var(--neutral-700);
    --palette-slate-900: var(--neutral-900);
    --palette-teal-50: #f0fdfa;
    --palette-teal-100: var(--brand-container);
    --palette-teal-200: #99f6e4;
    --palette-teal-500: var(--teal-500);
    --palette-teal-600: var(--teal-600);
    --palette-teal-700: var(--teal-700);
    --palette-amber-50: var(--amber-50);
    --palette-amber-100: var(--amber-100);
    --palette-amber-500: var(--amber-500);
    --palette-emerald-50: var(--emerald-50);
    --palette-emerald-100: var(--emerald-100);
    --palette-emerald-600: var(--emerald-600);
    --palette-red-50: var(--red-50);
    --palette-red-600: var(--red-600);
    --palette-sky-600: var(--sky-600);

    --color-bg: var(--surface-page);
    --color-bg-accent: var(--neutral-200);
    --color-surface: var(--surface-elevated);
    --color-surface-muted: var(--surface-container-low);
    --color-surface-tint: var(--surface-container-low);
    --color-surface-raised: var(--surface-elevated);
    --color-border: var(--border-default);
    --color-border-soft: var(--border-subtle);
    --color-text: var(--text-primary);
    --color-text-muted: var(--text-secondary);
    --color-text-soft: var(--text-tertiary);
    --color-primary: var(--brand);
    --color-primary-hover: var(--brand-hover);
    --color-primary-soft: var(--brand-container);
    --color-primary-ring: var(--brand-ring);
    --color-accent: var(--amber-500);
    --color-accent-soft: var(--amber-100);
    --color-success: var(--emerald-600);
    --color-success-soft: var(--emerald-100);
    --color-danger: var(--red-600);
    --color-danger-soft: var(--red-50);
    --color-warning: #d97706;
    --color-info: var(--sky-600);

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --nav-height: 64px;
    --layout-max-width: 1280px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--surface-page);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
}

main.app-main {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    overflow-x: clip;
}

/* Navigation */
.app-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    border-bottom: 1px solid var(--border-default);
    background: var(--surface-elevated);
    box-shadow: var(--shadow-sm);
}

.app-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--layout-max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: var(--color-text);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
    text-decoration: none;
}

.app-brand:hover {
    color: var(--color-primary);
}

.app-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--palette-teal-500));
    color: #fff;
    font-size: .95rem;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.app-brand em {
    color: var(--color-primary);
    font-style: normal;
    font-weight: 700;
}

.app-nav__links {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.app-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.35rem;
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    font-size: .9rem;
    font-weight: 600;
    padding: .45rem .9rem;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.app-nav__link:hover {
    background: var(--surface-container-low);
    color: var(--color-text);
}

.app-nav__link.is-active {
    background: var(--surface-container);
    color: var(--brand-hover);
    box-shadow: inset 0 0 0 1px var(--border-default);
}

/* Page layout */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-header__content h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
}

.page-header__content p,
.page-header__subtitle {
    margin: .35rem 0 0;
    color: var(--color-text-muted);
    font-size: .92rem;
}

.page-header__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.content-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.content-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border-default);
    background: var(--surface-container-low);
}

.content-card__header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.content-card__body {
    padding: 1rem 1.15rem;
}

.content-card__body--flush {
    padding: 0;
}

.section-gap {
    margin-bottom: 1.25rem;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: -.01em;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, var(--color-primary), var(--palette-teal-500));
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-hover), #0d9488);
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.32);
}

.btn-outline-secondary {
    border-color: var(--color-border);
    color: var(--color-text-muted);
    background: #fff;
}

.btn-outline-secondary:hover {
    border-color: var(--palette-slate-300);
    background: var(--palette-slate-50);
    color: var(--color-text);
}

.btn-sm {
    border-radius: 8px;
    font-size: .8rem;
    padding: .35rem .65rem;
}

/* Metrics / stats */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .85rem;
}

.metric,
.stat-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.1rem;
}

.metric span,
.stat-card__label {
    display: block;
    color: var(--color-text-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.metric strong,
.stat-card__value {
    display: block;
    margin-top: .25rem;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.stat-card--primary {
    border-color: var(--border-default);
    background: var(--surface-elevated);
}

.stat-card--primary .stat-card__value {
    color: var(--brand-hover);
}

/* Forms */
.form-panel,
.detail-panel {
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}

.form-panel .form-label {
    color: var(--color-text-muted);
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.form-control,
.form-select {
    border-color: var(--color-border);
    border-radius: 10px;
    font-size: .92rem;
    min-height: 42px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--palette-teal-200);
    box-shadow: 0 0 0 .2rem var(--color-primary-ring);
}

/* Tables */
.table-responsive {
    border-radius: var(--radius-md);
}

.app-table {
    margin: 0;
}

.app-table thead th {
    background: var(--palette-slate-50);
    border-bottom: 1px solid var(--color-border-soft);
    color: var(--color-text-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: .75rem 1rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-table tbody td {
    border-bottom: 1px solid var(--color-border-soft);
    padding: .8rem 1rem;
    vertical-align: middle;
}

.app-table tbody tr:hover {
    background: var(--palette-slate-50);
}

.app-table tbody tr:last-child td {
    border-bottom: 0;
}

.table > :not(caption) > * > * {
    border-color: var(--color-border-soft);
}

.badge {
    font-weight: 700;
    letter-spacing: .01em;
    padding: .4em .65em;
}

/* Dashboard filters */
.filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.filter-bar__title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .15rem;
}

.filter-bar__title h2 {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
}

.filter-bar__title p {
    margin: 0;
    color: var(--color-text-soft);
    font-size: .82rem;
}

.dashboard-filter > label {
    display: grid;
    gap: .35rem;
    margin: 0;
}

.dashboard-filter > label > span {
    color: var(--color-text-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.filter-bar .form-control,
.filter-bar .form-select,
.filter-bar .btn,
.dashboard-multi__button,
.dashboard-date-range__button {
    min-height: 40px;
    font-size: .88rem;
}

.dashboard-filter__actions {
    display: flex;
    align-items: flex-end;
}

.dashboard-filter__actions .btn {
    width: 100%;
}

/* Insights */
.dashboard-insights {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.dashboard-insights.is-loading .dashboard-insight {
    opacity: .72;
}

.dashboard-insight {
    display: grid;
    gap: .3rem;
    min-width: 0;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--surface-elevated);
    box-shadow: var(--shadow-sm);
    padding: .9rem 1rem;
    transition: box-shadow .15s ease;
}

.dashboard-insight:hover {
    box-shadow: var(--shadow-md);
}

.dashboard-insight--accent {
    border-color: var(--border-default);
    background: var(--surface-elevated);
    box-shadow: inset 3px 0 0 var(--brand);
}

.dashboard-insight--good {
    border-color: var(--border-default);
    background: var(--surface-elevated);
    box-shadow: inset 3px 0 0 var(--color-success);
}

.dashboard-insight--warn {
    border-color: var(--border-default);
    background: var(--surface-elevated);
    box-shadow: inset 3px 0 0 var(--color-accent);
}

.dashboard-insight > span {
    color: var(--color-text-muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dashboard-insight strong {
    color: var(--color-text);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.dashboard-insight a,
.dashboard-insight [data-insight-title] {
    color: var(--color-primary-hover);
    font-size: .84rem;
    font-weight: 700;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-insight a:hover {
    text-decoration: underline;
}

.dashboard-insight small {
    color: var(--color-text-muted);
    font-size: .76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Multi-select & date picker */
.dashboard-native-select {
    display: none;
}

.dashboard-multi,
.dashboard-date-range {
    position: relative;
}

.dashboard-multi__button,
.dashboard-date-range__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    line-height: 1.25;
    padding: .5rem .75rem;
    text-align: left;
}

.dashboard-multi__button:hover,
.dashboard-multi__button[aria-expanded="true"],
.dashboard-date-range__button:hover,
.dashboard-date-range__button[aria-expanded="true"] {
    border-color: #5eead4;
}

.dashboard-multi__button:focus-visible,
.dashboard-date-range__button:focus-visible {
    border-color: #5eead4;
    box-shadow: 0 0 0 .2rem var(--color-primary-ring);
    outline: 0;
}

.dashboard-multi__button [data-multi-label],
.dashboard-date-range__button [data-date-range-label] {
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.dashboard-multi__chevron {
    width: .48rem;
    height: .48rem;
    border-right: 2px solid var(--color-text-muted);
    border-bottom: 2px solid var(--color-text-muted);
    flex: 0 0 auto;
    transform: translateY(-.12rem) rotate(45deg);
}

.dashboard-multi__menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + .35rem);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-lg);
    padding: 0;
}

.dashboard-multi__option {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 40px;
    border-bottom: 1px solid var(--color-border-soft);
    color: var(--color-text);
    cursor: pointer;
    font-size: .86rem;
    padding: .5rem .8rem;
}

.dashboard-multi__option:last-child {
    border-bottom: 0;
}

.dashboard-multi__option:hover {
    background: #f0fdfa;
}

.dashboard-multi__option input {
    accent-color: var(--color-primary);
    margin: 0;
}

.dashboard-multi__option span {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-multi__empty {
    color: var(--color-text-muted);
    font-size: .84rem;
    padding: .65rem .8rem;
}

.dashboard-date-range__picker {
    position: absolute;
    z-index: 35;
    top: calc(100% + .35rem);
    left: 0;
    width: min(620px, calc(100vw - 2rem));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-lg);
    padding: .75rem;
}

.dashboard-date-range__head,
.dashboard-date-range__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.dashboard-date-range__head {
    margin-bottom: .6rem;
}

.dashboard-date-range__head button,
.dashboard-date-range__foot button {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    color: var(--color-text);
    font-weight: 700;
    min-height: 30px;
    padding: .25rem .6rem;
}

.dashboard-date-range__head strong {
    font-size: .9rem;
    text-transform: capitalize;
}

.dashboard-date-range__months {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: .75rem;
}

.dashboard-date-range__month h3 {
    font-size: .84rem;
    margin: 0 0 .35rem;
    text-align: center;
    text-transform: capitalize;
}

.dashboard-date-range__weekdays,
.dashboard-date-range__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(28px, 1fr));
    gap: .16rem;
}

.dashboard-date-range__weekdays span {
    color: var(--color-text-muted);
    font-size: .68rem;
    font-weight: 700;
    text-align: center;
}

.dashboard-date-range__day {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text);
    font-size: .78rem;
    min-height: 32px;
}

.dashboard-date-range__day:hover {
    background: var(--color-primary-soft);
}

.dashboard-date-range__day.is-disabled,
.dashboard-date-range__day:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    text-decoration: line-through;
}

.dashboard-date-range__day.is-inside {
    background: #ecfeff;
}

.dashboard-date-range__day.is-edge {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
}

.dashboard-date-range__foot {
    border-top: 1px solid var(--color-border-soft);
    color: var(--color-text-muted);
    font-size: .78rem;
    margin-top: .65rem;
    padding-top: .55rem;
}

/* Hotel list */
.hotel-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .85rem;
}

.hotel-list-toolbar span {
    color: var(--color-text-muted);
    font-size: .82rem;
    font-weight: 700;
}

.hotel-list {
    display: grid;
    gap: .85rem;
    min-width: 0;
}

.hotel-list [data-hotel-list-items] {
    display: grid;
    gap: .85rem;
    min-width: 0;
}

.hotel-list-sentinel {
    height: 1px;
}

.hotel-list-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    padding: 1.25rem 0;
    color: var(--color-text-muted);
    font-size: .9rem;
}

.hotel-group {
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s ease;
    min-width: 0;
    max-width: 100%;
}

.hotel-group:hover {
    box-shadow: var(--shadow-md);
}

.hotel-group__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem 1.25rem;
    width: 100%;
    padding: 1rem 1.15rem;
    border: 0;
    border-bottom: 1px solid transparent;
    background: var(--surface-container-low);
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: background .12s ease;
}

.hotel-group__info {
    min-width: 0;
}

.hotel-group__header:hover,
.hotel-group__header:focus {
    background: var(--surface-container);
}

.hotel-group__header:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

.hotel-group__header[aria-expanded="true"] {
    border-bottom-color: var(--border-default);
    background: var(--surface-container);
}

.hotel-group__header h2 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.25;
    margin: 0 0 .3rem;
    color: var(--color-text);
}

.hotel-group__meta {
    color: var(--color-text-muted);
    font-size: .84rem;
}

.provider-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin-top: .5rem;
}

.provider-badge,
.provider-badges span,
.provider-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    line-height: 1;
    padding: .28rem .5rem;
}

.provider-logo {
    display: block;
    height: 22px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    object-position: left center;
}

.provider-logo--sm {
    height: 18px;
    max-width: 84px;
}

.provider-logo--header {
    height: 20px;
    max-width: 92px;
    margin: 0 auto;
}

.provider-logo--meta {
    display: inline-block;
    vertical-align: middle;
    height: 20px;
    max-width: 88px;
}

.provider-fallback {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

.compare-table__provider {
    text-align: center;
    vertical-align: middle;
}

.provider-badges span,
.provider-pill {
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 700;
}

.hotel-group__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: .15rem;
    min-width: 10.5rem;
    padding: .65rem .9rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    text-align: right;
    flex-shrink: 0;
}

.hotel-group__price-label {
    color: var(--color-text-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1;
    text-transform: uppercase;
}

.hotel-group__price-value {
    color: var(--brand-hover);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    white-space: nowrap;
}

.hotel-group__trend-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    margin-top: .1rem;
    padding: 0;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-container-low);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .12s ease, border-color .12s ease, background .12s ease;
}

.hotel-group__trend-btn:hover,
.hotel-group__trend-btn:focus-visible {
    border-color: var(--brand);
    background: var(--palette-teal-50);
    color: var(--brand);
    outline: 0;
}

.hotel-group__trend-btn svg {
    width: .95rem;
    height: .95rem;
}

.hotel-group__price-meta {
    color: var(--color-text-muted);
    font-size: .78rem;
    line-height: 1.35;
    white-space: nowrap;
}

.hotel-group__body {
    background: var(--surface-elevated);
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.term-table {
    table-layout: fixed;
    width: 100%;
    font-size: .76rem;
}

.term-col-provider { width: 4rem; }
.term-col-term { width: 11rem; }
.term-col-meal { width: 5.25rem; }
.term-col-airport { width: 4.25rem; }
.term-col-price { width: 5.5rem; }
.term-col-stat { width: 5rem; }
.term-col-diff { width: 5rem; }
.term-col-days { width: 3rem; }

.term-table th {
    color: var(--text-secondary);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.2;
    text-transform: uppercase;
    background: var(--surface-container-low);
    border-bottom: 1px solid var(--border-default);
    white-space: normal;
}

.term-sort-button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    padding: 0;
    text-align: left;
}

.term-sort-button:hover,
.term-sort-button:focus-visible {
    color: var(--color-primary);
    outline: 0;
}

.term-table td,
.term-table th {
    padding: .35rem .45rem;
    vertical-align: middle;
}

.term-table__provider,
.term-table__price,
.term-table__stat,
.term-table__diff,
.term-table__days {
    white-space: nowrap;
}

.term-table__term,
.term-table__meal,
.term-table__airport {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 0;
}

.term-table .provider-pill {
    padding: .15rem .25rem;
}

.term-table .provider-logo--xs {
    height: 16px;
    max-width: 52px;
}

.term-table tbody tr {
    background: var(--surface-elevated);
}

.term-table tbody tr:nth-child(even) {
    background: var(--surface-container-lowest);
}

.term-table tbody tr:hover {
    background: var(--surface-container-low);
}

.term-table a {
    font-weight: 700;
    text-decoration: none;
}

.term-table a:hover {
    text-decoration: underline;
}

.empty-state {
    background: var(--color-surface);
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    padding: 2rem 1.25rem;
    text-align: center;
}

/* Admin / tasks */
.tasks-table {
    table-layout: fixed;
    width: 100%;
}

.tasks-table thead th,
.tasks-table tbody td {
    padding-left: .65rem;
    padding-right: .65rem;
}

.tasks-col-provider { width: 7.5rem; }
.tasks-col-country { width: 10rem; }
.tasks-col-status { width: 14rem; }
.tasks-col-last-run { width: 11.5rem; }
.tasks-col-actions { width: 10.75rem; }

.tasks-table__provider,
.tasks-table__last-run {
    white-space: nowrap;
}

.tasks-table__country {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tasks-table__actions-head,
.tasks-table__actions {
    text-align: right;
    white-space: nowrap;
}

.task-status-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 3.1rem;
}

.task-status-box__value {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
    font-weight: 600;
}

.task-status-box__live[hidden] {
    display: none !important;
}

.task-status-box__live-line {
    display: flex;
    align-items: center;
    gap: .35rem;
    color: var(--text-secondary);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.2;
}

.task-status-box__live-line span[data-task-live-label] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.task-status-box__live-line strong {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--brand);
}

.task-status-box__progress {
    height: .3rem;
    margin-top: .35rem;
}

.task-status-box__message {
    margin-top: .2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-tertiary);
    font-size: .7rem;
    line-height: 1.2;
}

.task-status-box__message[hidden] {
    display: none !important;
}

.task-row--running > td {
    background: var(--palette-teal-50);
}

.task-row--running .task-status-box__value {
    display: none;
}

.task-row--running .task-status-box__live {
    display: flex !important;
    flex-direction: column;
}

.task-row--running [data-task-status-value] {
    color: var(--brand);
}

.task-action-bar {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .2rem;
    flex-wrap: nowrap;
}

.task-action-bar__form {
    display: inline-flex;
    margin: 0;
}

.task-action-bar .icon-btn {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 6px;
}

.task-action-bar .icon-btn svg {
    width: .8rem;
    height: .8rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: var(--surface-elevated);
    color: var(--text-secondary);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}

.icon-btn svg {
    width: 1rem;
    height: 1rem;
    display: block;
}

.icon-btn:hover {
    background: var(--surface-container-low);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.icon-btn:disabled,
.icon-btn.is-disabled {
    opacity: .55;
    cursor: not-allowed;
}

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

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

.icon-btn--warning {
    color: var(--color-warning);
}

.icon-btn--danger {
    color: var(--color-danger);
}

.icon-btn--active {
    border-color: var(--brand);
    background: var(--color-primary-soft);
    color: var(--brand-hover);
}

.icon-btn.is-loading {
    pointer-events: none;
}

.url-cell {
    max-width: 420px;
    color: var(--color-text-muted);
    font-size: .86rem;
}

.task-live-status {
    min-width: 230px;
    max-width: 360px;
    color: var(--color-text-muted);
    font-size: .78rem;
}

.task-live-status__line {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-weight: 700;
}

.task-live-status__line strong {
    margin-left: auto;
    color: var(--color-primary);
}

.task-live-status__progress {
    height: .35rem;
    margin-top: .35rem;
}

.task-live-status__message {
    margin-top: .25rem;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-end;
}

.log-list .list-group-item {
    border-color: var(--color-border-soft);
    padding: .85rem 1rem;
}

.log-list .list-group-item + .list-group-item {
    border-top-width: 1px;
}

.log-status {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.log-status--success { color: var(--color-success); }
.log-status--error { color: var(--color-danger); }
.log-status--partial { color: var(--color-warning); }

/* Detail page */
.detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--surface-elevated);
    box-shadow: var(--shadow-sm);
}

.detail-hero h1 {
    margin: 0 0 .35rem;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -.03em;
}

.detail-hero__meta {
    color: var(--color-text-muted);
    font-size: .92rem;
}

.detail-list dt {
    color: var(--color-text-muted);
    font-size: .82rem;
    font-weight: 700;
}

.detail-list dd {
    margin-bottom: .65rem;
}

/* Compare table */
.compare-table td,
.compare-table th {
    min-width: 140px;
    vertical-align: top;
}

.compare-table tbody td {
    font-size: .88rem;
}

.compare-table .small {
    line-height: 1.35;
}

.compare-cheapest {
    font-weight: 700;
    color: var(--color-success);
}

/* Modal */
.offer-modal__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}

.offer-modal__meta {
    color: var(--color-text-muted);
    font-size: .85rem;
    font-weight: 700;
}

.offer-modal__term {
    color: var(--color-text);
    font-size: .88rem;
    margin-top: .15rem;
}

.offer-modal__metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: .55rem;
    margin-bottom: .75rem;
}

.offer-modal__metrics > div,
.offer-modal__panel {
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    background: #fff;
}

.offer-modal__metrics > div {
    padding: .65rem .75rem;
}

.offer-modal__metrics span {
    display: block;
    color: var(--color-text-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.offer-modal__metrics strong {
    display: block;
    margin-top: .15rem;
    font-size: 1rem;
}

.offer-modal__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, .75fr);
    gap: .75rem;
}

.offer-modal__panel {
    min-width: 0;
    padding: .75rem;
}

.offer-modal__panel:first-child {
    grid-row: span 2;
}

.offer-modal__panel h3 {
    font-size: .9rem;
    margin: 0 0 .6rem;
}

.offer-modal canvas {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    cursor: crosshair;
}

.price-chart {
    position: relative;
}

.price-chart__tooltip {
    position: absolute;
    z-index: 2;
    min-width: 8.5rem;
    padding: .45rem .6rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    box-shadow: var(--shadow-md);
    color: var(--color-text);
    font-size: .74rem;
    line-height: 1.35;
    pointer-events: none;
}

.price-chart__tooltip[hidden] {
    display: none !important;
}

.price-chart__tooltip strong {
    display: block;
    color: var(--brand);
    font-size: .92rem;
    line-height: 1.2;
}

.price-chart__tooltip span {
    display: block;
    color: var(--color-text-muted);
    margin-top: .1rem;
}

.price-chart__delta {
    display: inline-block;
    margin-top: .2rem;
    font-size: .72rem;
    font-weight: 700;
}

.price-chart__delta.is-down {
    color: #15803d;
}

.price-chart__delta.is-up {
    color: #b42318;
}

.price-chart__unavailable {
    display: block;
    margin-top: .15rem;
    color: #b42318;
    font-size: .7rem;
    font-weight: 700;
}

.hotel-trend-modal__intro {
    margin: 0 0 .75rem;
    color: var(--color-text-muted);
    font-size: .82rem;
    line-height: 1.45;
}

.hotel-trend-departures {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    max-height: 8.5rem;
    margin-bottom: .35rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding: .15rem .1rem .15rem 0;
}

.hotel-trend-modal__departure-count {
    margin-bottom: .75rem;
    color: var(--color-text-muted);
    font-size: .72rem;
    font-weight: 600;
}

.hotel-trend-departure {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .08rem;
    min-width: 5.5rem;
    padding: .45rem .6rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.hotel-trend-departure strong {
    font-size: .88rem;
    line-height: 1.2;
}

.hotel-trend-departure span {
    color: var(--brand);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.2;
}

.hotel-trend-departure small {
    color: var(--color-text-muted);
    font-size: .68rem;
    font-weight: 600;
}

.hotel-trend-departure:hover,
.hotel-trend-departure:focus-visible {
    border-color: var(--brand);
    outline: 0;
}

.hotel-trend-departure.is-active {
    border-color: var(--brand);
    background: var(--palette-teal-50);
    box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.12);
}

.hotel-trend-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin-bottom: .75rem;
}

.hotel-trend-summary > div {
    padding: .55rem .65rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-container-low);
}

.hotel-trend-summary span {
    display: block;
    color: var(--color-text-muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.hotel-trend-summary strong {
    display: block;
    margin-top: .15rem;
    font-size: .84rem;
    line-height: 1.35;
}

.hotel-trend-modal__axis-note {
    margin-top: .25rem;
    color: var(--color-text-muted);
    font-size: .72rem;
    text-align: right;
}

.hotel-trend-table-wrap {
    margin-top: .75rem;
}

.hotel-trend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8rem;
}

.hotel-trend-table th,
.hotel-trend-table td {
    border-bottom: 1px solid var(--color-border-soft);
    padding: .45rem .35rem;
    vertical-align: middle;
}

.hotel-trend-table th {
    color: var(--color-text-muted);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hotel-trend-table tbody tr {
    cursor: pointer;
}

.hotel-trend-table tbody tr:hover {
    background: var(--surface-container-low);
}

.hotel-trend-table tbody tr.is-muted {
    opacity: .45;
}

.hotel-trend-table__hint {
    margin: .35rem 0 0;
    color: var(--color-text-muted);
    font-size: .72rem;
}

.price-chart--hotel-trend canvas {
    cursor: crosshair;
}

.offer-modal__chart-note {
    color: var(--color-text-muted);
    font-size: .78rem;
    margin-top: .35rem;
}

.offer-modal__params {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: .35rem .65rem;
    margin: 0;
    font-size: .84rem;
}

.offer-modal__params dt {
    color: var(--color-text-muted);
    font-weight: 700;
}

.offer-modal__params dd {
    margin: 0;
}

.offer-modal__history {
    max-height: 210px;
    overflow: auto;
}

.offer-modal__history table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8rem;
}

.offer-modal__history th,
.offer-modal__history td {
    border-bottom: 1px solid var(--color-border-soft);
    padding: .35rem .25rem;
    white-space: nowrap;
}

.offer-modal__history th {
    color: var(--color-text-muted);
    font-size: .7rem;
    text-transform: uppercase;
}

.offer-modal__history tr.is-active td {
    background: var(--palette-teal-50);
}

.log-box {
    white-space: pre-wrap;
    background: #0f172a;
    color: #f8fafc;
    border-radius: var(--radius-md);
    padding: 1rem;
}

.run-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    max-width: 760px;
}

.run-panel h1 {
    font-size: 1.2rem;
    margin: 0 0 .35rem;
}

.run-panel p {
    color: var(--color-text-muted);
    margin-bottom: .8rem;
}

.alert {
    border: 0;
    border-radius: var(--radius-md);
    font-size: .9rem;
}

/* Legacy aliases */
.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-heading h1 {
    font-size: clamp(1.5rem, 2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin: 0;
}

.page-heading p {
    color: var(--color-text-muted);
    margin: .35rem 0 0;
    font-size: .92rem;
}

@media (max-width: 1200px) {
    .filter-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 900px) {
    .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .page-header,
    .page-heading,
    .detail-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    main.app-main {
        padding: 1rem .85rem 2rem;
    }

    .filter-bar,
    .dashboard-insights,
    .offer-modal__metrics,
    .hotel-trend-summary {
        grid-template-columns: 1fr;
    }

    .dashboard-date-range__picker {
        width: min(340px, calc(100vw - 1.5rem));
    }

    .dashboard-date-range__months {
        grid-template-columns: 1fr;
    }

    .hotel-group__header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .hotel-group__price {
        align-items: flex-start;
        min-width: 0;
        text-align: left;
        width: 100%;
    }

    .offer-modal__grid {
        display: block;
    }

    .offer-modal__panel {
        margin-top: .65rem;
    }

    .app-nav__links {
        gap: .15rem;
    }

    .app-nav__link {
        font-size: .82rem;
        padding: .4rem .65rem;
    }
}
