/* ==========================================================================
   My Computer tools — shared styles
   Every page links this file:  <link rel="stylesheet" href="site.css">
   Each page sets its colour with <body data-tool="claim|statement|notice|lease|payments|factoring">
   ========================================================================== */

:root{
  --bg:#EDF1F4;
  --surface:#FFFFFF;
  --surface-2:#F5F7F9;
  --ink:#16202A;
  --ink-soft:#4E5B68;
  --line:#D2DBE2;
  --line-strong:#B4C1CC;
  --brand:#0F5D94;
  --brand-ink:#0A4470;
  --brand-soft:#E4EFF8;
  --accent:#F2810E;           /* My Computer orange: focus rings + help button */
  --danger:#B42318;
  --danger-soft:#FDEDEB;
  --ok:#22704F;

  /* document colours, also used on the start page */
  --t-claim:#8A6418;     --t-claim-soft:#F5EEDC;
  --t-statement:#1F6FA8; --t-statement-soft:#E6F0F8;
  --t-notice:#B0472E;    --t-notice-soft:#F8E9E4;
  --t-lease:#2E7D6B;     --t-lease-soft:#E3F1EC;
  --t-payments:#6B4A86;  --t-payments-soft:#EFE8F4;
  --t-factoring:#1D6B78; --t-factoring-soft:#E2F0F2;

  --tool:var(--brand); --tool-soft:var(--brand-soft);

  --font:"IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --radius:10px;
  --radius-sm:7px;
}
body[data-tool="claim"]    { --tool:var(--t-claim);     --tool-soft:var(--t-claim-soft); }
body[data-tool="statement"]{ --tool:var(--t-statement); --tool-soft:var(--t-statement-soft); }
body[data-tool="notice"]   { --tool:var(--t-notice);    --tool-soft:var(--t-notice-soft); }
body[data-tool="lease"]    { --tool:var(--t-lease);     --tool-soft:var(--t-lease-soft); }
body[data-tool="payments"] { --tool:var(--t-payments);  --tool-soft:var(--t-payments-soft); }
body[data-tool="factoring"]{ --tool:var(--t-factoring); --tool-soft:var(--t-factoring-soft); }

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0;
  font-family:var(--font);
  font-size:15px;
  line-height:1.5;
  color:var(--ink);
  background:var(--bg);
  min-height:100vh;
  padding:0 0 96px;
}
button, input, select, textarea{ font-family:inherit; }
a{ color:var(--brand); }
:focus-visible{ outline:3px solid var(--accent); outline-offset:2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible{ outline:none; }

/* ---------- Top bar ---------- */
.app-bar{
  background:var(--surface);
  border-top:4px solid var(--tool);
  border-bottom:1px solid var(--line);
}
.app-bar-inner{
  max-width:var(--page-width, 880px);
  margin:0 auto;
  padding:12px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.app-back{
  display:inline-flex; align-items:center; gap:7px;
  color:var(--ink-soft); text-decoration:none;
  font-size:14px; font-weight:500;
  padding:6px 10px 6px 6px; margin-left:-6px;
  border-radius:6px;
}
.app-back:hover{ color:var(--ink); background:var(--surface-2); }
.app-brand{
  display:inline-flex; align-items:center; gap:8px;
  font-size:13.5px; font-weight:600; color:var(--ink-soft);
}
.app-mark{ width:10px; height:10px; border-radius:2px; background:var(--accent); box-shadow:4px 4px 0 var(--brand); margin-right:4px; }

/* ---------- Page ---------- */
.page{
  max-width:var(--page-width, 880px);
  margin:0 auto;
  padding:36px 20px 0;
}
.page-head{
  position:relative;
  padding-left:20px;
  margin:0 0 28px;
}
.page-head::before{
  content:"";
  position:absolute; left:0; top:4px; bottom:4px;
  width:5px; border-radius:3px;
  background:var(--tool);
}
.page-head h1{
  font-size:30px; line-height:1.15; font-weight:700;
  letter-spacing:-0.4px;
  margin:0 0 8px;
}
.page-head p{
  margin:0; max-width:62ch;
  color:var(--ink-soft); font-size:15.5px; line-height:1.55;
}

/* ---------- Sections ---------- */
.section{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px 26px 26px;
  margin:0 0 16px;
}
.section > h2, .section-title{
  font-size:17px; font-weight:600; line-height:1.3;
  margin:0 0 18px;
  display:flex; align-items:baseline; gap:10px; flex-wrap:wrap;
}
.opt{
  font-size:12.5px; font-weight:500; color:var(--ink-soft);
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:999px; padding:1px 9px;
}

/* ---------- Fields ---------- */
.row{ display:grid; grid-template-columns:1fr 1fr; gap:0 18px; }
label{ display:block; font-size:13.5px; font-weight:600; color:var(--ink); margin:0 0 6px; }
.hint{ font-size:13px; color:var(--ink-soft); line-height:1.5; margin-top:6px; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=email], select, textarea{
  width:100%;
  font-size:15px;
  color:var(--ink);
  background:var(--surface);
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  padding:9px 12px;
  min-height:42px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
input[type=number]{ font-variant-numeric:tabular-nums; }
input::placeholder, textarea::placeholder{ color:#8794A0; }
input:hover, select:hover, textarea:hover{ border-color:#8C9BA8; }
input:focus, select:focus, textarea:focus{
  outline:none;
  border-color:var(--tool);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--tool) 22%, transparent);
}
input:disabled{ background:var(--surface-2); color:var(--ink-soft); }
input[type=checkbox], input[type=radio]{ accent-color:var(--tool); width:18px; height:18px; margin:0; }
input[type=file]{
  width:100%; font-size:14px; color:var(--ink-soft);
  padding:16px; border:1.5px dashed var(--line-strong); border-radius:var(--radius-sm);
  background:var(--surface-2); cursor:pointer;
}
input[type=file]:hover{ border-color:var(--tool); background:var(--tool-soft); }
input[type=file]::file-selector-button{
  font:inherit; font-size:14px; font-weight:600; margin-right:12px;
  padding:8px 14px; border-radius:6px; cursor:pointer;
  border:1px solid var(--line-strong); background:var(--surface); color:var(--ink);
}

[aria-invalid="true"]{ border-color:var(--danger) !important; background:var(--danger-soft) !important; }

/* ---------- Buttons ---------- */
.btn, button.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-size:15px; font-weight:600; line-height:1.2;
  padding:11px 20px; min-height:44px;
  border-radius:var(--radius-sm);
  border:1px solid transparent;
  cursor:pointer; text-decoration:none;
  transition:background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary{ background:var(--brand); color:#fff; }
.btn-primary:hover{ background:var(--brand-ink); }
.btn-secondary{ background:var(--surface); color:var(--ink); border-color:var(--line-strong); }
.btn-secondary:hover{ border-color:var(--ink-soft); background:var(--surface-2); }
.btn-quiet{ background:transparent; color:var(--brand); padding-left:10px; padding-right:10px; }
.btn-quiet:hover{ background:var(--brand-soft); }
.btn-danger{ background:var(--surface); color:var(--danger); border-color:#EBB4AE; }
.btn-danger:hover{ background:var(--danger-soft); }
button:disabled, .btn[aria-disabled="true"]{ opacity:.55; cursor:default; }
.btn-wide{ width:100%; }
.actions{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:20px; }

/* ---------- Messages ---------- */
.alert-error{
  background:var(--danger-soft); color:var(--danger);
  border:1px solid #F0C2BC; border-left:4px solid var(--danger);
  border-radius:var(--radius-sm);
  padding:11px 14px; font-size:14px; line-height:1.5;
  margin-top:14px;
}
.note{
  background:var(--tool-soft);
  border:1px solid color-mix(in srgb, var(--tool) 25%, transparent);
  border-left:4px solid var(--tool);
  border-radius:var(--radius-sm);
  padding:12px 16px; font-size:14px; line-height:1.55;
}

/* ---------- Responsive / motion / print ---------- */
@media (max-width:640px){
  body{ font-size:15px; }
  .page{ padding-top:24px; }
  .page-head h1{ font-size:25px; }
  .section{ padding:20px 18px 22px; }
  .row{ grid-template-columns:1fr; }
  .app-brand{ display:none; }
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ transition:none !important; animation:none !important; scroll-behavior:auto !important; }
}
@media print{
  .app-bar, .page-head{ display:none !important; }
  body{ background:#fff; padding:0; }
}
