/* Platinum Portal — TBR 24-7 Ltd
   Brand: blue #0971ce, green #83bc25, Poppins.
   Platinum styling: light platinum greys, graphite dark mode. */
:root {
  --blue: #0971ce;
  --blue-dark: #075a9e;
  --green: #83bc25;
  --platinum: #e8eaed;
  --platinum-light: #f4f5f7;
  --ink: #1c2330;
  --muted: #5b6472;
  --card: #ffffff;
  --border: #d5d9de;
  --danger: #b3261e;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --platinum: #20242b;
    --platinum-light: #171a1f;
    --ink: #e8eaed;
    --muted: #a7b0bd;
    --card: #262b33;
    --border: #3a4049;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--platinum-light);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--blue); }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.lede { color: var(--muted); margin-top: 0; }

/* Header — blue hero bar with the white ring-mark logo */
.site-header {
  background: linear-gradient(120deg, var(--blue), #0b5fa8 60%, #0a4f8c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1.2rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.brand-logo { height: 44px; width: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.05rem; }
.brand-text small { font-size: .75rem; opacity: .85; }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav a { color: #fff; text-decoration: none; font-weight: 500; }
.site-nav a:hover { text-decoration: underline; }
.nav-user { opacity: .85; font-size: .9rem; }

.stub-banner {
  background: #fff3cd;
  color: #664d03;
  padding: .55rem 1.2rem;
  font-size: .85rem;
  border-bottom: 1px solid #ffecb5;
}
@media (prefers-color-scheme: dark) {
  .stub-banner { background: #3a2f04; color: #ffe08a; border-color: #5c4a08; }
}

.page { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.2rem 2rem;
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
}
.site-footer p { margin: .2rem 0; }

/* Hero (landing page) */
.hero {
  background: linear-gradient(135deg, var(--blue), #0b5fa8 55%, #0a4f8c);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.2rem 1.6rem;
  text-align: center;
}
.hero-logo { height: 84px; width: 84px; }
.hero h1 { font-size: 2rem; margin: .6rem 0 0; }
.tagline { color: var(--green); font-weight: 600; letter-spacing: .04em; margin: .2rem 0 1rem; }
.hero-copy { max-width: 560px; margin: 0 auto 1.4rem; opacity: .95; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.card, .panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.panel { margin-top: 1.2rem; }
.panel-highlight { border: 2px solid var(--green); }

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: .6rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: var(--green); color: #fff; }
.btn-secondary:hover { filter: brightness(.92); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-small { padding: .35rem .6rem; font-size: .85rem; }
a.btn-primary, a.btn-secondary { color: #fff; }

/* Forms */
.form { display: flex; flex-direction: column; gap: .9rem; max-width: 520px; }
.form-inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; max-width: none; }
.form label { display: flex; flex-direction: column; gap: .25rem; font-weight: 500; font-size: .92rem; }
.form input[type="text"], .form input[type="password"], .form input[type="file"], .form select {
  font: inherit;
  padding: .55rem .6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  min-width: 220px;
}
.form-page { max-width: 560px; margin: 0 auto; }
.form-note { font-size: .9rem; color: var(--muted); }
.inline-form { display: inline; }
.inline-form input[type="text"] { font: inherit; padding: .3rem .4rem; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--ink); }
.inline-form select { font: inherit; padding: .3rem .4rem; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--ink); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.table .actions { white-space: nowrap; }
.table .actions .inline-form { margin-right: .3rem; }

/* Misc */
.flash { max-width: 960px; margin: 1rem auto 0; padding: .7rem 1rem; border-radius: 8px; }
.flash-error { background: #fdecea; color: #611a15; border: 1px solid #f5c6c2; }
.flash-success { background: #e6f4d7; color: #2c4a0e; border: 1px solid #b5d99a; }
.badge { background: var(--platinum); border: 1px solid var(--border); border-radius: 20px; padding: .05rem .5rem; font-size: .75rem; font-weight: 600; }
.code { font-size: 1.25rem; letter-spacing: .08em; }
.message { white-space: pre-wrap; background: var(--platinum-light); border: 1px solid var(--border); border-radius: 8px; padding: .8rem; font-size: .9rem; }
.error-text { color: var(--danger); }
.folder-block { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .4rem; }
.folder-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.folder-list a { font-weight: 500; }
.icon { width: 1em; height: 1em; vertical-align: -0.12em; fill: var(--blue); }
.breadcrumb { margin: .4rem 0 1rem; color: var(--muted); }
@media (max-width: 640px) {
  .hero h1 { font-size: 1.5rem; }
  .table .actions { white-space: normal; }
}
