/* VCxO Backup Vault — brand styling.
   Palette from the Virtual CxO profile deck (navy #002060, the cyan→blue band,
   burgundy and teal accents); type and light-background treatment from
   vcfoconsulting.com (Roboto Slab headings, Raleway body). */

:root {
  /* brand */
  --navy: #002060;
  --navy-deep: #001845;
  --navy-soft: #e8edf6;
  --blue: #1b75bc;
  --blue-link: #0170b9;
  --blue-soft: #e7f1fa;
  --cyan: #00aeef;
  --burgundy: #6e1d2d;
  --burgundy-soft: #f7ebed;
  --teal: #35877e;
  --teal-soft: #e6f2f0;
  --amber: #b45309;
  --amber-soft: #fdf3e3;

  /* neutrals */
  --ink: #2d2d2d;
  --body: #4b4f58;
  --muted: #7a7a7a;
  --line: #e3e8ee;
  --line-soft: #eef2f7;
  --bg: #f7f9fc;
  --card: #ffffff;

  --font-head: "Roboto Slab", Georgia, "Times New Roman", serif;
  --font-body: "Raleway", Arial, Helvetica, sans-serif;
  --font-mono: Consolas, "SF Mono", Menlo, monospace;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 32, 96, .05), 0 10px 28px rgba(0, 32, 96, .07);
  --band: linear-gradient(90deg, var(--cyan) 0%, var(--blue) 45%, var(--navy) 100%);
}

* { box-sizing: border-box; }

/* The hidden attribute must always win. It is applied by the browser's own
   stylesheet, so ANY class that sets `display` silently overrides it and leaves
   the element on screen — which is how a hidden bottom sheet ended up covering
   the whole phone app and swallowing every tap. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font: 15px/1.6 var(--font-body);
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.rtl { direction: rtl; font-family: "Cairo", "Segoe UI", Tahoma, sans-serif; }
body.rtl h1, body.rtl h2, body.rtl h3 { font-family: "Cairo", "Segoe UI", Tahoma, sans-serif; }

h1, h2, h3 { font-family: var(--font-head); color: var(--navy); font-weight: 600; }
a { color: var(--blue-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ------------------------------------------------------------------ header */

header.topbar {
  background: #fff;
  padding: 12px 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
header.topbar img.logo { height: 38px; width: auto; display: block; }
header.topbar .spacer { flex: 1; }

header.topbar .period {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  background: var(--navy-soft);
  border: 1px solid #d3ddee;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.accent-band { height: 4px; background: var(--band); }

/* hero — echoes the gradient bands used throughout the deck */
.hero {
  background: linear-gradient(115deg, var(--navy-deep) 0%, var(--navy) 48%, #0b3f86 100%);
  color: #fff;
  padding: 26px 26px 28px;
  position: relative;
  overflow: hidden;
}
.hero::after {                       /* ghosted V, as on the deck's master slide */
  content: "";
  position: absolute;
  inset: 0 auto 0 auto;
  right: -40px; top: -30px;
  width: 260px; height: 260px;
  background: conic-gradient(from 210deg at 50% 0%, rgba(255,255,255,.10) 0deg, transparent 38deg);
  transform: skewX(-12deg);
  pointer-events: none;
}
body.rtl .hero::after { right: auto; left: -40px; transform: skewX(12deg); }
.hero .inner { max-width: 1080px; margin: 0 auto; position: relative; z-index: 1; }
.hero.wide .inner { max-width: 1420px; }
.hero h1 {
  font-family: var(--font-head);
  color: #fff;
  margin: 0 0 4px;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .2px;
}
.hero p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 14px; }
.hero .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero .chip {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
}

main { max-width: 1080px; margin: 0 auto; padding: 24px 26px 56px; }
main.wide { max-width: 1420px; }

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.card h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .1px;
}
.card .hint { color: var(--muted); font-size: 13.5px; margin: 0 0 15px; }

.step { display: flex; gap: 14px; align-items: baseline; }
.step .num {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--band);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  display: grid;
  place-items: center;
}

/* ------------------------------------------------------------------ forms */

label.field {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: .2px;
}

select, input[type=text], input[type=email], input[type=password], textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  border: 1px solid #d5dde7;
  border-radius: 8px;
  background: #fff;
}
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 117, 188, .16);
}
textarea { min-height: 68px; resize: vertical; }

/* type-to-filter name picker */
.combo { position: relative; }
.combo input { padding-inline-end: 40px; }
.combo-btn {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 6px;
  font-size: 17px;
  line-height: 1;
}
.combo-btn:hover:not(:disabled) { background: var(--navy-soft); color: var(--navy); }

.combo-list {
  position: absolute;
  z-index: 30;
  inset-inline: 0;
  top: calc(100% + 5px);
  max-height: 292px;
  overflow-y: auto;
  margin: 0;
  padding: 5px;
  list-style: none;
  background: #fff;
  border: 1px solid #d5dde7;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 32, 96, .16);
}
.combo-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--ink);
}
.combo-opt:hover, .combo-opt.active { background: var(--navy-soft); }
.combo-opt mark {
  background: #fdf0c4;
  color: var(--navy);
  font-weight: 700;
  padding: 0 1px;
  border-radius: 2px;
}
.combo-name { flex: 1; }
.combo-tick {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 8px;
  border-radius: 999px;
}
.combo-empty { padding: 12px; color: var(--muted); font-size: 13.5px; }

button {
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--navy);
  color: #fff;
  transition: background .15s, box-shadow .15s;
}
button:hover:not(:disabled) { background: var(--blue); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost { background: #fff; color: var(--navy); border-color: #d5dde7; }
button.ghost:hover:not(:disabled) { background: var(--navy-soft); border-color: #bccbe2; }
button.danger { background: var(--burgundy); }
button.danger:hover:not(:disabled) { background: #8a2739; }
button.small { padding: 5px 11px; font-size: 12.5px; }

/* ------------------------------------------------------------------ dropzone */

.dropzone {
  border: 2px dashed #c3d3e6;
  border-radius: var(--radius);
  padding: 34px 20px;
  text-align: center;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
  transition: background .15s, border-color .15s;
}
.dropzone.hot { border-color: var(--cyan); background: var(--blue-soft); }
.dropzone p { margin: 6px 0; color: var(--muted); }
.dropzone p strong { color: var(--navy); font-size: 16px; font-family: var(--font-head); font-weight: 600; }
.dropzone .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* ------------------------------------------------------------------ progress */

.bar {
  height: 9px;
  background: #e7edf4;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 6px;
}
.bar > i { display: block; height: 100%; background: var(--band); width: 0; transition: width .2s; }

.stats { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.stats b { color: var(--navy); font-weight: 700; }

.filelist {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 12px;
  font-size: 13px;
  background: #fff;
}
.filelist div.row { display: flex; gap: 10px; padding: 6px 11px; border-bottom: 1px solid var(--line-soft); }
.filelist div.row:last-child { border-bottom: 0; }
.filelist .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .sz { color: var(--muted); font-variant-numeric: tabular-nums; }
.filelist .st { width: 84px; text-align: end; font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
.st.ok { color: var(--teal); }
.st.err { color: var(--burgundy); }
.st.run { color: var(--blue-link); }
.st.wait, .st.skip { color: var(--muted); }

/* ------------------------------------------------------------------ notices */

.notice {
  padding: 13px 15px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 15px;
  border-inline-start: 4px solid transparent;
}
.notice.info { background: var(--blue-soft); border: 1px solid #c9e0f3; border-inline-start: 4px solid var(--blue); color: #10456f; }
.notice.warn { background: var(--amber-soft); border: 1px solid #f0d9ae; border-inline-start: 4px solid var(--amber); color: #7c3f06; }
.notice.err  { background: var(--burgundy-soft); border: 1px solid #e8c8ce; border-inline-start: 4px solid var(--burgundy); color: var(--burgundy); }
.notice.good { background: var(--teal-soft); border: 1px solid #c2e0da; border-inline-start: 4px solid var(--teal); color: #1f5f58; }

/* ------------------------------------------------------------------ tables */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--navy);
  font-weight: 700;
  background: #f4f7fb;
  border-bottom: 2px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody tr:hover td { background: #fbfcfe; }

th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { background: #e8eff7; color: var(--blue-link); }
th.sortable .arrow { margin-inline-start: 5px; font-size: 9px; opacity: 0; }
th.sortable:hover .arrow { opacity: .4; }
th.sortable.on { color: var(--blue-link); background: #e8eff7; }
th.sortable.on .arrow { opacity: 1; }
tr.dept td {
  background: var(--navy-soft);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .05em;
}
tr.dept:hover td { background: var(--navy-soft); }
td.num { text-align: end; font-variant-numeric: tabular-nums; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge.missing   { background: #eef2f7; color: var(--muted); }
.badge.open      { background: var(--amber-soft); color: var(--amber); }
.badge.finalized { background: var(--blue-soft); color: var(--blue-link); }
.badge.verified  { background: var(--teal-soft); color: var(--teal); }
.badge.purged    { background: var(--burgundy-soft); color: var(--burgundy); }

/* ------------------------------------------------------------------ tiles */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.tile .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.tile .v { font-size: 25px; font-weight: 600; margin-top: 3px; color: var(--navy); font-family: var(--font-head); }
.tile:nth-child(2) { border-top-color: var(--amber); }
.tile:nth-child(4) { border-top-color: var(--teal); }
.tile:nth-child(5) { border-top-color: var(--burgundy); }

/* ------------------------------------------------------------------ tabs */

nav.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
nav.tabs button {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 9px 16px;
  font-weight: 600;
  margin-bottom: -1px;
}
nav.tabs button:hover { background: transparent; color: var(--navy); }
nav.tabs button.on { color: var(--navy); border-bottom-color: var(--cyan); }

/* ------------------------------------------------------------------ dialogs */

dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 4px solid var(--navy);
  padding: 24px;
  max-width: 660px;
  width: calc(100% - 40px);
  box-shadow: 0 24px 60px rgba(0, 32, 96, .28);
  color: var(--body);
  font-family: var(--font-body);
}
dialog::backdrop { background: rgba(0, 24, 69, .5); }
dialog h3 { margin: 0 0 12px; font-size: 18px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ------------------------------------------------------------------ misc */

.login-wrap { max-width: 400px; margin: 7vh auto; }
.login-wrap .card { border-top: 4px solid var(--navy); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
code.cmd {
  display: block;
  background: var(--navy-deep);
  color: #cfe3f7;
  padding: 11px 13px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre;
  margin: 8px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  direction: ltr;
  text-align: start;
}

footer.site {
  text-align: center;
  padding: 22px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 640px) {
  header.topbar { padding: 10px 16px; }
  header.topbar img.logo { height: 30px; }
  .hero { padding: 20px 16px 22px; }
  .hero h1 { font-size: 20px; }
  main { padding: 18px 16px 40px; }
  .card { padding: 18px 16px; }
  .step { gap: 10px; }
}
