/* ============================================================
   assets/style.css  –  Gemeinsames Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root {
  --navy:     #0f2744;
  --navy2:    #1a3a5c;
  --accent:   #c8a84b;
  --bg:       #f0f2f5;
  --surface:  #ffffff;
  --text:     #1c2b3a;
  --muted:    #6b7c93;
  --border:   #d5dde8;
  --success:  #1e7e34;
  --danger:   #c0392b;
  --warning:  #856404;
  --radius:   10px;
  --shadow:   0 4px 24px rgba(15,39,68,.10);
  --sidebar:  240px;
}

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

body {
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Typografie ── */
h1, h2, h3 { font-weight: 700; color: var(--navy); }

/* ── Öffentlicher Header ── */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid var(--accent);
}
.site-header .brand      { font-size: 18px; font-weight: 700; }
.site-header .brand span { color: var(--accent); }
.site-header .tagline    { margin-left: auto; font-size: 12px; color: rgba(255,255,255,.5); font-family: 'IBM Plex Mono', monospace; }

/* ── Panel-Sidebar ── */
.sidebar {
  width: var(--sidebar);
  background: var(--navy);
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 2px solid var(--accent);
  font-size: 17px; font-weight: 700;
}
.sidebar-brand span   { color: var(--accent); }
.sidebar-brand .role  { display: block; font-size: 11px; color: rgba(255,255,255,.45); font-family: 'IBM Plex Mono', monospace; margin-top: 4px; font-weight: 400; }
.sidebar nav          { flex: 1; padding: 12px 0; }
.nav-group            { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.3); padding: 14px 20px 5px; }
.nav-link             { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: rgba(255,255,255,.65); text-decoration: none; font-size: 14px; border-left: 3px solid transparent; transition: all .15s; }
.nav-link:hover,
.nav-link.active      { color: #fff; background: rgba(255,255,255,.08); border-left-color: var(--accent); }
.nav-link .ni         { width: 20px; text-align: center; }
.sidebar-foot         { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.sidebar-foot a       { color: rgba(255,255,255,.45); text-decoration: none; }
.sidebar-foot a:hover { color: rgba(255,255,255,.75); }

/* ── Panel-Layout ── */
.panel-wrap { display: flex; min-height: 100vh; }
.panel-main { margin-left: var(--sidebar); flex: 1; display: flex; flex-direction: column; }
.topbar     { background: var(--surface); border-bottom: 1px solid var(--border); height: 58px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.topbar h1  { font-size: 17px; color: var(--navy); }
.content    { padding: 28px 32px; flex: 1; }

/* ── Cards ── */
.card          { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden; }
.card-head     { padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-head h2  { font-size: 15px; color: var(--navy); }
.card-body     { padding: 24px; }
.card-body-raw { padding: 0; }

/* ── Stats-Grid ── */
.stats-grid        { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat              { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); border-left: 4px solid var(--accent); }
.stat .s-label     { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 8px; }
.stat .s-value     { font-size: 30px; font-weight: 700; color: var(--navy); font-family: 'IBM Plex Mono', monospace; }
.stat.green        { border-left-color: var(--success); }
.stat.red          { border-left-color: var(--danger); }
.stat.blue         { border-left-color: #3b82f6; }
.stat.orange       { border-left-color: #f59e0b; }

/* ── Tabelle ── */
.table-scroll { overflow-x: auto; }
table          { width: 100%; border-collapse: collapse; font-size: 14px; }
th             { background: #f4f7fb; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
td             { padding: 11px 14px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td    { background: #fafbfd; }
.mono          { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--muted); }
.td-nowrap     { white-space: nowrap; }

/* ── Formulare ── */
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fg          { display: flex; flex-direction: column; gap: 6px; }
.fg.full     { grid-column: 1/-1; }
label        { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
label .req   { color: var(--accent); margin-left: 2px; }
input, select, textarea {
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 10px 13px;
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #fafbfd;
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--navy2);
  box-shadow: 0 0 0 3px rgba(26,58,92,.1);
  background: #fff;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%236b7c93'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
.date-row        { display: flex; gap: 12px; align-items: center; }
.date-row span   { color: var(--muted); white-space: nowrap; font-size: 14px; }
.date-row input  { flex: 1; }

/* ── Buttons ── */
.btn         { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 7px; font-size: 13px; font-weight: 700; border: none; cursor: pointer; text-decoration: none; font-family: inherit; transition: opacity .15s, transform .1s; white-space: nowrap; }
.btn:hover   { opacity: .85; transform: translateY(-1px); }
.btn-sm      { padding: 5px 12px; font-size: 12px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn-block   { width: 100%; justify-content: center; }
.btn-xl      { padding: 14px 28px; font-size: 16px; border-radius: 9px; }

/* ── Submit-Button (Formular) ── */
.btn-submit {
  width: 100%; padding: 14px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 8px;
  font-size: 16px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  margin-top: 28px; letter-spacing: .3px;
  transition: background .18s, transform .1s;
  position: relative; overflow: hidden;
}
.btn-submit::after { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--accent); }
.btn-submit:hover  { background: var(--navy2); transform: translateY(-1px); }

/* ── Alerts ── */
.alert         { padding: 14px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.alert-success { background: #e6f4ea; color: #145a23; border-left: 4px solid var(--success); }
.alert-error   { background: #fde8e8; color: #8b1c1c; border-left: 4px solid var(--danger); }
.alert-info    { background: #e8f4fd; color: #0c4a7a; border-left: 4px solid #3b82f6; }
.alert .ai     { font-size: 18px; flex-shrink: 0; }

/* ── Loading-Spinner ── */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Progress-Bar (Budget) ── */
.pbar-wrap { display: flex; align-items: center; gap: 8px; }
.pbar      { flex: 1; height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; }
.pbar-fill { height: 100%; border-radius: 4px; transition: width .4s; }

/* ── Divider ── */
.divider { border: none; border-top: 1.5px solid var(--border); margin: 10px 0; }

/* ── Section-Label ── */
.section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }

/* ── Success-State (Formular) ── */
.success-state      { text-align: center; padding: 56px 32px; }
.success-state .ico { width: 80px; height: 80px; background: linear-gradient(135deg, var(--navy), var(--navy2)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36px; margin: 0 auto 24px; color: var(--accent); }
.success-state h2   { font-size: 22px; color: var(--navy); margin-bottom: 12px; }
.success-state p    { color: var(--muted); line-height: 1.7; max-width: 420px; margin: 0 auto; }

/* ── Login-Seite ── */
.login-wrap   { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0f2744 0%, #1a3a5c 60%, #0f2744 100%); padding: 20px; }
.login-card   { background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); width: 100%; max-width: 390px; overflow: hidden; }
.login-head   { background: var(--navy); padding: 32px; text-align: center; border-bottom: 3px solid var(--accent); }
.login-head h1{ font-size: 20px; font-weight: 700; color: #fff; }
.login-head h1 span { color: var(--accent); }
.login-head p { color: rgba(255,255,255,.45); font-size: 12px; font-family: 'IBM Plex Mono', monospace; margin-top: 5px; }
.login-body   { padding: 32px; }

footer { text-align: center; padding: 20px; color: var(--muted); font-size: 13px; }

/* ── Responsive ── */
@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
  .fg.full   { grid-column: 1; }
  .sidebar   { display: none; }
  .panel-main{ margin-left: 0; }
  .content   { padding: 16px; }
  .stats-grid{ grid-template-columns: 1fr 1fr; }
  .site-header { padding: 0 16px; }
  .site-header .tagline { display: none; }
}
