/* Expatium Legal Portal - styled after expatium.es (Jost, gold, warm cream, white rounded cards). */

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/jost-latin.928f4210aa48.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/jost-latin-ext.7f44f6fd229b.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --gold: #b1976b;          /* buttons, links (expatium.es) */
  --gold-bright: #bfac5b;   /* top bar, accents */
  --gold-dark: #8a7148;     /* gold text on light backgrounds (readable) */
  --gold-soft: #f3eedf;
  --cream: #f8f7ee;         /* page background */
  --surface: #ffffff;
  --text: #1a1a1a;
  --body: #4a4740;
  --muted: #868686;
  --line: #e9e4d4;
  --good: #3f7d4f;
  --good-soft: #e8f2e8;
  --warn: #9a6b12;
  --warn-soft: #fbf3df;
  --bad: #b23a2e;
  --bad-soft: #fbeae7;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(60, 50, 20, 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font: 400 16px/1.6 "Jost", "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }
h1, h2, h3 { color: var(--text); font-weight: 600; line-height: 1.25; }
h1 { font-size: 1.85rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 14px; }
strong { color: var(--text); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 32px; padding-bottom: 56px; min-height: 60vh; }

/* Top bar and header, as on expatium.es */
.contactbar { background: var(--gold-bright); color: var(--text); font-size: .9rem; }
.contactbar .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 7px; padding-bottom: 7px; }
.contactbar a { color: var(--text); }
.contactbar .links { display: flex; gap: 18px; align-items: center; }
.lang-switch { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.lang-switch button { background: none; border: 0; padding: 0 2px; font: inherit; color: var(--text); opacity: .65; cursor: pointer; }
.lang-switch button:hover { opacity: 1; text-decoration: underline; }
.lang-switch button.active { opacity: 1; font-weight: 600; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 44px; width: auto; display: block; }
.brand .portal-tag { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); border-left: 1px solid var(--line); padding-left: 12px; }
.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; font-weight: 500; }
.nav a, .link-button { color: var(--text); }
.nav a:hover, .link-button:hover { color: var(--gold); text-decoration: none; }
.inline { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

.footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .88rem; }
.footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.footer a { color: var(--gold-dark); }

/* Building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head > div + div { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 6px; }

.messages { list-style: none; padding: 0; margin: 0 0 18px; }
.msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; background: var(--gold-soft); color: var(--text); }
.msg-success { background: var(--good-soft); color: var(--good); }
.msg-error { background: var(--bad-soft); color: var(--bad); }
.preview-banner { background: var(--warn-soft); border: 1px solid #ecd9a6; margin-bottom: 18px; }

/* Forms */
label { display: block; font-weight: 500; font-size: .92rem; color: var(--text); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=tel], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(177, 151, 107, .2); }
textarea { resize: vertical; }
.field { margin-bottom: 16px; }
.helptext { display: block; color: var(--muted); font-size: .84rem; margin-top: 4px; }
.errorlist { color: var(--bad); list-style: none; padding: 0; margin: 4px 0; font-size: .88rem; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.btn {
  display: inline-block; background: var(--gold); color: #fff; border: 1px solid var(--gold); border-radius: 10px;
  padding: 10px 22px; font: inherit; font-weight: 500; cursor: pointer; transition: background .15s, color .15s;
}
.btn:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; text-decoration: none; }
.btn-secondary { background: #fff; color: var(--gold-dark); }
.btn-secondary:hover { background: var(--gold-soft); color: var(--gold-dark); }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; }
.filters .field { margin: 0; }

/* Login and password pages */
.auth { max-width: 440px; margin: 40px auto; text-align: left; }
.auth-logo { display: block; height: 52px; width: auto; margin: 0 auto 22px; }
.auth h1 { text-align: center; }
.auth .intro { text-align: center; margin-top: 0; }
.auth .btn { width: 100%; }

/* Case list */
.matter-list { display: grid; gap: 14px; }
.matter-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: center; color: inherit; margin: 0; transition: border-color .15s, box-shadow .15s; }
.matter-row:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(60, 50, 20, .1); text-decoration: none; color: inherit; }
.matter-row .title { font-weight: 600; font-size: 1.08rem; color: var(--text); }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .9rem; }

.badge { display: inline-block; padding: 2px 11px; border-radius: 99px; font-size: .74rem; font-weight: 600; letter-spacing: .04em; background: var(--gold-soft); color: var(--gold-dark); }
.badge-high { background: var(--bad-soft); color: var(--bad); }
.badge-medium { background: var(--warn-soft); color: var(--warn); }
.badge-low, .badge-good { background: var(--good-soft); color: var(--good); }
.badge-quiet { background: var(--cream); color: var(--muted); border: 1px solid var(--line); }

.bar { height: 8px; background: var(--gold-soft); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-bright), var(--gold)); border-radius: 99px; }
.mini-progress { width: 190px; }

/* Case page */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--text); }

.stepper { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 6px; }
.stepper li { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: .94rem; }
.stepper .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: #fff; flex: none; }
.stepper .done { color: var(--body); }
.stepper .done .dot { background: var(--gold); border-color: var(--gold); }
.stepper .current { color: var(--text); font-weight: 600; }
.stepper .current .dot { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 2px solid var(--line); padding: 0 0 20px 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px #fff; }
.timeline .when { color: var(--muted); font-size: .84rem; }
.timeline .details { white-space: pre-line; margin-top: 4px; }

.docs { width: 100%; border-collapse: collapse; }
.docs th, .docs td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: .94rem; vertical-align: top; }
.docs th { color: var(--muted); font-weight: 500; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

details.panel summary { cursor: pointer; font-weight: 500; color: var(--gold-dark); }
details.panel[open] summary { margin-bottom: 14px; }

/* Admin overview */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat .num { font-size: 2rem; font-weight: 600; color: var(--gold-dark); }
.hbars { display: grid; grid-template-columns: minmax(150px, 250px) 1fr 32px; gap: 8px 12px; align-items: center; font-size: .92rem; }
.trello-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 24px; }
.trello-bar .badge { margin: 0 6px; }

@media (max-width: 760px) {
  .detail-grid, .filters { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .matter-row { grid-template-columns: 1fr; }
  .mini-progress { width: 100%; }
  .hbars { grid-template-columns: 1fr 1fr 28px; }
  .brand img { height: 36px; }
  .brand .portal-tag { display: none; }
  .contactbar .question { display: none; }
}
