/* Focus Ofis — sadə, sıx ofis interfeysi */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #1b2430;
  --muted: #667085;
  --line: #e3e6eb;
  --accent: #1f4e8c;
  --accent-ink: #ffffff;
  --accent-soft: #e8eff8;
  --green: #1a7f4b;   --green-soft: #e3f4ea;
  --red: #b42318;     --red-soft: #fdecea;
  --amber: #a15c07;   --amber-soft: #fdf3e2;
  --blue: #175cd3;    --blue-soft: #e8f0fd;
  --violet: #6941c6;  --violet-soft: #f1ecfc;
  --grey: #475467;    --grey-soft: #eef0f3;
  --radius: 8px;
  --mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { font-size: 14px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 1.1rem; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 0.95rem; margin: 0 0 8px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* Yuxarı panel */
.topbar {
  background: #14243a; color: #fff; display: flex; align-items: center; gap: 20px;
  padding: 0 20px; height: 52px; position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; letter-spacing: .2px; color: #fff; white-space: nowrap; }
.brand span { color: #8fb3e6; font-weight: 500; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav a { color: #c9d5e6; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: #c9d5e6; white-space: nowrap; }
.userbox form { margin: 0; }
.userbox button { background: none; border: 0; color: #c9d5e6; cursor: pointer; font: inherit; padding: 0; }
.userbox button:hover, .userbox a:hover { color: #fff; }
.userbox a { color: #c9d5e6; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 22px 20px 60px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

/* Panellər */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card.tight { padding: 0; overflow: hidden; }
.card.tight > h2, .card.tight > .cardhead { padding: 14px 18px 0; }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.cardhead h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 960px) { .grid.two, .grid.side { grid-template-columns: 1fr; } }

/* Statistika */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: block; color: inherit; }
.stat:hover { border-color: var(--accent); text-decoration: none; }
.stat b { display: block; font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .88rem; }

/* Cədvəllər */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 600; background: #fafbfc; white-space: nowrap; }
tbody tr:hover { background: #fafbfd; }
tr.clickable { cursor: pointer; }
tr.bad td { background: var(--red-soft); }
tr.warn td { background: var(--amber-soft); }
td.empty { text-align: center; color: var(--muted); padding: 28px; }
tfoot td { font-weight: 650; background: #fafbfc; }

/* Nişanlar */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.b-grey { background: var(--grey-soft); color: var(--grey); }
.b-green { background: var(--green-soft); color: var(--green); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-violet { background: var(--violet-soft); color: var(--violet); }

/* Düymələr və formalar */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c5cbd3; text-decoration: none; background: #fafbfc; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #1a4176; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { padding: 4px 10px; font-size: .88rem; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: .84rem; margin-top: 4px; font-weight: 400; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #cfd4dc; border-radius: 6px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 70px; resize: vertical; }
input[type=file] { font: inherit; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 3px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .field { margin: 0; min-width: 160px; }

/* Bildirişlər */
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; border: 1px solid; }
.flash.ok { background: var(--green-soft); border-color: #b7e1c8; color: #14593a; }
.flash.error { background: var(--red-soft); border-color: #f4c3be; color: #8a1c12; }
.flash.info { background: var(--blue-soft); border-color: #c4d7f8; color: #123f8f; }

/* Mərhələlər */
.steps { display: flex; gap: 0; margin: 4px 0 18px; overflow-x: auto; }
.step { flex: 1; min-width: 130px; padding: 10px 12px 10px 0; position: relative; font-size: .84rem; color: var(--muted); }
.step::before { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--line); margin-bottom: 8px; margin-right: 6px; }
.step.done::before { background: var(--green); }
.step.now::before { background: var(--accent); }
.step.now { color: var(--ink); font-weight: 600; }
.step.done { color: var(--ink); }
.step small { display: block; font-weight: 400; color: var(--muted); }

/* Açıqlama siyahısı */
dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 500; }

/* Tarixçə */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline b { font-weight: 600; }

/* Tablar */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 0; padding: 0 12px; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 550; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* Sütun seçimi */
.mapgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
th.mapped { background: var(--accent-soft); color: var(--accent); }
td.mapped { background: #f6f9fd; }
.colhead small { display: block; font-weight: 700; color: var(--accent); text-transform: none; letter-spacing: 0; }

.action-box { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.action-box h3 { color: var(--accent); }
.summary-row { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 12px; }
.summary-row div b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.summary-row div span { color: var(--muted); font-size: .84rem; }
.diffpos { color: var(--green); } .diffneg { color: var(--red); }
details summary { cursor: pointer; color: var(--accent); font-weight: 550; }

/* Giriş səhifəsi */
.login { max-width: 360px; margin: 10vh auto; }
.login .brand { color: var(--ink); font-size: 1.3rem; display: block; margin-bottom: 18px; text-align: center; }
.login .brand span { color: var(--accent); }

@media print {
  .topbar, .noprint { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; max-width: none; }
  .card { border: 0; padding: 0; }
}
