/* =========================================================
   Loftigo Cockpit — TailAdmin-inspired layout, LIGHT theme,
   Loftigo brand colors (yellow accent).
   Sits on top of loftigo.de style.css (--yellow etc).
   ========================================================= */

:root {
  --cockpit-sidebar-width: 270px;
  --cockpit-topbar-height: 68px;

  --cockpit-bg: #f3f3f3;
  --cockpit-surface: #ffffff;
  --highlight: #e49e00;

  --cockpit-text: #111827;
  --cockpit-text-soft: #4b5563;
  --cockpit-muted: #1a1a1a;
  --cockpit-faint: #9ca3af;

  --cockpit-border: #e5e7eb;
  --cockpit-border-soft: #ebebeb;
  --cockpit-hover: #f8f9fb;
  --cockpit-yellow-soft: #e49e0021;
  --cockpit-yellow-mid: #e49e007a;

  --cockpit-shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --cockpit-shadow-md: 0 4px 16px rgba(16,24,40,.06);
}

/* =========================================================
   Body baseline (cockpit only loads this file)
   ========================================================= */
body {
  margin: 0;
  padding: 0 !important;
  background: var(--cockpit-bg);
  color: var(--cockpit-text);
  font-family: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   Shell layout
   ========================================================= */
.cockpit-shell {
  display: grid;
  grid-template-columns: var(--cockpit-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

/* =========================================================
   Sidebar — EXACT TailAdmin clone (dark navy), yellow accent
   ========================================================= */
:root {
  --cockpit-sidebar-bg:        #ffffff;   /* TailAdmin navy */
  --cockpit-sidebar-fg:        #1a1a1a;
  --cockpit-sidebar-fg-strong: #ffffff;
  --cockpit-sidebar-muted:     #ababab;
  --cockpit-sidebar-faint:     #575757;
  --cockpit-sidebar-border:    rgba(255,255,255,.08);
  --cockpit-sidebar-hover:     #494949;   /* TailAdmin hover/active */
  --cockpit-sidebar-active-bg: #e49e00;   /* TailAdmin active */
}

.cockpit-sidebar {
  background: var(--cockpit-sidebar-bg);
  color: var(--cockpit-sidebar-fg);
  border-right: none;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 14px 22px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  /* hide scrollbar completely (still scrollable) */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cockpit-sidebar::-webkit-scrollbar { display: none; width: 0; height: 0; }

.cockpit-sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0px 25px 10px;
  border-bottom: 1px solid var(--cockpit-sidebar-border);
  margin-bottom: 14px;
}
.cockpit-sidebar__logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: 56px;
  object-fit: contain;
}

/* ---- Nav ---- */
.cockpit-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cockpit-nav__label {
  padding: 16px 12px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--cockpit-sidebar-faint);
  text-transform: uppercase;
}

.cockpit-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--cockpit-sidebar-fg);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.cockpit-nav__item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
  color: var(--cockpit-sidebar-muted);
  flex-shrink: 0;
}
.cockpit-nav__item:hover {
  background: rgba(17, 17, 17, .045);
  color: var(--cockpit-sidebar-fg);
}
.cockpit-nav__item:hover i {
  color: var(--cockpit-sidebar-fg);
}
.cockpit-nav__item.is-active {
  background: rgba(228, 158, 0, .20);
  color: var(--highlight);
  font-weight: 600;
}
.cockpit-nav__item.is-active i {
  color: var(--highlight);
}

/* ---- Collapsible groups (native <details>) ---- */
.cockpit-nav__group {
  margin: 0;
}
.cockpit-nav__group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  color: var(--cockpit-sidebar-fg);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
  user-select: none;
}
.cockpit-nav__group-head::-webkit-details-marker,
.cockpit-nav__group-head::marker {
  display: none;
  content: '';
}
.cockpit-nav__group-head > i:first-of-type {
  font-size: 18px;
  width: 20px;
  text-align: center;
  color: var(--cockpit-sidebar-muted);
  flex-shrink: 0;
}
.cockpit-nav__group-head > span {
  flex: 1;
}
.cockpit-nav__chevron {
  width: 14px !important;
  height: 14px !important;
  color: var(--cockpit-sidebar-muted) !important;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.cockpit-nav__group[open] .cockpit-nav__chevron {
  transform: rotate(180deg);   /* down -> up like TailAdmin */
  color: var(--highlight) !important;
}
.cockpit-nav__group-head:hover {
  background: rgba(17, 17, 17, .045);
  color: var(--cockpit-sidebar-fg);
}
.cockpit-nav__group-head:hover > i:first-of-type {
  color: var(--cockpit-sidebar-fg);
}
.cockpit-nav__group[open] > .cockpit-nav__group-head {
  color: var(--highlight);
  background: #e49e001c;
}
.cockpit-nav__group[open] > .cockpit-nav__group-head > i:first-of-type {
  color: var(--highlight);
}

.cockpit-nav__sub {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 0 8px 38px;
  position: relative;
}
.cockpit-nav__sub::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 4px;
  bottom: 8px;
  width: 1px;
  background: var(--cockpit-sidebar-border);
}
.cockpit-nav__subitem {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--cockpit-sidebar-muted);
  transition: background .15s, color .15s;
}
.cockpit-nav__subitem:hover {
  background: rgba(17, 17, 17, .045);
  color: var(--cockpit-sidebar-fg);
}
.cockpit-nav__subitem.is-active {
  background: rgba(228, 158, 0, .20);
  color: var(--highlight);
  font-weight: 600;
}

/* Bottom user/logout block removed — logout lives in the topbar user dropdown. */

/* =========================================================
   Main + Topbar
   ========================================================= */
.cockpit-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

:root {
  --cockpit-topbar-height: 76px;
}

.cockpit-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--cockpit-topbar-height);
  background: var(--cockpit-surface);
  border-bottom: 1px solid var(--cockpit-border);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
}
.cockpit-topbar__menu {
  display: none;
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 24px;
  color: var(--cockpit-text);
  -webkit-tap-highlight-color: rgba(228,158,0,.2);
  position: relative;
  z-index: 60;
  padding: 0;
  touch-action: manipulation;
}
.cockpit-topbar__menu i { pointer-events: none; }
.cockpit-topbar__menu:hover,
.cockpit-topbar__menu:active {
  background: var(--cockpit-hover);
}

/* ---- Search input (TailAdmin: flush, ultra-minimal) ---- */
.cockpit-search {
  flex: 1;
  max-width: 480px;
  position: relative;
  display: flex;
  align-items: center;
}
.cockpit-search__btn {
  position: absolute;
  left: 14px;
  background: transparent;
  border: none;
  padding: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9aa4b2;
  cursor: pointer;
  pointer-events: none;
}
.cockpit-search__input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 16px 11px 42px;
  font-family: inherit;
  font-size: 14px;
  color: var(--cockpit-text);
  background: transparent;
  border: none;
  border-radius: 3px;
  transition: background .15s;
}
.cockpit-search__input::placeholder { color: #9aa4b2; font-weight: 400; }
.cockpit-search__input:focus {
  outline: none;
  background: #f8fafc;
}

/* ---- Topbar right (icons + user pill) ---- */
.cockpit-topbar__right {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

/* Icon buttons (bell, mail) — TailAdmin: borderless, transparent circles */
.cockpit-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: background .15s, color .15s;
}
.cockpit-iconbtn:hover {
  background: #f2f2f2;
  color: var(--cockpit-text);
}
.cockpit-iconbtn--dot::after {
  content: '';
  position: absolute;
  top: 8px; right: 9px;
  width: 8px; height: 8px;
  background: #ef4444;
  border: 2px solid var(--cockpit-surface);
  border-radius: 50%;
}

/* ---- Theme pill switch (TailAdmin-style) ---- */
.cockpit-themeswitch {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 4px;
  background: #e5e7eb;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .15s;
}
.cockpit-themeswitch__dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: transform .2s ease, color .15s, background .15s;
}
body.cockpit-theme-dark .cockpit-themeswitch {
  background: #334155;
}
body.cockpit-theme-dark .cockpit-themeswitch__dot {
  transform: translateX(22px);
  background: #1e293b;
  color: #fbbf24;
}

/* ---- User pill (TailAdmin: text LEFT right-aligned, avatar RIGHT, no pill bg) ---- */
.cockpit-userpill { position: relative; }
.cockpit-userpill__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 4px 10px;
  border-radius: 3px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: var(--cockpit-text);
  transition: background .15s;
}

.cockpit-userpill__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
  order: 2;
}
.cockpit-userpill__meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: right;
  order: 1;
}
.cockpit-userpill__meta strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--cockpit-text);
}
.cockpit-userpill__meta small {
  font-size: 11px;
  color: #6b7280;
}
.cockpit-userpill__chev {
  color: #9aa4b2;
  transition: transform .15s;
  order: 3;
}
.cockpit-userpill.is-open .cockpit-userpill__chev {
  transform: rotate(180deg);
}

.cockpit-userpill__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  box-shadow: 0 12px 32px rgba(16,24,40,.12);
  padding: 8px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.cockpit-userpill.is-open .cockpit-userpill__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.cockpit-userpill__head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--cockpit-border-soft);
  margin-bottom: 6px;
}
.cockpit-userpill__head strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--cockpit-text);
}
.cockpit-userpill__head small {
  display: block;
  font-size: 12px;
  color: var(--cockpit-muted);
}
.cockpit-userpill__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 3px;
  text-decoration: none;
  color: var(--cockpit-text-soft);
  font-size: 13px;
  font-weight: 700;
  transition: background .15s, color .15s;
}
.cockpit-userpill__item i { font-size: 16px; width: 18px; text-align: center; color: var(--cockpit-muted); }
.cockpit-userpill__item:hover {
  background: var(--cockpit-bg);
  color: var(--cockpit-text);
}
.cockpit-userpill__item:hover i { color: var(--cockpit-text); }
.cockpit-userpill__item--danger { color: #b91c1c; }
.cockpit-userpill__item--danger i { color: #b91c1c; }
.cockpit-userpill__item--danger:hover { background: #fee2e2; color: #991b1b; }
.cockpit-userpill__item--danger:hover i { color: #991b1b; }

/* Page title in content */
.cockpit-pagetitle {
  margin: 0 0 22px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--cockpit-text);
}

/* =========================================================
   Content area
   ========================================================= */
.cockpit-content {
  flex: 1;
  padding: 28px 32px 60px;
}
.cockpit-content > main:first-child {
  margin: -28px -32px 0;
  padding: 28px 32px 0;
}
.cockpit-content .container {
  max-width: none;
  padding: 0;
  width: 100%;
}

/* =========================================================
   Grid + cards
   ========================================================= */
.cockpit-grid {
  display: grid;
  gap: 18px;
}
.cockpit-grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.cockpit-grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cockpit-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

.cockpit-card {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 22px;
  box-shadow: var(--cockpit-shadow-sm);
}
.cockpit-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}
.cockpit-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--cockpit-text);
}
.cockpit-card__link {
  font-size: 13px;
  color: var(--highlight);
  font-weight: 800;
  text-decoration: none;
}

/* ---- TailAdmin-exact stat card (icon top, HUGE value, label+trend bottom row) ---- */
.ta-stat {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 200px;
  box-shadow: var(--cockpit-shadow-sm);
}
.ta-stat__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;            /* CIRCLE like TailAdmin, not square */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cockpit-yellow-soft);
  color: var(--highlight);
  align-self: flex-start;
}
.ta-stat__icon--blue   { background: #e0ecff; color: #2563eb; }
.ta-stat__icon--green  { background: #dcfce7; color: #16a34a; }
.ta-stat__icon--red    { background: #fee2e2; color: #dc2626; }
.ta-stat__icon--yellow { background: var(--cockpit-yellow-soft); color: var(--highlight); }

.ta-stat__main { margin-top: auto; }    /* push to bottom of card */
.ta-stat__value {
  display: block;
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--cockpit-text);
  margin-bottom: 14px;
}
.ta-stat__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ta-stat__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--cockpit-muted);
}
.ta-stat__trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.ta-stat__trend--up      { color: #15803d; }
.ta-stat__trend--down    { color: #b91c1c; }
.ta-stat__trend--neutral { color: var(--cockpit-muted); }

/* keep legacy .cockpit-stat working if any moved page uses it */
.cockpit-stat { display: flex; flex-direction: column; gap: 14px; }
.cockpit-stat__icon { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--cockpit-yellow-soft); color: var(--yellow); font-size: 22px; }
.cockpit-stat__icon--blue   { background: #e0ecff; color: #2563eb; }
.cockpit-stat__icon--green  { background: #dcfce7; color: #16a34a; }
.cockpit-stat__icon--red    { background: #fee2e2; color: #dc2626; }
.cockpit-stat__row    { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cockpit-stat__main   { flex: 1; min-width: 0; }
.cockpit-stat__label  { display: block; font-size: 13px; font-weight: 700; color: var(--cockpit-muted); margin-bottom: 4px; }
.cockpit-stat__value  { display: block; font-size: 28px; line-height: 1.05; font-weight: 900; letter-spacing: -.02em; color: var(--cockpit-text); }
.cockpit-stat__trend  { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 999px; }
.cockpit-stat__trend--up   { background: #dcfce7; color: #15803d; }
.cockpit-stat__trend--down { background: #fee2e2; color: #b91c1c; }
.cockpit-stat__trend--flat { background: var(--cockpit-bg); color: var(--cockpit-muted); }

/* ---- Dashboard charts row ---- */
.dash-charts {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px;
}
.dash-charts__legend {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--cockpit-muted);
  font-weight: 700;
}
.dash-charts__legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dash-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dash-charts__canvas-wrap {
  position: relative;
  height: 280px;
  width: 100%;
}
@media (max-width: 1100px) {
  .dash-charts { grid-template-columns: 1fr; }
  .dash-charts__canvas-wrap { height: 240px; }
}

/* ---- Quick actions grid ---- */
.cockpit-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap: 12px;
}
.cockpit-action {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 4px;
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  text-decoration: none;
  color: var(--cockpit-text);
  transition: transform .15s, background .15s, border-color .15s;
}
.cockpit-action:hover {
  transform: translateY(-1px);
  background: var(--cockpit-yellow-soft);
  border-color: var(--cockpit-yellow-mid);
}
.cockpit-action__icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--cockpit-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--highlight);
  flex-shrink: 0;
}
.cockpit-action__body { flex: 1; min-width: 0; }
.cockpit-action__title {
  display: block;
  font-weight: 800;
  margin-bottom: 2px;
  font-size: 14px;
}
.cockpit-action__sub {
  display: block;
  font-size: 12px;
  color: var(--cockpit-muted);
  line-height: 1.4;
}

/* ---- Tables ---- */
.cockpit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.cockpit-table th,
.cockpit-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--cockpit-border-soft);
}
.cockpit-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--cockpit-muted);
  font-weight: 800;
  background: var(--cockpit-bg);
}
.cockpit-table tbody tr:hover {
  background: var(--cockpit-hover);
}

/* =========================================================
   Footer (desktop only)
   ========================================================= */
.cockpit-footer {
  margin-top: auto;
  padding: 18px 32px;
  border-top: 1px solid var(--cockpit-border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--cockpit-muted);
  background: var(--cockpit-surface);
  flex-wrap: wrap;
  gap: 8px;
}
.cockpit-footer a { color: inherit; text-decoration: none; }
.cockpit-footer a:hover { text-decoration: underline; }

/* =========================================================
   Login screen (centered, light)
   ========================================================= */
.cockpit-body--centered {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fafaf6 0%, #f0eee8 100%);
  background-attachment: fixed;
}
.cockpit-login {
  width: min(420px, 92vw);
  background: var(--cockpit-surface);
  border-radius: 5px;
  padding: 32px;
  box-shadow: var(--cockpit-shadow-md);
  border: 1px solid var(--cockpit-border);
}
.cockpit-login__brand { text-align: center; margin-bottom: 22px; }
.cockpit-login__brand img { width: 56px; height: 56px; object-fit: contain; }
.cockpit-login__brand h1 { margin: 14px 0 4px; font-size: 22px; font-weight: 900; letter-spacing: -.02em; color: var(--cockpit-text); }
.cockpit-login__brand p { margin: 0; color: var(--cockpit-muted); font-size: 13px; }
.cockpit-login__alert { background: #fdecec; border-radius: 4px; padding: 12px 14px; font-size: 13px; color: #7a1a1a; margin-bottom: 14px; }
.cockpit-login__field { display: block; margin-bottom: 14px; }
.cockpit-login__field span { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--cockpit-muted); margin-bottom: 6px; }
.cockpit-login__field input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--cockpit-border); border-radius: 4px; font-family: inherit; font-size: 15px; background: #fff; color: var(--cockpit-text); }
.cockpit-login__field input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(228,158,0,.18); }
.cockpit-login__submit { width: 100%; padding: 13px 18px; border: none; border-radius: 4px; background: var(--highlight); color: #111; font-weight: 900; font-size: 15px; cursor: pointer; margin-top: 6px; }
.cockpit-login__submit:hover { filter: brightness(.96); }
.cockpit-login__footer { margin-top: 18px; text-align: center; font-size: 12px; color: var(--cockpit-muted); }
.cockpit-login__footer a { color: inherit; }

/* =========================================================
   Access-denied
   ========================================================= */
.cockpit-deny { padding: 80px 24px; text-align: center; }
.cockpit-deny__card { background: var(--cockpit-surface); border-radius: 5px; padding: 40px; max-width: 460px; margin: 0 auto; box-shadow: var(--cockpit-shadow-md); border: 1px solid var(--cockpit-border); }
.cockpit-deny__card h1 { margin: 0 0 12px; font-size: 24px; font-weight: 900; color: var(--cockpit-text); }
.cockpit-deny__card p { margin: 0 0 22px; color: var(--cockpit-muted); }

/* =========================================================
   Ported-page layout helpers (kill old margin-tops from
   pages that were built for the floating public header)
   ========================================================= */
.cockpit-content .account-hero,
.cockpit-content .dash-hero,
.cockpit-content .account-page,
.cockpit-content .dashboard-page {
  margin: 0;
  padding: 0;
  background: transparent !important;
}
.cockpit-content .account-tabs {
  margin-bottom: 18px;
}

/* =========================================================
   COCKPIT LEGACY OVERRIDES
   Ported pages still ship with public-site CSS via inline
   <style> blocks. We override the most common offenders so
   they look at home inside the cockpit without rewriting
   every page individually.
   ========================================================= */

/* --- Big public-site titles -> compact cockpit page title --- */
.cockpit-content .account-hero__title,
.cockpit-content .dash-title,
.cockpit-content h1.huge,
.cockpit-content .page__title,
.cockpit-content .heading-xl,
.cockpit-content .hero__title {
  font-size: 22px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  font-weight: 900 !important;
  margin: 0 0 6px !important;
  color: var(--cockpit-text) !important;
}
.cockpit-content .account-hero__sub,
.cockpit-content .dash-sub,
.cockpit-content .page__subtitle,
.cockpit-content .hero__subtitle {
  font-size: 13px !important;
  color: var(--cockpit-muted) !important;
  margin: 0 0 18px !important;
  max-width: 720px;
}

/* --- Public-site container width -> full inside cockpit --- */
.cockpit-content .container {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* --- All cards / panels: square corners, subtle border, no public-site shadow --- */
.cockpit-content .panel,
.cockpit-content .panel-card,
.cockpit-content .table-card,
.cockpit-content .booking-card,
.cockpit-content .filter-card,
.cockpit-content .form-card,
.cockpit-content .card,
.cockpit-content .services-card,
.cockpit-content .admin-stat,
.cockpit-content .dash-card,
.cockpit-content .admin-action,
.cockpit-content .info-card,
.cockpit-content .stat-card {
  border-radius: 4px !important;
  border: 1px solid var(--cockpit-border) !important;
  background: var(--cockpit-surface) !important;
  box-shadow: var(--cockpit-shadow-sm) !important;
}

/* --- Buttons inside ported pages --- */
.cockpit-content .btn,
.cockpit-content .button,
.cockpit-content button.btn,
.cockpit-content a.btn,
.cockpit-content input[type="submit"],
.cockpit-content input[type="button"] {
  border-radius: 4px !important;
}
.cockpit-content .btn--primary,
.cockpit-content .btn-primary {
  background: var(--highlight) !important;
  color: #111 !important;
  border: none !important;
  font-weight: 800 !important;
}
.cockpit-content .btn--ghost,
.cockpit-content .btn-ghost,
.cockpit-content .btn--secondary {
  background: var(--cockpit-surface) !important;
  border: 1px solid var(--cockpit-border) !important;
  color: var(--cockpit-text) !important;
}

/* --- Inputs --- */
.cockpit-content input[type="text"],
.cockpit-content input[type="email"],
.cockpit-content input[type="date"],
.cockpit-content input[type="datetime-local"],
.cockpit-content input[type="time"],
.cockpit-content input[type="number"],
.cockpit-content input[type="search"],
.cockpit-content input[type="tel"],
.cockpit-content input[type="url"],
.cockpit-content input[type="password"],
.cockpit-content select,
.cockpit-content textarea {
  border-radius: 4px !important;
  border: 1px solid var(--cockpit-border) !important;
  background: var(--cockpit-surface) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  padding: 9px 12px !important;
  color: var(--cockpit-text) !important;
}
.cockpit-content input:focus,
.cockpit-content select:focus,
.cockpit-content textarea:focus {
  outline: none !important;
  border-color: var(--yellow) !important;
  box-shadow: 0 0 0 3px rgba(228,158,0,.15) !important;
}

/* --- Tables --- */
.cockpit-content .table,
.cockpit-content table.table,
.cockpit-content table.data-table,
.cockpit-content table.booking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cockpit-content .table th,
.cockpit-content .table td,
.cockpit-content table.table th,
.cockpit-content table.table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--cockpit-border-soft) !important;
  border-radius: 0 !important;
}
.cockpit-content .table th,
.cockpit-content table.table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--cockpit-muted);
  font-weight: 800;
  background: var(--cockpit-bg) !important;
}

/* --- Tabs / pills --- */
.cockpit-content .account-tabs,
.cockpit-content .tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--cockpit-border);
  padding-bottom: 0;
}
.cockpit-content .account-tab,
.cockpit-content .tab {
  padding: 10px 14px !important;
  border-radius: 0 !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
  color: var(--cockpit-muted) !important;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.cockpit-content .account-tab.is-active,
.cockpit-content .tab.is-active {
  color: var(--cockpit-text) !important;
  border-bottom-color: var(--yellow) !important;
}

/* --- Status / pills / badges --- */
.cockpit-content .status,
.cockpit-content .pill,
.cockpit-content .badge,
.cockpit-content .tag {
  border-radius: 999px !important;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px !important;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* --- FullCalendar tweaks (manage-availability-all uses FC) --- */
.cockpit-content .fc {
  font-family: inherit;
  font-size: 13px;
}
.cockpit-content .fc .fc-toolbar-title {
  font-size: 16px !important;
  font-weight: 800 !important;
}
.cockpit-content .fc .fc-button {
  border-radius: 4px !important;
  background: var(--cockpit-surface) !important;
  border: 1px solid var(--cockpit-border) !important;
  color: var(--cockpit-text) !important;
  font-weight: 700 !important;
  text-transform: none !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
  box-shadow: none !important;
}
.cockpit-content .fc .fc-button:hover {
  background: var(--cockpit-bg) !important;
}
.cockpit-content .fc .fc-button-primary:not(:disabled).fc-button-active,
.cockpit-content .fc .fc-button-primary:not(:disabled):active {
  background: var(--highlight) !important;
  border-color: var(--highlight) !important;
  color: #111 !important;
}
.cockpit-content .fc-event,
.cockpit-content .fc-event-main {
  border-radius: 3px !important;
  font-size: 11px !important;
  border: none !important;
}
.cockpit-content .fc-daygrid-event {
  padding: 2px 4px !important;
}
.cockpit-content .fc-theme-standard td,
.cockpit-content .fc-theme-standard th,
.cockpit-content .fc-theme-standard .fc-scrollgrid {
  border-color: var(--cockpit-border-soft) !important;
}
.cockpit-content .fc-col-header-cell {
  background: var(--cockpit-bg) !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--cockpit-muted);
}

/* --- Removed: big colored top-bars from ported pages --- */
.cockpit-content .account-hero {
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 0 18px !important;
  box-shadow: none !important;
}

/* --- Form rows that were built for the public site grid --- */
.cockpit-content .form-row,
.cockpit-content .field,
.cockpit-content .form-group {
  margin-bottom: 12px;
}
.cockpit-content .field__label,
.cockpit-content .form-label,
.cockpit-content label {
  font-size: 12px;
  font-weight: 700;
  color: var(--cockpit-text-soft);
  margin-bottom: 4px;
  display: block;
}

/* --- "Compact" mode for legacy pages: tighter line-height --- */
.cockpit-content {
  line-height: 1.45;
}
.cockpit-content p { margin: 0 0 10px; }
.cockpit-content h2 { font-size: 16px; font-weight: 800; margin: 18px 0 10px; }
.cockpit-content h3 { font-size: 14px; font-weight: 800; margin: 14px 0 8px; }
.cockpit-content hr {
  border: 0;
  border-top: 1px solid var(--cockpit-border-soft);
  margin: 14px 0;
}

/* =========================================================
   Mailbox (cockpit/mail*.php)
   ========================================================= */
.mailbox {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.mailbox__folders {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: calc(var(--cockpit-topbar-height) + 18px);
}
.mailbox__compose-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--highlight);
  color: #111;
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 4px;
  font-weight: 900;
  font-size: 14px;
  justify-content: center;
}
.mailbox__compose-btn:hover { filter: brightness(.96); }
.mailbox__folder-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 6px;
}
.mailbox__folder {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: 3px;
  text-decoration: none;
  color: var(--cockpit-text-soft);
  font-size: 13px;
  font-weight: 700;
}
.mailbox__folder:hover { background: var(--cockpit-hover); color: var(--cockpit-text); }
.mailbox__folder.is-active { background: var(--cockpit-yellow-soft); color: var(--cockpit-text); }
.mailbox__badge {
  background: var(--highlight);
  color: #111;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 900;
}

.mailbox__main {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  overflow: hidden;
}
.mailbox__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--cockpit-border-soft);
}
.mailbox__title { margin: 0; font-size: 18px; font-weight: 800; color: var(--cockpit-text); }
.mailbox__sub { margin: 4px 0 0; font-size: 12px; color: var(--cockpit-muted); }
.mailbox__refresh {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 4px;
  color: var(--cockpit-muted); text-decoration: none;
  background: var(--cockpit-bg);
}
.mailbox__refresh:hover { background: var(--cockpit-yellow-soft); color: var(--cockpit-text); }
.mailbox__alert {
  margin: 18px;
  padding: 14px 16px;
  border-radius: 4px;
  background: #fdecec;
  color: #7a1a1a;
  font-size: 13px;
}
.mailbox__alert code { background: rgba(0,0,0,.05); padding: 2px 6px; border-radius: 4px; }
.mailbox__empty {
  padding: 60px 22px;
  text-align: center;
  color: var(--cockpit-muted);
}
.mailbox__list { list-style: none; margin: 0; padding: 0; }
.mailbox__item { border-bottom: 1px solid var(--cockpit-border-soft); }
.mailbox__item-link {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 22px;
  text-decoration: none;
  color: var(--cockpit-text);
  align-items: center;
}
.mailbox__item-link:hover { background: var(--cockpit-hover); }
.mailbox__item.is-unread .mailbox__item-link {
  background: #fffaef;
}
.mailbox__item.is-unread .mailbox__item-subject { font-weight: 900; }
.mailbox__item-sender {
  display: flex; align-items: center; gap: 8px;
  font-weight: 400;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mailbox__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--highlight);
  flex-shrink: 0;
}
.mailbox__item-subject {
  font-weight: 400;
  font-size: 14px;
  color: var(--cockpit-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mailbox__item-snippet {
  font-size: 12px;
  color: var(--cockpit-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mailbox__item-snippet:empty { display: none; }   /* hide when no preview */
.mailbox__item-meta {
  display: flex; align-items: center; gap: 8px;
  color: var(--cockpit-muted);
  font-size: 12px;
  white-space: nowrap;
}
.mailbox__item-meta i { font-size: 14px; }

.mailbox__pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  font-size: 13px;
  color: var(--cockpit-muted);
}
.mailbox__pagination a {
  color: var(--highlight);
  font-weight: 800;
  text-decoration: none;
}

/* ---- Mailview (single message) ---- */
.mailview { display: flex; flex-direction: column; gap: 14px; }
.mailview__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.mailview__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cockpit-text-soft);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}
.mailview__back:hover { color: var(--highlight); }
.mailview__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  color: var(--cockpit-text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.btn-line:hover { background: var(--cockpit-yellow-soft); border-color: var(--cockpit-yellow-mid); }
.btn-line--danger { color: #b91c1c; border-color: #fecaca; }
.btn-line--danger:hover { background: #fee2e2; border-color: #fca5a5; }
.btn-yellow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--highlight); color: #111;
  border: none; padding: 11px 18px; border-radius: 4px;
  font-weight: 900; font-size: 14px;
  cursor: pointer; text-decoration: none;
  font-family: inherit;
}
.btn-yellow:hover { filter: brightness(.96); }

.mailview__card {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 22px;
}
.mailview__subject {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--cockpit-text);
}
.mailview__meta {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 6px 14px;
  margin: 0 0 18px;
  font-size: 13px;
}
.mailview__meta dt { color: var(--cockpit-muted); font-weight: 700; }
.mailview__meta dd { margin: 0; color: var(--cockpit-text); word-break: break-word; }
.mailview__attachments {
  background: var(--cockpit-bg);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.mailview__attachments strong { display: block; font-size: 12px; color: var(--cockpit-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.mailview__attachments ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mailview__attachments a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--cockpit-text);
  font-size: 13px;
  font-weight: 700;
}
.mailview__attachments a:hover { background: var(--cockpit-yellow-soft); }
.mailview__attachments small { color: var(--cockpit-muted); font-weight: 600; }

.mailview__body {
  width: 100%;
  min-height: 380px;
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  background: #fff;
}
.mailview__text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--cockpit-text);
  margin: 0;
  padding: 12px 14px;
  background: var(--cockpit-bg);
  border-radius: 4px;
}

/* ---- Compose ---- */
.mailcompose {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 22px;
  max-width: 820px;
}
.mailcompose__head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.mailcompose__head h1 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.mailcompose__form { display: flex; flex-direction: column; gap: 14px; }
.mailcompose__row { display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: center; }
.mailcompose__row label { font-weight: 700; color: var(--cockpit-text-soft); font-size: 13px; }
.mailcompose__row input[type="text"],
.mailcompose__row input[type="email"],
.mailcompose__row textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  background: var(--cockpit-surface);
  color: var(--cockpit-text);
}
.mailcompose__row input[type="file"] { padding: 8px 0; }
.mailcompose__row textarea { resize: vertical; min-height: 220px; line-height: 1.5; }
.mailcompose__row input:focus,
.mailcompose__row textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(228,158,0,.15);
}
.mailcompose__from {
  padding: 11px 14px;
  background: var(--cockpit-bg);
  border-radius: 4px;
  font-weight: 700;
  color: var(--cockpit-text);
}
.mailcompose__advanced {
  background: var(--cockpit-bg);
  border-radius: 4px;
  padding: 6px 12px;
}
.mailcompose__advanced summary { padding: 8px 0; font-weight: 700; cursor: pointer; color: var(--cockpit-text-soft); }
.mailcompose__advanced[open] summary { color: var(--cockpit-text); }
.mailcompose__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--cockpit-border-soft);
}

/* =========================================================
   Kanban board (issues-overview, my-issues)
   Jira / Freshsales-style — compact columns with status cards.
   ========================================================= */
.kanban-page { display: flex; flex-direction: column; gap: 16px; }

.kanban-page__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.kanban-page__title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--cockpit-text);
}
.kanban-page__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--cockpit-muted);
}
.kanban-newbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--highlight);
  color: #111;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  border: none;
  cursor: pointer;
}
.kanban-newbtn:hover { filter: brightness(.96); }

/* --- Stat row --- */
.kanban-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.kanban-stat {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kanban-stat strong {
  font-size: 20px;
  font-weight: 900;
  color: var(--cockpit-text);
  line-height: 1;
}
.kanban-stat span {
  font-size: 11px;
  color: var(--cockpit-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}
.kanban-stat.is-warn { background: #fef2f2; border-color: #fecaca; }
.kanban-stat.is-warn strong { color: #b91c1c; }
.kanban-stat.is-info { background: #eff6ff; border-color: #bfdbfe; }
.kanban-stat.is-info strong { color: #1d4ed8; }

/* --- Filter bar --- */
.kanban-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 10px 12px;
}
.kanban-search {
  flex: 1;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}
.kanban-search svg {
  position: absolute;
  left: 10px;
  color: var(--cockpit-muted);
  pointer-events: none;
}
.kanban-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px 8px 32px !important;
  font-size: 13px !important;
  border: 1px solid var(--cockpit-border) !important;
  border-radius: 3px !important;
  background: var(--cockpit-bg) !important;
}
.kanban-search input:focus {
  border-color: var(--yellow) !important;
  box-shadow: 0 0 0 2px rgba(228,158,0,.18) !important;
  background: var(--cockpit-surface) !important;
}
.kanban-filters select {
  padding: 8px 10px !important;
  font-size: 13px !important;
  border: 1px solid var(--cockpit-border) !important;
  border-radius: 3px !important;
  background: var(--cockpit-surface) !important;
  color: var(--cockpit-text);
  cursor: pointer;
  min-width: 130px;
}
.kanban-filterbtn {
  padding: 8px 14px;
  border: 1px solid var(--cockpit-border);
  background: var(--cockpit-surface);
  color: var(--cockpit-text-soft);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.kanban-filterbtn:hover { background: var(--cockpit-bg); }
.kanban-filterbtn--primary {
  background: var(--highlight);
  color: #111;
  border-color: var(--highlight);
}
.kanban-filterbtn--primary:hover { filter: brightness(.96); background: var(--highlight); }

/* --- The board itself --- */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.kanban__col {
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 10px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kanban__col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 4px;
  border-bottom: 1px solid var(--cockpit-border);
}
.kanban__col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kanban__col-title {
  margin: 0;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .02em;
  color: var(--cockpit-text) !important;
  text-transform: none !important;
  flex: 1;
}
.kanban__col-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--cockpit-muted);
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 999px;
  padding: 1px 8px;
}
.kanban__col-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 50px;
}
.kanban__empty {
  text-align: center;
  font-size: 12px;
  color: var(--cockpit-faint);
  padding: 16px 8px;
  border: 1px dashed var(--cockpit-border);
  border-radius: 3px;
}

/* --- Card --- */
.kanban__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  cursor: pointer;
}
.kanban__card:hover {
  border-color: var(--highlight);
  box-shadow: 0 2px 8px rgba(16,24,40,.08);
  transform: translateY(-1px);
}
.kanban__card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.kanban__card-id {
  font-size: 11px;
  font-weight: 700;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  color: var(--cockpit-muted);
  letter-spacing: -.01em;
}
.kanban__prio {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kanban__card-title {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--cockpit-text) !important;
  line-height: 1.35;
  letter-spacing: -.005em;
}
.kanban__card-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kanban__topic {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--topic, #94a3b8) 15%, transparent);
  color: color-mix(in srgb, var(--topic, #94a3b8) 90%, #000 10%);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kanban__card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.kanban__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  background: var(--cockpit-yellow-soft);
  color: var(--highlight);
  overflow: hidden;
  flex-shrink: 0;
}
.kanban__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.kanban__avatar--unassigned {
  background: var(--cockpit-bg);
  color: var(--cockpit-faint);
}
.kanban__due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--cockpit-muted);
}
.kanban__due.is-overdue {
  color: #b91c1c;
  font-weight: 800;
}

/* --- Mobile: horizontal scroll instead of 4-cols --- */
@media (max-width: 1100px) {
  .kanban {
    grid-template-columns: repeat(4, 280px);
    overflow-x: auto;
    padding-bottom: 8px;
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
    scrollbar-width: thin;
  }
}
@media (max-width: 640px) {
  .kanban-page__title { font-size: 19px; }
  .kanban-page__sub { font-size: 12px; }
  .kanban-newbtn { padding: 8px 12px; font-size: 12px; }
  .kanban-stats { grid-template-columns: repeat(3, 1fr); }
  .kanban-filters { flex-direction: column; align-items: stretch; }
  .kanban-search { min-width: 0; }
  .kanban-filters select { width: 100%; }
  .kanban {
    grid-template-columns: repeat(4, 260px);
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* =========================================================
   manage-bookings — Reception view
   ========================================================= */
.bk-page { display: flex; flex-direction: column; gap: 18px; }

.bk-page__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.bk-page__title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--cockpit-text);
}
.bk-page__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--cockpit-muted);
}

/* --- Hero stat row --- */
.bk-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.bk-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--cockpit-text);
  position: relative;
  overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.bk-stat:hover {
  border-color: var(--yellow);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16,24,40,.05);
}
.bk-stat__icon {
  position: absolute;
  top: 8px; right: 10px;
  font-size: 18px;
  opacity: .25;
}
.bk-stat strong {
  font-size: 22px;
  font-weight: 900;
  color: var(--cockpit-text);
  line-height: 1;
}
.bk-stat span:not(.bk-stat__icon) {
  font-size: 11px;
  color: var(--cockpit-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}
.bk-stat--current { background: #ecfdf5; border-color: #a7f3d0; }
.bk-stat--current strong { color: #047857; }
.bk-stat--arriving { background: #eff6ff; border-color: #bfdbfe; }
.bk-stat--arriving strong { color: #1d4ed8; }
.bk-stat--departing { background: #fef3c7; border-color: #fde68a; }
.bk-stat--departing strong { color: #b45309; }
.bk-stat--revenue { background: var(--cockpit-yellow-soft); border-color: var(--cockpit-yellow-mid); }
.bk-stat--revenue strong { color: #92400e; font-size: 18px; }

/* --- Section header --- */
.bk-section {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bk-section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.bk-section__head h2 {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--cockpit-text) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none !important;
}
.bk-section__count {
  font-size: 11px;
  font-weight: 800;
  color: var(--cockpit-muted);
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  border-radius: 999px;
  padding: 2px 9px;
}
.bk-section--split {
  background: transparent;
  border: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bk-section--split .bk-section__col {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- Pulse dot (live indicator) --- */
.bk-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16,185,129,.5);
  animation: bk-pulse 1.6s ease-out infinite;
}
@keyframes bk-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.45); }
  70%  { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* --- Tiles (currently checked-in) --- */
.bk-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.bk-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--cockpit-text);
  border-left: 3px solid #10b981;
  transition: transform .12s, box-shadow .12s, border-left-color .12s;
}
.bk-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16,24,40,.05);
  background: var(--cockpit-surface);
}
.bk-tile__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.bk-tile__apartment {
  font-size: 11px;
  font-weight: 700;
  color: var(--cockpit-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.bk-tile__badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.bk-tile__badge--current {
  background: #d1fae5;
  color: #047857;
}
.bk-tile__guest {
  font-size: 14px;
  font-weight: 800;
  color: var(--cockpit-text);
  letter-spacing: -.01em;
}
.bk-tile__dates {
  font-size: 12px;
  color: var(--cockpit-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.bk-tile__nights {
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
  color: var(--cockpit-text);
  margin-left: auto;
}

/* --- Row list (today arrivals/departures) --- */
.bk-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border-soft);
  border-radius: 3px;
  text-decoration: none;
  color: var(--cockpit-text);
  transition: background .12s, border-color .12s;
}
.bk-row:hover {
  background: var(--cockpit-surface);
  border-color: var(--cockpit-border);
}
.bk-row__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bk-row__dot--arriving { background: #3b82f6; }
.bk-row__dot--departing { background: #f59e0b; }
.bk-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bk-row__main strong { font-size: 13px; font-weight: 700; color: var(--cockpit-text); }
.bk-row__main small { font-size: 11px; color: var(--cockpit-muted); }
.bk-row__nights {
  font-size: 11px;
  font-weight: 700;
  color: var(--cockpit-muted);
  white-space: nowrap;
}

/* --- Tabs --- */
.bk-tabs-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--cockpit-border);
  padding-bottom: 0;
  flex-wrap: wrap;
}
.bk-tabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.bk-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cockpit-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.bk-tab:hover { color: var(--cockpit-text); }
.bk-tab.is-active { color: var(--cockpit-text); border-bottom-color: var(--yellow); }
.bk-tab span {
  font-size: 10px;
  font-weight: 800;
  color: var(--cockpit-muted);
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}
.bk-tab.is-active span {
  background: var(--cockpit-yellow-soft);
  border-color: var(--cockpit-yellow-mid);
  color: #92400e;
}

.bk-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
}
.bk-search svg {
  position: absolute;
  left: 10px;
  color: var(--cockpit-muted);
  pointer-events: none;
}
.bk-search input {
  padding: 8px 10px 8px 32px !important;
  font-size: 13px !important;
  border: 1px solid var(--cockpit-border) !important;
  border-radius: 3px !important;
  background: var(--cockpit-surface) !important;
  min-width: 240px;
}
.bk-search input:focus {
  border-color: var(--yellow) !important;
  box-shadow: 0 0 0 2px rgba(228,158,0,.18) !important;
}

/* --- Main bookings table --- */
.bk-list {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  overflow: hidden;
}
.bk-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--cockpit-muted);
  font-size: 13px;
}
.bk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bk-table th {
  text-align: left;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--cockpit-muted) !important;
  background: var(--cockpit-bg) !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid var(--cockpit-border) !important;
}
.bk-table td {
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--cockpit-border-soft) !important;
  vertical-align: middle;
}
.bk-table tbody tr:last-child td { border-bottom: none !important; }
.bk-table tbody tr:hover { background: var(--cockpit-hover); }
.bk-table strong { font-weight: 700; color: var(--cockpit-text); }
.bk-table small {
  display: block;
  color: var(--cockpit-muted);
  font-size: 11px;
  margin-top: 1px;
}
.bk-arrow { color: var(--cockpit-faint); margin: 0 4px; }
.bk-muted { color: var(--cockpit-faint); }
.bk-code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  border-radius: 3px;
  padding: 2px 8px;
  letter-spacing: .04em;
}

/* --- Status pills (multi-color by booking state) --- */
.bk-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 3px !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.bk-pill--current   { background: #d1fae5; color: #047857; }
.bk-pill--arriving  { background: #dbeafe; color: #1e40af; }
.bk-pill--departing { background: #fef3c7; color: #b45309; }
.bk-pill--upcoming  { background: #e0f2fe; color: #0369a1; }
.bk-pill--past      { background: var(--cockpit-bg); color: var(--cockpit-muted); }
.bk-pill--pending   { background: #fff7ed; color: #9a3412; }
.bk-pill--cancelled { background: #fee2e2; color: #b91c1c; }
.bk-pill--done      { background: #d1fae5; color: #047857; }
.bk-pill--warn      { background: #fef3c7; color: #b45309; }
.bk-pill--idle      { background: var(--cockpit-bg); color: var(--cockpit-muted); }

.bk-detail {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cockpit-text);
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 3px;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.bk-detail:hover {
  background: var(--cockpit-yellow-soft);
  border-color: var(--cockpit-yellow-mid);
}

/* --- Mobile --- */
@media (max-width: 1100px) {
  .bk-section--split { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .bk-stats { grid-template-columns: repeat(2, 1fr); }
  .bk-tabs-wrap { border-bottom: none; }
  .bk-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .bk-tab { white-space: nowrap; }
  .bk-search { width: 100%; min-width: 0; }
  .bk-search input { width: 100%; min-width: 0; }

  /* Stacked card-table on mobile */
  .bk-table thead { display: none; }
  .bk-table, .bk-table tbody, .bk-table tr, .bk-table td { display: block; width: 100%; box-sizing: border-box; }
  .bk-table tr {
    background: var(--cockpit-surface);
    border-bottom: 1px solid var(--cockpit-border-soft) !important;
    padding: 10px 14px;
  }
  .bk-table td {
    padding: 4px 0 !important;
    border-bottom: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .bk-table td::before {
    content: attr(data-label);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--cockpit-muted);
    font-weight: 700;
  }
  .bk-table td:first-child { padding-bottom: 6px !important; border-bottom: 1px dashed var(--cockpit-border-soft) !important; margin-bottom: 4px; }
  .bk-tile__nights { margin-left: 0; }
}

/* =========================================================
   create-direct-booking — stepper-style form
   ========================================================= */
.cdb-page { display: flex; flex-direction: column; gap: 16px; }

.cdb-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.cdb-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--cockpit-text);
}
.cdb-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--cockpit-muted);
  max-width: 640px;
}
.cdb-cancel {
  background: var(--cockpit-surface) !important;
  color: var(--cockpit-text) !important;
  border: 1px solid var(--cockpit-border);
}
.cdb-cancel:hover { background: var(--cockpit-bg) !important; filter: none !important; }

.cdb-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  padding: 14px 16px;
  color: #7f1d1d;
  font-size: 13px;
}
.cdb-alert ul { margin: 6px 0 0; padding-left: 20px; }

.cdb-form { display: flex; flex-direction: column; gap: 14px; }

.cdb-step {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cdb-step__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.cdb-step__no {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--highlight);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  flex-shrink: 0;
}
.cdb-step__head h2 {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--cockpit-text) !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cdb-step__head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--cockpit-muted);
}
.cdb-step__opt {
  font-size: 10px;
  font-weight: 700;
  color: var(--cockpit-muted);
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  padding: 1px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* --- Apartment picker tiles --- */
.cdb-aparts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.cdb-apart {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  background: var(--cockpit-bg);
  border: 2px solid var(--cockpit-border);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  font-family: inherit;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.cdb-apart:hover {
  transform: translateY(-1px);
  border-color: var(--cockpit-border-strong, var(--cockpit-faint));
  box-shadow: 0 2px 8px rgba(16,24,40,.06);
}
.cdb-apart.is-selected {
  border-color: var(--highlight);
  box-shadow: 0 0 0 2px rgba(228,158,0,.18);
}
.cdb-apart.is-inactive { opacity: .55; }
.cdb-apart__img {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--cockpit-border-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cdb-apart__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cdb-apart__img-placeholder {
  font-size: 28px;
  font-weight: 900;
  color: var(--cockpit-faint);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.cdb-apart__status {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 7px;
  border-radius: 3px;
}
.cdb-apart__body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cdb-apart__body strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--cockpit-text);
}
.cdb-apart__body small {
  font-size: 11px;
  color: var(--cockpit-muted);
}
.cdb-apart__check {
  position: absolute;
  top: 8px; right: 8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--highlight);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .15s, transform .15s;
}
.cdb-apart.is-selected .cdb-apart__check {
  opacity: 1;
  transform: scale(1);
}

/* --- Grid for fields --- */
.cdb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.cdb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cdb-field span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--cockpit-muted);
}
.cdb-field input,
.cdb-field select,
.cdb-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px !important;
  border: 1px solid var(--cockpit-border) !important;
  border-radius: 3px !important;
  background: var(--cockpit-surface) !important;
  font-family: inherit;
  font-size: 14px;
  color: var(--cockpit-text);
}
.cdb-field--wide { grid-column: 1 / -1; }
.cdb-field--readout {
  background: var(--cockpit-yellow-soft);
  border: 1px solid var(--cockpit-yellow-mid);
  border-radius: 3px;
  padding: 8px 12px;
}
.cdb-nights {
  font-size: 18px;
  font-weight: 900;
  color: #92400e;
  line-height: 1.1;
}

/* --- Toggle row --- */
.cdb-toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  border-radius: 3px;
  cursor: pointer;
}
.cdb-toggle input { margin-top: 2px; accent-color: var(--yellow); }
.cdb-toggle span { display: flex; flex-direction: column; gap: 2px; }
.cdb-toggle strong { font-size: 13px; font-weight: 800; color: var(--cockpit-text); }
.cdb-toggle small { font-size: 12px; color: var(--cockpit-muted); }

/* --- Extras circles --- */
.cdb-extras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.cdb-extra {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 14px 10px;
  background: var(--cockpit-bg);
  border: 2px solid var(--cockpit-border);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: transform .12s, border-color .12s, background .12s;
}
.cdb-extra:hover {
  transform: translateY(-1px);
  border-color: var(--cockpit-faint);
}
.cdb-extra.is-selected {
  border-color: var(--highlight);
  background: var(--cockpit-yellow-soft);
}
.cdb-extra input[type="checkbox"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
/* --- Tile layout: photo + centered name + price + minimal stepper --- */
.cdb-extra {
  /* override the inherited gap; we manage spacing per-element */
  gap: 0 !important;
  padding: 16px 12px 14px !important;
}

.cdb-extra__circle {
  display: flex;
  width: 72px; height: 72px;
  margin: 0 auto 10px;        /* center horizontally, gap to name */
  border-radius: 50%;
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background .12s, transform .12s, border-color .12s, box-shadow .12s;
  flex-shrink: 0;
}
.cdb-extra__circle img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cdb-extra__glyph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 28px; line-height: 1;
}
.cdb-extra.has-photo .cdb-extra__circle { background: #fff; }
.cdb-extra.is-selected .cdb-extra__circle {
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(228,158,0,.18);
}

.cdb-extra__name {
  display: block;
  width: 100%;
  margin: 0 auto 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cockpit-text);
  line-height: 1.3;
  text-align: center;
  word-wrap: break-word;
}

.cdb-extra__price {
  display: block;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  line-height: 1.3;
}
.cdb-extra__price strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--cockpit-text);
}
.cdb-extra__price small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--cockpit-muted);
}

/* --- Stepper:  ⊖   1   ⊕   (circular, yellow, only on .has-qty + is-selected) --- */
.cdb-extra__qty {
  display: none;
  margin: 14px auto 0;
  width: auto;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  background: transparent;
  border: 0;
  padding: 0;
}
.cdb-extra.has-qty.is-selected .cdb-extra__qty { display: inline-flex; }

.cdb-qty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  padding: 0;
  background: var(--highlight);
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 3px rgba(228,158,0,.32);
  transition: background .12s, transform .08s, box-shadow .12s;
  flex-shrink: 0;
}
.cdb-qty__btn:hover {
  background: #c98d00;
  box-shadow: 0 2px 5px rgba(228,158,0,.42);
}
.cdb-qty__btn:active { transform: scale(.94); }

.cdb-extra__qty input[data-qty-input] {
  flex: 0 0 28px;
  width: 28px;
  min-width: 0;
  height: 32px;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-align: center;
  border: 0 !important;
  background: transparent !important;
  color: var(--cockpit-text) !important;
  -moz-appearance: textfield;
}
.cdb-extra__qty input[data-qty-input]::-webkit-outer-spin-button,
.cdb-extra__qty input[data-qty-input]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cdb-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--cockpit-muted);
  font-style: italic;
}

/* --- Auto-calculated total panel --- */
.cdb-autocalc {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 5px;
  padding: 14px 16px;
  margin-bottom: 14px;
  transition: opacity .15s;
}
.cdb-autocalc.is-loading { opacity: .65; }
.cdb-autocalc.is-ready {
  border-color: rgba(228,158,0,.45);
  background: #fff;
}

.cdb-autocalc__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.cdb-autocalc__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cockpit-muted);
}
.cdb-autocalc__amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--cockpit-text);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.cdb-autocalc__lines {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cdb-autocalc__lines li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--cockpit-text);
  padding: 2px 0;
  border-bottom: 1px dashed transparent;
}
.cdb-autocalc__lines li span {
  color: var(--cockpit-muted);
  flex: 1;
  min-width: 0;
}
.cdb-autocalc__lines li strong {
  font-weight: 600;
  color: var(--cockpit-text);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.cdb-autocalc__hint {
  font-style: italic;
  color: var(--cockpit-muted) !important;
  font-size: 12px;
}

.cdb-autocalc__apply {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--highlight);
  border: 1px solid var(--highlight);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  transition: background .12s, opacity .12s;
}
.cdb-autocalc__apply:hover:not(:disabled) {
  background: #c98d00;
  border-color: #c98d00;
}
.cdb-autocalc__apply:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.cdb-field__hint {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--cockpit-muted);
  text-transform: none;
  letter-spacing: 0;
}

/* --- Actions footer --- */
.cdb-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- Mobile --- */
@media (max-width: 640px) {
  .cdb-step { padding: 16px; }
  .cdb-step__head h2 { font-size: 14px !important; }
  .cdb-aparts { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cdb-extras-grid { grid-template-columns: repeat(2, 1fr); }
  .cdb-extra__circle { width: 64px; height: 64px; }
  .cdb-extra__glyph { font-size: 24px; }
  .cdb-extra__name { font-size: 12px; }
  .cdb-extra__price strong { font-size: 12px; }
  .cdb-extra__price small { font-size: 10px; }
  .cdb-actions { flex-direction: column-reverse; align-items: stretch; }
  .cdb-actions .bk-detail,
  .cdb-actions .kanban-newbtn { width: 100%; justify-content: center; }
}

/* =========================================================
   guest-codes — clean cockpit-style form + list
   ========================================================= */
.gc-page { display: flex; flex-direction: column; gap: 14px; }
.gc-page__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; flex-wrap: wrap;
}
.gc-page__head h1 {
  margin: 0; font-size: 22px; font-weight: 900;
  letter-spacing: -.02em; color: var(--cockpit-text);
}
.gc-page__head p {
  margin: 4px 0 0; font-size: 13px; color: var(--cockpit-muted);
  max-width: 640px;
}

.gc-card {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  padding: 22px;
}
.gc-card__head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 16px;
}
.gc-card__head h2 {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--cockpit-text) !important;
}
.gc-card__count {
  font-size: 11px; font-weight: 800; color: var(--cockpit-muted);
  background: var(--cockpit-bg); border: 1px solid var(--cockpit-border);
  border-radius: 999px; padding: 2px 9px;
}

.gc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.gc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gc-field > span {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--cockpit-muted);
}
.gc-field input,
.gc-field select {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px !important;
  border: 1px solid var(--cockpit-border) !important;
  border-radius: 3px !important;
  background: var(--cockpit-surface) !important;
  font-family: inherit; font-size: 14px; color: var(--cockpit-text);
}
.gc-field input:focus,
.gc-field select:focus {
  outline: none !important;
  border-color: var(--yellow) !important;
  box-shadow: 0 0 0 2px rgba(228,158,0,.18) !important;
}

.gc-actions { margin-top: 14px; display: flex; justify-content: flex-end; }

.gc-msg {
  padding: 12px 14px; border-radius: 3px; margin-bottom: 14px;
  font-size: 13px;
}
.gc-ok  { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.gc-err { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }

.gc-empty {
  padding: 30px 16px; text-align: center;
  color: var(--cockpit-muted); font-size: 13px;
  background: var(--cockpit-bg); border-radius: 3px;
}

.gc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gc-table th {
  text-align: left;
  font-size: 10px !important; font-weight: 800 !important;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--cockpit-muted) !important;
  background: var(--cockpit-bg) !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid var(--cockpit-border) !important;
}
.gc-table td {
  padding: 11px 12px !important;
  border-bottom: 1px solid var(--cockpit-border-soft) !important;
  vertical-align: middle;
}
.gc-table tbody tr:hover { background: var(--cockpit-hover); }
.gc-table tbody tr:last-child td { border-bottom: none !important; }

/* =========================================================
   Entrance System (manage-entrance-system.php) — multi-door cockpit
   ========================================================= */
.entry-page { display: flex; flex-direction: column; gap: 14px; }
.entry-page__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; flex-wrap: wrap;
}
.entry-page__head h1 {
  margin: 0; font-size: 22px; font-weight: 900;
  letter-spacing: -.02em; color: var(--cockpit-text);
}
.entry-page__head p {
  margin: 4px 0 0; font-size: 13px; color: var(--cockpit-muted);
  max-width: 720px;
}

.entry-empty {
  padding: 30px 16px; text-align: center;
  color: var(--cockpit-muted); font-size: 13px;
  background: var(--cockpit-surface); border: 1px dashed var(--cockpit-border);
  border-radius: 4px;
}
.entry-empty--inline { padding: 18px 12px; }

.entry-card {
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  border-radius: 4px;
  overflow: hidden;
}
.entry-card__head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cockpit-border-soft);
  background: var(--cockpit-bg);
}
.entry-card__title {
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.entry-card__title strong {
  display: block; font-size: 15px; font-weight: 800;
  color: var(--cockpit-text); letter-spacing: -.01em;
}
.entry-card__title small {
  display: block; font-size: 12px; color: var(--cockpit-muted);
  margin-top: 2px;
}
.entry-card__title small code {
  font-size: 10px; font-family: 'SF Mono', Menlo, Consolas, monospace;
  padding: 1px 5px; background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border); border-radius: 2px;
  color: var(--cockpit-muted);
}
.entry-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 4px;
  background: var(--cockpit-yellow-soft);
  color: var(--yellow, #e49e00);
  flex-shrink: 0;
}
.entry-card__actions {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.entry-actform { margin: 0; display: inline-block; }

.entry-card__body { padding: 16px 20px 20px; }

.entry-codes-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 10px;
}
.entry-codes-head h3 {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--cockpit-text) !important;
  text-transform: uppercase; letter-spacing: .05em;
}
.entry-codes-count {
  font-size: 10px; font-weight: 800;
  color: var(--cockpit-muted);
  background: var(--cockpit-bg); border: 1px solid var(--cockpit-border);
  border-radius: 999px; padding: 1px 7px;
  margin-left: 6px;
}

.entry-codes-table td, .entry-codes-table th { font-size: 13px; }

/* --- Buttons --- */
.entry-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; font-size: 12px; font-weight: 800;
  background: var(--cockpit-surface);
  border: 1px solid var(--cockpit-border);
  color: var(--cockpit-text);
  border-radius: 3px; cursor: pointer;
  text-decoration: none; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.entry-btn:hover:not(:disabled) {
  background: var(--cockpit-bg);
  border-color: var(--cockpit-faint);
}
.entry-btn:disabled { opacity: .5; cursor: not-allowed; }
.entry-btn--primary {
  background: var(--yellow, #e49e00);
  border-color: var(--yellow, #e49e00);
  color: #111;
}
.entry-btn--primary:hover:not(:disabled) {
  filter: brightness(.96);
  background: var(--yellow, #e49e00);
  border-color: var(--yellow, #e49e00);
}
.entry-btn--ghost {
  background: transparent;
  border-color: var(--cockpit-border);
  color: var(--cockpit-text-soft);
}
.entry-btn--danger {
  color: #b91c1c; border-color: #fecaca;
}
.entry-btn--danger:hover { background: #fee2e2; }
.entry-btn--small { padding: 5px 10px; font-size: 11px; }

/* --- PIN mask (blurred until hover / click) --- */
.pin-mask {
  display: inline-flex; align-items: center;
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  border-radius: 3px;
  padding: 4px 12px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 14px; font-weight: 800;
  letter-spacing: .15em;
  color: var(--cockpit-text);
  cursor: pointer;
  user-select: none;
  font: inherit;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 800;
}
.pin-mask__value {
  filter: blur(5px);
  transition: filter .15s ease;
  -webkit-user-select: all;
  user-select: all;
}
.pin-mask:hover .pin-mask__value,
.pin-mask:focus .pin-mask__value,
.pin-mask.is-revealed .pin-mask__value {
  filter: blur(0);
}
.pin-mask.is-revealed {
  background: var(--cockpit-yellow-soft);
  border-color: var(--cockpit-yellow-mid);
}

/* --- Inline code-creation form --- */
.entry-codeform {
  margin-top: 12px;
  padding: 16px;
  background: var(--cockpit-bg);
  border: 1px solid var(--cockpit-border);
  border-radius: 3px;
}
.entry-codeform__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.entry-codeform__actions {
  margin-top: 12px;
  display: flex; gap: 8px; justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--cockpit-border-soft);
}

@media (max-width: 720px) {
  .entry-card__head { flex-direction: column; align-items: stretch; }
  .entry-card__actions { width: 100%; }
  .entry-card__actions .entry-btn { flex: 1 1 0; justify-content: center; }
}

/* =========================================================
   Availability calendar pages — Loftigo FullCalendar polish
   ========================================================= */
.cockpit-content .fc-day-today {
  background: var(--cockpit-yellow-soft) !important;
}
.cockpit-content .fc-day-today .fc-daygrid-day-number {
  color: #92400e !important;
  font-weight: 800;
}
.cockpit-content .fc-daygrid-day-number,
.cockpit-content .fc-list-day-cushion {
  font-size: 12px !important;
}
.cockpit-content .fc-event {
  cursor: pointer;
  padding: 3px 6px !important;
  font-weight: 600 !important;
}
.cockpit-content .fc-event:hover { opacity: .9; }
.cockpit-content .fc-list-event:hover td { background: var(--cockpit-yellow-soft) !important; }
.cockpit-content .fc .fc-toolbar.fc-header-toolbar { margin-bottom: 12px !important; }
.cockpit-content .fc .fc-toolbar-chunk { gap: 6px; display: flex; }
.cockpit-content .fc-toolbar-title { color: var(--cockpit-text) !important; }
.cockpit-content .fc .fc-list-empty { background: var(--cockpit-bg); color: var(--cockpit-muted); }

/* =========================================================
   Mobile App-Nav (bottom bar — staff-first UX)
   ========================================================= */
.app-nav { display: none; }

@media (max-width: 1100px) {
  .cockpit-grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cockpit-grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cockpit-userpill__meta { display: none; }
  .cockpit-userpill__btn { padding: 4px; }
  .cockpit-userpill__chev { display: none; }
}

@media (max-width: 860px) {
  /* ---- Mailbox on mobile: stack folders above list ---- */
  .mailbox { grid-template-columns: 1fr; }
  .mailbox__folders { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .mailbox__folder-list { flex-direction: row; padding: 4px; }
  .mailbox__folder { white-space: nowrap; }
  .mailbox__item-link { grid-template-columns: 1fr; gap: 4px; padding: 12px 14px; }
  .mailbox__item-sender { font-size: 13px; }
  .mailbox__item-snippet { white-space: normal; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .mailcompose__row { grid-template-columns: 1fr; gap: 4px; align-items: stretch; }
  .mailcompose__row label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--cockpit-muted); }

  .cockpit-shell { grid-template-columns: 1fr; }
  .cockpit-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 290px;
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 200;
    box-shadow: 0 0 40px rgba(0,0,0,.18);
    will-change: transform;
  }
  body.cockpit-menu-open .cockpit-sidebar { transform: translateX(0); }
  body.cockpit-menu-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 150;
    cursor: pointer;
  }
  .cockpit-topbar__menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .cockpit-topbar { padding: 0 14px; gap: 10px; }
  .cockpit-search { max-width: none; flex: 1; }
  .cockpit-search__input { padding: 10px 14px 10px 40px; font-size: 13px; }
  .cockpit-iconbtn { width: 38px; height: 38px; }
  .cockpit-iconbtn--dot:not(:first-child) { display: none; }  /* keep only one notification dot on mobile */
  .cockpit-pagetitle { font-size: 22px; margin-bottom: 16px; }
  .cockpit-content {
    padding: 18px 14px calc(90px + env(safe-area-inset-bottom, 0px));
  }
  .cockpit-footer { display: none; }
  .cockpit-grid--4,
  .cockpit-grid--3,
  .cockpit-grid--2 { grid-template-columns: 1fr; }

  /* ----- Bottom tab bar ----- */
  .app-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cockpit-surface);
    border-top: 1px solid var(--cockpit-border);
    z-index: 90;
    padding: 4px 4px env(safe-area-inset-bottom, 6px);
    box-shadow: 0 -2px 18px rgba(0,0,0,.06);
    gap: 2px;
  }
  .app-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--cockpit-muted);
    font-size: 11px;
    font-weight: 800;
    padding: 8px 4px 6px;
    border-radius: 4px;
    min-height: 58px;
    transition: color .15s, background .15s;
    -webkit-tap-highlight-color: rgba(228,158,0,.18);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    touch-action: manipulation;
    position: relative;
  }
  .app-nav__item:active { background: var(--cockpit-yellow-soft); }
  .app-nav__item.is-active { color: var(--highlight); }
  .app-nav__item.is-active .app-nav__icon { color: var(--highlight); }
  .app-nav__item.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 32px;
    height: 3px;
    background: var(--highlight);
    border-radius: 0 0 6px 6px;
  }
  .app-nav__icon { font-size: 22px; line-height: 1; color: var(--cockpit-text); pointer-events: none; }
  .app-nav__label { line-height: 1.1; pointer-events: none; }
  .app-nav__avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid transparent; pointer-events: none; }
  body.cockpit-menu-open .app-nav__item--more .app-nav__avatar { border-color: var(--highlight); }
  body.cockpit-menu-open .app-nav__item--more { color: var(--highlight); }
}

/* =====================================================================
   Availability (minimal redesign — single + all apartments)
   ===================================================================== */
.avail-page { display: flex; flex-direction: column; gap: 10px; }

.avail-page__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.avail-page__title {
  margin: 0; font-size: 16px; line-height: 1.2; font-weight: 600;
  color: #111;
}
.avail-page__sub { display: none; } /* zu groß — wird ausgeblendet, header bleibt schlank */
.avail-page__actions { display: flex; gap: 6px; }

/* Buttons */
.avail-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; height: 32px; padding: 0 12px;
  font-size: 13px; font-weight: 600; line-height: 1;
  border-radius: 4px; border: 1px solid #d8dbe0; background: #fff;
  color: #111; cursor: pointer; text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
}
.avail-btn:hover { border-color: #b6bac1; }
.avail-btn--ghost { background: #fff; color: #374151; }
.avail-btn--primary {
  background: var(--cockpit-yellow, #e49e00); border-color: var(--cockpit-yellow, #e49e00); color: #fff;
}
.avail-btn--primary:hover { background: #c98d00; border-color: #c98d00; }
.avail-btn--danger { color: #b91c1c; border-color: #fecaca; background: #fff; }
.avail-btn--danger:hover { background: #fef2f2; border-color: #f87171; }
.avail-btn--full { width: 100%; }

/* Circular apartment picker (top of the page) */
.avail-aps {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 4px 2px 10px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
}
.avail-aps::-webkit-scrollbar { height: 6px; }
.avail-aps::-webkit-scrollbar-thumb { background: #e2e4e8; border-radius: 999px; }
.avail-ap {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  flex: 0 0 auto; width: 76px;
  background: none; border: 0; padding: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.avail-ap__img {
  position: relative;
  width: 60px; height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: #f3f4f6;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px #e6e8ec;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.avail-ap__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.avail-ap__ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 16px; font-weight: 700; color: #9aa0a6;
  letter-spacing: .02em;
}
.avail-ap__name {
  font-size: 12px; font-weight: 500; line-height: 1.2;
  color: #6b7280; text-align: center;
  max-width: 76px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.avail-ap:hover .avail-ap__img {
  border-color: rgba(228, 158, 0, .45);
  transform: translateY(-1px);
}
.avail-ap.is-active .avail-ap__img {
  border-color: var(--highlight, #e49e00);
  box-shadow: 0 0 0 3px rgba(228, 158, 0, .20);
}
.avail-ap.is-active .avail-ap__name {
  color: var(--highlight, #e49e00); font-weight: 700;
}
.avail-ap.is-inactive .avail-ap__img { filter: grayscale(.55); opacity: .8; }

/* Toolbar — kein eigenes Card, inline */
.avail-toolbar {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 10px;
  padding: 0;
}
.avail-select {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: #374151;
}
.avail-select > span { font-weight: 600; color: #6b7280; }
.avail-select select {
  height: 30px; padding: 0 10px; font-size: 13px;
  border: 1px solid #d8dbe0; border-radius: 4px; background: #fff;
  color: #111; min-width: 220px; max-width: 320px;
}
.avail-select select:focus { outline: none; border-color: var(--cockpit-yellow, #e49e00); }

.avail-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.avail-legend span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: #4b5563;
}

.avail-dot {
  width: 8px; height: 8px; border-radius: 999px;
  display: inline-block; flex-shrink: 0;
}
.avail-dot--external   { background: #dc3545; }
.avail-dot--internal   { background: #e49e00; }
.avail-dot--cleaning   { background: #16a34a; }
.avail-dot--manual     { background: #9ca3af; }
.avail-dot--dependency { background: #374151; }

/* Filters (all-apartments view) */
.avail-toolbar--all { gap: 10px; }
.avail-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.avail-filter { display: inline-flex; cursor: pointer; }
.avail-filter input {
  position: absolute; opacity: 0; pointer-events: none;
}
.avail-filter span {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border: 1px solid #d8dbe0; border-radius: 4px;
  background: #fff; font-size: 12px; font-weight: 500; color: #374151;
}
.avail-filter input:checked + span {
  background: #f9fafb; border-color: #9ca3af; color: #111;
}
.avail-filter input:not(:checked) + span { opacity: .55; }

.avail-search input {
  height: 30px; padding: 0 12px;
  border: 1px solid #d8dbe0; border-radius: 4px; background: #fff;
  font-size: 13px; color: #111; outline: none;
  width: min(260px, 60vw);
}
.avail-search input:focus { border-color: var(--cockpit-yellow, #e49e00); }

/* Layout */
.avail-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px;
  gap: 12px; align-items: start;
}

.avail-card {
  background: #fff; border: 1px solid #e6e8ec;
  border-radius: 5px; padding: 12px;
}
.avail-card--calendar { padding: 10px; overflow: hidden; }

.avail-card__title {
  margin: 0 0 8px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  color: #6b7280;
}
.avail-card__hint {
  margin: 0 0 12px; font-size: 12px; line-height: 1.45;
  color: #6b7280;
}

.avail-side {
  display: flex; flex-direction: column; gap: 14px;
}

/* Form */
.avail-form { display: flex; flex-direction: column; gap: 10px; }
.avail-field { display: flex; flex-direction: column; gap: 4px; }
.avail-field > span {
  font-size: 11px; font-weight: 600; color: #6b7280;
  text-transform: uppercase; letter-spacing: .04em;
}
.avail-field input,
.avail-field textarea,
.avail-field select {
  height: 32px; padding: 0 10px; font-size: 13px;
  border: 1px solid #d8dbe0; border-radius: 4px; background: #fff;
  color: #111; outline: none; width: 100%;
  font-family: inherit;
}
.avail-field textarea { height: auto; padding: 8px 10px; line-height: 1.4; resize: vertical; }
.avail-field input:focus,
.avail-field textarea:focus,
.avail-field select:focus { border-color: var(--cockpit-yellow, #e49e00); }

.avail-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Event panel */
.avail-event__apt {
  padding: 10px 12px; background: #fef9ec;
  border: 1px solid #fde9b0; border-radius: 4px;
  margin-bottom: 10px;
}
.avail-event__apt span {
  display: block; font-size: 10px; font-weight: 700;
  color: #92722a; text-transform: uppercase; letter-spacing: .06em;
}
.avail-event__apt strong {
  display: block; margin-top: 2px; font-size: 15px;
  font-weight: 700; color: #111;
}

.avail-event__list {
  margin: 0; padding: 0;
  display: grid; grid-template-columns: max-content 1fr;
  gap: 6px 14px; font-size: 12px;
}
.avail-event__list dt { color: #6b7280; font-weight: 500; }
.avail-event__list dd {
  margin: 0; color: #111; font-weight: 600;
  text-align: right; word-break: break-word;
}

.avail-event__desc {
  margin-top: 10px; padding: 10px;
  background: #f9fafb; border-radius: 4px;
  font-size: 12px; line-height: 1.45; color: #374151;
}
.avail-event__delete { margin-top: 12px; }

/* Apartment list */
.avail-aplist {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 360px; overflow: auto; padding-right: 2px;
}
.avail-aplist__row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 4px;
  background: #f9fafb; font-size: 12px;
}
.avail-aplist__row strong { font-weight: 600; color: #111; }
.avail-aplist__row span { color: #6b7280; }

/* FullCalendar overrides for minimal look */
.avail-card--calendar .fc { font-size: 12px; }
.avail-card--calendar .fc .fc-toolbar-title {
  font-size: 15px; font-weight: 700; color: #111;
}
.avail-card--calendar .fc .fc-toolbar { gap: 8px; }
.avail-card--calendar .fc .fc-button {
  background: #fff; border: 1px solid #d8dbe0; color: #374151;
  font-weight: 500; font-size: 12px;
  padding: 4px 10px; box-shadow: none; text-transform: capitalize;
  border-radius: 4px;
}
.avail-card--calendar .fc .fc-button:not(:disabled):hover {
  background: #f3f4f6; border-color: #b6bac1; color: #111;
}
.avail-card--calendar .fc .fc-button-primary:not(:disabled).fc-button-active,
.avail-card--calendar .fc .fc-button-primary:not(:disabled):active {
  background: var(--cockpit-yellow, #e49e00);
  border-color: var(--cockpit-yellow, #e49e00); color: #fff;
}
.avail-card--calendar .fc .fc-today-button:disabled {
  opacity: .55; background: #fff; color: #6b7280;
}
.avail-card--calendar .fc-theme-standard td,
.avail-card--calendar .fc-theme-standard th,
.avail-card--calendar .fc-theme-standard .fc-scrollgrid {
  border-color: #eef0f3;
}
.avail-card--calendar .fc-col-header-cell-cushion {
  font-size: 11px; font-weight: 600; color: #6b7280;
  text-transform: uppercase; letter-spacing: .04em;
}
.avail-card--calendar .fc-daygrid-day-number {
  font-size: 12px; font-weight: 500; color: #374151;
}
.avail-card--calendar .fc-day-today { background: #fffbeb !important; }
.avail-card--calendar .fc-daygrid-event {
  border-radius: 3px; padding: 1px 4px; font-size: 11px;
  border: none;
}
.avail-fc-event {
  display: flex; align-items: center; gap: 5px;
  line-height: 1.15; overflow: hidden;
}
.avail-fc-event__body {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0; flex: 1;
}
.avail-fc-event strong {
  font-size: 11px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.avail-fc-event span {
  font-size: 10px; opacity: .92;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Circular platform logo at the start of an event (Airbnb / Booking / Loftigo) */
.avail-fc-logo {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85);
}

/* Single-apartment view: events are one line, logo + title */
.avail-fc-event--single {
  gap: 6px; padding: 1px 2px;
}
.avail-fc-event__title {
  font-size: 11px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; flex: 1;
}

/* Logo in the selected-event side panel */
.avail-event__platform {
  display: inline-flex; align-items: center; gap: 7px;
}
.avail-event__platform .avail-fc-logo {
  width: 20px; height: 20px;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .12);
}

/* ── Event popup (appears on event click) ─────────────────────────────── */
.avail-event-popup {
  position: absolute;
  z-index: 9999;
  width: 280px;
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.07);
  font-size: 13px;
  color: #1c1c1c;
  overflow: hidden;
  animation: ep-in .12s ease;
}
@keyframes ep-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ep-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 13px 10px;
  border-bottom: 1px solid #f0f2f5;
}
.ep-logo { flex: 0 0 auto; }
.ep-logo .avail-fc-logo { width: 28px; height: 28px; margin-top: 1px; }
.ep-head__text { flex: 1; min-width: 0; }
.ep-title {
  display: block; font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #111;
}
.ep-platform { display: block; font-size: 11px; color: #6b7280; margin-top: 2px; }
.ep-close {
  flex: 0 0 auto; background: none; border: none; padding: 0;
  width: 22px; height: 22px; line-height: 22px; text-align: center;
  font-size: 12px; color: #9ca3af; cursor: pointer; border-radius: 4px;
  transition: background .1s, color .1s;
}
.ep-close:hover { background: #f3f4f6; color: #374151; }

.ep-table {
  width: 100%; border-collapse: collapse;
  padding: 8px 13px; display: table;
}
.ep-table tr + tr th,
.ep-table tr + tr td { border-top: 1px solid #f0f2f5; }
.ep-table th {
  padding: 6px 13px; text-align: left; font-weight: 500;
  color: #6b7280; font-size: 12px; white-space: nowrap; width: 100px;
}
.ep-table td {
  padding: 6px 13px 6px 0; font-size: 13px; font-weight: 600; color: #111;
}

.ep-action {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; padding: 10px 13px;
  border-top: 1px solid #f0f2f5;
  background: #fafafa;
  text-decoration: none;
  font-size: 13px; font-weight: 600;
  color: var(--highlight, #e49e00);
  transition: background .12s;
}
.ep-action:hover { background: #fff8e6; }
.ep-action svg { flex: 0 0 auto; }

.ep-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px; text-transform: uppercase;
  letter-spacing: .04em; vertical-align: middle; margin-left: 4px;
}
.ep-badge--green  { background: #dcfce7; color: #15803d; }
.ep-badge--yellow { background: #fef9c3; color: #92400e; }
.ep-badge--red    { background: #fee2e2; color: #b91c1c; }
.ep-badge--grey   { background: #f3f4f6; color: #6b7280; }

@media (max-width: 1080px) {
  .avail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .avail-toolbar { padding: 8px; }
  .avail-select select { min-width: 0; flex: 1; }
  .avail-select { width: 100%; }
  .avail-search input { width: 100%; }
  .avail-page__title { font-size: 18px; }
  .avail-field-row { grid-template-columns: 1fr; }
  .avail-card { padding: 12px; }
  .avail-card--calendar { padding: 8px; }
  .avail-card--calendar .fc .fc-toolbar {
    flex-direction: column; align-items: stretch;
  }
}

/* =====================================================================
   Heating dashboard (apartment tiles → drill-down with thermostat)
   ===================================================================== */
.heat-page { display: flex; flex-direction: column; gap: 14px; }

.heat-page__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.heat-page__head h1 {
  margin: 0; font-size: 20px; font-weight: 700;
  letter-spacing: -.01em; color: #111;
}
.heat-page__head p {
  margin: 4px 0 0; font-size: 13px; color: #6b7280;
}

.heat-back {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  font-size: 12px; font-weight: 600; text-decoration: none;
  color: #374151; background: #fff;
  border: 1px solid #d8dbe0; border-radius: 4px;
}
.heat-back:hover { border-color: #9ca3af; color: #111; }

/* Summer mode banner — clearer + simpler */
.heat-summer {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: #fff; border: 1px solid #e6e8ec;
  border-radius: 5px;
}
.heat-summer.is-on {
  background: #fff7ed; border-color: #fed7aa;
}
.heat-summer__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 4px;
  background: #f3f4f6; color: #6b7280; font-size: 22px;
  flex-shrink: 0;
}
.heat-summer.is-on .heat-summer__icon {
  background: #fdba74; color: #7c2d12;
}
.heat-summer__body { flex: 1; min-width: 0; }
.heat-summer__body h3,
.heat-summer__body strong {
  display: block; margin: 0; font-size: 14px; font-weight: 700; color: #111;
}
.heat-summer__body p {
  margin: 2px 0 0; font-size: 12px; color: #4b5563; line-height: 1.45;
}
.heat-summer__body p strong { display: inline; font-size: inherit; }
.heat-summer__actions { display: flex; gap: 8px; flex-shrink: 0; }

.heat-summer-banner {
  padding: 10px 14px;
  background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 5px;
  font-size: 13px; color: #7c2d12;
  display: flex; align-items: center; gap: 10px;
}
.heat-summer-banner strong { font-weight: 700; }

/* Apartment grid (overview) */
.heat-apt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.heat-apt {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  background: #fff; border: 1px solid #e6e8ec;
  border-radius: 5px; text-decoration: none; color: inherit;
  transition: border-color .12s, box-shadow .12s, transform .08s;
}
.heat-apt:hover {
  border-color: #b6bac1;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.heat-apt:active { transform: translateY(1px); }

.heat-apt__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px;
}
.heat-apt__head strong {
  font-size: 14px; font-weight: 700; color: #111;
  line-height: 1.2;
}
.heat-apt__head span,
.heat-apt__head small {
  font-size: 11px; color: #6b7280;
}

.heat-apt__temp {
  font-size: 30px; font-weight: 700; color: #111;
  letter-spacing: -.02em; line-height: 1;
}
.heat-apt__temp small {
  font-size: 14px; font-weight: 600; color: #6b7280;
  margin-left: 2px;
}
.heat-apt__temp--idle { color: #9ca3af; }

.heat-apt__metric {
  display: flex; flex-direction: column; gap: 4px;
}
.heat-apt__metric small {
  font-size: 11px; color: #6b7280;
}

.heat-apt__foot {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: auto;
}

.heat-apt__chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; font-size: 11px; font-weight: 600;
  border-radius: 999px;
  background: #f3f4f6; color: #4b5563;
  border: 1px solid #e5e7eb;
}
.heat-apt__chip--warn {
  background: #fef2f2; color: #b91c1c; border-color: #fecaca;
}
.heat-apt__chip--info {
  background: #eff6ff; color: #1e40af; border-color: #bfdbfe;
}
.heat-apt__chip--summer {
  background: #fff7ed; color: #7c2d12; border-color: #fed7aa;
}

/* Room drill-down */
.heat-rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.heat-room {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px;
  background: #fff; border: 1px solid #e6e8ec;
  border-radius: 5px;
}
.heat-room.is-locked { opacity: .65; }
.heat-room.is-locked .heat-stepper button { pointer-events: none; }

.heat-room__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.heat-room__head h3,
.heat-room__head strong {
  margin: 0; font-size: 14px; font-weight: 700; color: #111;
}

.heat-room__chips { display: flex; gap: 4px; flex-wrap: wrap; }

.heat-room__thermo {
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  padding: 12px 0;
}

.heat-stepper {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 4px; border: 1px solid #d8dbe0;
  background: #fff; color: #111;
  font-size: 18px; font-weight: 700; cursor: pointer;
  line-height: 1; flex-shrink: 0;
  user-select: none;
}
.heat-stepper:hover { background: #f3f4f6; border-color: #9ca3af; }
.heat-stepper:active { background: #e5e7eb; }
.heat-stepper[disabled] {
  opacity: .4; cursor: not-allowed; background: #f9fafb;
}

.heat-room__temp {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-size: 32px; font-weight: 700; color: #111;
  letter-spacing: -.02em; line-height: 1;
  min-width: 80px; justify-content: center;
}
.heat-room__temp strong { font-weight: 700; }
.heat-room__temp span,
.heat-room__temp small {
  font-size: 14px; font-weight: 600; color: #6b7280;
}

.heat-room__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding-top: 10px; border-top: 1px solid #f3f4f6;
  font-size: 11px; color: #6b7280;
}
.heat-room__foot small { font-size: 11px; color: #6b7280; }
.heat-room__foot > div {
  display: flex; gap: 6px; flex-shrink: 0;
}
.heat-room__foot .avail-btn,
.heat-room__foot .heat-btn,
.heat-room__foot .entry-btn { flex: 1; }

.heat-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; height: 30px; padding: 0 10px;
  font-size: 12px; font-weight: 600;
  border: 1px solid #d8dbe0; border-radius: 4px;
  background: #fff; color: #111; cursor: pointer;
  text-decoration: none;
}
.heat-btn:hover { border-color: #9ca3af; background: #f9fafb; }
.heat-btn--primary {
  background: var(--cockpit-yellow, #e49e00);
  border-color: var(--cockpit-yellow, #e49e00); color: #fff;
}
.heat-btn--primary:hover { background: #c98d00; border-color: #c98d00; }
.heat-btn--ghost { background: #fff; color: #6b7280; }

@media (max-width: 720px) {
  .heat-summer { flex-direction: column; align-items: flex-start; }
  .heat-summer__actions { width: 100%; }
  .heat-summer__actions .avail-btn,
  .heat-summer__actions .heat-btn { flex: 1; }
  .heat-page__head h1 { font-size: 18px; }
  .heat-apt-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .heat-rooms { grid-template-columns: 1fr; }
  .heat-room { padding: 14px; }
  .heat-room__temp { font-size: 28px; }
}

/* =====================================================================
   Dashboard (role-aware hero with profile + live timer)
   ===================================================================== */
.dash-flash {
  padding: 10px 14px; border-radius: 5px; font-size: 13px; font-weight: 600;
  margin-bottom: 14px;
}
.dash-flash--ok  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.dash-flash--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.dash-hero {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.dash-hero-card {
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 8px;
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
  position: relative;
}

/* --- Card 1: Greeting ---------------------------------------------------- */
.dash-hero-card--greet {
  text-align: center;
  align-items: center;
}
.dash-hero__date {
  font-size: 12px; color: #6b7280; font-weight: 500;
}
.dash-hero-card--greet h1 {
  margin: 0; font-size: 22px; font-weight: 700; color: #111;
  letter-spacing: -.01em;
}
.dash-hero__avatar {
  margin: 4px 0 6px;
}
.dash-hero__avatar img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #e6e8ec, 0 4px 14px rgba(0,0,0,.06);
}
.dash-hero-card--greet p {
  margin: 0; font-size: 13px; color: #6b7280; line-height: 1.45;
  max-width: 240px;
}

/* --- Card 2: Achievement ------------------------------------------------- */
.dash-hero-card--stat {
  align-items: center; text-align: center;
}
.dash-hero__stat-head {
  display: flex; flex-direction: column; gap: 6px;
}
.dash-hero__stat-head strong {
  font-size: 18px; font-weight: 700; color: #111;
}
.dash-hero__stat-head > span {
  font-size: 12px; color: #6b7280; line-height: 1.45;
}
.dash-hero__stat-head strong + span strong {
  color: #111; font-weight: 700;
}
.dash-hero__stat-illu {
  display: flex; align-items: center; justify-content: center;
  margin: 2px 0;
}
.dash-hero__stat-foot {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #4b5563;
}
.dash-hero__stat-foot strong {
  font-size: 14px; color: #111; font-weight: 700;
}
.dash-hero__stat-foot em {
  font-style: normal; font-size: 11px; color: #6b7280; font-weight: 500;
}

/* --- Card 3: Live timer -------------------------------------------------- */
.dash-hero-card--timer {
  align-items: center; text-align: center;
}
.dash-timer__title {
  font-size: 13px; color: #6b7280; font-weight: 600;
}
.dash-timer__ring {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  margin: 4px 0;
}
.dash-timer__svg .dash-timer__progress {
  transition: stroke-dashoffset .4s linear;
}
.dash-timer__time {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.dash-timer__time strong {
  font-size: 22px; font-weight: 700; color: #111;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.dash-timer__time small {
  font-size: 10px; color: #6b7280; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.dash-timer__actions {
  display: flex; gap: 8px; justify-content: center;
  width: 100%;
}
.dash-timer-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; height: 38px; padding: 0 16px;
  border: 1px solid #d8dbe0; background: #fff; color: #111;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border-radius: 5px;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}
.dash-timer-btn:hover {
  background: #f9fafb; border-color: #9ca3af;
}
.dash-timer-btn--primary {
  background: var(--cockpit-yellow, #e49e00);
  border-color: var(--cockpit-yellow, #e49e00); color: #fff;
}
.dash-timer-btn--primary:hover { background: #c98d00; border-color: #c98d00; }
.dash-timer-btn--danger {
  background: #fff; border-color: #fecaca; color: #b91c1c;
}
.dash-timer-btn--danger:hover { background: #fef2f2; border-color: #f87171; }
.dash-timer-btn svg { flex-shrink: 0; }
.dash-timer__since {
  font-size: 11px; color: #6b7280; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.dash-timer__notice {
  font-size: 12px; color: #6b7280; padding: 8px 12px;
  background: #f9fafb; border-radius: 4px;
}

/* --- 30-day chart card --------------------------------------------------- */
.dash-chart-card {
  background: #fff; border: 1px solid #e6e8ec; border-radius: 8px;
  padding: 18px; margin-bottom: 18px;
}
.dash-chart-card header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.dash-chart-card h2 {
  margin: 0; font-size: 15px; font-weight: 700; color: #111;
}
.dash-chart-card header small {
  display: block; font-size: 12px; color: #6b7280; margin-top: 2px;
}
.dash-chart-wrap {
  position: relative; height: 200px;
}
.dash-muted { color: #6b7280; font-size: 12px; font-weight: 500; }

/* --- 4-tile grid (my work / management) ---------------------------------- */
.dash-mygrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.dash-tile {
  position: relative;
  background: #fff; border: 1px solid #e6e8ec; border-radius: 8px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .12s, box-shadow .12s;
}
.dash-tile:hover { border-color: #b6bac1; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.dash-tile__link {
  position: absolute; inset: 0; z-index: 1;
}
.dash-tile__icon {
  width: 38px; height: 38px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; margin-bottom: 4px;
}
.dash-tile__icon--blue   { background: #3b82f6; }
.dash-tile__icon--green  { background: #16a34a; }
.dash-tile__icon--yellow { background: #e49e00; }
.dash-tile__icon--red    { background: #dc2626; }
.dash-tile__icon--violet { background: #8b5cf6; }
.dash-tile__value {
  font-size: 22px; font-weight: 700; color: #111;
  letter-spacing: -.01em; line-height: 1.1;
}
.dash-tile__label {
  font-size: 12px; color: #6b7280; font-weight: 500;
}

/* --- Two-col list cards -------------------------------------------------- */
.dash-twocol {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 18px;
}
.dash-card {
  background: #fff; border: 1px solid #e6e8ec; border-radius: 8px;
  padding: 16px;
}
.dash-card--wide { grid-column: span 1; }
.dash-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.dash-card__head h2 {
  margin: 0; font-size: 14px; font-weight: 700; color: #111;
}
.dash-card__head small {
  display: block; font-size: 11px; color: #6b7280; margin-top: 2px;
}
.dash-card__link {
  font-size: 12px; color: #e49e00; text-decoration: none; font-weight: 600;
}
.dash-card__link:hover { text-decoration: underline; }

.dash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dash-list__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px; border-radius: 4px;
  background: #f9fafb;
}
.dash-list__row strong {
  display: block; font-size: 13px; font-weight: 600; color: #111;
}
.dash-list__row small {
  display: block; font-size: 11px; color: #6b7280;
}
.dash-list--compact .dash-list__row { padding: 8px 10px; }

.dash-pill {
  display: inline-flex; align-items: center;
  padding: 2px 8px; font-size: 11px; font-weight: 600;
  border-radius: 999px;
  background: #e5e7eb; color: #374151;
  text-decoration: none;
  flex-shrink: 0;
}
.dash-pill--confirmed,
.dash-pill--active,
.dash-pill--in_progress  { background: #d1fae5; color: #065f46; }
.dash-pill--pending,
.dash-pill--assigned,
.dash-pill--open         { background: #fef3c7; color: #92400e; }
.dash-pill--cancelled,
.dash-pill--rejected     { background: #fee2e2; color: #991b1b; }

.dash-legend {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: #6b7280;
}
.dash-legend span { display: inline-flex; align-items: center; gap: 4px; }
.dash-dot {
  width: 8px; height: 8px; border-radius: 999px; display: inline-block;
}

/* --- Modal (clock-out confirm) ------------------------------------------- */
.dash-modal {
  position: fixed; inset: 0; z-index: 9999; display: none;
}
.dash-modal.is-open { display: block; }
.dash-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}
.dash-modal__dialog {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 28px));
  background: #fff; border-radius: 8px;
  padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
  border: 1px solid #e6e8ec;
}
.dash-modal__dialog h2 {
  margin: 0 0 10px; font-size: 17px; font-weight: 700; color: #111;
}
.dash-modal__dialog p {
  margin: 8px 0; font-size: 13px; color: #4b5563; line-height: 1.55;
}
.dash-modal__dialog p strong { color: #111; font-weight: 700; }
.dash-modal__note {
  padding: 10px 12px; background: #fef3c7; border-radius: 4px;
  color: #92400e !important; font-weight: 600;
}
.dash-modal__actions {
  display: flex; flex-direction: column; gap: 8px; margin-top: 16px;
}
.dash-modal__actions .dash-timer-btn { width: 100%; height: 40px; }
.dash-modal__close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border: 0; border-radius: 999px;
  background: #f3f4f6; color: #6b7280; font-size: 20px;
  cursor: pointer; line-height: 1;
}
.dash-modal__close:hover { background: #e5e7eb; color: #111; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1100px) {
  .dash-hero { grid-template-columns: 1fr 1fr; }
  .dash-hero-card--timer { grid-column: span 2; flex-direction: row; flex-wrap: wrap; }
  .dash-hero-card--timer .dash-timer__ring { flex: 0 0 auto; }
  .dash-hero-card--timer .dash-timer__title { width: 100%; text-align: center; }
  .dash-hero-card--timer .dash-timer__actions { flex: 1; min-width: 200px; }
  .dash-hero-card--timer .dash-timer__since { width: 100%; text-align: center; }
  .dash-mygrid { grid-template-columns: 1fr 1fr; }
  .dash-twocol { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .dash-hero { grid-template-columns: 1fr; }
  .dash-hero-card { padding: 16px; min-height: 0; }
  .dash-hero-card--greet h1 { font-size: 20px; }
  .dash-hero__avatar img { width: 80px; height: 80px; }
  .dash-hero-card--timer { flex-direction: column; }
  .dash-hero-card--timer .dash-timer__actions { width: 100%; }
  .dash-mygrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-tile { padding: 12px; }
  .dash-tile__value { font-size: 18px; }
  .dash-chart-wrap { height: 160px; }
}

/* =====================================================================
   Task Board (Kanban — Task Ready · In Progress · Needs Review · Done)
   Clean white-card style matching the reference screenshot.
   ===================================================================== */
.tboard {
  --tboard-bg: #eef0f5;
  --tboard-card-bg: #ffffff;
  --tboard-text: #0f172a;
  --tboard-muted: #64748b;
  --tboard-border: #e6e8ec;
}

/* Subtle bluish-gray page background only behind the board content area */
.cockpit-content:has(> .tboard) {
  background: var(--tboard-bg);
}

.tboard__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.tboard__title {
  margin: 0;
  font-size: 28px; font-weight: 800;
  color: var(--tboard-text); letter-spacing: -.01em;
}
.tboard__head-right {
  display: flex; align-items: center; gap: 8px;
}
.tboard__people {
  display: inline-flex; align-items: center;
}
.tboard__person {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(15,23,42,.06);
  margin-left: -8px;
}
.tboard__person:first-child { margin-left: 0; }
.tboard__add {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  margin-left: 4px;
  background: transparent;
  border: 1.5px dashed #94a3b8;
  color: #64748b;
  border-radius: 50%;
  text-decoration: none;
  transition: border-color .12s, color .12s, background .12s;
}
.tboard__add:hover {
  border-color: var(--highlight, #e49e00);
  color: var(--highlight, #e49e00);
  background: #fff;
}

/* Filter chips (only shown when filters are active) */
.tboard__filterchips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.tboard__chip {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px;
  background: #fff; border: 1px solid var(--tboard-border);
  border-radius: 999px;
  font-size: 11px; font-weight: 600; color: var(--tboard-muted);
  text-decoration: none;
}
.tboard__chip--reset { color: var(--highlight, #e49e00); border-color: rgba(228,158,0,.45); }

/* Collapsible search bar */
.tboard__searchbar { margin-bottom: 14px; }
.tboard__searchbar > summary {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--tboard-muted);
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
}
.tboard__searchbar > summary::-webkit-details-marker { display: none; }

.tboard__searchform {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
  padding: 10px; background: #fff;
  border: 1px solid var(--tboard-border); border-radius: 6px;
}
.tboard__searchform input,
.tboard__searchform select {
  height: 32px; padding: 0 10px;
  font-size: 12px;
  border: 1px solid var(--tboard-border); border-radius: 4px;
  background: #fff; color: var(--tboard-text);
  outline: none;
}
.tboard__searchform input { flex: 1; min-width: 160px; }
.tboard__searchform input:focus,
.tboard__searchform select:focus { border-color: var(--highlight, #e49e00); }
.tboard__searchform button {
  height: 32px; padding: 0 14px;
  border: 0; border-radius: 4px;
  background: var(--highlight, #e49e00); color: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer;
}

/* Columns */
.tboard__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.tboard__col {
  display: flex; flex-direction: column;
  min-width: 0;
}
.tboard__col-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px;
  padding: 4px 4px 14px;
}
.tboard__col-title {
  margin: 0;
  font-size: 16px; font-weight: 800; color: var(--tboard-text);
  letter-spacing: -.005em;
}
.tboard__col-menu {
  width: 28px; height: 22px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--tboard-muted);
  font-size: 16px; line-height: 1;
  padding: 0;
  letter-spacing: 1px;
}
.tboard__col-menu:hover { color: var(--tboard-text); }

.tboard__col-body {
  display: flex; flex-direction: column;
  gap: 12px;
}

.tboard__empty {
  padding: 18px 12px;
  font-size: 12px; color: var(--tboard-muted);
  background: transparent;
  border: 1px dashed var(--tboard-border);
  border-radius: 6px;
  text-align: center;
}

/* Cards */
.tboard__card {
  display: flex; flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--tboard-card-bg);
  border: 1px solid var(--tboard-border);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
}
.tboard__card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15,23,42,.08);
  border-color: #d8dbe0;
}

.tboard__card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px;
}

.tboard__pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tboard__pill--blank {
  background: transparent; color: transparent;
}

.tboard__card-menu {
  width: 22px; height: 18px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--tboard-muted);
  font-size: 15px; line-height: 1; padding: 0;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.tboard__card-menu:hover { color: var(--tboard-text); }

.tboard__card-title {
  margin: 0;
  font-size: 14px; font-weight: 700;
  color: var(--tboard-text); line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tboard__card-desc {
  margin: -4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--tboard-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Top-right circular assignee avatar inside the card */
.tboard__avatar-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: #f3f4f6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  flex-shrink: 0;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(15,23,42,.06);
}
.tboard__avatar-top img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.tboard__avatar-top--initials { color: #fff; }
.tboard__avatar-top--unassigned {
  background: #e5e7eb; color: #94a3b8;
  font-weight: 600;
}

.tboard__card-foot {
  display: flex; align-items: center;
  gap: 12px;
  margin-top: 2px;
  padding-top: 6px;
}
.tboard__meta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 500;
  color: var(--tboard-muted);
}
.tboard__meta svg { flex-shrink: 0; }
.tboard__avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1100px) {
  .tboard__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 640px) {
  .tboard__cols { grid-template-columns: 1fr; gap: 12px; }
  .tboard__title { font-size: 22px; }
  .tboard__col-head { padding: 4px 4px 10px; }
  .tboard__card { padding: 14px; }
}

/* =====================================================================
   Issue / Task Details (matches the task board aesthetic)
   ===================================================================== */
.idetail {
  --idetail-bg: #eef0f5;
  --idetail-card-bg: #ffffff;
  --idetail-text: #0f172a;
  --idetail-muted: #64748b;
  --idetail-border: #e6e8ec;
}

.idetail__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px;
}
.idetail__back {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  font-size: 12px; font-weight: 600;
  color: var(--idetail-muted);
  background: #fff;
  border: 1px solid var(--idetail-border);
  border-radius: 5px;
  text-decoration: none;
  transition: color .12s, border-color .12s;
}
.idetail__back:hover { color: var(--idetail-text); border-color: #b6bac1; }
.idetail__id {
  font-size: 11px; font-weight: 700;
  color: var(--idetail-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.idetail__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.idetail__main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.idetail__side { display: flex; flex-direction: column; gap: 14px; }

/* Cards */
.idetail-card {
  background: var(--idetail-card-bg);
  border: 1px solid var(--idetail-border);
  border-radius: 6px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.idetail-card--title { padding: 20px 22px; }
.idetail-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.idetail-card__head h2 {
  margin: 0;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--idetail-muted);
}
.idetail-card__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 7px;
  font-size: 11px; font-weight: 700;
  background: #f3f4f6;
  border-radius: 999px;
  color: var(--idetail-muted);
}

.idetail-empty {
  margin: 0;
  padding: 14px;
  font-size: 13px;
  color: var(--idetail-muted);
  background: #f9fafb;
  border-radius: 5px;
  text-align: center;
}

/* Title block */
.idetail-titlebar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.idetail-titlebar__left {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.idetail-pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  line-height: 1.2;
}
.idetail-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  background: #f3f4f6; color: var(--idetail-text);
}
.idetail-status__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.idetail-status--open        { background: #dbeafe; color: #1e40af; }
.idetail-status--in_progress { background: #fef3c7; color: #92400e; }
.idetail-status--waiting     { background: #ede9fe; color: #5b21b6; }
.idetail-status--done        { background: #d1fae5; color: #065f46; }
.idetail-status--closed      { background: #e5e7eb; color: #475569; }

.idetail-prio {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  background: #f3f4f6; color: var(--idetail-muted);
}
.idetail-prio--critical { background: #fee2e2; color: #991b1b; }
.idetail-prio--high     { background: #fed7aa; color: #9a3412; }
.idetail-prio--medium   { background: #dbeafe; color: #1e40af; }
.idetail-prio--low      { background: #e5e7eb; color: #475569; }

.idetail-titlebar__avatar {
  display: inline-flex;
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #f3f4f6;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(15,23,42,.08);
  flex-shrink: 0;
}
.idetail-titlebar__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idetail-titlebar__initials {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: #fff; font-size: 14px; font-weight: 700;
  letter-spacing: .02em;
}
.idetail-titlebar__initials--unassigned { background: #cbd5e1; color: #fff; }

.idetail-title {
  margin: 0;
  font-size: 22px; font-weight: 800;
  color: var(--idetail-text);
  letter-spacing: -.01em;
  line-height: 1.3;
}

/* Description */
.idetail-description {
  font-size: 14px;
  color: var(--idetail-text);
  line-height: 1.6;
  word-wrap: break-word;
}

/* Files */
.idetail-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.idetail-file {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: #f9fafb;
  border: 1px solid var(--idetail-border);
  border-radius: 5px;
  overflow: hidden;
  transition: border-color .12s, transform .08s, box-shadow .12s;
}
.idetail-file:hover {
  border-color: #b6bac1;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15,23,42,.05);
}
.idetail-file__preview {
  width: 100%; height: 110px;
  object-fit: cover;
  display: block;
  background: #f3f4f6;
}
.idetail-file__icon {
  height: 110px;
  display: flex; align-items: center; justify-content: center;
  background: #f3f4f6;
  color: var(--idetail-muted);
}
.idetail-file__body {
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.idetail-file__body strong {
  font-size: 12px; font-weight: 600;
  color: var(--idetail-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idetail-file__body span {
  font-size: 11px;
  color: var(--idetail-muted);
}

/* Avatars (shared) */
.idetail-avatar {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}
.idetail-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.idetail-avatar__initials {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: .02em;
}
.idetail-avatar--sm { width: 28px; height: 28px; }
.idetail-avatar--sm .idetail-avatar__initials { font-size: 10px; }

/* Comments */
.idetail-thread {
  display: flex; flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}
.idetail-comment {
  display: flex;
  gap: 12px;
}
.idetail-comment__body { flex: 1; min-width: 0; }
.idetail-comment__meta {
  display: flex; gap: 8px; align-items: baseline;
  margin-bottom: 4px;
}
.idetail-comment__meta strong {
  font-size: 13px; font-weight: 700;
  color: var(--idetail-text);
}
.idetail-comment__meta time {
  font-size: 11px;
  color: var(--idetail-muted);
}
.idetail-comment__text {
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 5px;
  font-size: 13px; line-height: 1.55;
  color: var(--idetail-text);
  word-wrap: break-word;
}
.idetail-comment__atts {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
}
.idetail-comment__att {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid var(--idetail-border);
  border-radius: 4px;
  font-size: 11px; font-weight: 500;
  color: var(--idetail-muted);
  text-decoration: none;
  max-width: 100%;
}
.idetail-comment__att img {
  width: 16px; height: 16px;
  border-radius: 2px; object-fit: cover;
  flex-shrink: 0;
}
.idetail-comment__att span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.idetail-comment__att:hover { border-color: #9ca3af; color: var(--idetail-text); }

/* Comment form */
.idetail-commentform {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--idetail-border);
}
.idetail-commentform textarea {
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--idetail-border);
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  color: var(--idetail-text);
  resize: vertical;
  outline: none;
  line-height: 1.5;
}
.idetail-commentform textarea:focus {
  border-color: var(--highlight, #e49e00);
}
.idetail-commentform__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.idetail-commentform__file {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--idetail-muted);
  cursor: pointer;
}
.idetail-commentform__file:hover { color: var(--idetail-text); }
.idetail-commentform__file input[type="file"] { display: none; }

/* Buttons */
.idetail-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  font-size: 12px; font-weight: 700;
  border: 1px solid var(--idetail-border);
  border-radius: 5px;
  background: #fff;
  color: var(--idetail-text);
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, border-color .12s;
}
.idetail-btn:hover { background: #f9fafb; border-color: #b6bac1; }
.idetail-btn--primary {
  background: var(--highlight, #e49e00);
  border-color: var(--highlight, #e49e00);
  color: #fff;
}
.idetail-btn--primary:hover { background: #c98d00; border-color: #c98d00; }
.idetail-btn--full { width: 100%; }

/* Activity */
.idetail-activity {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 14px;
}
.idetail-activity__row {
  display: flex; gap: 10px;
}
.idetail-activity__body { flex: 1; min-width: 0; }
.idetail-activity__meta {
  display: flex; gap: 6px; align-items: baseline;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--idetail-muted);
}
.idetail-activity__meta strong {
  font-size: 12px; font-weight: 700;
  color: var(--idetail-text);
}
.idetail-activity__meta time {
  font-size: 11px;
  color: var(--idetail-muted);
}

.idetail-activity-list {
  list-style: none;
  margin: 6px 0 0; padding: 0;
}
.idetail-activity-list li {
  display: flex; gap: 8px;
  padding: 4px 0;
  font-size: 12px;
}
.idetail-activity-list li span {
  color: var(--idetail-muted);
  min-width: 80px;
}
.idetail-activity-list li strong {
  color: var(--idetail-text); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.idetail-activity-list li strong em {
  font-style: normal;
  font-weight: 500;
  padding: 1px 6px;
  background: #f3f4f6;
  border-radius: 3px;
  color: var(--idetail-text);
}
.idetail-activity-list li strong b {
  color: var(--idetail-muted);
  font-weight: 400;
}
.idetail-activity-quote {
  margin-top: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--idetail-text);
  background: #f9fafb;
  border-left: 3px solid var(--idetail-border);
  border-radius: 3px;
  line-height: 1.5;
}

/* Side panels: meta + form */
.idetail-meta {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.idetail-meta li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--idetail-border);
  font-size: 12px;
}
.idetail-meta li:last-child { border-bottom: 0; }
.idetail-meta li > span {
  color: var(--idetail-muted);
  font-weight: 500;
}
.idetail-meta li > strong {
  color: var(--idetail-text);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}
.idetail-meta__person {
  display: inline-flex !important; align-items: center; gap: 6px;
  text-align: right;
}
.idetail-overdue { color: #b91c1c !important; }

.idetail-form {
  display: flex; flex-direction: column; gap: 10px;
}
.idetail-field {
  display: flex; flex-direction: column; gap: 4px;
}
.idetail-field > span {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--idetail-muted);
}
.idetail-field select,
.idetail-field input {
  height: 34px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--idetail-border);
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  color: var(--idetail-text);
  outline: none;
}
.idetail-field select:focus,
.idetail-field input:focus { border-color: var(--highlight, #e49e00); }

/* Responsive */
@media (max-width: 1080px) {
  .idetail__layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .idetail-card { padding: 14px; }
  .idetail-card--title { padding: 16px; }
  .idetail-title { font-size: 18px; }
  .idetail-titlebar__avatar { width: 38px; height: 38px; }
  .idetail-files { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

