:root {
    --tb-primary: #0b5ed7;
    --tb-primary-dark: #073e94;
    --tb-accent: #ffb703;
    --tb-ink: #16202c;
    --tb-muted: #6b7280;
    --tb-surface: #f5f7fb;
}

body {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--tb-ink);
    background: #fff;
}

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

.bg-primary {
    background-color: var(--tb-primary) !important;
}

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

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

.btn-warning {
    background-color: var(--tb-accent);
    border-color: var(--tb-accent);
    color: #1c1c1c;
}

/* Header */
.tb-header {
    background: var(--tb-primary);
    box-shadow: 0 1px 6px rgba(0, 0, 0, .15);
}

.tb-header .navbar-brand,
.tb-header .nav-link {
    color: #fff;
}

.tb-header .nav-link:hover {
    color: var(--tb-accent);
}

/* Hero + search */
/* The hero keeps its original height; the carousel is layered behind the content
   rather than sized by it, so swapping slides never shifts the search box. */
.tb-hero {
    position: relative;
    background: linear-gradient(135deg, var(--tb-primary) 0%, #1b8cf0 100%);
    overflow: hidden;
}

.tb-hero-carousel,
.tb-hero-carousel .carousel-inner,
.tb-hero-carousel .carousel-item {
    position: absolute;
    inset: 0;
    height: 100%;
}

.tb-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Sits above the carousel so the heading and search box stay interactive. */
.tb-hero-body {
    position: relative;
    z-index: 2;
}

/* Captions are stacked; only the active one is shown, cross-faded. */
.tb-hero-captions {
    display: grid;
    min-height: 8.5rem;
}

.tb-hero-caption {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}

.tb-hero-caption.is-active {
    opacity: 1;
    visibility: visible;
}

.tb-hero-carousel .carousel-control-prev,
.tb-hero-carousel .carousel-control-next {
    z-index: 3;
    width: 6%;
    opacity: .65;
}

.tb-hero-carousel .carousel-control-prev:hover,
.tb-hero-carousel .carousel-control-next:hover {
    opacity: 1;
}

@media (max-width: 767.98px) {
    .tb-hero-captions {
        min-height: 10.5rem;
    }

    .tb-hero-carousel .carousel-control-prev,
    .tb-hero-carousel .carousel-control-next {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tb-hero-caption {
        transition: none;
    }
}

.tb-searchbox-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

.tb-searchbox {
    background: #fff;
    border-radius: .75rem;
    padding: 1rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
    border: 3px solid var(--tb-accent);
}

.tb-searchbox-compact {
    padding: .6rem;
    border-width: 2px;
}

/* Cards */
.tb-hotel-card {
    border: 1px solid #e5e7eb;
    transition: box-shadow .15s ease-in-out;
}

.tb-hotel-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
}

.tb-hotel-img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    max-height: 240px;
    object-fit: cover;
    border-radius: .375rem 0 0 .375rem;
}

.tb-deal-card img {
    height: 150px;
    object-fit: cover;
}

.tb-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #c1121f;
}

.tb-score {
    background: var(--tb-primary);
    color: #fff;
}

.tb-gallery-main {
    height: 380px;
    object-fit: cover;
}

.tb-gallery-thumb {
    height: 185px;
    object-fit: cover;
}

/* Destinations */
.tb-destination-card {
    display: block;
    position: relative;
    border-radius: .5rem;
    overflow: hidden;
    text-decoration: none;
}

.tb-destination-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform .2s ease;
}

.tb-destination-card:hover img {
    transform: scale(1.06);
}

.tb-destination-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: .35rem .5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, .75));
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
}

.tb-filters .card {
    border: 1px solid #e5e7eb;
}

/* Footer */
.tb-footer {
    background: var(--tb-ink);
    color: #d1d5db;
}

.tb-footer a {
    color: #d1d5db;
    text-decoration: none;
}

.tb-footer a:hover {
    color: var(--tb-accent);
}

/* Admin */
.tb-admin-body {
    background: var(--tb-surface);
}

.tb-sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--tb-ink);
    color: #cbd5e1;
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
}

.tb-sidebar a {
    color: #cbd5e1;
    text-decoration: none;
    display: block;
    padding: .5rem 1rem;
    font-size: .92rem;
    border-left: 3px solid transparent;
}

.tb-sidebar a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.tb-sidebar a.active {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border-left-color: var(--tb-accent);
}

.tb-sidebar .tb-sidebar-group {
    padding: .75rem 1rem .25rem;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
}

.tb-content {
    margin-left: 240px;
    padding: 1rem 1.5rem 3rem;
}

@media (max-width: 991.98px) {
    .tb-sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .tb-content {
        margin-left: 0;
    }
}

.tb-stat-card {
    border-left: 4px solid var(--tb-primary);
}

.tb-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
}

/* Room board and calendar */
.tb-room-status {
    display: inline-block;
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    margin-right: .35rem;
}

.tb-status-available { background: #16a34a; }
.tb-status-occupied { background: #2563eb; }
.tb-status-dirty { background: #f59e0b; }
.tb-status-cleaning { background: #06b6d4; }
.tb-status-maintenance { background: #dc2626; }
.tb-status-outoforder { background: #7f1d1d; }
.tb-status-blocked { background: #6b7280; }

.tb-calendar {
    font-size: .78rem;
    border-collapse: collapse;
    width: 100%;
}

.tb-calendar th,
.tb-calendar td {
    border: 1px solid #e5e7eb;
    padding: .2rem .3rem;
    text-align: center;
    white-space: nowrap;
}

.tb-calendar th.tb-room-col,
.tb-calendar td.tb-room-col {
    text-align: left;
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    min-width: 150px;
}

.tb-calendar .tb-weekend {
    background: #fff7ed;
}

.tb-calendar .tb-stay {
    background: var(--tb-primary);
    color: #fff;
    border-radius: .25rem;
    font-size: .7rem;
    padding: .1rem .2rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tb-calendar .tb-stay-checkedin { background: #16a34a; }
.tb-calendar .tb-stay-pending { background: #f59e0b; color: #1c1c1c; }

.tb-cell-input {
    width: 68px;
    font-size: .74rem;
    padding: .1rem .2rem;
    border: 1px solid #d1d5db;
    border-radius: .2rem;
}

@media print {
    .tb-header, .tb-footer, .btn, form, .navbar {
        display: none !important;
    }
}

/* Language switcher — shown in both public header and admin topbar. */
.tb-language .btn { border-color: rgba(255, 255, 255, .5); color: #fff; }
.tb-language .btn:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.tb-language .dropdown-item.active { background: var(--tb-primary); }
.tb-flag { font-size: 1.05rem; line-height: 1; }
.tb-admin-language .btn { color: var(--tb-ink); border-color: var(--tb-muted); }
.tb-admin-language .btn:hover { background: #eef2f7; color: var(--tb-ink); }
