:root {
  color-scheme: light;
  --bg: #edf2f3;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-soft: #f8faf7;
  --ink: #101820;
  --muted: #64707d;
  --line: #d7dedb;
  --green: #0e5f4f;
  --green-2: #0a7a62;
  --amber: #b7791f;
  --red: #b42318;
  --blue: #1f5f99;
  --violet: #6d5dfc;
  --teal: #0891b2;
  --rose: #c2416b;
  --nav: #0d1b2a;
  --gold: #c49a45;
  --gold-soft: #f3dfad;
  --shadow: 0 18px 44px rgba(16, 24, 32, 0.11);
  --shadow-soft: 0 8px 24px rgba(16, 24, 32, 0.075);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(196, 154, 69, 0.12) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 242, 243, 0.96)),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 258px 1fr;
  background: transparent;
}

.login-shell {
  display: block;
  max-width: 560px;
  min-height: 100vh;
}

.login-panel {
  margin: 44px auto;
  box-shadow: 0 20px 54px rgba(20, 31, 43, 0.12);
}

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

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 16px 0 12px;
}

.summary-grid > div {
  display: grid;
  grid-template-columns: minmax(118px, 0.42fr) 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.25;
}

.summary-grid strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.rail {
  min-height: 100vh;
  padding: 20px 14px;
  background:
    linear-gradient(180deg, rgba(196, 154, 69, 0.14), rgba(196, 154, 69, 0) 30%),
    linear-gradient(180deg, #081522, #102235 50%, #0b2d29);
  color: white;
  position: sticky;
  top: 0;
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.08), 12px 0 42px rgba(8, 21, 34, 0.12);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fff4cf, #c49a45 58%, #8a621a);
  box-shadow: 0 10px 26px rgba(196, 154, 69, 0.28);
  overflow: hidden;
  flex: 0 0 44px;
}

.mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mark rect {
  fill: #0f5f4c;
  stroke: rgba(255, 244, 207, 0.92);
  stroke-width: 2;
}

.mark path {
  fill: #f4d58c;
}

.mark text {
  fill: #ffffff;
  font-size: 13px;
  font-weight: 950;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.brand h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.05;
}

.brand p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 7px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(196, 154, 69, 0.14);
  color: #8a621a;
  border: 1px solid rgba(196, 154, 69, 0.35);
  font-size: 11px;
  font-weight: 850;
}

.rail .version-badge {
  color: #fff4cf;
  background: rgba(255, 244, 207, 0.12);
  border-color: rgba(255, 244, 207, 0.24);
}

.refresh-version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.refresh-version .version-badge {
  margin-top: 0;
  white-space: nowrap;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-group + .nav-group {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-group-title {
  padding: 0 8px 2px;
  color: rgba(255, 244, 207, 0.68);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav button,
.mobile-tabs button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  text-align: left;
  font-size: 13px;
  font-weight: 780;
}

.nav button.active {
  background: linear-gradient(90deg, rgba(196, 154, 69, 0.18), rgba(255, 255, 255, 0.1));
  box-shadow: inset 3px 0 var(--gold), 0 8px 24px rgba(0, 0, 0, 0.12);
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.rail-footer {
  margin-top: 14px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.35;
}

.main {
  padding: 22px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 2px 0 4px;
}

.topbar-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.back-btn {
  min-height: 36px;
  padding: 7px 10px;
  flex: 0 0 auto;
}

.topbar h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.08;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.role-select {
  display: grid;
  gap: 6px;
  min-width: 208px;
}

.role-select label,
.field label {
  color: #4b5563;
  font-size: 12px;
  font-weight: 820;
}

.label-hi {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.voice-btn {
  min-height: 28px;
  margin-left: 6px;
  padding: 5px 9px;
  border-radius: var(--radius);
  background: var(--blue);
  color: white;
  font-size: 12px;
  font-weight: 900;
  vertical-align: middle;
}

.voice-btn.listening {
  background: var(--red);
}

.role-select select,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field select,
.role-select select {
  min-height: 46px;
  padding-right: 34px;
  line-height: 1.35;
}

.role-select select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green-2);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(196, 154, 69, 0.18), 0 8px 20px rgba(10, 122, 98, 0.08);
}

.field textarea {
  min-height: 76px;
  resize: vertical;
}

.mobile-tabs {
  display: none;
}

.grid {
  display: grid;
  gap: 12px;
}

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

.stat,
.panel,
.row,
.toast {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.stat {
  padding: 13px;
  min-height: 88px;
  position: relative;
  overflow: hidden;
  border-top: 0;
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--green-2));
}

.stat:nth-child(1)::before {
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.stat:nth-child(2)::before {
  background: linear-gradient(90deg, var(--amber), var(--gold));
}

.stat:nth-child(3)::before {
  background: linear-gradient(90deg, var(--violet), var(--gold));
}

.stat:nth-child(4)::before {
  background: linear-gradient(90deg, var(--green-2), var(--gold));
}

.stat:nth-child(5)::before {
  background: linear-gradient(90deg, var(--rose), var(--gold));
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 23px;
  line-height: 1;
}

.stat small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.layout {
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  align-items: start;
  margin-top: 12px;
}

.work-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.compact-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.kpi-strip > div {
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbf8ef);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.kpi-strip > div:nth-child(1) {
  border-color: rgba(8, 145, 178, 0.26);
}

.kpi-strip > div:nth-child(2) {
  border-color: rgba(15, 107, 87, 0.26);
}

.kpi-strip > div:nth-child(3) {
  border-color: rgba(217, 119, 6, 0.28);
}

.kpi-strip > div:nth-child(4) {
  border-color: rgba(109, 93, 252, 0.26);
}

.kpi-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.kpi-strip strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.panel {
  padding: 15px;
  overflow-x: visible;
  max-width: 100%;
  border-color: rgba(215, 222, 219, 0.88);
}

.compact-work-panel {
  align-self: start;
}

.compact-work-panel .empty {
  padding: 12px;
  font-size: 12px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(215, 222, 219, 0.72);
}

.panel h3 {
  margin: 0;
  font-size: 17px;
}

.panel-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.compact-form {
  margin-bottom: 12px;
}

.field.full {
  grid-column: 1 / -1;
}

.photo-drop {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px dashed rgba(8, 145, 178, 0.48);
  border-radius: var(--radius);
  padding: 10px;
  background: linear-gradient(135deg, rgba(10, 122, 98, 0.06), rgba(196, 154, 69, 0.12), #ffffff);
  min-height: 94px;
  overflow: hidden;
}

.clickable-photo {
  cursor: pointer;
}

.photo-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.photo-meta {
  align-self: center;
  color: #365349;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.camera-action {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: var(--green);
  color: white;
  font-size: 12px;
  font-weight: 900;
  pointer-events: auto;
  border: 0;
}

.live-camera-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(2, 14, 12, 0.72);
}

.live-camera-box {
  width: min(560px, 100%);
  max-height: calc(100vh - 28px);
  overflow: auto;
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.live-camera-head,
.live-camera-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.live-camera-video {
  width: 100%;
  max-height: 62vh;
  border-radius: 12px;
  background: #071512;
  object-fit: contain;
}

.photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #f8f3e7);
  object-fit: cover;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--teal);
  font-weight: 900;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
}

.invoice-preview {
  padding: 6px;
  overflow: hidden;
  word-break: break-word;
  font-size: 10px;
  line-height: 1.15;
}

.receive-mode-select {
  display: none;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mode-chip {
  min-height: 68px;
  border: 1px solid #d9e3df;
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff, #f7faf9);
  color: #15221f;
  text-align: left;
  box-shadow: 0 8px 20px rgba(7, 42, 34, 0.05);
}

.mode-chip strong,
.mode-chip span {
  display: block;
}

.mode-chip strong {
  font-size: 13px;
  line-height: 1.15;
}

.mode-chip span {
  margin-top: 5px;
  color: #60706d;
  font-size: 11px;
  line-height: 1.15;
}

.mode-chip.active {
  border-color: #b9902f;
  background: linear-gradient(180deg, #fff8df, #edf8f3);
  color: #0f6b57;
  box-shadow: 0 0 0 2px rgba(185, 144, 47, 0.14);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0c8067, var(--green));
  color: white;
  font-size: 13px;
  font-weight: 860;
  box-shadow: 0 10px 22px rgba(15, 107, 87, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  white-space: normal;
  text-align: center;
}

.btn.secondary {
  background: linear-gradient(180deg, #ffffff, #f3f6f6);
  color: #0f5f4f;
  box-shadow: none;
  border: 1px solid #d9e3df;
}

.btn.warn {
  background: linear-gradient(180deg, #e89918, var(--amber));
}

.btn.danger {
  background: linear-gradient(180deg, #dc3e32, var(--red));
}

.btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  box-shadow: none;
}

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

.stack {
  display: grid;
  gap: 8px;
}

.row {
  padding: 11px;
}

.compact-queue-row {
  padding: 9px 10px;
  box-shadow: none;
}

.compact-queue-row .row-title {
  font-size: 13px;
}

.compact-queue-row .row-meta {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
}

.compact-queue-row .tag {
  min-height: 20px;
  padding: 3px 7px;
  font-size: 10px;
}

.compact-queue-row .mini-actions {
  margin-top: 7px;
  gap: 6px;
}

.compact-queue-row .mini-actions .btn {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
}

.queue-details {
  margin-top: 3px;
}

.queue-details summary {
  width: max-content;
  max-width: 100%;
  cursor: pointer;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.photo-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.photo-review {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #fbfcfd;
}

.photo-review img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.photo-review-title {
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.check-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.row-title {
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.row-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.amount {
  white-space: nowrap;
  font-weight: 950;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f4f6;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.tag.pending {
  background: linear-gradient(180deg, #fff4dc, #f8e7bf);
  color: #8a560e;
}

.tag.ok {
  background: linear-gradient(180deg, #e6f5ef, #d8eee6);
  color: var(--green);
}

.tag.info {
  background: linear-gradient(180deg, #eef4ff, #e3ecfb);
  color: var(--blue);
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mini-actions .btn {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 12px;
}

.inline-control {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-control input {
  min-width: 0;
  flex: 1;
}

.inline-control .btn {
  white-space: nowrap;
}

.linklike {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.linklike:hover,
.linklike:focus {
  text-decoration: underline;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 680px;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border-radius: 7px;
}

.compact-select {
  width: min(132px, 100%);
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.geo-status-grid {
  margin: 2px 0 4px;
}

.booking-form-panel {
  position: relative;
  z-index: 1;
}

.ledger-table th,
.ledger-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 7px;
  text-align: left;
  vertical-align: top;
}

.ledger-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f8fafb, #eef3f2);
  font-weight: 900;
}

.ledger-table tbody tr:hover {
  background: #fbfdfe;
}

.ledger-table td:last-child,
.ledger-table th:last-child {
  text-align: right;
}

.table-thumb {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.rights-table .btn {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.channel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  background: #fbfcfd;
  font-size: 12px;
}

.website-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 243, 231, 0.94)),
    linear-gradient(90deg, rgba(196, 154, 69, 0.14), rgba(255, 255, 255, 0));
  box-shadow: var(--shadow);
}

.website-hero h3 {
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.12;
}

.website-hero p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.website-status {
  min-width: 210px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid #ecd39a;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff7e2, #eef8f4);
}

.website-status strong {
  color: #8a560e;
  font-size: 16px;
  line-height: 1.2;
}

.website-status span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.contact-list {
  display: grid;
  gap: 8px;
}

.contact-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--green);
  background: linear-gradient(135deg, #ffffff, #f6f0de);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gallery-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #fbf7ec);
}

.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.gallery-card div {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.gallery-card strong {
  font-size: 13px;
  line-height: 1.2;
}

.gallery-card span {
  color: var(--muted);
  font-size: 12px;
}

.policy-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.42;
}

.policy-list strong {
  color: var(--green);
}

.otp-box {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff8ea, #eef7ff);
  border: 1px solid #ecd39a;
}

.otp-preview {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #ecd39a;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff8ea, #eef7ff);
}

.otp-preview span {
  color: #8a560e;
  font-size: 12px;
  font-weight: 900;
}

.otp-preview strong {
  color: var(--ink);
  font-size: 28px;
  letter-spacing: 0;
}

.otp-preview small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.otp-line {
  display: flex;
  gap: 8px;
}

.otp-line input {
  min-width: 0;
  flex: 1;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  padding: 12px 14px;
  max-width: min(320px, calc(100vw - 24px));
  font-size: 13px;
  transform: translateY(120%);
  opacity: 0;
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.owner-reason-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(8, 21, 34, 0.48);
  overflow: auto;
}

.owner-reason-dialog {
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid rgba(196, 154, 69, 0.36);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(8, 21, 34, 0.28);
  padding: 18px;
}

.owner-edit-dialog {
  width: min(760px, 100%);
}

.owner-reason-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.owner-reason-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.owner-reason-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.owner-reason-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.empty {
  padding: 18px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

@media (min-width: 881px) {
  .app-shell:not(.login-shell) {
    min-height: 100vh;
  }

  .main {
    width: 100%;
    overflow: hidden;
  }

  .panel-head .btn,
  .mini-actions .btn {
    flex: 0 0 auto;
  }

  .screen.active {
    animation: screenFade 130ms ease-out;
  }
}

@keyframes screenFade {
  from {
    opacity: 0.82;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 880px) {
  body {
    background: #eef3f5;
  }

  .app-shell {
    display: block;
    max-width: 100%;
  }

  .rail {
    display: none;
  }

  .main {
    padding: 8px 9px calc(82px + env(safe-area-inset-bottom));
  }

  .topbar {
    display: grid;
    position: sticky;
    top: 0;
    z-index: 8;
    gap: 7px;
    margin: -8px -9px 8px;
    padding: 8px 9px 7px;
    background: rgba(238, 243, 245, 0.96);
    border-bottom: 1px solid rgba(214, 221, 230, 0.9);
    backdrop-filter: blur(14px);
    transition: transform 150ms ease, opacity 150ms ease;
    will-change: transform;
  }

  .topbar.header-hidden {
    transform: translateY(calc(-100% - 9px));
    opacity: 0;
    pointer-events: none;
  }

  .topbar h2 {
    font-size: 17px;
    line-height: 1.08;
  }

  .topbar p {
    font-size: 11px;
    line-height: 1.25;
    margin-top: 3px;
  }

  .topbar-title > div {
    display: none;
  }

  .topbar-title {
    align-items: end;
  }

  .role-select {
    min-width: 0;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 7px;
  }

  .role-select label {
    display: none;
  }

  .role-select .tag {
    display: none;
  }

  .role-select .btn {
    grid-column: 1 / -1;
    min-height: 42px;
  }

  .field select,
  .field input,
  .field textarea,
  .role-select select {
    min-height: 48px;
    font-size: 16px;
  }

  .field select,
  .role-select select {
    min-height: 52px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .actions {
    padding-bottom: 22px;
    gap: 8px;
  }

  .actions .btn {
    width: 100%;
  }

  .screen {
    padding-bottom: 28px;
  }

  .mobile-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
    padding: 5px max(7px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left));
    box-shadow: 0 -10px 24px rgba(17, 24, 39, 0.1);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
  }

  .mobile-tabs::-webkit-scrollbar {
    display: none;
  }

  .mobile-tabs button {
    flex: 0 0 76px;
    min-height: 42px;
    justify-content: center;
    padding: 5px 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.1;
    display: grid;
    gap: 2px;
    text-align: center;
  }

  .mobile-tabs button.active {
    color: var(--green);
    background: linear-gradient(180deg, #fff7e2, #e9f4f1);
    box-shadow: inset 0 2px 0 var(--gold);
  }

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

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

  .layout,
  .work-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    gap: 14px;
  }

  .panel {
    padding: 12px;
    border-radius: 7px;
    box-shadow: 0 5px 18px rgba(17, 24, 39, 0.06);
  }

  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .panel-head h3 {
    font-size: 16px;
    line-height: 1.25;
  }

  .panel-head .btn,
  .panel-head .tag,
  .panel-head .panel-sub {
    max-width: 100%;
  }

  .btn {
    min-height: 46px;
    padding: 10px 11px;
  }

  .mini-actions .btn {
    flex: 1 1 132px;
  }

  .inline-control {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-control .btn {
    width: 100%;
  }

  .photo-drop {
    grid-template-columns: 64px 1fr;
    min-height: 86px;
  }

  .photo-preview {
    width: 64px;
    height: 64px;
  }

  .ledger-table {
    min-width: 760px;
  }

  .booking-register-table,
  .booking-register-table.ledger-table {
    min-width: 900px;
  }

  .table-scroll {
    margin-inline: -2px;
    padding-bottom: 4px;
  }

  .toast {
    right: 12px;
    left: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .owner-reason-dialog {
    padding: 14px;
    max-height: calc(100dvh - 24px);
  }

  .owner-reason-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .row-top {
    display: grid;
  }

  .amount {
    white-space: normal;
  }

  .website-hero {
    display: grid;
    padding: 14px;
  }

  .website-status {
    min-width: 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }
}

@media (max-width: 430px) {
  .stats {
    gap: 9px;
  }

  .main {
    padding-inline: 8px;
  }

  .stat {
    padding: 12px;
    min-height: 88px;
  }

  .stat strong {
    font-size: 21px;
  }

  .panel {
    padding: 13px;
  }

  .topbar h2 {
    font-size: 17px;
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }

  .photo-review-grid {
    grid-template-columns: 1fr;
  }

  .mode-switch {
    grid-template-columns: 1fr;
  }

  .otp-line {
    display: grid;
    grid-template-columns: 1fr;
  }

  .otp-line input,
  .otp-line .btn {
    width: 100%;
  }

  .mobile-tabs button {
    flex-basis: 68px;
    font-size: 10.5px;
  }
}
