/* BSM Tools-Hub — Design 1:1 uebernommen aus dem BSM-Projekttool (app/styles.css) */

:root {
  color-scheme: light;
  --brand-navy: #0b1d36;
  --brand-red: #e10613;
  --brand-anthracite: #333333;
  --white: #ffffff;
  --dark-gray: #1a1a1a;
  --gray: #4d4d4d;
  --mid-gray: #7a7a7a;
  --light-gray: #b3b3b3;
  --silver-gray: #e5e5e5;
  --paper-gray: #f2f2f2;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f7f8f9;
  --text: #0b1d36;
  --muted: #657082;
  --line: #d9dde4;
  --accent: var(--brand-red);
  --accent-strong: #b8000a;
  --accent-soft: #fde7e8;
  --navy-soft: #e9eef5;
  --warn: #a94d16;
  --danger: #b3261e;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 52px rgba(11, 29, 54, 0.12);
  --shadow-soft: 0 10px 28px rgba(11, 29, 54, 0.08);
  font-family:
    Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(11, 29, 54, 0.10), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(225, 6, 19, 0.10), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, var(--paper-gray) 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(11, 29, 54, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 29, 54, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(135deg, #000 0%, transparent 52%);
  z-index: -1;
}

button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.65; }
.hidden { display: none !important; }

.loading {
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

/* ---------- Login (identisch zum Projekttool: login-shell / login-panel) ---------- */

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(11, 29, 54, 0.96) 0%, rgba(11, 29, 54, 0.86) 46%, rgba(225, 6, 19, 0.88) 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 22px);
}

.login-panel {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.login-panel::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 120px;
  height: 120px;
  border-top: 3px solid rgba(225, 6, 19, 0.22);
  border-right: 3px solid rgba(11, 29, 54, 0.16);
  pointer-events: none;
}

.brand-logo {
  display: block;
  width: min(220px, 72%);
  height: auto;
  object-fit: contain;
  margin: 0 auto 18px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
  text-align: center;
}

.login-panel h1 {
  font-size: 20px;
  text-align: center;
  margin: 0 0 22px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 14px 0 6px;
}

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
}

input:focus {
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(11, 29, 54, 0.10);
}

.primary {
  width: 100%;
  margin-top: 22px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-red));
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(225, 6, 19, 0.18);
}

.primary:hover {
  background: linear-gradient(135deg, #071426, #c6000b);
  transform: translateY(-1px);
}

.login-error {
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 12px;
  min-height: 14px;
  font-weight: 600;
  text-align: center;
}

/* ---------- App-Shell (Sidebar + Hauptbereich, wie im Projekttool) ---------- */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(11, 29, 54, 0.98), rgba(11, 29, 54, 0.92)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  color: #f7fbf9;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 4px solid var(--brand-red);
  box-shadow: 12px 0 34px rgba(11, 29, 54, 0.16);
  overflow-y: auto;
}

.sidebar-brand {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar .brand-logo { width: min(176px, 100%); margin: 0 0 8px; }
.sidebar .eyebrow { color: rgba(255, 255, 255, 0.72); text-align: left; }
.sidebar h2 { color: #ffffff; margin: 0; font-size: 18px; }
.sidebar .muted { color: rgba(255, 255, 255, 0.66); font-size: 12.5px; margin: 4px 0 0; }

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

.sidebar-nav-button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  font-weight: 700;
  font-size: 13px;
}

.sidebar-nav-button:hover {
  background: linear-gradient(135deg, rgba(225, 6, 19, 0.95), rgba(225, 6, 19, 0.72));
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 24px rgba(225, 6, 19, 0.22);
}

.app-version { color: rgba(255, 255, 255, 0.55) !important; font-size: 11px; margin-top: 8px; }

.main { padding: 34px 40px; }

h1 { margin: 0; font-size: 30px; line-height: 1.12; }
.sub { color: var(--muted); font-size: 14px; margin: 8px 0 30px; }

/* ---------- Kacheln (Panel-Look 1:1 aus dem Projekttool) ---------- */

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

.tile {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 221, 228, 0.92);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 26px 22px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tile:hover {
  border-color: var(--brand-red);
  box-shadow: 0 14px 30px rgba(225, 6, 19, 0.14);
  transform: translateY(-2px);
}

.tile .icon { font-size: 30px; margin-bottom: 14px; }
.tile .title { color: var(--text); font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.tile .desc { color: var(--muted); font-size: 12.5px; line-height: 1.55; }

.badge {
  display: inline-block;
  font-size: 10.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  font-weight: 800;
  margin-top: 12px;
}
.badge.soon { background: var(--mid-gray); }

.footer-note { margin-top: 40px; color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- Modul-Platzhalterseite ---------- */

.placeholder-box {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 221, 228, 0.92);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  margin-top: 10px;
}
.placeholder-icon { font-size: 40px; margin-bottom: 16px; }
.placeholder-box h1 { font-size: 20px; }
.placeholder-box p { color: var(--muted); font-size: 13px; max-width: 480px; margin: 12px auto 0; line-height: 1.6; }

.btn-back {
  display: inline-block;
  margin-top: 24px;
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}
