/* ── Eura Mobil GmbH · Intranet · Shared Styles ─────────────── */

/* Montserrat – self-hosted (kein Google-CDN) */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('fonts/montserrat.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Tokens aus CI: Primary #004f9f, Montserrat, Secondary #414042 */
:root {
  --em-primary:       #004f9f;
  --em-primary-dark:  #003d7a;
  --em-primary-light: #e6f2ff;
  --em-secondary:     #414042;
  --em-secondary-dark:#2a2a2b;
  --em-base:          #f5f5f7;
  --em-white:         #ffffff;
  --em-border:        #dcdcdf;
  --em-success:       #1a6e2e;
  --em-success-bg:    #eaf4ec;
  --em-warn:          #7a5c00;
  --em-warn-bg:       #fdf6e0;
  --em-danger:        #8c1a1a;
  --em-danger-bg:     #faeaea;
  --em-text:          #414042;
  --em-text-muted:    #6e6d6f;
  --em-text-light:    #a0a0a4;
  --r:   4px;
  --r-lg: 8px;
  --r-xl: 12px;
}

[data-theme="dark"] {
  --em-primary:       #4a90d9;
  --em-primary-dark:  #5a9fe8;
  --em-primary-light: #1a2a40;
  --em-secondary:     #8a8888;
  --em-secondary-dark:#1a1a1b;
  --em-base:          #111318;
  --em-white:         #1e2230;
  --em-border:        #2d3350;
  --em-text:          #e8eaf0;
  --em-text-muted:    #9ca3b0;
  --em-text-light:    #6b7280;
  --em-success-bg:    #0f2a18;
  --em-warn-bg:       #2a2000;
  --em-danger-bg:     #2a0f0f;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', -apple-system, 'Segoe UI', Arial, sans-serif;
  background: var(--em-base);
  color: var(--em-text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Intranet Nav ────────────────────────────────────────────── */
.intranet-nav {
  background: var(--em-secondary-dark);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 300;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.intranet-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.intranet-logo img { height: 28px; display: block; }
.intranet-logo span {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,.2);
}
.intranet-nav-right { display: flex; align-items: center; gap: 16px; }
.intranet-user { font-size: 13px; color: rgba(255,255,255,.65); }
.intranet-nav-link {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--r);
  transition: background .15s;
}
.intranet-nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.intranet-nav-link.active { color: #fff; }
.intranet-theme-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  font-size: .95rem;
  padding: 4px 6px;
  border-radius: var(--r);
  transition: background .15s;
}
.intranet-theme-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ── Dashboard Layout ─────────────────────────────────────── */
.dash-page { max-width: 1500px; margin: 0 auto; padding: 48px 48px 100px; }
.dash-hero {
  background: var(--em-primary);
  border-radius: 20px;
  padding: 52px 64px;
  margin-bottom: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.dash-hero-text h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.dash-hero-text p { font-size: 1.1rem; color: rgba(255,255,255,.8); }
.dash-hero-logo { height: 56px; opacity: .9; }

/* ── Formular-Karten (Dashboard) ──────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 52px;
}
.form-card {
  background: var(--em-white);
  border: 1px solid var(--em-border);
  border-radius: 16px;
  padding: 36px 40px;
  text-decoration: none;
  color: var(--em-text);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .2s, border-color .2s, transform .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.form-card:hover {
  box-shadow: 0 8px 32px rgba(0,79,159,.16);
  border-color: var(--em-primary);
  transform: translateY(-4px);
}
.form-card-icon { font-size: 3rem; }
.form-card-title { font-size: 1.25rem; font-weight: 800; color: var(--em-secondary); }
.form-card-desc  { font-size: 1rem; color: var(--em-text-muted); line-height: 1.6; }

/* ── Anträge-Liste ────────────────────────────────────────── */
.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--em-text-muted);
  margin-bottom: 18px;
}
.submissions-list { display: flex; flex-direction: column; gap: 6px; }
.submission-item {
  background: var(--em-white);
  border: 1px solid var(--em-border);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.submission-type { font-size: .875rem; font-weight: 700; }
.submission-date { font-size: .75rem; color: var(--em-text-muted); margin-top: 2px; }
.status-badge {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  margin-left: auto;
}
.status-offen                    { background: #fef9c3; color: #92400e; }
.status-vorgesetzter_ausstehend  { background: var(--em-primary-light); color: var(--em-primary); }
.status-fachabteilung_ausstehend { background: #ede9fe; color: #6d28d9; }
.status-genehmigt                { background: var(--em-success-bg); color: var(--em-success); }
.status-abgelehnt                { background: var(--em-danger-bg); color: var(--em-danger); }

/* ── Login ────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, var(--em-secondary-dark) 0%, #1a3060 100%);
}
.login-card {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 52px 44px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-logo { height: 32px; margin-bottom: 24px; }
.login-title { font-size: 1.1rem; font-weight: 800; color: var(--em-secondary); margin-bottom: 6px; }
.login-subtitle { font-size: .8rem; color: var(--em-text-muted); margin-bottom: 36px; line-height: 1.6; }
.btn-microsoft {
  width: 100%;
  padding: 13px 24px;
  background: #0078d4;
  color: #fff;
  border: none;
  border-radius: var(--r-lg);
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: background .15s;
  letter-spacing: .02em;
}
.btn-microsoft:hover { background: #006cbe; }
.login-footer { margin-top: 28px; font-size: .75rem; color: #9ca3af; }

/* ── Toast ────────────────────────────────────────────────── */
.em-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 11px 18px;
  border-radius: var(--r-lg);
  font-size: .825rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,.22);
  z-index: 9999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.em-toast.show { opacity: 1; transform: translateY(0); }
.em-toast-success { background: var(--em-success); color: #fff; }
.em-toast-error   { background: var(--em-danger);  color: #fff; }

/* ── 404 ──────────────────────────────────────────────────── */
.error-page { max-width: 600px; margin: 80px auto; padding: 0 24px; text-align: center; }
.error-page .big-icon { font-size: 3rem; margin-bottom: 16px; }
.error-page h1 { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; }
.error-page p { color: var(--em-text-muted); font-size: .875rem; margin-bottom: 24px; }

/* ── Approve ──────────────────────────────────────────────── */
.approve-wrap { max-width: 640px; margin: 48px auto; padding: 0 24px; }
.approve-card {
  background: var(--em-white);
  border: 1px solid var(--em-border);
  border-radius: var(--r-xl);
  padding: 36px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.approve-card h1 { font-size: 1.15rem; font-weight: 800; margin-bottom: 20px; }

/* ── Buttons (gemeinsam für approve etc.) ─────────────────── */
.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: .875rem;
  padding: 10px 22px;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.btn:hover   { opacity: .88; }
.btn:active  { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary   { background: var(--em-primary);   color: #fff; }
.btn-secondary { background: var(--em-white);     color: var(--em-text); border: 1px solid var(--em-border); }
.btn-approve   { background: var(--em-success);   color: #fff; }
.btn-reject    { background: var(--em-danger);    color: #fff; }
.decision-buttons { display: flex; gap: 10px; margin-top: 24px; }

/* ── Form fields (für approve.html) ──────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.field label {
  font-size: 14px;
  font-weight: 700;
  color: var(--em-text);
}
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--em-border);
  border-radius: var(--r);
  background: var(--em-white);
  color: var(--em-text);
  outline: none;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--em-primary);
  box-shadow: 0 0 0 3px rgba(0,79,159,.12);
}
.field textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
.req { color: var(--em-primary); }
.status-msg { font-size: .8rem; margin-top: 10px; color: var(--em-text-muted); }

/* ── Approve Success ──────────────────────────────────────── */
.approve-success { text-align: center; padding: 40px 20px; }
.approve-success .big-icon { font-size: 3rem; margin-bottom: 16px; }
.approve-success h1 { font-size: 1.2rem; font-weight: 800; margin-bottom: 12px; }
.approve-success p  { font-size: .875rem; color: var(--em-text-muted); margin-bottom: 24px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .intranet-nav { padding: 0 16px; }
  .dash-hero { padding: 24px 20px; flex-direction: column; text-align: center; }
  .dash-page { padding: 20px 16px 60px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .decision-buttons { flex-direction: column; }
  .login-card { padding: 36px 24px; }
  .approve-card { padding: 24px 20px; }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="color"]),
  textarea, select { font-size: max(16px, 1em); }
}
@media (max-width: 500px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ── Demo Banner ───────────────────────────────────────────── */
#demo-bar {
  background: #f59e0b;
  color: #1c1600;
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1.4;
  border-bottom: 2px solid #d97706;
  position: sticky;
  top: 68px; /* nach der intranet-nav */
  z-index: 299;
}
.demo-bar-icon { font-size: 14px; flex-shrink: 0; }
.demo-bar-text { flex: 1; min-width: 200px; }
.demo-bar-link {
  color: #1c1600; font-weight: 700; text-decoration: underline;
  white-space: nowrap; font-size: 13px;
}
.demo-bar-exit {
  background: rgba(0,0,0,.12); color: #1c1600; font-weight: 700;
  text-decoration: none; padding: 4px 12px; border-radius: 4px;
  font-size: 13px; white-space: nowrap;
}
.demo-bar-exit:hover { background: rgba(0,0,0,.2); }
