:root {
  color-scheme: light;
  --bg: #f3f6f8;
  --surface: #ffffff;
  --line: #d7e1e7;
  --ink: #172026;
  --muted: #60707a;
  --green: #1f7a4d;
  --green-strong: #126338;
  --amber: #a86c16;
  --red: #b3261e;
  --blue: #255e91;
  --shadow: 0 14px 32px rgba(25, 42, 55, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(180deg, #eaf1f5, var(--bg)); color: var(--ink); font-family: "Segoe UI", Arial, sans-serif; }
button, input, textarea { font: inherit; }
select { font: inherit; }
body.access-active { background: linear-gradient(180deg, #2b5c8f 0%, #0d1f38 42%, #050b14 100%); color: #fff; }
[hidden] { display: none !important; }
.access-shell { width: min(620px, calc(100vw - 28px)); margin: 52px auto 24px; text-align: center; }
.brand h1 { color: #fff; font-size: 30px; letter-spacing: 2px; text-transform: uppercase; }
.brand p { color: rgba(255, 255, 255, 0.76); font-size: 12px; letter-spacing: 1px; margin-top: 6px; text-transform: uppercase; }
.access-card { margin-top: 34px; padding: 34px 30px; background: rgba(13, 27, 48, 0.88); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.44); }
.access-heading { margin-bottom: 14px; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.access-note { color: rgba(255, 255, 255, 0.78); font-size: 13px; line-height: 1.55; margin-bottom: 18px; }
.access-form { display: grid; gap: 12px; }
.access-form input { height: 44px; border-color: rgba(255, 255, 255, 0.2); background: rgba(5, 11, 20, 0.72); color: #fff; text-align: center; }
.access-form input::placeholder { color: rgba(255, 255, 255, 0.52); }
.access-form button { margin: 0; color: #fff; background: #00aeca; border-color: #00aeca; }
.access-form button:hover { background: #0096b0; }
.btn-secondary { background: #23877c !important; border-color: #23877c !important; }
.btn-secondary:hover { background: #1c7168 !important; }
.check-row { display: flex; align-items: flex-start; gap: 10px; color: rgba(255, 255, 255, 0.82); font-size: 12px; line-height: 1.45; text-align: left; }
.check-row input { width: 16px; height: 16px; margin-top: 2px; flex: 0 0 auto; }
.access-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 18px; color: rgba(255, 255, 255, 0.55); font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.access-divider::before, .access-divider::after { content: ""; height: 1px; flex: 1; background: rgba(255, 255, 255, 0.14); }
.success-message { margin-top: 12px; padding: 11px 12px; border: 1px solid rgba(42, 157, 143, 0.65); border-radius: 6px; background: rgba(42, 157, 143, 0.15); color: #d7fff7; font-size: 13px; line-height: 1.45; text-align: left; }
.error-message { margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(179, 38, 30, 0.6); border-radius: 6px; background: rgba(179, 38, 30, 0.16); color: #ffd0cc; font-size: 13px; }
.shell { width: min(1280px, calc(100vw - 28px)); margin: 0 auto; padding: 20px 0 28px; }
.topbar, .section-title, .status, .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h1, h2, p { margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 17px; }
.topbar p, .section-title span, label, .muted { color: var(--muted); }
.status, .panel, .warning { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.status { min-width: 190px; padding: 11px 12px; }
.status span { color: var(--muted); }
.warning { margin: 14px 0 12px; padding: 12px; }
.business-note { margin-top: 14px; padding: 10px 12px; border: 1px solid rgba(42, 157, 143, 0.45); border-radius: 8px; background: rgba(42, 157, 143, 0.1); color: var(--muted); font-size: 13px; line-height: 1.45; }
.quota-card { margin-top: 14px; padding: 12px; border: 1px solid #b9d4e9; border-radius: 8px; background: linear-gradient(180deg, #f8fcff, #eef7fd); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85); }
.quota-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding-bottom: 10px; border-bottom: 1px solid #d8e7f1; }
.quota-head span { color: var(--ink); font-size: 13px; font-weight: 900; line-height: 1.25; }
.quota-head strong { color: var(--blue); font-size: 12px; text-align: right; text-transform: uppercase; letter-spacing: 0.4px; }
.quota-label { margin-top: 10px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.quota-bar { height: 13px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #dbe6ed; border: 1px solid #c9d8e0; }
.quota-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1f7a4d, #2da86c); transition: width 220ms ease; }
.quota-count { margin-top: 8px; color: var(--ink); font-size: 14px; font-weight: 900; }
.quota-foot { display: grid; gap: 4px; margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.api-limit { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbfd; color: var(--muted); font-size: 13px; font-weight: 700; }
.api-limit.warning-limit { border-color: var(--amber); color: var(--amber); background: #fff8ed; }
.grid { display: grid; grid-template-columns: 280px minmax(420px, 1.4fr) minmax(360px, 1fr); gap: 12px; align-items: start; }
.panel { padding: 14px; }
.wide { grid-column: 1 / -1; }
.watch-list { display: grid; gap: 8px; margin-top: 12px; }
.watch-item, .metric { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
label { display: grid; gap: 6px; font-size: 14px; }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
input, select { height: 42px; padding: 0 10px; }
textarea { min-height: 68px; padding: 9px 10px; resize: vertical; }
button { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; font-weight: 800; padding: 0 12px; margin-top: 8px; }
button:disabled { cursor: progress; opacity: 0.65; }
.primary { color: #fff; background: var(--green-strong); border-color: #0b4f2b; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18); }
.primary:hover { background: #0f5a32; }
.small-action { justify-self: start; min-height: 32px; margin-top: 10px; color: var(--blue); }
.save-case { color: #fff; background: var(--blue); border-color: var(--blue); margin-left: 6px; }
.workflow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.full-workflow { grid-column: 1 / -1; }
.workflow-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #f8fbfd; }
.scanner-card { background: linear-gradient(180deg, #f5fbff, #eef8fb); border-color: #b9dce8; }
.workflow-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.workflow-title strong { font-size: 15px; }
.workflow-title span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.search-box, .direct-import { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: end; }
.search-box button, .direct-import button { min-width: 120px; margin: 0; color: #fff; background: var(--blue); border-color: var(--blue); }
.search-box span, .direct-import span { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.reverse-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; align-items: end; }
.reverse-box button { width: min(260px, 100%); margin: 0; color: #fff; background: var(--green-strong); border-color: #0b4f2b; }
.reverse-box span { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.scanner-box { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 10px; align-items: stretch; }
.camera-drop { min-height: 118px; display: flex; flex-direction: column; justify-content: center; gap: 6px; border: 2px dashed #7cb8c8; border-radius: 8px; padding: 14px; background: rgba(255, 255, 255, 0.72); color: var(--ink); cursor: pointer; text-align: center; }
.camera-drop input { display: none; }
.camera-drop span { font-weight: 900; }
.camera-drop small { color: var(--muted); line-height: 1.35; }
.scan-preview-list { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.scan-preview-item { position: relative; min-height: 96px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.scan-preview-item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.scan-preview-item button { position: absolute; top: 5px; right: 5px; min-width: 0; min-height: 26px; margin: 0; padding: 0 7px; color: #fff; background: rgba(179, 38, 30, 0.9); border-color: rgba(179, 38, 30, 0.9); }
.scan-preview-item span { position: absolute; left: 5px; bottom: 5px; border-radius: 999px; padding: 3px 7px; color: #fff; background: rgba(23, 32, 38, 0.76); font-size: 12px; font-weight: 900; }
.scanner-box button { align-self: center; min-width: 142px; margin: 0; color: #fff; background: var(--green-strong); border-color: #0b4f2b; }
.scanner-box #scanClearButton { color: var(--red); background: #fff; border-color: var(--red); }
.scanner-box > span { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.compact-label input { text-align: center; }
.keyword-results { display: grid; gap: 8px; margin: 12px 0 4px; }
.keyword-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #f8fbfd; }
.keyword-thumb { width: 72px; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.keyword-title { font-weight: 900; }
.keyword-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; color: var(--muted); font-size: 13px; margin-top: 5px; }
.keyword-meta span { white-space: nowrap; }
.keyword-actions { display: flex; flex-direction: column; gap: 6px; }
.keyword-actions button { min-height: 32px; margin: 0; white-space: nowrap; color: var(--blue); }
.keyword-actions .detail-load { color: #fff; background: var(--blue); border-color: var(--blue); }
.fetch-ok { color: var(--green); font-weight: 800; }
.fetch-error { color: var(--red); font-weight: 800; }
.item-link { display: inline-block; margin-top: 8px; color: var(--blue); font-weight: 800; text-decoration: none; }
.item-link:hover { text-decoration: underline; }
.image-panel { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #f8fbfd; }
.image-panel-title { display: flex; align-items: center; justify-content: space-between; color: var(--muted); margin-bottom: 8px; }
.image-panel-title strong { color: var(--ink); }
.image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.image-tile { position: relative; display: block; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.image-tile img, .watch-images img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-tile span { position: absolute; left: 6px; bottom: 6px; min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: #fff; background: rgba(23, 32, 38, 0.78); font-size: 12px; font-weight: 800; }
.watch-images { display: grid; grid-template-columns: repeat(6, 58px); gap: 6px; margin-top: 8px; }
.watch-images a { display: block; width: 58px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.parts-box { margin-top: 12px; display: grid; gap: 8px; }
.parts-box h3 { margin: 0; font-size: 15px; }
.part-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #f8fbfd; }
.part-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.part-head span { color: var(--blue); font-weight: 900; white-space: nowrap; }
.part-item p { margin: 8px 0 0; color: var(--muted); }
.part-queries { display: grid; gap: 5px; margin-top: 8px; }
.part-queries code { display: block; padding: 6px 7px; border-radius: 6px; background: #fff; border: 1px solid var(--line); overflow-wrap: anywhere; }
.part-links, .watch-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.part-links a, .watch-parts span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; background: #fff; color: var(--blue); font-weight: 800; text-decoration: none; }
.market-button { width: 100%; margin-top: 12px; color: #fff; background: var(--blue); border-color: var(--blue); }
.market-button:hover { background: #1d4f7e; }
.market-box { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #f8fbfd; }
.market-box h3 { margin: 0 0 8px; font-size: 15px; }
.market-note { color: var(--muted); font-size: 13px; line-height: 1.45; }
.market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.market-stat { border: 1px solid var(--line); border-radius: 8px; padding: 9px; background: #fff; }
.market-stat span { display: block; color: var(--muted); font-size: 12px; }
.market-stat strong { display: block; margin-top: 4px; font-size: 18px; }
.market-list { display: grid; gap: 6px; margin-top: 10px; }
.market-list a { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; color: var(--blue); font-weight: 800; text-decoration: none; }
.market-list small { display: block; margin-top: 3px; color: var(--muted); font-weight: 600; }
.empty, .error { border: 1px dashed var(--line); border-radius: 8px; padding: 18px; color: var(--muted); margin-top: 12px; }
.error { color: var(--red); border-color: var(--red); }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.metric { display: grid; gap: 6px; min-height: 72px; align-content: center; }
.metric span { color: var(--muted); }
.metric strong { font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }
.metric:first-child { grid-column: 1 / -1; min-height: 92px; }
.metric:first-child span { font-size: 15px; }
.metric:first-child strong { font-size: 28px; }
.signal { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; border-radius: 999px; color: #fff; padding: 8px 16px; font-weight: 900; }
.gruen { background: var(--green); }
.gelb { background: var(--amber); }
.rot { background: var(--red); }
ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); }
.verdict { margin-top: 10px; color: var(--ink); font-weight: 800; }
.watch-item strong, .watch-item span { display: block; }
.watch-item span { color: var(--muted); }
.watch-item summary { cursor: pointer; list-style: none; }
.watch-item summary::-webkit-details-marker { display: none; }
.watch-summary { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.watch-summary span { grid-column: 1 / -1; }
.watch-signal { justify-self: end; border-radius: 999px; color: #fff; font-weight: 900; padding: 5px 9px; font-size: 12px; }
.watch-details { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.wide-doc { grid-column: 1 / -1; }
.legal-footer { background: #050b14; color: rgba(255, 255, 255, 0.78); padding: 28px 20px 34px; text-align: center; font-size: 12px; line-height: 1.55; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; }
.footer-links a { color: #fff; font-weight: 800; text-decoration: underline; }
.copyright { margin-top: 12px; color: rgba(255, 255, 255, 0.55); font-size: 11px; }
.modal-overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(2, 8, 18, 0.82); z-index: 1000; }
.modal-overlay.is-open { display: flex; }
.modal-window { width: min(780px, 100%); max-height: min(80vh, 720px); overflow-y: scroll; background: #fff; color: #102033; border-radius: 8px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); text-align: left; }
.modal-header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; background: #0d1b30; color: #fff; }
.modal-header h2 { font-size: 20px; margin: 0; }
.modal-close { min-height: 0; margin: 0; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, 0.45); background: transparent; color: #fff; font-size: 18px; line-height: 1; }
.modal-body { padding: 22px; font-size: 15px; line-height: 1.65; }
.modal-body p { margin: 0 0 14px; }
@media (max-width: 920px) { .topbar { flex-direction: column; align-items: stretch; } .status { width: 100%; min-width: 0; } .grid, .form-grid, .metrics, .workflow-grid, .search-box, .direct-import, .reverse-box, .scanner-box { grid-template-columns: 1fr; } .wide, .full-workflow { grid-column: auto; } .keyword-item { grid-template-columns: 64px 1fr; } .keyword-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } }
