/*
 * Peugeot Traveller – Verwaltungsoberfläche Desktop
 * Version: 2.7.5 | 2026-10-14 17:44:58
 */

@font-face {
  font-family: "Roboto Condensed";
  src: url("/assets/fonts/RobotoCondensed-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("/assets/fonts/RobotoCondensed-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #0a2d43;
  --navy-soft: #164963;
  --orange: #eb6a25;
  --orange-dark: #b94713;
  --canvas: #f2f5f6;
  --paper: #fff;
  --ink: #173241;
  --muted: #627681;
  --line: #d6e0e4;
  --success: #16704b;
  --warning: #a86500;
  --danger: #b7252d;
  --info: #176b91;
  --shadow: 0 16px 42px rgba(10, 45, 67, .12);
  --radius: 18px;
  --control: 44px;
  --section-gap: 20px;
}

* { box-sizing: border-box; font-family: "Roboto Condensed" !important; }
html { min-height: 100%; font-family: "Roboto Condensed"; color: var(--ink); background: var(--canvas); }
body { min-width: 320px; min-height: 100vh; margin: 0; font-size: calc(17px * var(--mobile-type-scale, 1)); line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ui-icon { width: 21px; height: 21px; flex: 0 0 21px; fill: currentColor; }
.eyebrow { display: block; margin-bottom: 5px; color: var(--orange-dark); font-size: calc(.78rem * var(--mobile-type-scale, 1)); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; color: var(--navy); font-size: calc(clamp(2.2rem, 3vw, 3.4rem) * var(--mobile-type-scale, 1)); line-height: .98; letter-spacing: -.035em; }
h2 { margin-bottom: 5px; color: var(--navy); font-size: calc(1.55rem * var(--mobile-type-scale, 1)); line-height: 1.05; }

.admin-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; width: 270px; padding: 22px 16px; flex-direction: column; color: #fff; background: var(--navy); overflow-y: auto;
}
.admin-brand { display: flex; min-height: 58px; margin-bottom: 24px; padding: 8px; align-items: center; gap: 12px; text-decoration: none; border-radius: 12px; }
.admin-brand:focus-visible, .admin-sidebar a:focus-visible, .button:focus-visible, .icon-button:focus-visible, .password-toggle:focus-visible { outline: 3px solid #ffb185; outline-offset: 2px; }
.admin-brand img { width: 44px; height: 44px; }
.admin-brand span { display: flex; flex-direction: column; }
.admin-brand strong { font-size: calc(1.15rem * var(--mobile-type-scale, 1)); }
.admin-brand small { color: #bed0d9; }
.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav a { display: flex; min-height: 46px; padding: 10px 12px; align-items: center; gap: 11px; color: #dce9ee; text-decoration: none; border-radius: 10px; }
.admin-sidebar nav a:hover, .admin-sidebar nav a[aria-current="page"] { color: #fff; background: var(--navy-soft); }
.admin-sidebar nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--orange); }
.admin-user { display: grid; margin-top: auto; padding-top: 22px; gap: 2px; border-top: 1px solid rgba(255,255,255,.15); }
.admin-user > span { color: #bed0d9; font-size: calc(.88rem * var(--mobile-type-scale, 1)); }
.admin-user form { margin-top: 10px; }
.admin-user .button { width: 100%; justify-content: flex-start; }
.admin-menu-toggle, .admin-backdrop { display: none; }

.admin-main { width: min(calc(100% - 270px), 1860px); min-height: 100vh; margin-left: 270px; padding: clamp(30px, 3vw, 54px); }
.admin-page-header { display: flex; margin: 0 auto 28px; align-items: flex-end; justify-content: space-between; gap: 28px; max-width: 1600px; }
.admin-page-header p { max-width: 780px; margin-bottom: 0; color: var(--muted); }
.back-link { display: inline-flex; margin-bottom: 18px; align-items: center; gap: 7px; color: var(--navy-soft); font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--orange-dark); }
.admin-card, .revision-list, .editor-form, .notice { max-width: 1600px; margin-right: auto; margin-left: auto; }
.admin-card { margin-bottom: var(--section-gap); padding: clamp(22px, 2.2vw, 34px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.narrow-card { max-width: 760px; margin-left: 0; }
.card-heading { display: flex; margin-bottom: 22px; align-items: flex-end; justify-content: space-between; gap: 20px; }
.card-heading p { margin: 6px 0 0; color: var(--muted); }
.card-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-span-2 { grid-column: span 2; }
.field-span-3 { grid-column: 1 / -1; }
.form-stack { display: grid; gap: 18px; }
.field { display: grid; min-width: 0; gap: 7px; }
.field > span:first-child { color: var(--navy); font-size: calc(.92rem * var(--mobile-type-scale, 1)); font-weight: 750; }
.field b { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; min-height: var(--control); padding: 9px 12px; color: var(--ink); border: 1px solid #aebec6; border-radius: 9px; outline: none; background: #fbfcfd; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.field select { padding-right: 38px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230a2d43' d='m7 10 5 5 5-5z'/%3E%3C/svg%3E"); background-position: right 10px center; background-size: 22px 22px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(235,106,37,.17); background: #fff; }
.field-help { margin: 14px 0 0; color: var(--muted); font-size: calc(.9rem * var(--mobile-type-scale, 1)); }
.workshop-trip-editor { border-left: 7px solid var(--orange); }
input[type="number"] { appearance: auto; }
input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear { display: none; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; top: 2px; right: 2px; display: grid; width: 40px; height: 40px; padding: 0; place-items: center; color: var(--navy); border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.check-line { display: flex; min-height: 48px; align-items: center; gap: 12px; cursor: pointer; }
.check-line input { position: absolute; opacity: 0; pointer-events: none; }
.custom-check { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border: 2px solid #8da1ab; border-radius: 6px; background: #fff; }
.check-line input:checked + .custom-check { border-color: var(--orange); background: var(--orange); }
.check-line input:checked + .custom-check::after { content: ""; width: 9px; height: 5px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.check-line input:focus-visible + .custom-check { outline: 3px solid rgba(235,106,37,.25); outline-offset: 2px; }
.check-copy { display: flex; min-width: 0; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.check-copy strong { color: var(--navy); }
.check-copy small { color: var(--muted); }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }

.button, .icon-button { display: inline-flex; min-height: var(--control); align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; text-decoration: none; cursor: pointer; }
.button { padding: 9px 15px; }
.button-primary { color: #fff; background: var(--orange); border-color: var(--orange); }
.button-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.button-secondary { color: var(--navy); background: #fff; border-color: #9fb2bc; }
.button-secondary:hover { border-color: var(--orange); color: var(--orange-dark); }
.button-quiet { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.button-full { width: 100%; }
.icon-button { width: var(--control); padding: 0; color: var(--navy); background: #fff; border-color: var(--line); }
.icon-button:hover { color: var(--orange-dark); border-color: var(--orange); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.section-actions { margin-top: var(--section-gap); }
.section-block { margin-top: calc(var(--section-gap) * 1.5); }

.metric-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--section-gap);
  max-width: 1600px;
  margin: 0 auto var(--section-gap);
}
.metric-card { margin-bottom: 0; }
.metric-card > strong { display: block; margin: 8px 0; color: var(--navy); font-size: calc(clamp(2rem, 3vw, 3.15rem) * var(--mobile-type-scale, 1)); line-height: 1; }
.metric-card > p { margin-bottom: 0; color: var(--muted); }
.info-panel { margin-top: 22px; padding: 16px 18px; color: #14536e; border-left: 5px solid var(--info); border-radius: 10px; background: #edf7fb; }
.info-panel strong { display: block; color: var(--navy); }
.info-panel p { margin: 4px 0 0; }

.notice { margin-bottom: 18px; padding: 14px 17px; border-left: 4px solid; border-radius: 10px; background: #fff; box-shadow: 0 7px 22px rgba(10,45,67,.08); }
.notice-danger { color: #721920; border-color: var(--danger); background: #fff3f3; }
.notice-success { color: #105638; border-color: var(--success); background: #eef9f4; }
.notice-warning { color: #714700; border-color: var(--warning); background: #fff8e8; }
.notice-info { color: #14536e; border-color: var(--info); background: #edf7fb; }

.table-wrap { overflow-x: auto; }
.entry-table { width: 100%; border-collapse: collapse; }
.entry-table th { padding: 11px 12px; color: var(--muted); border-bottom: 2px solid var(--line); font-size: calc(.8rem * var(--mobile-type-scale, 1)); text-align: left; text-transform: uppercase; letter-spacing: .06em; }
.entry-table td { padding: 14px 12px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.entry-table td small { display: block; margin-top: 3px; color: var(--muted); }
.entry-table tr:last-child td { border-bottom: 0; }
.entry-table .is-archived { opacity: .62; }
.table-actions { display: flex; gap: 6px; }
.level-badge, .status-badge { display: inline-flex; width: max-content; padding: 4px 8px; border-radius: 99px; font-size: calc(.74rem * var(--mobile-type-scale, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.level-critical { color: #fff; background: var(--danger); }
.level-high { color: #7c2500; background: #ffe1d0; }
.level-medium { color: #124f69; background: #dfeff5; }
.level-document { color: #4c3d78; background: #ece8fb; }
.status-active { color: #105638; background: #dcf4e8; }
.status-muted { color: #53656e; background: #e9eef0; }
.workshop-trip-admin-badge { display: flex; width: fit-content; margin-top: 5px; padding: 4px 8px; color: #7c3500; border: 1px solid #efb590; border-radius: 99px; background: #fff3ea; font-size: calc(.76rem * var(--mobile-type-scale, 1)); font-weight: 800; }

.repeater { display: grid; gap: 12px; }
.repeater-row { display: grid; grid-template-columns: minmax(170px, .5fr) minmax(300px, 1.5fr) 44px; align-items: end; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafb; }
.repeater-grow { min-width: 0; }
.repeater-remove { align-self: end; }
.media-editor-row { grid-template-columns: minmax(190px, .55fr) minmax(300px, 1.45fr) auto 44px; }
.asset-chip { display: inline-flex; min-height: 44px; max-width: 290px; padding: 8px 10px; align-items: center; gap: 7px; color: var(--navy); border: 1px solid var(--line); border-radius: 9px; background: #fff; text-decoration: none; }
.asset-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.media-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.media-library-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(10,45,67,.08); }
.media-library-preview { display: grid; min-height: 220px; place-items: center; overflow: hidden; background: #071b27; }
.media-library-preview img, .media-library-preview video { display: block; width: 100%; height: 100%; max-height: 360px; aspect-ratio: 16 / 10; object-fit: contain; }
.media-library-content { display: grid; gap: 13px; padding: 18px; }
.media-library-content h3, .media-library-content p { margin: 0; overflow-wrap: anywhere; }
.media-library-status, .media-library-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.media-metadata { display: grid; gap: 7px; margin: 0; }
.media-metadata div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
.media-metadata dt { color: var(--muted); font-weight: 700; }
.media-metadata dd { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { padding: 30px; border: 2px dashed var(--line); border-radius: 13px; color: var(--muted); text-align: center; background: #f8fafb; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--navy); font-size: calc(1.1rem * var(--mobile-type-scale, 1)); }

.revision-list { display: grid; gap: 12px; }
.revision-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.revision-card summary { display: flex; min-height: 70px; padding: 16px 20px; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; }
.revision-card summary span:first-child { display: flex; flex-direction: column; }
.revision-card summary small { color: var(--muted); }
.revision-content { padding: 20px; border-top: 1px solid var(--line); }
.revision-content pre { max-height: 560px; overflow: auto; padding: 16px; color: #dbe8ee; border-radius: 10px; background: #102b39; font-family: "Roboto Condensed"; font-size: calc(13px * var(--mobile-type-scale, 1)); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }

.admin-login-page { display: grid; min-height: 100dvh; place-items: center; padding: 24px; background: var(--navy); }
.admin-login-shell { width: min(100%, 570px); }
.login-card { padding: clamp(28px, 5vw, 44px); border-radius: 22px; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.login-card > p { color: var(--muted); }
.neutral-entry-card { max-width: 520px; text-align: center; }
.neutral-entry-card .eyebrow, .neutral-entry-card h1, .neutral-entry-card p { overflow-wrap: anywhere; }
.login-mark { display: flex; margin-bottom: 20px; align-items: center; gap: 15px; }
.login-mark img { width: 62px; height: 62px; }
.login-mark h1 { margin-bottom: 0; }
.error-panel { max-width: 760px; margin: 10vh auto; padding: 42px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.error-code { display: block; color: var(--orange); font-size: calc(6rem * var(--mobile-type-scale, 1)); font-weight: 900; line-height: .8; }
.admin-toast-region { position: fixed; right: 12px; bottom: 12px; z-index: 100; display: grid; width: min(420px, calc(100% - 24px)); gap: 2px; }
.admin-toast { display: flex; padding: 14px; align-items: center; gap: 12px; color: #fff; border-radius: 9px; box-shadow: 0 15px 38px rgba(0,0,0,.22); background: var(--info); }
.admin-toast.is-success { background: var(--success); }
.admin-toast.is-danger { background: var(--danger); }

@media (min-width: 769px) and (max-width: 1279px) {
  .admin-sidebar { width: 230px; }
  .admin-main { width: calc(100% - 230px); margin-left: 230px; padding: 28px; }
  .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-editor-row { grid-template-columns: minmax(180px, .6fr) minmax(260px, 1.4fr) 44px; }
  .media-editor-row .asset-chip { grid-column: 1 / 3; }
  .media-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1920px) {
  .admin-main { padding-right: 70px; padding-left: 70px; }
  .form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 2560px) {
  .admin-main { width: min(calc(100% - 300px), 2200px); margin-left: max(300px, calc((100vw - 2200px) / 2 + 150px)); }
  .admin-sidebar { width: 300px; padding: 30px 22px; }
  .admin-card, .revision-list, .editor-form, .notice, .admin-page-header, .metric-overview { max-width: 1880px; }
  .media-library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
