:root {
  --bg: #f4efe7;
  --panel: #fffaf3;
  --panel-strong: #ffffff;
  --text: #1a1a1a;
  --muted: #6a6259;
  --line: #ddcfbe;
  --accent: #1f5c4c;
  --accent-soft: #d9ede7;
  --warn: #b35c1e;
  --danger: #982c2c;
  --shadow: 0 20px 45px rgba(34, 32, 28, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at top right, rgba(31, 92, 76, 0.18), transparent 25%),
    radial-gradient(circle at bottom left, rgba(179, 92, 30, 0.14), transparent 20%),
    var(--bg);
  color: var(--text);
}

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

.auth-shell,
.page-shell {
  min-height: 100vh;
  padding: 24px;
}

.auth-shell {
  display: grid;
  place-items: center;
}

.auth-card,
.page-card {
  background: rgba(255, 250, 243, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(221, 207, 190, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(100%, 460px);
  padding: 36px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #0d392f);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand-copy h1,
.page-title {
  margin: 0;
  font-size: 28px;
}

.brand-copy p,
.page-subtitle,
.muted {
  margin: 6px 0 0;
  color: var(--muted);
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

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

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
}

button {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.nav-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(221, 207, 190, 0.8);
}

.nav-links a.active {
  background: var(--accent);
  color: #fff;
}

.page-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboardv-shell {
  direction: rtl;
}

.dashboardv-shell table,
.dashboardv-shell th,
.dashboardv-shell td,
.dashboardv-shell label,
.dashboardv-shell input,
.dashboardv-shell select,
.dashboardv-shell button {
  text-align: right;
}

.card {
  padding: 20px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.metric-value {
  font-size: 32px;
  margin: 12px 0 0;
  font-weight: 700;
}

.metric-medium {
  font-size: 24px;
}

.metric-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.metric-card-hero {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 243, 232, 0.95));
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.bar-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 92, 76, 0.12);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f5c4c, #b35c1e);
}

.split {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.2fr 0.8fr;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.tag.warn {
  background: #fde8d7;
  color: var(--warn);
}

.tag.danger {
  background: #f9dddd;
  color: var(--danger);
}

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

.history-list,
.tree-list {
  display: grid;
  gap: 12px;
}

.tree-item,
.history-item {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}

.tree-item.active {
  border-color: var(--accent);
  background: rgba(217, 237, 231, 0.55);
}

.tree-children {
  margin-left: 18px;
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.filters-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.filters-actions {
  display: flex;
  gap: 12px;
  align-items: end;
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dashboardv-pies {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.pie-card h2 {
  margin-top: 0;
}

.pie-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 18px;
  align-items: start;
}

.pie-visual-wrap {
  display: grid;
  place-items: center;
  padding: 8px 0;
}

.pie-visual {
  width: min(100%, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(31, 92, 76, 0.08);
  box-shadow: inset 0 0 0 1px rgba(26, 26, 26, 0.08);
}

.pie-details table {
  width: 100%;
}

.legend-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex: 0 0 auto;
}

.totals-row td {
  font-weight: 700;
  background: #fffad1;
}

.mini-stat {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.metric-small {
  font-size: 24px;
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.toolbar > * {
  flex: 1 1 180px;
}

.message {
  padding: 12px 14px;
  border-radius: 14px;
  margin-top: 14px;
}

.message.success {
  background: #dff3ec;
  color: #135242;
}

.message.error {
  background: #f8dddd;
  color: #7b1e1e;
}

.hidden {
  display: none !important;
}

img.preview {
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.zone-entry-shell {
  direction: rtl;
}

.procedures-shell {
  direction: rtl;
}

.procedures-shell table,
.procedures-shell th,
.procedures-shell td,
.procedures-shell label,
.procedures-shell input,
.procedures-shell select,
.procedures-shell textarea,
.procedures-shell button {
  text-align: right;
}

.procedures-layout {
  align-items: start;
}

.procedure-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  margin-top: 16px;
}

.procedure-list-item {
  display: grid;
  gap: 6px;
  text-align: right;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.procedure-list-item span {
  color: var(--muted);
  font-size: 13px;
}

.procedure-fields {
  display: grid;
  gap: 14px;
}

.procedure-checkbox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.procedure-checkbox input {
  width: auto;
}

.procedure-result {
  display: grid;
  gap: 18px;
}

.procedure-result-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.procedure-recordset {
  display: grid;
  gap: 10px;
}

.procedure-recordset h3 {
  margin: 0;
}

.restart-shell {
  direction: rtl;
  background:
    radial-gradient(circle at top right, rgba(31, 92, 76, 0.14), transparent 26%),
    radial-gradient(circle at top left, rgba(79, 134, 181, 0.12), transparent 24%),
    linear-gradient(180deg, #f7fafc 0%, #eef4f8 100%);
}

.restart-shell * {
  min-width: 0;
}

.restart-shell label,
.restart-shell input,
.restart-shell select,
.restart-shell button {
  text-align: right;
}

.restart-nav {
  align-items: center;
  padding: 16px 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 226, 233, 0.85);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.restart-nav-intro {
  display: grid;
  gap: 10px;
}

.restart-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.restart-brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f8d95, #145b67);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.restart-hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: stretch;
  margin: 18px 0 16px;
  padding: 22px;
  border-radius: 28px;
  background:
    linear-gradient(140deg, rgba(8, 124, 139, 0.98), rgba(9, 83, 99, 0.98)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
  color: #fff;
  box-shadow: 0 30px 80px rgba(10, 80, 95, 0.22);
  position: relative;
  overflow: hidden;
}

.restart-hero::after {
  content: "";
  position: absolute;
  inset: auto -5% -30% auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 65%);
  pointer-events: none;
}

.restart-hero .muted {
  color: rgba(255, 255, 255, 0.78);
}

.restart-hero-copy,
.restart-hero-figure {
  position: relative;
  z-index: 1;
}

.restart-hero-copy {
  display: grid;
  gap: 12px;
  max-width: 620px;
}

.restart-hero h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
}

.restart-hero-subtitle {
  margin: 0;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.restart-hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.restart-hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
}

.restart-hero-figure {
  min-width: 260px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.restart-hero-kicker {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.restart-hero-figure strong {
  font-size: clamp(2.1rem, 3.8vw, 2.9rem);
  line-height: 1.15;
}

.restart-hero-figure span {
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  line-height: 1.25;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.84);
}

.restart-section-tabs {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  width: min(calc(100vw - 28px), 1240px);
  margin: 0;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(217, 226, 233, 0.92);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.restart-section-tabs a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbfd, #eef5f8);
  border: 1px solid #dde8ee;
  color: #0f5c67;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.restart-section-tabs a:hover {
  background: linear-gradient(180deg, #e9f7f8, #dff1f4);
}

.restart-filter-card {
  margin-top: 86px;
}

.restart-filter-card {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 226, 233, 0.9);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.06);
}

.restart-filters {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.restart-filters label {
  padding: 12px;
  border-radius: 20px;
  background: #f9fbfc;
  border: 1px solid #e3edf1;
}

.restart-summary-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.restart-summary-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 226, 233, 0.9);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.05);
}

.restart-summary-card span {
  display: block;
  color: #64748b;
  font-size: 13px;
}

.restart-summary-card strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.25;
}

.restart-metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.restart-metric-card,
.restart-section,
.restart-data-card {
  border: 1px solid rgba(217, 226, 233, 0.95);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.06);
}

.restart-metric-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}

.restart-metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #0f8d95, #38bdf8);
}

.restart-metric-card-warning::before {
  background: linear-gradient(180deg, #d97706, #f59e0b);
}

.restart-metric-card span,
.restart-card-metric span,
.restart-data-card header span {
  color: #64748b;
  font-size: 13px;
}

.restart-metric-card strong {
  font-size: 28px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  color: #0f172a;
}

.restart-section {
  padding: 20px;
  border-radius: 28px;
  margin-top: 18px;
  scroll-margin-top: 86px;
}

.restart-section h2 {
  margin: 0;
  font-size: 24px;
}

.restart-section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f8d95;
  font-weight: 700;
  font-size: 14px;
}

.restart-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.restart-card-list {
  display: grid;
  gap: 14px;
}

.restart-profitability-section .restart-card-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.restart-performance-section .restart-card-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.restart-items-section .restart-card-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.restart-data-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.restart-data-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.restart-data-card header strong {
  overflow-wrap: anywhere;
  display: block;
  font-size: 18px;
  color: #0f172a;
}

.restart-card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.restart-card-metric {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(244, 249, 250, 0.96), rgba(235, 244, 248, 0.94));
  border: 1px solid rgba(224, 234, 239, 0.96);
}

.restart-card-metric-button {
  width: 100%;
  text-align: right;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.restart-card-metric-button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 141, 149, 0.38);
  background: linear-gradient(180deg, rgba(231, 247, 249, 0.98), rgba(223, 241, 244, 0.96));
}

.restart-card-metric strong {
  overflow-wrap: anywhere;
  color: #0f172a;
}

.restart-total-card {
  background: linear-gradient(180deg, #fffef3, #fdf8cf);
}

.restart-profit-card.is-strong {
  border-color: rgba(16, 185, 129, 0.3);
}

.restart-profit-card.is-good {
  border-color: rgba(34, 197, 94, 0.24);
}

.restart-profit-card.is-medium {
  border-color: rgba(14, 165, 233, 0.24);
}

.restart-profit-badge,
.restart-performance-badge {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(15, 141, 149, 0.08);
  color: #0f8d95;
  text-align: center;
}

.restart-profit-badge {
  min-width: 84px;
  place-items: center;
  font-weight: 800;
}

.restart-warning-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  font-size: 13px;
  font-weight: 800;
}

.restart-progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e6eef2;
}

.restart-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f8d95, #39c0d5);
}

.restart-item-card {
  border-color: rgba(15, 141, 149, 0.18);
}

.restart-item-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(15, 141, 149, 0.08);
  color: #0f8d95;
  font-size: 13px;
  font-weight: 800;
}

.restart-analytics-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.restart-pie-card {
  display: grid;
  gap: 14px;
}

.restart-pie-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 16px;
  align-items: start;
}

.restart-pie {
  width: min(200px, 62vw);
  aspect-ratio: 1;
  border-radius: 50%;
  justify-self: center;
  background: rgba(15, 141, 149, 0.08);
  box-shadow: inset 0 0 0 16px rgba(255, 255, 255, 0.92), inset 0 0 0 1px rgba(15, 23, 42, 0.05);
  position: relative;
}

.restart-pie::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 1px rgba(217, 226, 233, 0.85);
}

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

.restart-breakdown-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1.2fr) minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 0.6fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(247, 250, 252, 0.92);
  border: 1px solid rgba(225, 234, 239, 0.86);
  font-size: 13px;
}

.restart-breakdown-row > * {
  overflow-wrap: anywhere;
}

.restart-warning-card {
  border-color: rgba(245, 158, 11, 0.32);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(255, 247, 237, 0.94));
}

.restart-missing-cost-section .restart-card-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.restart-missing-cost-items {
  display: grid;
  gap: 10px;
}

.restart-missing-cost-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed rgba(217, 119, 6, 0.28);
}

.restart-missing-cost-item strong {
  color: #7c2d12;
}

.restart-missing-cost-item span {
  color: #7c6f64;
  font-size: 13px;
}

.may-report-shell {
  direction: rtl;
  overflow-x: hidden;
}

.may-report-shell * {
  min-width: 0;
}

.may-report-nav {
  align-items: flex-start;
}

.may-report-hero {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1f5c4c, #13382f);
  color: #fff;
  box-shadow: var(--shadow);
}

.may-report-hero .muted {
  color: rgba(255, 255, 255, 0.78);
}

.may-report-hero h2 {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.45;
}

.may-report-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.may-report-metrics article,
.may-report-section {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.may-report-metrics article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
}

.may-report-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.may-report-metrics strong {
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.may-report-section {
  padding: 16px;
  border-radius: 18px;
  margin-top: 16px;
}

.may-report-section h2 {
  margin: 0 0 12px;
}

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

.may-table-frame {
  width: 100%;
  overflow: visible;
}

.may-mobile-table {
  table-layout: fixed;
  width: 100%;
  direction: rtl;
}

.may-mobile-table th,
.may-mobile-table td {
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  padding: 9px 7px;
  line-height: 1.35;
  font-size: 12px;
}

.may-mobile-table th {
  background: rgba(217, 237, 231, 0.42);
  color: var(--accent);
}

.zone-entry-shell table,
.zone-entry-shell th,
.zone-entry-shell td,
.zone-entry-shell label,
.zone-entry-shell input,
.zone-entry-shell select,
.zone-entry-shell textarea,
.zone-entry-shell button {
  text-align: right;
}

.zone-entry-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px;
  margin-bottom: 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(31, 92, 76, 0.95), rgba(14, 47, 39, 0.95)),
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent);
  color: #fff;
  box-shadow: var(--shadow);
}

.zone-entry-hero .muted {
  color: rgba(255, 255, 255, 0.82);
}

.zone-entry-hero h2 {
  margin: 12px 0 8px;
  font-size: 28px;
}

.zone-entry-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.zone-entry-layout {
  align-items: start;
}

.zone-entry-card {
  border: 1px solid rgba(31, 92, 76, 0.18);
}

.zone-entry-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.zone-entry-card-head h2,
.zone-panel h3 {
  margin: 0;
}

.zone-entry-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.zone-lookup-row {
  display: flex;
  gap: 8px;
}

.zone-lookup-row input {
  flex: 1;
}

.zone-panels {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 16px 0;
}

.zone-panel {
  display: grid;
  gap: 10px;
}

.zone-entry-toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.zone-entry-toolbar > * {
  flex: 1;
}

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

.entry-line-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.entry-line-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.entry-line-meta {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 12px;
}

.entry-line-meta label {
  min-width: 120px;
}

.entry-remove-btn {
  min-width: 52px;
}

.zone-entry-footer {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.zone-entry-totals {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.zone-image-capture {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }

  .pie-layout {
    grid-template-columns: 1fr;
  }

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

  .zone-entry-hero,
  .zone-entry-card-head,
  .zone-entry-toolbar,
  .zone-lookup-row,
  .entry-line-main {
    flex-direction: column;
  }

  .zone-entry-hero-actions,
  .zone-entry-toolbar > *,
  .zone-lookup-row button,
  .zone-lookup-row input,
  .entry-remove-btn,
  .zone-entry-footer > button {
    width: 100%;
  }

  .page-shell {
    padding: 14px;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .restart-nav .nav-links {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .restart-nav .nav-links a,
  .restart-nav .nav-links button {
    flex: 0 0 auto;
    text-align: center;
    padding-inline: 12px;
  }

  .restart-hero,
  .restart-section-head,
  .restart-data-card header {
    flex-direction: column;
    align-items: stretch;
  }

  .restart-filters,
  .restart-summary-strip,
  .restart-metrics,
  .restart-analytics-grid,
  .restart-card-grid,
  .restart-pie-layout {
    grid-template-columns: 1fr;
  }

  .restart-metric-card strong {
    font-size: 22px;
  }

  .restart-hero {
    padding: 18px;
    border-radius: 24px;
  }

  .restart-hero h2 {
    font-size: 28px;
  }

  .restart-hero-figure strong {
    font-size: 30px;
  }

  .restart-hero-figure span {
    font-size: 26px;
  }

  .restart-profitability-section .restart-card-list,
  .restart-items-section .restart-card-list,
  .restart-missing-cost-section .restart-card-list,
  .restart-performance-section .restart-card-list {
    grid-template-columns: 1fr;
  }

  .restart-breakdown-row {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .restart-breakdown-row span:nth-child(n + 3) {
    grid-column: 2;
  }

  .restart-section-tabs {
    top: 10px;
    width: calc(100vw - 16px);
    padding: 8px;
  }

  .restart-filter-card {
    margin-top: 80px;
  }

  .may-report-nav .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .may-report-nav .nav-links a,
  .may-report-nav .nav-links button {
    width: 100%;
    text-align: center;
    padding-inline: 10px;
  }

  .may-report-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .may-report-metrics,
  .may-report-grid {
    grid-template-columns: 1fr;
  }

  .may-mobile-table {
    display: table;
    table-layout: fixed;
    width: 100%;
  }

  .may-mobile-table thead {
    display: none;
  }

  .may-mobile-table tr {
    display: table;
    table-layout: fixed;
    width: 100%;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
  }

  .may-mobile-table td {
    display: table-row;
    padding: 0;
    border-bottom: 1px solid rgba(221, 207, 190, 0.72);
    font-size: 12px;
  }

  .may-mobile-table td::before,
  .may-mobile-table td::after {
    display: table-cell;
    width: 42%;
    padding: 8px;
    vertical-align: top;
  }

  .may-mobile-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
    background: rgba(217, 237, 231, 0.28);
  }

  .may-mobile-table td::after {
    content: attr(data-value);
  }

  .may-mobile-table td {
    color: transparent;
  }

  .may-mobile-table td::after {
    color: var(--text);
  }

  th,
  td {
    padding: 10px 8px;
    font-size: 13px;
  }
}
