/* Tabu2Docs — לנדובר, סגנון זהה לשאר הכלים (BuildCalc וחבריו) */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --copper:       #B8743D;
  --copper-dark:  #9A5F2E;
  --copper-light: #F5E9DC;
  --teal:         #5BC8C4;
  --teal-light:   #E0F7F6;
  --charcoal:     #3C3C3C;
  --text:         #2C2C2C;
  --text-muted:   #777777;
  --bg:           #F0EDE6;
  --bg-white:     #FFFFFF;
  --border:       #E2DDD6;
  --red:          #C0392B;
  --green:        #2E7D52;
  --radius:       4px;
  --shadow:       0 2px 12px rgba(0,0,0,0.08);
}

html { font-size: 16px; }

body {
  font-family: 'Heebo', 'Arial Hebrew', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  padding-bottom: 48px;
}

/* ── Navbar ──────────────────────────────── */
nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-app-brand,
.nav-site-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
}
.nav-app-logo { height: 130px; width: auto; }
.nav-site-brand { opacity: .8; transition: opacity .2s; }
.nav-site-brand:hover { opacity: 1; }
.nav-site-logo { height: 100px; width: auto; }
@media (max-width: 520px) {
  .nav-app-logo { height: 92px; }
  .nav-site-logo { height: 64px; }
  nav { padding: 8px 16px; }
}

/* ── Hero ────────────────────────────────── */
.hero {
  background: var(--charcoal);
  color: #fff;
  text-align: center;
  padding: 28px 24px 24px;
}
.hero h1 {
  font-size: 1.7rem; font-weight: 700; margin-bottom: 8px;
  letter-spacing: -.01em;
}
.hero p { font-size: 1rem; color: rgba(255,255,255,0.78); font-weight: 300; }

/* ── Container ───────────────────────────── */
.container {
  max-width: 720px;
  margin: 36px auto 0;
  padding: 0 16px;
}

/* ── Section title ───────────────────────── */
.section-title {
  font-size: 1.1rem; font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 18px;
  padding-bottom: 10px;
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 2px;
  background: var(--copper);
}

/* ── Card ────────────────────────────────── */
.card {
  background: var(--bg-white);
  border-top: 3px solid var(--copper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 20px;
}

/* ── Upload form ─────────────────────────── */
.upload-form { display: flex; flex-direction: column; gap: 16px; }

.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group label {
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
}
.field-group input[type="file"],
.field-group input[type="text"] {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Heebo', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-white);
  transition: border-color .15s;
}
.field-group input[type="text"] { text-align: right; }
.field-group input:focus { outline: none; border-color: var(--copper); }

/* ── Buttons ─────────────────────────────── */
.btn-primary,
.btn-secondary {
  padding: 10px 28px;
  border-radius: var(--radius);
  font-family: 'Heebo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .15s, border-color .15s;
}
.btn-primary {
  background: var(--copper);
  color: #fff;
  border: none;
}
.btn-primary:hover:not(:disabled) { background: var(--copper-dark); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-secondary {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--border);
  font-weight: 600;
}
.btn-secondary:hover {
  border-color: var(--copper);
  color: var(--copper-dark);
  background: var(--copper-light);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Status line ─────────────────────────── */
.status-line { margin: 0; font-size: .9rem; min-height: 1.1em; color: var(--text-muted); }
.status-line[data-kind="error"]   { color: var(--red); font-weight: 600; }
.status-line[data-kind="success"] { color: var(--green); font-weight: 600; }

/* ── Warnings note ───────────────────────── */
.warnings-note {
  background: #FEF6ED;
  border: 1px solid #F0C68A;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: .9rem;
  color: #8A5A1A;
  margin-bottom: 16px;
}
.warnings-list {
  list-style: disc inside;
  background: #FEF6ED;
  border: 1px solid #F0C68A;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: .88rem;
  color: #8A5A1A;
  margin: 0 0 16px;
}
.warnings-list li { margin-bottom: 3px; }

/* ── Progress bar ────────────────────────── */
.progress-block { margin-top: 14px; }
.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--copper-light);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--copper), var(--copper-dark));
  border-radius: 999px;
  transition: width .25s ease;
  position: relative;
}
.progress-fill.indet {
  width: 100% !important;
  background: linear-gradient(
    -90deg,
    var(--copper-light) 0%,
    var(--copper) 50%,
    var(--copper-light) 100%
  );
  background-size: 200% 100%;
  animation: indet-slide 1.2s linear infinite;
}
@keyframes indet-slide {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}
.progress-label {
  margin: 6px 0 0; font-size: .88rem;
  color: var(--text-muted); font-weight: 500;
}

/* ── Review header / meta ────────────────── */
.review-meta {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px 18px;
  margin-bottom: 16px;
  align-items: baseline;
}
.info-item label {
  display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: 2px;
}
.info-item.wide { grid-column: 1 / -1; }
.info-item.muted { color: var(--text-muted); font-size: .85rem; }
.inline-input {
  width: 90px; padding: 5px 8px; text-align: center;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Heebo', sans-serif; font-size: 1rem; font-weight: 700;
  color: var(--charcoal); background: var(--bg-white);
}
.inline-input:focus { outline: none; border-color: var(--copper); }

/* ── Owners table ────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 -4px 16px; }
#owners-table {
  width: 100%; border-collapse: collapse;
  min-width: 640px; font-size: .92rem;
}
#owners-table th, #owners-table td {
  padding: 8px 10px; text-align: right;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
#owners-table thead th {
  background: var(--charcoal); color: #fff; font-weight: 600;
  font-size: .85rem;
}
#owners-table tbody tr:hover { background: var(--copper-light); }
.unit-cell {
  font-weight: 700;
  background: #FBF8F0;
  border-inline-start: 3px solid var(--copper);
  vertical-align: top; width: 80px;
  color: var(--charcoal);
}
.cell-input {
  width: 100%; min-width: 80px;
  padding: 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: 'Heebo', sans-serif; font-size: .95rem;
  color: var(--text); background: var(--bg-white);
}
.cell-input:focus { outline: none; border-color: var(--copper); }
.cell-input.mono { font-variant-numeric: tabular-nums; }
td.flagged { background: #FEF6ED; }
td.flagged .cell-input { border-color: #E0A85C; }

.id-label {
  display: inline-block;
  padding: 2px 10px; border-radius: 999px;
  background: var(--copper-light); color: var(--copper-dark);
  font-weight: 700; font-size: .82rem;
}

.icon-btn {
  background: transparent; border: 1.5px solid transparent;
  color: var(--text-muted);
  padding: 4px 9px; border-radius: var(--radius);
  cursor: pointer; font-size: 1rem; line-height: 1;
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--red); color: var(--red); }

.review-actions {
  display: flex; gap: 12px; justify-content: flex-start;
  margin-top: 16px;
}

/* ── Help / instructions card ────────────── */
.help-card .help-h3 {
  font-size: 1rem; font-weight: 700; color: var(--charcoal);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.help-card .help-h3:first-of-type { margin-top: 4px; }
.help-card .help-p,
.help-card .steps,
.help-card .rules {
  font-size: .95rem; line-height: 1.7; color: var(--text);
}
.help-card .steps {
  padding-inline-start: 1.4em;
  margin-bottom: 10px;
}
.help-card .steps > li { margin-bottom: 8px; }
.help-card .steps strong { color: var(--copper-dark); font-weight: 700; }
.help-card .rules {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.help-card .rules > li {
  padding: 10px 14px;
  background: #FBF8F0;
  border-right: 3px solid var(--copper);
  border-radius: var(--radius);
}
.help-card .rules strong {
  color: var(--copper-dark); font-weight: 700;
}

.placeholders-table {
  width: 100%; border-collapse: collapse;
  margin: 8px 0 14px; font-size: .92rem;
}
.placeholders-table th, .placeholders-table td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: right; vertical-align: top;
}
.placeholders-table th {
  background: var(--copper-light); color: var(--charcoal);
  font-weight: 700;
}
.placeholders-table tbody tr:nth-child(even) { background: #FAF8F2; }
.placeholders-table code { white-space: nowrap; }
.placeholders-table .dim {
  color: var(--text-muted); font-size: .85rem; font-weight: 400;
}

code {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: .9em; background: var(--copper-light);
  padding: 1px 6px; border-radius: 3px;
  color: var(--copper-dark);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .card { padding: 20px; }
  .hero h1 { font-size: 1.4rem; }
  .hero p { font-size: .9rem; }
  .container { margin-top: 20px; padding: 0 12px; }
  .review-meta { grid-template-columns: 1fr 1fr; }
  .review-meta .info-item.wide { grid-column: 1 / -1; }
}
