/*
 * DMEXCO Passport — shared design tokens and components for the Symfony
 * administration (Twig). Mirrors the tokens used in pwa/src/assets/main.css
 * so both surfaces read as one system. See the P0 design review artifact
 * for the source palette/typography decisions.
 */

/* Self-hosted fonts (previously loaded from Google Fonts) — kept local so
 * no visitor's IP address is sent to a third-party CDN when loading a page
 * that also handles personal data (CLAUDE.md §6). Latin subset only,
 * matching the German-language UI. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 420 700;
  font-display: swap;
  src: url('/fonts/fraunces-variable-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/public-sans-variable-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
}

:root {
  --navy: #1e3a64;
  --navy-2: #28497a;
  --navy-3: #3a5f98;
  --cover-1: #cbddf1;
  --cover-2: #93b7de;
  --cover-3: #5d84b8;
  --gold: #c6a046;
  --gold-light: #e7d08c;
  --gold-dark: #8a6b24;
  --parchment: #fbf6ea;
  --parchment-2: #f1e9d2;
  --line: rgba(28, 25, 15, 0.16);
  --ink: #211c13;
  --ink-soft: #5b5240;
  --stamp: #5a3e86;
  --error: #9b3226;
  --error-bg: #f7e7e2;
  --font-display: 'Fraunces', Georgia, serif;
  --font-ui: 'Public Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--parchment);
  background-image:
    repeating-radial-gradient(circle at 18% 12%, rgba(190, 60, 110, 0.045) 0px, transparent 2px, transparent 6px),
    repeating-radial-gradient(circle at 82% 60%, rgba(40, 100, 175, 0.045) 0px, transparent 2px, transparent 7px),
    repeating-radial-gradient(circle at 50% 95%, rgba(90, 150, 105, 0.04) 0px, transparent 2px, transparent 8px),
    repeating-linear-gradient(115deg, rgba(33, 28, 19, 0.03) 0px, rgba(33, 28, 19, 0.03) 1px, transparent 1px, transparent 5px);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--navy);
}

.mono {
  font-family: var(--font-mono);
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

/* Layout */

.page {
  padding: 44px 40px 60px;
  max-width: 1180px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* Nav bar */

.navbar {
  background: var(--navy);
  min-height: 72px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 40px;
  border-bottom: 2px solid var(--gold-dark);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.navbar-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-wordmark span {
  font-family: var(--font-display);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}

.navbar-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-links a {
  color: #c9d3e6;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}

.navbar-links a.active {
  color: #fff;
  border-bottom-color: var(--gold);
}

.navbar-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-meta .divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.18);
}

.navbar-meta .user-email {
  color: var(--gold-light);
  font-size: 12px;
}

.navbar-meta .label {
  color: #9fb0ce;
  font-size: 12px;
}

.navbar-meta a.logout {
  color: #c9d3e6;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.brand-chip {
  background: #fff;
  border-radius: 5px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
}

.brand-chip img {
  height: 14px;
  width: auto;
  display: block;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  font: 700 13px var(--font-ui);
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--navy);
  color: var(--gold-light);
  border-color: var(--navy);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}

.btn-text {
  background: transparent;
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  border: 0;
  min-height: auto;
  padding: 0;
}

/* Forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
.field legend {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input[type='text'],
.field input[type='email'],
.field input[type='password'],
.field input[type='datetime-local'] {
  min-height: 46px;
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--navy);
  background: transparent;
  font: 16px var(--font-ui);
  color: var(--ink);
  padding: 8px 2px 6px;
  outline: none;
}

.field input:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.field .hint {
  font-size: 11px;
  color: var(--ink-soft);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.alert {
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
}

.alert-error {
  border: 1.5px solid var(--error);
  background: var(--error-bg);
  color: var(--error);
}

.alert-success {
  border: 1.5px solid var(--stamp);
  background: #f2edf9;
  color: var(--stamp);
}

/* Stamps / status badges */

.stamp {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 3px 11px;
}

.stamp-submitted {
  background: var(--stamp);
  color: #fff;
}

.stamp-opened {
  border: 1.5px dashed var(--gold-dark);
  color: var(--gold-dark);
  padding: 2.5px 11px;
}

.stamp-created {
  border: 1.5px dashed #8b93a6;
  color: #5b6377;
  padding: 2.5px 11px;
}

/* Table */

.table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead tr {
  background: var(--navy);
  color: var(--gold-light);
}

th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 12px 16px;
  font-weight: 700;
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: var(--parchment-2);
}

/* Filter pills */

.pill-group {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  text-decoration: none;
}

.pill.active {
  background: var(--navy);
  color: var(--gold-light);
  font-weight: 700;
  border-color: var(--navy);
}

/* Pagination */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  font-size: 12px;
}

.pagination nav {
  display: flex;
  gap: 8px;
}

.pagination a,
.pagination span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 14px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
}

.pagination .disabled {
  color: #b7ae98;
  border-color: var(--line);
}

/* Login cover split */

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
}

.login-cover {
  width: 460px;
  max-width: 100%;
  min-height: 420px;
  background-color: var(--cover-3);
  background-image:
    radial-gradient(circle at 22% 6%, var(--cover-1), var(--cover-3) 78%),
    repeating-radial-gradient(circle at 50% 40%, rgba(30, 58, 100, 0.05) 0px, rgba(30, 58, 100, 0.05) 1px, transparent 1px, transparent 8px);
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  flex: 0 1 460px;
}

.login-cover-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.login-cover-title {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--navy-3), var(--navy));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.02em;
  line-height: 1;
}

.login-cover-rule {
  width: 64px;
  height: 2px;
  background: var(--gold-dark);
  margin: 22px 0;
}

.login-cover-tagline {
  color: var(--navy-2);
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
}

.login-cover-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-cover-footer .republic {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 15px;
}

.login-cover-footer .meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-cover-footer .meta-row img {
  height: 18px;
  width: auto;
}

.login-form-panel {
  flex: 1 1 360px;
  min-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.login-form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Emblem */

.emblem {
  flex: none;
}

/* Dashboard tiles */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.tile-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-dark {
  background: var(--navy);
  border: 0;
  color: #fff;
}

.tile-dark .eyebrow {
  color: var(--gold-light);
}

.tile-count {
  background: var(--stamp);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
}

@media (max-width: 720px) {
  .navbar {
    padding: 12px 20px;
  }
  .page {
    padding: 32px 20px 48px;
  }
}
