:root {
  --bg: #f6f4ef;
  --surface: #fffdf8;
  --surface-2: #fbf7f0;
  --line: rgba(23, 42, 51, 0.09);
  --text: #12222b;
  --muted: #62717b;
  --teal: #0a4f57;
  --teal-2: #0f7d7a;
  --sand: #d6ad66;
  --sand-soft: rgba(214, 173, 102, 0.16);
  --mint: rgba(112, 184, 172, 0.16);
  --shadow: 0 28px 70px rgba(17, 37, 48, 0.12);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --sidebar-width: 286px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(6, 84, 94, 0.07), transparent 32%),
    radial-gradient(circle at top right, rgba(214, 173, 102, 0.13), transparent 26%),
    linear-gradient(180deg, #fbfaf7 0%, var(--bg) 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
}

.sidebar {
  background: linear-gradient(180deg, #063940 0%, #073944 48%, #082d34 100%);
  color: rgba(255, 255, 255, 0.92);
  padding: 28px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 8px 28px;
}

.brand-mark {
  width: 54px;
  height: 78px;
  color: #d9af63;
  flex: 0 0 auto;
}

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

.brand-title {
  font-size: 1.78rem;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 700;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 1.2rem;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.96);
}

.brand-ar {
  margin-top: 8px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.86);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.92);
  transition: background 160ms ease, transform 160ms ease;
}

.nav-item span {
  width: 24px;
  text-align: center;
  color: #f3cf86;
  font-weight: 800;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.workspace-card,
.user-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.workspace-name {
  font-size: 0.96rem;
  font-weight: 700;
}

.workspace-meta {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.72);
}

.avatar,
.profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, #f7d59a 0%, #d39d48 100%);
  color: #20333c;
}

.main {
  padding: 16px 18px 24px;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 4px 14px;
}

.search {
  flex: 1;
  max-width: 580px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 37, 48, 0.08);
  box-shadow: 0 10px 24px rgba(17, 37, 48, 0.05);
}

.search span {
  color: #80919a;
  font-size: 1.05rem;
}

.search input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  color: var(--text);
  font-weight: 600;
}

.search kbd {
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 0.78rem;
  border: 1px solid rgba(17, 37, 48, 0.12);
  color: #60707a;
  background: rgba(255, 255, 255, 0.92);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ghost-chip,
.icon-btn,
.profile,
.refresh-button,
.soft-button,
.filter-chip,
.primary-button {
  border: 0;
  cursor: pointer;
}

.ghost-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(17, 37, 48, 0.08);
  color: #31424c;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 700;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(17, 37, 48, 0.08);
  color: #31424c;
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d64a44;
  color: #fff;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(17, 37, 48, 0.08);
  color: #20333c;
  font-weight: 700;
}

.profile-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 6px 14px;
}

.hero h1 {
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #556772;
  font-weight: 700;
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #4ba875;
  box-shadow: 0 0 0 6px rgba(75, 168, 117, 0.18);
}

.refresh-button {
  margin-left: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 37, 48, 0.1);
  color: #27414c;
  font-weight: 700;
}

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

.workspace-view {
  display: grid;
  gap: 16px;
}

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

.kpi-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: center;
  border-radius: var(--radius-lg);
  padding: 18px 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(17, 37, 48, 0.09);
  box-shadow: 0 14px 30px rgba(17, 37, 48, 0.04);
}

.kpi-card.accent-mint .kpi-icon {
  background: var(--mint);
  color: var(--teal);
}

.kpi-card.accent-sand .kpi-icon {
  background: var(--sand-soft);
  color: #a66d0b;
}

.kpi-card.accent-sea .kpi-icon {
  background: rgba(112, 184, 172, 0.18);
  color: #0d7b74;
}

.kpi-card.accent-amber .kpi-icon {
  background: rgba(214, 173, 102, 0.18);
  color: #b17a16;
}

.kpi-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  font-weight: 800;
}

.kpi-label {
  font-size: 0.93rem;
  color: #4f5f69;
  margin-bottom: 6px;
  font-weight: 700;
}

.kpi-value {
  font-size: 1.4rem;
  letter-spacing: 0;
  font-weight: 800;
}

.kpi-note {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

.positive {
  color: #13724b;
}

.negative {
  color: #bc4138;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.92fr);
  gap: 16px;
  margin-top: 16px;
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  gap: 16px;
}

.daily-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.68fr);
  gap: 16px;
}

.panel {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 37, 48, 0.09);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ledger-panel {
  padding: 18px 18px 14px;
  min-height: 472px;
}

.form-panel {
  padding: 18px;
}

.daily-entry-panel {
  padding: 18px;
}

.form-panel h2,
.mini-panel h2,
.chart-card h2 {
  margin: 0 0 14px;
  font-size: 1.08rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.panel-head.compact {
  align-items: center;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(249, 246, 241, 0.88);
  color: #34454f;
  border: 1px solid rgba(17, 37, 48, 0.08);
  font-weight: 700;
}

.filter-chip.active {
  background: linear-gradient(135deg, #0c4d57, #096d6f);
  color: #fff;
  box-shadow: 0 10px 18px rgba(9, 90, 94, 0.25);
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(17, 37, 48, 0.08);
}

.empty-row td {
  padding: 0;
  background: #fff;
}

.empty-state,
.empty-side-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}

.empty-side-state {
  min-height: 220px;
}

.empty-state-title {
  font-size: 1.02rem;
  font-weight: 800;
}

.empty-state-copy {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 300px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
  background: rgba(255, 255, 255, 0.7);
}

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

thead th {
  text-align: left;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #667780;
  padding: 15px 16px;
  background: rgba(246, 242, 235, 0.86);
}

tbody td {
  padding: 15px 16px;
  border-top: 1px solid rgba(17, 37, 48, 0.06);
  color: #22333c;
  font-size: 0.94rem;
}

tbody tr:hover {
  background: rgba(12, 79, 87, 0.04);
}

.right {
  text-align: right;
}

.amount-positive {
  color: #11714a;
  font-weight: 700;
}

.amount-negative {
  color: #bc4138;
  font-weight: 700;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
}

.soft-button {
  border-radius: 14px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 37, 48, 0.09);
  color: #223741;
  font-weight: 800;
}

.muted-summary {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.mini-panel {
  padding: 18px;
}

.panel-head.compact a {
  color: #0c6d70;
  font-weight: 800;
  font-size: 0.92rem;
}

.list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.quick-ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.mini-stat {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(246, 242, 235, 0.95), rgba(255, 255, 255, 0.82));
  border: 1px solid rgba(17, 37, 48, 0.08);
}

.mini-stat span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.mini-stat strong {
  font-size: 1.18rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.action-grid .primary-button,
.action-grid .soft-button {
  margin-top: 0;
}

.module-form {
  display: grid;
  gap: 12px;
}

.daily-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.daily-form .primary-button {
  grid-column: 1 / -1;
}

.module-form label {
  display: grid;
  gap: 8px;
  color: #20333c;
  font-size: 0.9rem;
  font-weight: 800;
}

.module-form input,
.module-form select {
  width: 100%;
  border: 1px solid rgba(17, 37, 48, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-weight: 700;
  outline: none;
}

.module-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #586a73 50%), linear-gradient(135deg, #586a73 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.expenses-grid {
  align-items: start;
}

.ocr-panel {
  display: grid;
  gap: 14px;
}

.ocr-upload {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(10, 79, 87, 0.34);
  background:
    radial-gradient(circle at top right, rgba(112, 184, 172, 0.16), transparent 38%),
    rgba(251, 247, 240, 0.82);
}

.ocr-upload input {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(17, 37, 48, 0.1);
  background: rgba(255, 255, 255, 0.88);
}

.ocr-upload p,
.ocr-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.ocr-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(12, 109, 112, 0.08);
  color: #0a5e61;
}

.ocr-preview {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 37, 48, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: #243741;
  font-size: 0.9rem;
}

.ocr-preview details {
  margin-top: 4px;
}

.ocr-preview summary {
  cursor: pointer;
  color: #0a5e61;
  font-weight: 800;
}

.ocr-preview pre {
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
  padding: 12px;
  border-radius: 12px;
  background: rgba(246, 242, 235, 0.86);
  color: var(--muted);
}

.form-subhead {
  margin-top: 4px !important;
}

.import-drop {
  margin-top: 16px;
  padding: 20px;
  border-radius: 20px;
  border: 1px dashed rgba(10, 79, 87, 0.35);
  background:
    radial-gradient(circle at top right, rgba(214, 173, 102, 0.12), transparent 38%),
    rgba(251, 247, 240, 0.82);
}

.import-drop input {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(17, 37, 48, 0.1);
}

.import-drop p,
.import-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.mapping-list {
  display: grid;
  gap: 12px;
}

.mapping-list div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(246, 242, 235, 0.8);
  border: 1px solid rgba(17, 37, 48, 0.08);
}

.mapping-list span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.print-preview {
  min-height: 360px;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 240, 228, 0.84)),
    repeating-linear-gradient(0deg, rgba(10, 79, 87, 0.04), rgba(10, 79, 87, 0.04) 1px, transparent 1px, transparent 28px);
  border: 1px solid rgba(17, 37, 48, 0.1);
}

.print-preview h2 {
  margin: 0;
  font-size: 1.6rem;
}

.print-preview p {
  margin: 8px 0 20px;
  color: var(--muted);
  font-weight: 800;
}

.template-box {
  min-height: 210px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  border-radius: 18px;
  color: var(--muted);
  font-weight: 800;
  border: 1px dashed rgba(10, 79, 87, 0.24);
  background: rgba(255, 255, 255, 0.7);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

.list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(17, 37, 48, 0.07);
}

.list-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.list-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
}

.list-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  min-width: 74px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.pill.paid {
  background: rgba(97, 176, 132, 0.16);
  color: #18704b;
}

.pill.pending {
  background: rgba(214, 173, 102, 0.18);
  color: #a06c1d;
}

.pill.overdue {
  background: rgba(214, 77, 68, 0.12);
  color: #b03d35;
}

.amount-inline {
  font-weight: 800;
}

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

.chart-card {
  padding: 18px;
}

.chart-value {
  margin-top: 10px;
  font-size: 1.44rem;
  letter-spacing: 0;
  font-weight: 800;
}

.chart-note {
  margin-top: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.empty-note {
  color: var(--muted) !important;
}

.sparkline {
  width: 100%;
  height: 130px;
  margin-top: 16px;
  display: block;
}

.sparkline-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline-fill {
  opacity: 0.2;
}

.sparkline-line.teal,
.sparkline-fill.teal {
  stroke: #0d7c78;
  fill: rgba(13, 124, 120, 0.16);
}

.sparkline-line.amber,
.sparkline-fill.amber {
  stroke: #c69035;
  fill: rgba(198, 144, 53, 0.16);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(245, 241, 235, 0.42);
  backdrop-filter: blur(12px);
  padding: 20px;
}

.modal-backdrop.is-hidden {
  display: none;
}

.activation-modal {
  width: min(100%, 530px);
  max-height: min(92vh, 960px);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(255, 255, 252, 0.95), rgba(248, 242, 233, 0.98));
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(17, 37, 48, 0.25);
  border: 1px solid rgba(17, 37, 48, 0.08);
  padding: 22px 22px 18px;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.82);
  color: #23333d;
  font-size: 1.55rem;
  cursor: pointer;
}

.modal-top {
  display: grid;
  place-items: center;
  gap: 6px;
  margin-top: 4px;
}

.shield {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d4a04d 0%, #b98022 100%);
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(184, 126, 25, 0.26);
}

.modal-ornament {
  width: 100%;
  color: rgba(189, 142, 51, 0.78);
  margin-top: -2px;
}

.modal-ornament svg {
  width: 100%;
  height: 60px;
  display: block;
}

.activation-modal h2 {
  text-align: center;
  margin: 8px 0 6px;
  font-size: 1.7rem;
  letter-spacing: 0;
}

.modal-subtitle {
  text-align: center;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.trial-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(251, 245, 234, 0.95);
  border: 1px solid rgba(194, 153, 82, 0.22);
}

.trial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #824f08;
  font-weight: 700;
}

.trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
}

.trial-eta {
  font-size: 0.9rem;
  color: #6d4b1b;
}

.countdown {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.countdown div {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 14px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(17, 37, 48, 0.08);
}

.countdown strong {
  font-size: 1.65rem;
  letter-spacing: 0;
}

.countdown span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
}

.activation-form {
  margin-top: 18px;
}

.activation-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.96rem;
  font-weight: 800;
  text-align: center;
}

.license-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(17, 37, 48, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.key-icon {
  color: #92600f;
}

.license-input-wrap input {
  border: 0;
  outline: none;
  width: 100%;
  background: transparent;
  font-weight: 700;
  color: var(--text);
}

.setup-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.setup-grid label,
.user-list-label {
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 800;
  color: #20333c;
}

.setup-grid input,
.activation-form textarea {
  width: 100%;
  border: 1px solid rgba(17, 37, 48, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-weight: 600;
  outline: none;
}

.activation-form textarea {
  resize: vertical;
  min-height: 88px;
  margin-top: 10px;
}

.user-list-label {
  margin-top: 12px;
}

.setup-section-title {
  margin-top: 16px;
  margin-bottom: 10px;
  color: #20333c;
  font-size: 0.96rem;
  font-weight: 800;
  text-align: center;
}

.user-role-table {
  display: grid;
  gap: 10px;
}

.user-role-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 124px 38px;
  gap: 8px;
  align-items: center;
}

.user-role-row input,
.user-role-row select {
  min-width: 0;
  border: 1px solid rgba(17, 37, 48, 0.12);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-weight: 600;
  outline: none;
}

.user-role-row select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #586a73 50%), linear-gradient(135deg, #586a73 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.remove-user-button,
.add-user-button {
  border: 1px solid rgba(17, 37, 48, 0.1);
  background: rgba(255, 255, 255, 0.86);
  color: #243741;
  cursor: pointer;
  font-weight: 800;
}

.remove-user-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.remove-user-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.add-user-button {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.primary-button {
  margin-top: 12px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0a4f57 0%, #0f7774 100%);
  color: white;
  font-weight: 800;
  box-shadow: 0 18px 26px rgba(11, 88, 92, 0.24);
}

.feedback {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  font-size: 0.8rem;
  color: #5a6c74;
}

.feature-strip div {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 37, 48, 0.07);
  text-align: center;
}

.feature-strip span {
  color: #c38b2b;
  font-weight: 900;
}

.role-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 86px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 109, 112, 0.1);
  color: #0a5e61;
  font-size: 0.78rem;
  font-weight: 800;
}

.modal-footer {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(17, 37, 48, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: #54666f;
  text-align: center;
  font-size: 0.9rem;
}

.app-shell.is-locked .main {
  filter: blur(0.5px) saturate(0.84);
}

.app-shell.is-locked .main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(251, 247, 239, 0.14), rgba(251, 247, 239, 0.3));
  pointer-events: none;
}

@media (max-width: 1220px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: block;
    padding: 12px;
    overflow: hidden;
  }

  .brand,
  .sidebar-footer {
    display: none;
  }

  .nav {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 2px;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    padding: 11px 13px;
    white-space: nowrap;
  }

  .nav-item:hover,
  .nav-item.active {
    transform: translateY(-1px);
  }

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

  .content-grid,
  .module-grid,
  .daily-work-grid {
    grid-template-columns: 1fr;
  }

  .daily-form {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .main {
    padding: 14px 12px 18px;
  }

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

  .topbar-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .kpi-grid,
  .metric-grid,
  .chart-grid,
  .quick-ledger-grid {
    grid-template-columns: 1fr;
  }

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

  .feature-strip {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .setup-grid.live-fields,
  .user-role-row {
    grid-template-columns: 1fr;
  }

  .remove-user-button {
    width: 100%;
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 560px) {
  .activation-modal {
    padding: 18px 16px 16px;
    border-radius: 22px;
  }

  .trial-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }
}
