/* Greystone LPR Manager — Corporate Design Greystone GmbH */

/* ── Kennzeichen-Listen Sidebar-Layout ───────────────────────────────────── */
.plates-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  align-items: start;
}

.plates-sidebar {
  border: 1px solid #c8d8db;
  border-radius: 6px;
  background: #fff;
  padding: 0.8rem;
  position: sticky;
  top: 1rem;
}

.list-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.list-nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--brand-text);
  transition: background 0.1s;
}

.list-nav button.active {
  background: var(--brand);
  color: #fff;
}

.list-nav button:hover:not(.active) {
  background: var(--brand-light);
}

.plates-content {
  min-width: 0;
}

/* Greystone Farbpalette (aus www.greystone.at extrahiert):
   Dunkelgrün (Nav/Buttons): rgb(35,73,81)   = #234951  (color_35)
   Mittleres Teal (Hover):   rgb(71,147,163) = #4793A3  (color_34)
   Helles Teal (Akzent):     rgb(170,188,191)= #AABCBF  (color_18/2)
   Hell (Chips/BG):          rgb(225,239,242)= #E1EFF2  (color_32)
   Text:                     rgb(44,44,44)   = #2C2C2C  (color_1)
*/

:root {
  --brand:      #2C2C2C;   /* Greystone Dunkelgrau — Hauptfarbe */
  --brand-mid:  #555555;   /* Hover — etwas heller */
  --brand-light:#F0F0F0;   /* Sehr hell — Hintergründe */
  --brand-text: #2C2C2C;
}

nav.top-nav {
  background: var(--brand);
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
}

nav.top-nav .nav-logo {
  height: 84px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

nav.top-nav .nav-spacer {
  flex: 1;
}

nav.top-nav button {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  padding: 0.3rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s;
}

nav.top-nav button.active,
nav.top-nav button:hover {
  background: var(--brand-mid);
  border-color: var(--brand-mid);
  color: #fff;
}

main.content {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.card {
  border: 1px solid #c8d8db;
  border-radius: 6px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  background: #fff;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-ok     { background: #d4edda; color: #155724; }
.badge-error  { background: #f8d7da; color: #721c24; }
.badge-warn   { background: #fff3cd; color: #856404; }
.badge-gray   { background: var(--brand-light); color: #495057; }

.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

table { width: 100%; }
table td, table th { vertical-align: middle; }

.plate-chip {
  display: inline-block;
  background: var(--brand-light);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-family: monospace;
  font-size: 0.9rem;
  margin: 0.1rem;
  color: var(--brand-text);
}

.plate-chip.inactive {
  opacity: 0.45;
  text-decoration: line-through;
}

dialog article {
  max-width: 500px;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.inline-form input { margin-bottom: 0; flex: 1; min-width: 150px; }

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--brand-mid);
  color: var(--brand);
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Alle outline-Buttons → filled (wie Primary) ────────────────────────── */
:is(button, [type=submit], [type=button], [role=button]).outline,
[type=reset].outline {
  --pico-background-color: #2C2C2C !important;
  --pico-border-color:     #2C2C2C !important;
  --pico-color:            #fff    !important;
}

:is(button, [type=submit], [type=button], [role=button]).outline:hover,
:is(button, [type=submit], [type=button], [role=button]).outline:focus,
[type=reset].outline:hover {
  --pico-background-color: #555555 !important;
  --pico-border-color:     #555555 !important;
  --pico-color:            #fff    !important;
}

/* ── Verbindungstest Inline-Ergebnis ─────────────────────────────────────── */
.test-result {
  margin-top: 0.5rem;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  word-break: break-word;
}
.test-ok    { background: #2C2C2C; color: #fff; }
.test-error { background: #f8d7da; color: #721c24; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  border-radius: 6px;
  padding: 0.75rem 1rem;
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  word-break: break-word;
  line-height: 1.4;
}

.toast strong {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toast span {
  font-size: 0.9rem;
}

.toast-ok    { background: #2C2C2C; color: #fff; }
.toast-error { background: #721c24; color: #fff; }

[x-cloak] { display: none !important; }

/* ── Card Toggle Header ──────────────────────────────────────────────────── */
.card-toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #c8d8db;
}

.card-toggle-header:hover {
  background: var(--brand-light);
  border-radius: 5px 5px 0 0;
}

/* ── Nav Dropdown ────────────────────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 180px;
  background: #3a3a3a;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 1000;
  padding: 0.3rem 0;
  display: flex;
  flex-direction: column;
}

.nav-dropdown-right {
  left: auto;
  right: 0;
}

.nav-dropdown-menu button {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  text-align: left;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  color: #fff !important;
  width: 100%;
  cursor: pointer;
  transition: background 0.1s;
}

.nav-dropdown-menu button:hover {
  background: rgba(255,255,255,0.12) !important;
}

/* ── Auth pages (login, setup, force-pw) ─────────────────────────────────── */
.auth-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-light);
}

.auth-card {
  background: #fff;
  border: 1px solid #c8d8db;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.auth-logo-header {
  background: var(--brand);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1.4rem 2rem;
}

.auth-logo {
  display: block;
  height: 56px;
  width: auto;
}

.auth-card-body {
  padding: 1.8rem 2rem 2rem;
}

.sync-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ── Pico CSS Override: alle blauen Defaults → Greystone Grau ───────────── */
/* Gleiche Spezifizität wie Pico (:root:not([data-theme=dark]) = 0,2,0)      */
:root:not([data-theme=dark]),
[data-theme="light"] {
  /* Primary (Submit-Buttons, Hauptaktionen) */
  --pico-primary:                    #2C2C2C;
  --pico-primary-background:         #2C2C2C;
  --pico-primary-border:             #2C2C2C;
  --pico-primary-underline:          rgba(44,44,44,0.5);
  --pico-primary-hover:              #444444;  /* Textfarbe für Links on hover */
  --pico-primary-hover-background:   #555555;
  --pico-primary-hover-border:       #555555;
  --pico-primary-hover-underline:    #555555;
  --pico-primary-focus:              rgba(44,44,44,0.25);
  --pico-primary-inverse:            #fff;

  /* Secondary (outline-Buttons, Links) */
  --pico-secondary:                  #2C2C2C;
  --pico-secondary-background:       #2C2C2C;
  --pico-secondary-border:           #2C2C2C;
  --pico-secondary-underline:        rgba(44,44,44,0.5);
  --pico-secondary-hover:            #555555;
  --pico-secondary-hover-background: #555555;
  --pico-secondary-hover-border:     #555555;
  --pico-secondary-focus:            rgba(44,44,44,0.25);
  --pico-secondary-inverse:          #fff;

  /* Inputs / Forms */
  --pico-form-element-focus-color:   #2C2C2C;
  --pico-switch-background-color:    #555555;

  /* Body-Text + Headings (Pico default ist blau-grau) */
  --pico-color:    #2C2C2C;
  --pico-h1-color: #2C2C2C;
  --pico-h2-color: #2C2C2C;
  --pico-h3-color: #2C2C2C;
  --pico-h4-color: #444444;
  --pico-h5-color: #555555;
  --pico-h6-color: #666666;
}
