/* ÖTB Wien Verwaltung — Hauptstylesheet
   Farbpalette: Dunkelblau #1a3a5c · Mittelblau #2563a8 · Gold #c9a227 · Hellgrau #f4f6f9 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-dark:   #1a3a5c;
  --blue-mid:    #2563a8;
  --blue-light:  #3b82d4;
  --gold:        #c9a227;
  --gold-light:  #e8c347;
  --gray-bg:     #f4f6f9;
  --gray-border: #dce2ea;
  --gray-text:   #4a5568;
  --white:       #ffffff;
  --red:         #c0392b;
  --green:       #27ae60;
  --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius:      6px;
  --shadow:      0 2px 8px rgba(26,58,92,.10);
  --shadow-lg:   0 4px 20px rgba(26,58,92,.15);
  --nav-w:       240px;
  --header-h:    56px;
}

html { font-size: 15px; }
body { font-family: var(--font); background: var(--gray-bg); color: #2d3748; line-height: 1.55; }
a { color: var(--blue-mid); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR NAV ────────────────────────────────────────── */
.sidebar {
  width: var(--nav-w);
  background: var(--blue-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar-logo .logo-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 2px;
}
.sidebar-logo .logo-sub {
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  line-height: 1.3;
}
.sidebar-user {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .8rem;
  color: rgba(255,255,255,.7);
}
.sidebar-user strong { display: block; color: #fff; font-size: .85rem; }

nav.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-section {
  padding: 16px 20px 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.8);
  font-size: .88rem;
  transition: background .15s, color .15s;
  cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--gold); color: var(--blue-dark); font-weight: 600; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-icon { width: 18px; text-align: center; opacity: .7; font-size: .9rem; }

.sidebar-bottom {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8rem;
}
.sidebar-bottom a { color: rgba(255,255,255,.55); }
.sidebar-bottom a:hover { color: var(--gold); }

/* ── MAIN CONTENT ───────────────────────────────────────── */
.main-wrap {
  margin-left: var(--nav-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.topbar-title { font-size: 1.05rem; font-weight: 700; color: var(--blue-dark); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.content { flex: 1; padding: 28px; max-width: 1400px; width: 100%; }

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--gray-border);
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-dark);
}
.card-title .accent { color: var(--gold); }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: .87rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--blue-mid); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--blue-dark); }
.btn-gold:hover { background: var(--gold-light); color: var(--blue-dark); text-decoration: none; }
.btn-outline { background: transparent; color: var(--blue-mid); border: 1.5px solid var(--blue-mid); }
.btn-outline:hover { background: var(--blue-mid); color: #fff; text-decoration: none; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a93226; color: #fff; text-decoration: none; }
.btn-sm { padding: 5px 11px; font-size: .8rem; }
.btn-xs { padding: 3px 8px; font-size: .75rem; }

/* ── FORMS ──────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1/-1; }
label { font-size: .82rem; font-weight: 600; color: var(--gray-text); }
label .req { color: var(--red); }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=url], input[type=tel], select, textarea {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-border);
  border-radius: var(--radius);
  font-size: .88rem;
  font-family: var(--font);
  color: #2d3748;
  background: var(--white);
  transition: border .15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(37,99,168,.12);
}
textarea { resize: vertical; min-height: 80px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--blue-mid); }
.form-check label { font-weight: 400; cursor: pointer; }
.form-section {
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gold);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.form-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--gray-border); }

/* ── TABLES ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
thead { background: var(--blue-dark); color: #fff; }
thead th { padding: 10px 13px; text-align: left; font-weight: 600; font-size: .8rem; white-space: nowrap; }
thead th a { color: rgba(255,255,255,.8); text-decoration: none; }
thead th a:hover { color: #fff; }
tbody tr { border-bottom: 1px solid var(--gray-border); transition: background .1s; }
tbody tr:hover { background: rgba(37,99,168,.04); }
td { padding: 9px 13px; color: #2d3748; }
td.mono { font-family: monospace; font-size: .82rem; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-actions { display: flex; gap: 5px; }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: .74rem;
  font-weight: 600;
}
.badge-blue   { background: #dbeafe; color: var(--blue-dark); }
.badge-gold   { background: #fef3c7; color: #92400e; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gray   { background: var(--gray-border); color: var(--gray-text); }

/* ── ALERTS ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: .88rem;
  border-left: 4px solid;
}
.alert-success { background: #d1fae5; border-color: var(--green); color: #065f46; }
.alert-error   { background: #fee2e2; border-color: var(--red);   color: #991b1b; }
.alert-info    { background: #dbeafe; border-color: var(--blue-mid); color: var(--blue-dark); }
.alert-warning { background: #fef3c7; border-color: var(--gold);  color: #92400e; }

/* ── SEARCH BAR ─────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.search-bar input { max-width: 320px; }

/* ── STATS GRID ─────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  border-top: 3px solid var(--blue-mid);
}
.stat-card.gold { border-top-color: var(--gold); }
.stat-card.green { border-top-color: var(--green); }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--blue-dark); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--gray-text); margin-top: 4px; }

/* ── DETAIL VIEW ────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.detail-section { margin-bottom: 20px; }
.detail-section h3 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-border);
}
.detail-row { display: flex; gap: 10px; margin-bottom: 8px; font-size: .87rem; }
.detail-label { min-width: 160px; color: var(--gray-text); font-size: .82rem; }
.detail-value { color: var(--blue-dark); font-weight: 500; }

/* ── PAGINATION ─────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; margin-top: 20px; }
.pagination ul { display: flex; gap: 4px; list-style: none; }
.pagination li a, .pagination li.active {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 500;
}
.pagination li a { color: var(--blue-mid); background: var(--white); border: 1px solid var(--gray-border); }
.pagination li a:hover { background: var(--blue-dark); color: #fff; border-color: var(--blue-dark); text-decoration: none; }
.pagination li.active { background: var(--blue-dark); color: #fff; }

/* ── LOGIN PAGE ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 40px 44px;
  width: 380px;
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo .logo-mark {
  display: inline-block;
  width: 64px; height: 64px;
  background: var(--blue-dark);
  border-radius: 50%;
  line-height: 64px;
  text-align: center;
  font-size: 1.6rem;
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 10px;
}
.login-logo h1 { font-size: 1.15rem; font-weight: 800; color: var(--blue-dark); }
.login-logo p { font-size: .8rem; color: var(--gray-text); margin-top: 2px; }
.login-box .form-group { margin-bottom: 16px; }
.login-box .btn-primary { width: 100%; justify-content: center; padding: 11px; font-size: .95rem; margin-top: 8px; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { width: 56px; }
  .sidebar-logo .logo-title, .sidebar-logo .logo-sub, .sidebar-user,
  .nav-section, .nav-item span, .sidebar-bottom { display: none; }
  .main-wrap { margin-left: 56px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .content { padding: 16px; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ── TABS ───────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-border); margin-bottom: 22px; }
.tab {
  padding: 10px 22px;
  font-size: .87rem;
  font-weight: 600;
  color: var(--gray-text);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
  text-decoration: none;
}
.tab:hover { color: var(--blue-mid); text-decoration: none; }
.tab.active { color: var(--blue-dark); border-bottom-color: var(--gold); }

/* ── IMPORT ZONE ────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--gray-border);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  color: var(--gray-text);
  transition: border .2s, background .2s;
  cursor: pointer;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--blue-mid);
  background: rgba(37,99,168,.04);
}
.drop-zone .drop-icon { font-size: 2.5rem; margin-bottom: 10px; color: var(--blue-mid); }

/* ── MISC ───────────────────────────────────────────────── */
.text-muted { color: var(--gray-text); font-size: .85rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.flex { display: flex; } .gap-2 { gap: 10px; } .items-center { align-items: center; }
.font-bold { font-weight: 700; } .text-blue { color: var(--blue-dark); }
.breadcrumb { font-size: .82rem; color: var(--gray-text); margin-bottom: 12px; }
.breadcrumb a { color: var(--blue-mid); }
.breadcrumb span { margin: 0 5px; }
