/* ═══════════════════════════════════════════════════════════════
   Service-Portal – Stylesheet
   Primärfarbe: #9d1006 / Dunkel: #7a0c05
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --primary:     #9d1006;
  --primary-dk:  #7a0c05;
  --primary-lt:  #c41408;
  --text:        #1a1a1a;
  --text-muted:  #555;
  --bg:          #f4f5f7;
  --white:       #ffffff;
  --border:      #dde0e4;
  --shadow:      0 2px 12px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.15);
  --radius:      10px;
  --blue:        #0057b8;
  --orange:      #d4620a;
  --green:       #1a7a30;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────── */
.app-header {
  background: var(--primary);
  color: var(--white);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

.header-logo {
  height: 44px;
  width: auto;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .01em;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
  margin: 0 auto;
}

.header-nav a {
  color: rgba(255,255,255,.9);
  text-decoration: none;
  font-size: .95rem;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--white);
  border-bottom-color: rgba(255,255,255,.7);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  flex-shrink: 0;
}

.user-greeting {
  font-size: .9rem;
  opacity: .9;
  white-space: nowrap;
}

.btn-logout {
  color: var(--white);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  padding: .3rem .85rem;
  border-radius: 5px;
  text-decoration: none;
  font-size: .85rem;
  transition: background .2s;
  white-space: nowrap;
}

.btn-logout:hover { background: rgba(255,255,255,.25); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
  margin-left: auto;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* ── Main Content ────────────────────────────────────────────── */
.main-content {
  padding: 2rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Dashboard ───────────────────────────────────────────────── */
.dashboard-welcome {
  margin-bottom: 2rem;
}

.dashboard-welcome h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}

.dashboard-welcome p {
  color: var(--text-muted);
  margin-top: .25rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.module-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.module-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.module-icon svg {
  width: 26px;
  height: 26px;
}

.module-icon--red    { background: #fdecea; color: var(--primary); }
.module-icon--blue   { background: #e8f0fb; color: var(--blue); }
.module-icon--orange { background: #fef0e6; color: var(--orange); }
.module-icon--green  { background: #e6f4ea; color: var(--green); }

.module-info { flex: 1; min-width: 0; }

.module-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .2rem;
}

.module-info p {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.module-arrow {
  font-size: 1.5rem;
  color: var(--border);
  flex-shrink: 0;
  transition: color .15s;
}

.module-card:hover .module-arrow { color: var(--primary); }

/* ── Login Page ──────────────────────────────────────────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #7a0c05 0%, #9d1006 50%, #c41408 100%);
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.login-card {
  background: var(--white);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-logo-wrap { margin-bottom: 1.25rem; }

.login-logo {
  height: 72px;
  width: auto;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .3rem;
}

.login-subtitle {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.login-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

.login-info {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.btn-ms-login {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  background: #2f2f2f;
  color: var(--white);
  text-decoration: none;
  padding: .75rem 1.5rem;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 500;
  width: 100%;
  justify-content: center;
  transition: background .2s;
}

.btn-ms-login:hover { background: #1a1a1a; }

.ms-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.login-hint {
  font-size: .78rem;
  color: #aaa;
  margin-top: 1.5rem;
  line-height: 1.5;
}

/* ── Footer ─────────────────────────────────────────────────── */
.app-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: .8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .burger { display: flex; }

  .header-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--primary-dk);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: .5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
  }

  .header-nav.open { display: flex; }

  .header-nav a {
    padding: .5rem 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }

  .header-user .user-greeting { display: none; }

  .module-grid { grid-template-columns: 1fr; }

  .login-card { padding: 2rem 1.25rem; }
}

/* Aufnahme-Portal – Lila */
.module-icon--purple {
  background: linear-gradient(135deg, #6f42c1, #563d7c);
  color: #fff;
}
