/* =====================================================
   UCB Admin — customisations on top of Tabler.
   Sidebar layout, teal brand colour, dark mode tweaks.
   ===================================================== */

:root, [data-bs-theme="light"] {
  --tblr-primary: #0A6A96;
  --tblr-primary-rgb: 10,106,150;
  --tblr-primary-fg: #fff;
  --tblr-link-color: #0A6A96;
  --tblr-link-hover-color: #085A80;
  --tblr-font-sans-serif: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ucb-sidebar-bg: #2B2B2D;
  --ucb-sidebar-fg: rgba(255,255,255,.72);
  --ucb-sidebar-active: rgba(10,106,150,.35);
}
[data-bs-theme="dark"] {
  --tblr-primary: #2AC4F4;
  --tblr-primary-rgb: 42, 196, 244;
  --tblr-link-color: #56D0F6;
  --tblr-link-hover-color: #9ADFF7;
  --ucb-sidebar-bg: #0B0F19;
}

body { font-family: var(--tblr-font-sans-serif); }

/* ---- Login ---- */
.admin-login-wrapper { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.admin-login-brand {
  background:
    radial-gradient(900px 400px at 100% 0%, rgba(42,196,244,.25), transparent 60%),
    linear-gradient(160deg, #2B2B2D 0%, #3A3A3C 60%, #0A6A96 130%);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem;
  position: relative; overflow: hidden;
}
.admin-login-brand::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='64' height='64' viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M32 4L60 32L32 60L4 32Z' stroke='white' stroke-width='1' fill='none' opacity='0.08'/%3E%3C/svg%3E");
}
.admin-login-brand > * { position: relative; z-index: 1; }
.admin-login-brand h2 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.admin-login-brand .stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 1rem 1.25rem; }
.admin-login-brand .stat b { display: block; font-size: 1.5rem; font-weight: 800; }
.admin-login-brand .stat span { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.admin-login-form { display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--tblr-bg-surface-secondary); }
@media (max-width: 991px) { .admin-login-wrapper { grid-template-columns: 1fr; } .admin-login-brand { display: none; } }

.admin-brand-mark {
  width: 2.25rem; height: 2.25rem; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0A6A96, #2AC4F4); color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .04em;
  box-shadow: 0 6px 16px -6px rgba(10,106,150,.6);
}

/* ---- Sidebar layout ---- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; flex-shrink: 0; background: var(--ucb-sidebar-bg); color: var(--ucb-sidebar-fg);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  transition: transform .25s;
}
.admin-sidebar .brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; color: #fff; text-decoration: none; }
.admin-sidebar .brand .t { font-weight: 800; font-size: .95rem; line-height: 1.1; }
.admin-sidebar .brand .s { font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: #2AC4F4; font-weight: 700; }
.admin-sidebar .section { padding: 1rem 1.25rem .4rem; font-size: .65rem; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.35); font-weight: 700; }
.admin-sidebar .nav-item {
  display: flex; align-items: center; gap: .7rem; padding: .6rem 1rem; margin: .1rem .75rem; border-radius: .6rem;
  color: var(--ucb-sidebar-fg); text-decoration: none; font-size: .875rem; font-weight: 600; transition: background .15s, color .15s;
}
.admin-sidebar .nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-sidebar .nav-item.active { background: var(--ucb-sidebar-active); color: #fff; }
.admin-sidebar .nav-item .ti { font-size: 1.15rem; opacity: .85; }
.admin-sidebar .nav-item .badge { margin-left: auto; }
.admin-sidebar .sidebar-footer { margin-top: auto; padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); }
.admin-sidebar .user-chip { display: flex; align-items: center; gap: .6rem; color: #fff; }
.admin-sidebar .user-chip .avatar { background: #0A6A96; color: #fff; font-weight: 800; }
.admin-sidebar .user-chip small { color: rgba(255,255,255,.5); display: block; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  display: flex; align-items: center; gap: 1rem; padding: .75rem 1.5rem; background: var(--tblr-bg-surface);
  border-bottom: 1px solid var(--tblr-border-color); position: sticky; top: 0; z-index: 20;
}
.admin-topbar .page-heading { font-weight: 800; font-size: 1.05rem; margin: 0; }
.admin-content { padding: 1.5rem; flex: 1; }
.admin-footer { padding: 1rem 1.5rem; font-size: .8rem; color: var(--tblr-secondary); border-top: 1px solid var(--tblr-border-color); }

@media (max-width: 991px) {
  .admin-sidebar { position: fixed; z-index: 1040; transform: translateX(-100%); }
  .admin-sidebar.is-open { transform: none; }
  .admin-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1035; display: none; }
  .admin-backdrop.is-open { display: block; }
}

/* Phones: roomier gutters, finger-sized controls, wrapping headers and toolbars */
@media (max-width: 767px) {
  .admin-topbar { padding: .6rem 1rem; gap: .6rem; }
  .admin-topbar .page-heading { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .admin-content { padding: 1rem .75rem; }
  .admin-footer { padding: .75rem 1rem; }
  .btn-sm, .btn-list .btn-sm { min-height: 36px; padding-inline: .7rem; }
  .btn-icon.btn-sm { min-width: 36px; }
  .form-control-sm, .form-select-sm { min-height: 38px; font-size: .875rem; }
  .form-check-input { width: 1.25rem; height: 1.25rem; }
  .form-switch .form-check-input { width: 2.4rem; }
  .form-selectgroup-label { padding-block: .55rem; }
  .card-header { flex-wrap: wrap; gap: .5rem; }
  .card-header .card-actions, .card-header .ms-auto { margin-left: 0 !important; }
  .card-body { padding: 1rem; }
  .nav-pills, .nav-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-pills .nav-link, .nav-tabs .nav-link { white-space: nowrap; }
  .sticky-actions { padding: .6rem .75rem; }
  .sticky-actions .btn { flex: 1 1 auto; }
  .bar-row { grid-template-columns: 84px 1fr 48px; }
  .table-responsive { -webkit-overflow-scrolling: touch; }
}

/* ---- Components ---- */
.stat-card { border-radius: 1rem; }
.stat-card .icon-box { width: 2.75rem; height: 2.75rem; border-radius: .8rem; display: grid; place-items: center; font-size: 1.35rem; }
.stat-card .value { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }

.bar-row { display: grid; grid-template-columns: 110px 1fr 60px; align-items: center; gap: .75rem; font-size: .85rem; margin-bottom: .6rem; }
.bar-row .bar { height: 10px; border-radius: 99px; background: var(--tblr-bg-surface-secondary); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0A6A96, #2AC4F4); }
.bar-row .bar i.amber { background: linear-gradient(90deg, #56D0F6, #2AC4F4); }

.admin-i18n-tabs .nav-link { text-transform: uppercase; font-size: .75rem; font-weight: 700; letter-spacing: .04em; }

.admin-image-preview {
  width: 100%; max-width: 360px; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: .75rem; border: 1px solid var(--tblr-border-color); background: var(--tblr-bg-surface-secondary);
}
.cover-preview {
  width: 100%; max-width: 360px; aspect-ratio: 16 / 10; border-radius: .75rem; position: relative; overflow: hidden;
  border: 1px solid var(--tblr-border-color);
}
.cover-preview svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .2; }
.gradient-swatch {
  width: 100%; height: 42px; border-radius: .6rem; cursor: pointer; border: 2px solid transparent; transition: border-color .15s, transform .15s;
}
.gradient-swatch:hover { transform: translateY(-1px); }
input:checked + .gradient-swatch { border-color: var(--tblr-primary); box-shadow: 0 0 0 3px rgba(var(--tblr-primary-rgb), .25); }
.pattern-swatch { background: #2B2B2D; }
.pattern-swatch svg { width: 100%; height: 42px; opacity: .5; }

.rooms-repeater .row-item { display: grid; grid-template-columns: 1fr 120px 42px; gap: .5rem; margin-bottom: .5rem; align-items: center; }
.rooms-repeater .handle { cursor: grab; color: var(--tblr-secondary); }

.stars-display { color: #2AC4F4; letter-spacing: -1px; font-size: .95rem; }
.table-hotels td { vertical-align: middle; }
.table-hotels .hotel-thumb { width: 52px; height: 36px; border-radius: .4rem; object-fit: cover; }
.table-hotels .hotel-thumb.gradient { display: inline-block; }
.table-hotels th a { color: inherit; text-decoration: none; }
.table-hotels th a.sorted { color: var(--tblr-primary); }

.form-check-switch { cursor: pointer; }
.sticky-actions { position: sticky; bottom: 0; background: var(--tblr-bg-surface); border-top: 1px solid var(--tblr-border-color); padding: .75rem 1rem; z-index: 5; }

.empty-illustration { font-size: 3rem; opacity: .35; }

/* ---- "Dur" identity: pearl surfaces, graphite sidebar, the logo's sky-blue arc ---- */
[data-bs-theme="light"] { --tblr-body-bg: #F3F1EC; --tblr-bg-surface: #FBFAF7; --tblr-border-color: #DDD8CD; --tblr-body-color: #3A3A3C; --tblr-border-radius: 4px; --tblr-card-border-radius: 4px; }
.admin-login-brand {
  background: #2B2B2D url("../img/photos/tashkent-city-night.jpg") center / cover no-repeat;
}
.admin-login-brand::after { background-image: none; background: rgba(43,43,45,.74); }
.admin-login-brand::before { content: none; }
.admin-login-brand .stat { border-color: rgba(255,255,255,.2); border-radius: 4px; }
.admin-logo-img { display: block; height: auto; }
.admin-brand-mark { background: #3A3A3C; color: #2AC4F4; box-shadow: none; border-radius: 4px; }
.admin-sidebar::before { content: ''; display: block; height: 4px; flex-shrink: 0; background: #2AC4F4; }
.admin-sidebar .nav-item.active { box-shadow: inset 3px 0 0 #2AC4F4; }
.admin-sidebar .sidebar-footer { background: none; }
.admin-topbar { border-bottom-color: #DDD8CD; }
.card { border-radius: 4px; }
.btn-primary { --tblr-btn-bg: #0A6A96; --tblr-btn-border-color: #0A6A96; --tblr-btn-hover-bg: #085A80; --tblr-btn-hover-border-color: #085A80; }

/* Delegations: sticky save bar for the pricing form */
.sticky-save { position: sticky; bottom: 0; z-index: 5; padding: 12px 0; background: linear-gradient(transparent, var(--tblr-body-bg, #fff) 40%); display: flex; justify-content: flex-end; }
.item-card { scroll-margin-top: 90px; }
[data-bs-theme="light"] .admin-login-form { background: #F3F1EC; }

.admin-logo-preview { display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; min-height: 72px;
  border: 1px solid var(--tblr-border-color); border-radius: .75rem; background: #fff; }
.admin-logo-preview img { max-height: 56px; max-width: 220px; object-fit: contain; }
