/* Shared styles for internal.rapidvalue.eu — vendor-only pages */
:root {
  --brand:       #0d9488;
  --brand-dark:  #0f766e;
  --brand-light: #14b8a6;
  --brand-pale:  #f0fdfa;
  --ink:         #0f172a;
  --ink-soft:    #475569;
  --muted:       #94a3b8;
  --line:        #e2e8f0;
  --bg:          #fafbfc;
  --card:        #ffffff;
  --amber:       #f59e0b;
  --emerald:     #10b981;
  --red:         #ef4444;
  --indigo:      #6366f1;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 15px;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1280px; margin: 0 auto; padding: 1.5rem; }
.container.narrow { max-width: 880px; }

/* Header / page chrome */
.page-header {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-light));
  color: white; padding: 2rem 1.5rem; margin-bottom: 1.5rem;
}
.page-header .container { padding-top: 0; padding-bottom: 0; }
.page-header h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.page-header .sub { font-size: .95rem; opacity: .9; margin-top: .4rem; max-width: 760px; }
.page-header .tag {
  display: inline-block; background: rgba(255,255,255,.18); padding: .15rem .55rem;
  border-radius: 12px; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: .55rem;
}
.page-header .crumbs {
  font-size: .82rem; opacity: .85; margin-bottom: .4rem;
}
.page-header .crumbs a { color: white; text-decoration: underline; }

/* Section + cards */
section { margin-bottom: 2.25rem; }
section > h2 {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft); margin-bottom: .9rem; font-weight: 700;
}

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 1.25rem;
}
.card h2 { font-size: 1rem; font-weight: 700; margin-bottom: .9rem; color: var(--ink); }
.card h3 {
  font-size: .75rem; font-weight: 700; margin-top: 1.1rem; margin-bottom: .55rem;
  color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em;
  border-top: 1px solid var(--line); padding-top: .9rem;
}
.card h3:first-of-type { border-top: 0; padding-top: 0; margin-top: .25rem; }
.card p + p { margin-top: .55rem; }
.card ul, .card ol { margin: .5rem 0 .5rem 1.4rem; }
.card li { margin-bottom: .25rem; }
.card code {
  background: #f1f5f9; padding: .05rem .35rem; border-radius: 3px; font-size: .82rem;
}

.grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* Tile (hub navigation) */
a.tile {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 1.25rem; color: var(--ink); text-decoration: none;
  transition: all .15s; position: relative;
}
a.tile:hover {
  border-color: var(--brand); transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.08); text-decoration: none;
}
a.tile .icon { font-size: 1.4rem; margin-bottom: .5rem; }
a.tile h3 { font-size: 1rem; font-weight: 700; margin-bottom: .3rem; color: var(--ink); }
a.tile p { font-size: .85rem; color: var(--ink-soft); }
a.tile .pill {
  position: absolute; top: 1rem; right: 1rem;
  font-size: .65rem; font-weight: 600; padding: .15rem .5rem; border-radius: 10px;
  background: var(--brand-pale); color: var(--brand-dark);
}
a.tile .pill.draft { background: #fef3c7; color: #92400e; }
a.tile .pill.placeholder { background: #f1f5f9; color: var(--muted); }
a.tile.coming { opacity: .55; pointer-events: none; }

/* Tables */
table.data {
  width: 100%; border-collapse: collapse; font-size: .85rem;
}
table.data th {
  text-align: left; padding: .55rem .55rem; border-bottom: 2px solid var(--line);
  font-weight: 600; color: var(--ink-soft); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .04em; background: #f8fafc;
}
table.data td {
  padding: .55rem .55rem; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
table.data td.right { text-align: right; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.subtotal td { background: #f1f5f9; font-weight: 600; }
table.data tr.total td {
  background: var(--brand-pale); font-weight: 700; color: var(--brand-dark);
  border-top: 2px solid var(--brand);
}
table.data .hint { font-size: .72rem; color: var(--muted); }

/* KPI strips */
.kpi-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .65rem; margin-bottom: 1.25rem;
}
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: .9rem;
}
.kpi .label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi .num {
  font-size: 1.45rem; font-weight: 700; margin-top: .25rem; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.kpi .delta { font-size: .72rem; margin-top: .12rem; color: var(--ink-soft); }
.kpi.good .num { color: var(--emerald); }
.kpi.warn .num { color: var(--amber); }
.kpi.bad  .num { color: var(--red); }

/* Pills + badges */
.pill {
  display: inline-block; padding: .12rem .5rem; font-size: .68rem; font-weight: 600;
  border-radius: 10px; background: var(--brand-pale); color: var(--brand-dark);
}
.pill.amber { background: #fef3c7; color: #92400e; }
.pill.red { background: #fee2e2; color: #991b1b; }
.pill.green { background: #d1fae5; color: #065f46; }
.pill.gray { background: #f1f5f9; color: var(--muted); }
.pill.indigo { background: #e0e7ff; color: #3730a3; }

/* Inputs */
input[type=range] { width: 100%; accent-color: var(--brand); }
select, input[type=text], input[type=number] {
  width: 100%; padding: .45rem .55rem; border: 1px solid var(--line);
  border-radius: 5px; background: white; font-size: .85rem; color: var(--ink);
  font-family: inherit;
}
.input-row { margin-bottom: 1rem; }
.input-row label {
  display: flex; justify-content: space-between; font-size: .82rem;
  color: var(--ink-soft); margin-bottom: .25rem;
}
.input-row label .value {
  font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums;
}
.input-row .hint { font-size: .72rem; color: var(--muted); margin-top: .2rem; }

/* Callouts */
.callout {
  border-left: 3px solid var(--brand); background: var(--brand-pale);
  padding: .85rem 1.1rem; border-radius: 6px; font-size: .88rem;
  color: var(--brand-dark); margin: 1rem 0;
}
.callout.warn { border-color: var(--amber); background: #fef3c7; color: #78350f; }
.callout.danger { border-color: var(--red); background: #fee2e2; color: #991b1b; }
.callout strong { color: inherit; }

/* Footer */
footer.page-footer {
  text-align: center; padding: 2rem 0; color: var(--muted); font-size: .82rem;
}
footer.page-footer a { color: var(--brand-dark); }

/* Utilities */
.muted { color: var(--ink-soft); }
.small { font-size: .82rem; }
.tight { margin: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
