:root {
  --brand: #0b4552;
  --brand-2: #0f6b70;
  --brand-3: #eaf5f2;
  --accent: #f2c66d;
  --soft: #f7fbfa;
  --line: #cfe2df;
  --ink: #152629;
  --muted: #5b6f74;
  --surface: #ffffff;
  --surface-2: #f7faf8;
  --surface-soft: rgba(255, 255, 255, 0.92);
  --shadow: rgba(15, 35, 39, 0.06);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --brand: #9ad8d5;
  --brand-2: #7bc4c4;
  --brand-3: #24383d;
  --accent: #ffd77d;
  --soft: #1b2428;
  --line: #405158;
  --ink: #f4f8f8;
  --muted: #d0dcdf;
  --surface: #263238;
  --surface-2: #303f46;
  --surface-soft: rgba(38, 50, 56, 0.96);
  --shadow: rgba(0, 0, 0, 0.2);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(220, 237, 223, 0.82), transparent 25rem),
    linear-gradient(180deg, #fbfcf9 0%, var(--soft) 100%);
  color: var(--ink);
  font-size: 0.96rem;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(123, 196, 196, 0.16), transparent 25rem),
    linear-gradient(180deg, #202b30 0%, var(--soft) 100%);
}

.navbar {
  backdrop-filter: blur(18px);
}

.navbar-brand {
  color: var(--ink);
}

:root[data-theme="dark"] .navbar,
:root[data-theme="dark"] .bg-white {
  background-color: var(--surface) !important;
  color: var(--ink);
}

:root[data-theme="dark"] .border-bottom {
  border-color: var(--line) !important;
}

.fw-black {
  font-weight: 900;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.brand-logo {
  width: 7.7rem;
  height: 2.35rem;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 9px;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: #08353f;
  --bs-btn-hover-border-color: #08353f;
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

:root[data-theme="dark"] .btn-primary {
  background-color: #0f6b70 !important;
  border-color: #9ad8d5 !important;
  color: #fff !important;
}

:root[data-theme="dark"] .btn-outline-primary,
:root[data-theme="dark"] .btn-outline-secondary {
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

:root[data-theme="dark"] .btn-outline-primary:hover,
:root[data-theme="dark"] .btn-outline-secondary:hover {
  background-color: var(--surface-2) !important;
  color: var(--ink) !important;
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

body.app-mode > .navbar {
  display: none;
}

.app-view.active {
  min-height: 100svh;
  background:
    linear-gradient(180deg, #eef4f7 0, #f7fbfa 18rem),
    var(--soft);
}

:root[data-theme="dark"] .app-view.active {
  background:
    linear-gradient(180deg, #233137 0, #1b2428 18rem),
    var(--soft);
}

.adminlte-app {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow-x: hidden;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1040;
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(207, 226, 223, 0.92);
  background: var(--surface-soft);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 26px var(--shadow);
}

:root[data-theme="dark"] .app-header,
:root[data-theme="dark"] .adminlte-panel,
:root[data-theme="dark"] .app-tabs,
:root[data-theme="dark"] .live-panel,
:root[data-theme="dark"] .kaila-popup,
:root[data-theme="dark"] .swal2-popup {
  border-color: var(--line) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}

.app-title {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.app-title > div {
  min-width: 0;
  max-width: 100%;
}

.app-title img {
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  object-fit: cover;
}

.app-title strong,
.app-title span {
  display: block;
}

.app-title strong {
  color: #16313b;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.1;
}

.app-title span {
  max-width: min(72rem, calc(100vw - 11rem));
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

.app-header-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.role-badge {
  border: 1px solid #cfe2df;
  background: var(--surface-2);
  color: var(--brand);
  text-transform: capitalize;
}

.icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.app-content {
  width: min(100%, 1120px);
  display: grid;
  align-content: start;
  gap: 0.55rem;
  margin: 0 auto;
  padding: 0.55rem 0.5rem calc(4.55rem + env(safe-area-inset-bottom));
}

.adminlte-panel {
  grid-template-rows: auto auto;
  display: grid;
  gap: 0.5rem;
  height: auto;
  padding: 0.58rem;
  border: 1px solid rgba(207, 226, 223, 0.9);
  border-radius: 12px;
  background: var(--surface-soft);
  box-shadow: 0 10px 24px var(--shadow);
}

.panel-title {
  min-width: 0;
  min-height: 1.8rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  color: #16313b;
  font-size: 0.83rem;
  font-weight: 900;
}

.panel-title span,
.panel-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-title small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.app-tab-content {
  min-height: 0;
  padding-bottom: 0;
}

.landing-shell {
  width: min(100%, 1120px);
  max-width: 100vw;
  margin: 0 auto;
  overflow: hidden;
}

.hero-compact,
.auth-card,
.k-card,
.toolbar,
.stats-row,
.compact-tabs,
.live-panel,
.settings-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  box-shadow: 0 10px 24px var(--shadow);
}

.hero-compact {
  width: 100%;
  min-height: auto;
  display: grid;
  gap: 1.25rem;
  padding: 1rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 248, 0.96)),
    var(--brand-3);
}

:root[data-theme="dark"] .hero-compact {
  background:
    linear-gradient(135deg, rgba(38, 50, 56, 0.98), rgba(32, 43, 48, 0.96)),
    var(--brand-3);
}

.hero-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: 0.35rem;
}

.hero-brand {
  width: min(11rem, 72vw);
  height: auto;
  display: block;
  margin-bottom: 0.65rem;
  border: 1px solid #dce9e5;
  border-radius: 10px;
}

.hero-compact h1 {
  max-width: 12ch;
  color: var(--brand);
  font-size: clamp(2.15rem, 9vw, 3.85rem);
  line-height: 1;
}

:root[data-theme="dark"] .hero-compact h1,
:root[data-theme="dark"] .app-title strong,
:root[data-theme="dark"] .panel-title,
:root[data-theme="dark"] .settings-head h3,
:root[data-theme="dark"] .k-card h3 {
  color: var(--ink);
}

.hero-lead {
  width: 100%;
  max-width: 36rem;
  color: #46575a;
  font-size: 1rem;
  line-height: 1.45;
}

:root[data-theme="dark"] .hero-lead,
:root[data-theme="dark"] .settings-head p,
:root[data-theme="dark"] .app-title span,
:root[data-theme="dark"] .k-card p {
  color: var(--muted);
}

.hero-actions {
  width: 100%;
  display: grid;
  gap: 0.55rem;
  max-width: 25rem;
}

.btn-login {
  min-height: 2.8rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 62, 70, 0.22);
}

.btn-register {
  --bs-btn-color: #335255;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: #c9d8d1;
  --bs-btn-hover-color: var(--brand);
  --bs-btn-hover-bg: #edf5f0;
  --bs-btn-hover-border-color: #b8ccc4;
  font-weight: 800;
  background-color: var(--surface) !important;
  border-color: #c9d8d1 !important;
  color: #335255 !important;
}

:root[data-theme="dark"] .btn-register {
  background-color: #34464d !important;
  border-color: #9bb0b5 !important;
  color: #f4f8f8 !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] .btn-register:hover,
:root[data-theme="dark"] .btn-register:focus-visible {
  background-color: #40545c !important;
  border-color: #f4f8f8 !important;
  color: #ffffff !important;
}

.hero-points {
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.hero-points span {
  flex: 0 1 auto;
  padding: 0.38rem 0.58rem;
  border: 1px solid #d8e7de;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.hero-preview {
  min-width: 0;
  display: grid;
  place-items: center;
  min-height: 18rem;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(15, 62, 70, 0.08), transparent 42%),
    var(--surface-2);
}

.preview-phone {
  min-width: 0;
  width: min(100%, 19.5rem);
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid #d7e4dc;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 18px 34px rgba(26, 54, 58, 0.14);
}

.preview-topbar,
.preview-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.preview-topbar {
  color: #5c6b6d;
  font-size: 0.74rem;
}

.preview-topbar span {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: #26a269;
}

.preview-icon {
  width: 1rem;
  height: 1rem;
  display: block;
  border-radius: 4px;
}

.preview-topbar em {
  color: #8a9697;
  font-style: normal;
}

.preview-request,
.preview-offer,
.preview-confirm {
  border-radius: 10px;
}

.preview-request {
  padding: 0.75rem;
  background: #123f46;
  color: #fff;
}

.preview-tag {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.2rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fde3a0;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-request h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
}

.preview-request p,
.preview-offer span {
  margin: 0.22rem 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.74rem;
}

.preview-offer {
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid #dce7e1;
  background: var(--surface);
}

.preview-offer strong,
.preview-offer span {
  display: block;
  overflow-wrap: anywhere;
}

.preview-offer strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.preview-offer span {
  color: var(--muted);
}

.preview-offer b {
  flex: 0 0 auto;
  color: var(--brand);
}

.preview-offer.soft {
  background: var(--surface-2);
}

.preview-confirm {
  padding: 0.7rem;
  background: var(--accent);
  color: #283331;
  font-size: 0.86rem;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 520px) {
  .landing-shell {
    padding-inline: 0.8rem !important;
  }

  .hero-compact {
    padding: 0.85rem;
  }

  .hero-copy {
    padding: 0.25rem;
  }

  .hero-compact h1 {
    font-size: clamp(2rem, 11vw, 2.75rem);
  }

  .hero-actions {
    max-width: 100%;
  }

  .hero-preview {
    min-height: 0;
    padding: 0.75rem;
  }

  .hero-points span {
    padding-inline: 0.5rem;
    font-size: 0.72rem;
  }
}

.eyebrow {
  color: #906304;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-card {
  max-width: 460px;
  margin: 0 auto;
  padding: 1rem;
}

.compact-form {
  display: grid;
  gap: 0.55rem;
}

.password-field {
  position: relative;
  display: block;
}

.password-field .form-control {
  min-height: 2.38rem;
  padding-right: 2.85rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.password-field:focus-within .password-toggle {
  opacity: 1;
  pointer-events: auto;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--surface-2);
  color: var(--ink);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 1px;
}

.form-control,
.form-select,
.btn {
  border-radius: 10px;
}

.form-control,
.form-select {
  border-color: var(--line);
  background-color: var(--surface);
  color: var(--ink);
}

.form-control[type="file"]::file-selector-button {
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.auth-field-label,
.category-chip-box {
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 900;
}

.category-chip-box {
  display: grid;
  gap: 0.5rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.category-chip-selected,
.category-chip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.category-chip-selected {
  min-height: 2.1rem;
  align-items: center;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

.category-chip-options {
  max-height: 8.25rem;
  overflow: auto;
}

.category-chip,
.category-chip-empty {
  min-height: 1.85rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.category-chip.selected {
  border-color: var(--brand-2);
  background: var(--brand);
  color: #fff;
}

.category-chip-empty {
  border-style: dashed;
  background: transparent;
}

.address-grid {
  display: grid;
  gap: 0.55rem;
}

.address-grid label {
  display: grid;
  gap: 0.25rem;
}

.address-grid span {
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 900;
}

.address-grid small {
  color: var(--muted);
  font-weight: 800;
}

.consent-line {
  display: flex !important;
  gap: 0.45rem !important;
  align-items: flex-start !important;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
}

.consent-line input {
  flex: 0 0 auto;
  margin-top: 0.12rem;
}

:root[data-theme="dark"] input:-webkit-autofill,
:root[data-theme="dark"] input:-webkit-autofill:hover,
:root[data-theme="dark"] input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--surface-2) inset;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 0.15rem rgba(15, 107, 112, 0.14);
}

.form-control::placeholder {
  color: var(--muted);
}

select[multiple].form-select {
  min-height: 7.75rem;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.6rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2rem;
  padding: 0.32rem;
  margin-bottom: 0.35rem;
}

.admin-stats {
  grid-template-columns: repeat(8, minmax(5.25rem, 1fr));
  min-height: 4.75rem;
  height: auto;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(12, 39, 48, 0.05);
}

.stats-row div,
.stats-row button {
  padding: 0.38rem 0.2rem;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  color: inherit;
}

.admin-stats div,
.admin-stats button {
  display: grid;
  min-width: 0;
  min-height: 4rem;
  gap: 0.18rem;
  align-content: center;
  padding: 0.5rem 0.22rem;
  text-align: center;
}

.admin-stats button {
  cursor: pointer;
}

.admin-stats button:hover,
.admin-stats button:focus-visible,
.admin-stats button.active {
  background: #dfecea;
  outline: 2px solid transparent;
  box-shadow: inset 0 0 0 1px var(--brand-2);
}

:root[data-theme="dark"] .admin-stats button:hover,
:root[data-theme="dark"] .admin-stats button:focus-visible,
:root[data-theme="dark"] .admin-stats button.active {
  background: #263a40;
}

.admin-metric-panel {
  border-color: var(--brand-2);
  background: var(--surface-soft);
}

.admin-stats i {
  color: #96a5a9;
  font-size: 0.82rem;
}

.stats-row strong,
.stats-row span {
  display: block;
}

.stats-row strong {
  color: var(--brand);
  font-size: clamp(0.9rem, 4vw, 1.2rem);
  line-height: 1;
}

.stats-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(0.54rem, 2vw, 0.68rem);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: stretch;
  min-height: 2.35rem;
  height: auto;
  margin-bottom: 0.35rem;
}

.adminlte-panel .action-row {
  margin-bottom: 0;
}

.action-row .btn {
  display: inline-flex;
  justify-content: center;
  gap: 0.45rem;
  align-items: center;
  min-height: 2.35rem;
  min-width: 0;
  font-weight: 850;
}

.action-row .btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-tabs {
  height: 3rem;
  padding: 0.24rem;
}

.compact-tabs .nav-link {
  height: 2.5rem;
  border-radius: 10px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 900;
}

:root[data-theme="dark"] .compact-tabs .nav-link {
  color: var(--ink);
}

.compact-tabs .nav-link.active {
  background: var(--brand);
}

.app-tabs {
  position: fixed;
  right: 0.5rem;
  bottom: max(0.45rem, env(safe-area-inset-bottom));
  left: 0.5rem;
  z-index: 1030;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.15rem;
  align-items: stretch;
  max-width: calc(100vw - 1rem);
  height: 3.15rem;
  padding: 0.25rem;
  border: 1px solid rgba(207, 226, 223, 0.95);
  border-radius: 14px;
  background: var(--surface-soft);
  box-shadow: 0 16px 34px var(--shadow);
  backdrop-filter: blur(18px);
}

.app-tabs .nav-link {
  overflow: hidden;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.12rem;
  padding: 0.42rem 0.12rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: clamp(0.56rem, 2.4vw, 0.68rem);
  line-height: 1;
}

.app-tabs .nav-link span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-tabs .nav-link i {
  font-size: 0.95rem;
}

.app-tabs .nav-link.active {
  background: var(--surface-2);
  color: var(--brand);
}

@media (max-width: 380px) {
  .app-tabs {
    right: 0.35rem;
    left: 0.35rem;
    max-width: calc(100vw - 0.7rem);
  }

  .app-tabs .nav-link {
    font-size: 0.52rem;
  }

  .app-tabs .nav-link i {
    font-size: 0.88rem;
  }

  .app-header {
    padding-inline: 0.55rem;
  }

  .role-badge {
    max-width: 4.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.stack {
  display: grid;
  gap: 0.55rem;
}

.k-card {
  padding: 0.75rem;
}

.app-view .k-card {
  border-color: rgba(218, 229, 226, 0.9);
  border-radius: 12px;
  background: var(--surface-soft);
  box-shadow: 0 8px 22px var(--shadow);
}

.app-view .k-card h3 {
  color: #16313b;
}

.k-card,
.offer-card,
.toolbar,
.compact-tabs,
.stats-row,
.settings-card {
  border-radius: 10px;
}

.k-card h3 {
  margin: 0;
  color: var(--brand);
  font-size: 1.05rem;
  font-weight: 900;
}

.k-card p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.55rem;
}

.meta span {
  padding: 0.25rem 0.48rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.offer {
  border-left: 3px solid #e3ad3f;
  margin-top: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #fff8e8;
  font-size: 0.82rem;
}

:root[data-theme="dark"] .offer {
  background: #2a2519;
  color: var(--ink);
}

.offers-section {
  margin-top: 0.65rem;
}

.offers-heading,
.offer-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: center;
}

.offers-heading span,
.offer-card-head span,
.offer-schedule {
  color: #677779;
  font-size: 0.74rem;
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.offer-card {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-width: 0;
  padding: 0.6rem;
  border: 1px solid #e0cf9f;
  border-left: 3px solid #e3ad3f;
  border-radius: 8px;
  background: #fff8e8;
}

:root[data-theme="dark"] .offer-card {
  border-color: #5f4f29;
  background: #2a2519;
}

.offer-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.offer-amount {
  color: #0f3e46;
  font-size: 1rem;
  font-weight: 900;
}

.media-block {
  margin-top: 0.55rem;
}

.media-heading,
.media-viewer-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: center;
}

.media-heading span,
.media-viewer-meta span {
  color: #677779;
  font-size: 0.74rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.75rem, 5.75rem));
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.media-tile {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d6dfdc;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

:root[data-theme="dark"] .badge.text-bg-light {
  border: 1px solid var(--line);
  background-color: var(--surface-2) !important;
  color: var(--ink) !important;
}

:root[data-theme="dark"] .text-muted,
:root[data-theme="dark"] .small.text-muted {
  color: var(--muted) !important;
}

:root[data-theme="dark"] .swal2-title,
:root[data-theme="dark"] .swal2-html-container,
:root[data-theme="dark"] .swal2-input,
:root[data-theme="dark"] .swal2-textarea,
:root[data-theme="dark"] .swal2-label,
:root[data-theme="dark"] .swal2-validation-message,
:root[data-theme="dark"] .swal2-content {
  color: var(--ink) !important;
}

:root[data-theme="dark"] .swal2-input,
:root[data-theme="dark"] .swal2-textarea,
:root[data-theme="dark"] .swal2-select {
  border-color: var(--line) !important;
  background: var(--surface-2) !important;
}

:root[data-theme="dark"] .swal2-validation-message,
:root[data-theme="dark"] .swal2-footer,
:root[data-theme="dark"] .swal2-actions {
  background: var(--surface) !important;
}

:root[data-theme="dark"] .swal2-close {
  color: var(--muted) !important;
}

:root[data-theme="dark"] .swal2-close:hover {
  color: var(--ink) !important;
}

:root[data-theme="dark"] .swal2-styled.swal2-cancel {
  border: 1px solid var(--line) !important;
  background: var(--surface-2) !important;
  color: var(--ink) !important;
}

:root[data-theme="dark"] .swal2-styled.swal2-confirm {
  border: 1px solid #9ad8d5 !important;
  background: #0f6b70 !important;
  color: #fff !important;
}

:root[data-theme="dark"] .swal2-styled.swal2-deny {
  border: 1px solid #d8a43b !important;
  background: #5b4822 !important;
  color: #fff !important;
}

:root[data-theme="dark"] .swal2-timer-progress-bar {
  background: var(--brand) !important;
}

.media-tile img,
.media-tile video {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  background: var(--surface-2);
  object-fit: cover;
}

.media-type {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  padding: 0.12rem 0.3rem;
  border-radius: 999px;
  background: rgb(15 62 70 / 88%);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
}

.media-popup {
  width: min(48rem, calc(100vw - 1.5rem));
}

.media-viewer {
  display: grid;
  gap: 0.5rem;
}

.media-viewer img,
.media-viewer video {
  width: 100%;
  max-height: 68svh;
  border-radius: 6px;
  background: #101617;
  object-fit: contain;
}

:root[data-theme="dark"] .media-viewer img,
:root[data-theme="dark"] .media-viewer video {
  background: #0f171b;
}

:root[data-theme="dark"] .media-viewer-meta strong,
:root[data-theme="dark"] .media-heading strong,
:root[data-theme="dark"] .media-heading span,
:root[data-theme="dark"] .media-viewer-meta span {
  color: var(--ink);
}

.card-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.card-actions .btn {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-card-focus {
  animation: request-focus-pulse 2.2s ease;
}

@keyframes request-focus-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(19 136 142 / 0%);
  }

  18%,
  70% {
    box-shadow: 0 0 0 4px rgb(19 136 142 / 30%);
  }
}

.collapsed-section {
  background: var(--surface-soft);
}

.collapsed-section summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
  color: var(--brand);
  font-weight: 900;
  list-style: none;
}

.collapsed-section summary::-webkit-details-marker {
  display: none;
}

.collapsed-section small {
  min-width: 1.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
}

.settings-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
}

.settings-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.settings-head h3,
.settings-head p {
  margin: 0;
}

.settings-head h3 {
  color: var(--brand);
  font-size: 1.05rem;
  font-weight: 900;
}

.settings-head p {
  color: var(--muted);
}

.profile-photo {
  width: 3.5rem;
  height: 3.5rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  object-fit: cover;
}

.settings-grid {
  display: grid;
  gap: 0.65rem;
}

.settings-grid label {
  display: grid;
  gap: 0.28rem;
}

.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
  gap: 0.45rem;
}

.upload-thumb {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.upload-thumb img,
.upload-thumb video {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  background: var(--surface-2);
}

.upload-thumb span {
  display: block;
  padding: 0.25rem 0.35rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 0.62rem;
  height: 0.62rem;
  display: inline-block;
  border-radius: 50%;
  background: #c95f46;
}

.status-dot.connected {
  background: #26a269;
}

.live-panel {
  position: fixed;
  inset: auto 0.75rem 0.75rem 0.75rem;
  z-index: 1080;
  max-height: 70svh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: 0.75rem;
}

.live-panel[hidden] {
  display: none;
}

.live-panel .stack {
  overflow: auto;
}

.swal2-popup.kaila-popup {
  border-radius: 14px;
}

.swal2-popup.kaila-popup .swal2-title {
  color: var(--brand);
  font-size: 1.25rem;
  font-weight: 900;
}

.attention-request-popup .swal2-title {
  margin-top: 0;
  padding-top: 0.25rem;
}

.attention-request {
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  text-align: center;
  color: var(--ink);
}

.attention-profile {
  display: grid;
  gap: 0.32rem;
  justify-items: center;
}

.attention-profile-photo {
  width: 4.25rem;
  height: 4.25rem;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  object-fit: cover;
}

.attention-profile > strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.15;
}

.attention-profile .reputation-badge {
  justify-content: center;
}

.attention-request-details {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
}

.attention-request-details strong {
  color: var(--ink);
  font-size: 1rem;
}

.attention-request-details p,
.attention-request-details span {
  margin: 0;
  color: var(--muted);
}

.attention-request-details span {
  font-size: 0.82rem;
}

.compact-offers {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  text-align: center;
  color: var(--ink);
}

.compact-offers-summary {
  display: grid;
  gap: 0.18rem;
}

.compact-offers-summary strong {
  color: var(--ink);
  font-size: 1rem;
}

.compact-offers-summary span,
.compact-offers small {
  color: var(--muted);
}

.compact-offer-photos {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.compact-offer-photo {
  width: 4.75rem;
  display: grid;
  gap: 0.22rem;
  justify-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.compact-offer-photo img {
  width: 3.35rem;
  height: 3.35rem;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  object-fit: cover;
}

.compact-offer-photo span {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-offer-photo:hover img,
.compact-offer-photo:focus-visible img {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(19 136 142 / 18%);
}

.compact-offer-photo:focus-visible {
  outline: 0;
}

:root[data-theme="dark"] .swal2-popup.kaila-popup .swal2-title {
  color: var(--ink) !important;
}

.swal-form {
  display: grid;
  gap: 0.55rem;
  text-align: left;
  color: var(--ink);
}

.swal-form label {
  display: grid;
  gap: 0.25rem;
}

.rating-field {
  display: grid;
  gap: 0.25rem;
}

.star-rating {
  display: flex;
  gap: 0.18rem;
}

.star-button {
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #f3f5f4;
  color: #cbd6d3;
  font-size: 1.55rem;
  line-height: 1;
}

.star-button.selected,
.star-button:hover,
.star-button:focus-visible {
  background: #fff3cf;
  color: #e2ad43;
}

:root[data-theme="dark"] .star-button {
  background: var(--surface-2);
  color: #77878c;
}

:root[data-theme="dark"] .star-button.selected,
:root[data-theme="dark"] .star-button:hover,
:root[data-theme="dark"] .star-button:focus-visible {
  background: #5b4822;
  color: var(--accent);
}

.star-button:focus-visible {
  outline: 0;
}

.rating-label {
  color: #677779;
  font-size: 0.78rem;
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.35rem;
}

.rating-stars {
  color: #d99a16;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.rating-note-text {
  color: var(--muted);
}

:root[data-theme="dark"] .rating-stars {
  color: var(--accent);
}

.user-identity {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-width: 0;
  margin-top: 0.6rem;
}

.user-identity.compact {
  margin-top: 0;
}

.user-avatar {
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  object-fit: cover;
}

.user-identity.compact .user-avatar {
  width: 2.35rem;
  height: 2.35rem;
}

.user-identity-copy {
  min-width: 0;
}

.user-identity-copy > strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reputation-badge {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.reputation-stars {
  color: #d99a16;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

:root[data-theme="dark"] .reputation-stars {
  color: var(--accent);
}

.reputation-line {
  display: flex;
  margin-top: 0.25rem;
}

.chat-popup {
  width: min(34rem, calc(100vw - 1.5rem));
}

.chat-shell {
  display: grid;
  gap: 0.45rem;
  text-align: left;
}

.chat-reputation {
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.chat-reputation .user-identity {
  margin-top: 0;
}

.chat-call-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.chat-call-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.audio-call-panel {
  position: fixed;
  z-index: 2000;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 32rem;
  margin-left: auto;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0.75rem 2rem rgba(10, 43, 49, 0.22);
  color: var(--ink);
  text-align: left;
}

.audio-call-panel span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.audio-call-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.35rem;
}

body.call-overlay-open {
  overflow: hidden;
}

.audio-call-panel.audio-call-overlay {
  inset: 0;
  display: grid;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: stretch;
  justify-content: stretch;
  gap: 1rem;
  max-width: none;
  margin: 0;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(242, 198, 109, 0.2), transparent 15rem),
    linear-gradient(155deg, #0b4552 0%, #082f39 62%, #061f27 100%);
  box-shadow: none;
  color: #fff;
  text-align: center;
}

.audio-call-overlay-head {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.audio-call-secure,
.audio-call-state {
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 0.7rem !important;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.audio-call-secure i {
  margin-right: 0.25rem;
}

.audio-call-minimize,
.audio-call-mini-action {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.audio-call-stage {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  align-content: center;
  justify-items: center;
  justify-self: stretch;
  gap: 0.65rem;
}

.audio-call-remote-video {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #031a20;
  object-fit: cover;
}

.audio-call-video-waiting {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.75rem;
  background: rgba(0, 12, 15, 0.52);
  color: rgba(255, 255, 255, 0.84);
  pointer-events: none;
}

.audio-call-video-waiting[hidden] {
  display: none;
}

.audio-call-video-waiting i {
  font-size: clamp(2.6rem, 12vw, 4.5rem);
}

.audio-call-video-waiting span {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audio-call-local-video {
  position: absolute;
  z-index: 3;
  top: max(4.4rem, calc(env(safe-area-inset-top) + 3.4rem));
  right: 1rem;
  width: clamp(5.5rem, 20vw, 8rem);
  aspect-ratio: 3 / 4;
  border: 2px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  background: #082f39;
  box-shadow: 0 0.6rem 1.5rem rgba(0, 0, 0, 0.28);
  object-fit: cover;
}

.audio-call-panel.video-active::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 18, 22, 0.48) 0%, rgba(0, 18, 22, 0.04) 36%, rgba(0, 18, 22, 0.72) 100%);
  content: "";
  pointer-events: none;
}

.audio-call-panel.video-active .audio-call-stage {
  align-content: end;
  padding-bottom: 0.35rem;
  text-shadow: 0 0.15rem 0.65rem rgba(0, 0, 0, 0.72);
}

.audio-call-avatar {
  width: clamp(7.5rem, 32vw, 10rem);
  aspect-ratio: 1;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 0.65rem rgba(255, 255, 255, 0.05);
  object-fit: cover;
}

.audio-call-state {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
}

.audio-call-live-dot {
  display: inline-block !important;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #71e2a1;
  box-shadow: 0 0 0 0.24rem rgba(113, 226, 161, 0.18);
}

.audio-call-stage h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.65rem, 7vw, 2.4rem);
  font-weight: 900;
}

.audio-call-stage p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.86rem;
}

.audio-call-duration {
  color: #fff;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.audio-call-overlay-actions {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
  gap: clamp(1.4rem, 12vw, 3rem);
}

.audio-call-control {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  min-width: 4.5rem;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 0.78rem;
}

.audio-call-control span {
  display: grid;
  width: 4.25rem;
  height: 4.25rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.25rem;
}

.audio-call-control.end span,
.audio-call-mini-action.end {
  border-color: transparent;
  background: #dc3545;
}

.audio-call-control.answer span {
  background: #20a66a;
}

.audio-call-panel.minimized {
  max-width: 34rem;
  padding: 0.5rem;
  border-color: rgba(11, 69, 82, 0.25);
  background: var(--surface-soft);
}

.audio-call-panel.video-minimized {
  overflow: visible;
}

.audio-call-mini-video {
  position: fixed;
  z-index: 2001;
  right: 0.75rem;
  bottom: 4.75rem;
  display: block;
  width: clamp(8rem, 22vw, 11rem);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  background: #031a20;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.3);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.audio-call-mini-video:active {
  cursor: grabbing;
}

.audio-call-mini-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audio-call-mini-video-waiting {
  position: absolute;
  inset: 0;
  display: grid !important;
  place-items: center;
  background: rgba(0, 12, 15, 0.6);
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 1.8rem !important;
}

.audio-call-mini-video-waiting[hidden] {
  display: none !important;
}

.audio-call-minimized-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.65rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.audio-call-minimized-main span:last-child {
  min-width: 0;
}

.audio-call-mini-photo {
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 auto;
  border: 2px solid rgba(32, 166, 106, 0.48);
  border-radius: 50%;
  object-fit: cover;
}

.audio-call-minimized-main strong,
.audio-call-minimized-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-call-minimized-main small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.audio-call-mini-action {
  flex: 0 0 auto;
  width: 2.45rem;
  height: 2.45rem;
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 560px) {
  .audio-call-panel.audio-call-overlay {
    gap: 0.65rem;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.55rem max(0.8rem, env(safe-area-inset-bottom));
  }

  .audio-call-local-video {
    top: max(4.1rem, calc(env(safe-area-inset-top) + 3.1rem));
    right: 0.65rem;
    width: 5.7rem;
  }

  .audio-call-panel.video-active .audio-call-stage {
    padding-bottom: 0;
  }

  .audio-call-stage {
    gap: 0.45rem;
  }

  .audio-call-stage h2 {
    font-size: clamp(1.55rem, 8vw, 2.05rem);
  }

  .audio-call-duration {
    font-size: 1.25rem;
  }

  .audio-call-overlay-actions {
    display: flex;
    gap: 0.1rem;
  }

  .audio-call-control {
    flex: 0 1 5.4rem;
    min-width: 0;
    gap: 0.35rem;
    font-size: 0.68rem;
  }

  .audio-call-control span {
    width: 3.55rem;
    height: 3.55rem;
    font-size: 1.05rem;
  }

  .audio-call-control b {
    white-space: nowrap;
  }

  .audio-call-mini-video {
    width: 7.2rem;
  }
}

.chat-transcript {
  display: grid;
  gap: 0.45rem;
  max-height: 52svh;
  overflow-y: auto;
  padding: 0.2rem;
}

.chat-message {
  max-width: 88%;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
}

.chat-message.mine {
  justify-self: end;
  background: #dff1ee;
}

:root[data-theme="dark"] .chat-message.mine {
  background: #244f55;
}

.chat-message strong,
.chat-message span {
  display: block;
}

.chat-message span,
.chat-typing,
.chat-empty,
.chat-archived {
  color: var(--muted);
  font-size: 0.74rem;
}

.chat-message p {
  margin: 0.2rem 0 0;
  white-space: pre-wrap;
}

.chat-presence,
.chat-typing {
  min-height: 1.1rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.chat-reaction {
  margin-top: 0.35rem;
  padding: 0.16rem 0.35rem;
  border: 1px solid #b9ccca;
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 800;
}

.chat-reaction-count {
  display: block;
  margin-top: 0.35rem;
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 800;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: end;
}

.chat-archived {
  padding: 0.55rem;
  border-radius: 8px;
  background: var(--surface-2);
  font-weight: 700;
}

.swal-form span {
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 900;
}

:root[data-theme="dark"] .swal-form span {
  color: var(--ink);
}

@media (min-width: 640px) {
  .hero-compact {
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.75fr);
    align-items: center;
    min-height: 420px;
    padding: clamp(1.25rem, 4vw, 2rem);
  }

  .hero-copy {
    padding: 0;
  }

  .hero-actions {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .app-content {
    grid-template-rows: 4.9rem auto 3.35rem minmax(0, 1fr);
    gap: 0.9rem;
    padding: 1rem;
  }

  .adminlte-panel {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    height: 4.9rem;
    padding: 0.78rem;
  }

  .panel-title {
    height: 2.8rem;
  }

  .admin-stats {
    min-height: 5rem;
    height: auto;
  }

  .stats-row {
    gap: 0.25rem;
    padding: 0.45rem;
    margin-bottom: 0.6rem;
  }

  .stats-row div,
  .stats-row button {
    padding: 0.55rem;
  }

  .admin-stats div,
  .admin-stats button {
    padding: 0.45rem 0.28rem;
  }

  .admin-stats i {
    font-size: 0.78rem;
  }

  .stats-row strong {
    font-size: 1.35rem;
  }

  .stats-row span {
    font-size: 0.72rem;
  }

  .action-row {
    gap: 0.5rem;
    height: 2.8rem;
    margin-bottom: 0.6rem;
  }

  .action-row .btn {
    min-height: 2.8rem;
  }

  .app-tabs {
    position: sticky;
    top: 4.75rem;
    right: auto;
    bottom: auto;
    left: auto;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(12, 39, 48, 0.06);
    height: 3.35rem;
    padding: 0.35rem;
  }

  .app-tabs .nav-link {
    display: flex;
    justify-content: center;
    gap: 0.42rem;
    align-items: center;
    justify-self: stretch;
    min-height: 2.65rem;
    padding: 0.65rem 0.5rem;
    font-size: 0.78rem;
  }

  .app-tab-content {
    padding-bottom: 0;
  }

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

  .settings-grid .wide {
    grid-column: 1 / -1;
  }

  .live-panel {
    inset: 4.75rem 1rem 1rem auto;
    width: 420px;
  }

  .swal-form.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swal-form .wide {
    grid-column: 1 / -1;
  }
}
