
:root {
  --orange: #f28c28;
  --orange-dark: #d66f0d;
  --charcoal: #232323;
  --dark: #303030;
  --panel: #ffffff;
  --bg: #eceff2;
  --muted: #7b8188;
  --line: #e4e7ea;
  --green: #29995a;
  --yellow: #d99a14;
  --red: #c64848;
  --shadow: 0 12px 32px rgba(20, 25, 30, .08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: #202326;
}

body {
  overflow-x: hidden;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(242, 140, 40, .08), transparent 24%),
    var(--bg);
}

.topbar {
  height: 92px;
  padding: 0 34px;
  background: linear-gradient(90deg, #202020 0%, #343434 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(242, 140, 40, .25);
}

.brand {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: .8px;
}

.subtitle {
  margin-top: 3px;
  color: #c9c9c9;
  font-size: 13px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #46d37a;
  box-shadow: 0 0 0 6px rgba(70, 211, 122, .12);
}

.clock {
  min-width: 210px;
  text-align: right;
  font-size: 17px;
  font-weight: 800;
}

.page {
  max-width: 1680px;
  margin: 0 auto;
  padding: 26px 30px 34px;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow,
.panel-kicker {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.hero-row h1 {
  margin: 4px 0 3px;
  font-size: 30px;
  letter-spacing: -.5px;
}

.hero-row p {
  margin: 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .7px;
}

select,
input[type="file"],
button {
  min-height: 44px;
  border-radius: 10px;
  font-size: 14px;
}

select,
input[type="file"] {
  border: 1px solid #d5d9dd;
  background: #fff;
  padding: 9px 12px;
}

button {
  border: 0;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(242,140,40,.2);
}

button.secondary {
  background: #444;
  box-shadow: none;
}

button:disabled {
  opacity: .55;
  cursor: wait;
}

.source {
  margin-left: auto;
  padding: 0 8px 12px 0;
  color: var(--muted);
  font-size: 12px;
}

.dropzone {
  margin-top: 14px;
  padding: 14px 18px;
  border: 1px dashed #c5c9cd;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  transition: .15s ease;
}

.dropzone strong,
.dropzone span {
  display: block;
}

.dropzone-icon {
  font-size: 28px;
  color: var(--orange-dark);
}

.dropzone.active {
  border-color: var(--orange);
  background: #fff5e9;
  transform: scale(1.005);
}

.cards {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 15px;
}

.card {
  min-height: 162px;
  padding: 20px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: rgba(242,140,40,.07);
}

.primary-card {
  background: linear-gradient(145deg, #2d2d2d, #424242);
  color: white;
}

.primary-card::after {
  background: rgba(242,140,40,.2);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
}

.primary-card span,
.primary-card small {
  color: #d9d9d9;
}

.card-icon {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  background: #f5f6f7;
  display: grid;
  place-items: center;
  color: var(--orange-dark) !important;
  font-size: 11px !important;
}

.primary-card .card-icon {
  background: rgba(255,255,255,.1);
  color: #fff !important;
}

.card strong {
  display: block;
  margin-top: 18px;
  font-size: 46px;
  line-height: 1;
}

.card small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.content-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  gap: 18px;
}

.panel {
  min-height: 420px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.panel-header h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.green { background: var(--green); }
.legend-dot.yellow { background: var(--yellow); }
.legend-dot.red { background: var(--red); }

.department-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 14px;
}

.department-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfbfc;
}

.department-top,
.department-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.department-name {
  font-size: 17px;
  font-weight: 900;
}

.department-number {
  font-size: 30px;
  font-weight: 900;
}

.department-number span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.progress {
  height: 12px;
  margin: 17px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eaed;
}

.progress > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #ffb564);
}

.department-meta {
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
}

.badge.GRÜN { background: #dff3e5; color: #137132; }
.badge.GELB { background: #fff0c6; color: #8a6200; }
.badge.ROT { background: #f9dada; color: #941e1e; }

.absence-list {
  max-height: 520px;
  overflow-y: auto;
}

.absence-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
}

.absence-name {
  font-weight: 800;
}

.absence-department {
  color: var(--muted);
  font-size: 12px;
}

.reason-pill {
  align-self: center;
  grid-row: 1 / span 2;
  grid-column: 2;
  padding: 7px 10px;
  border-radius: 10px;
  background: #f1f3f5;
  font-size: 11px;
  font-weight: 800;
  color: #53585e;
}

.empty {
  padding: 28px;
  color: var(--muted);
}

.statusbar {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

.refresh-info {
  text-align: right;
}

@media (max-width: 1150px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .source { width: 100%; margin-left: 0; }
}

@media (max-width: 720px) {
  .topbar { height: auto; padding: 18px; }
  .clock { display: none; }
  .page { padding: 18px; }
  .hero-row { align-items: flex-start; }
  .toolbar { align-items: stretch; }
  .field, .upload-field, select, input[type="file"], button { width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .department-grid { grid-template-columns: 1fr; }
  .legend { display: none; }
  .statusbar { flex-direction: column; }
  .refresh-info { text-align: left; }
}

.main-nav{display:flex;align-items:center;gap:5px;margin-left:auto;margin-right:22px}.nav-link{padding:10px 15px;border-radius:9px;color:#cfcfcf;text-decoration:none;font-size:13px;font-weight:800}.nav-link:hover,.nav-link.active{background:rgba(255,255,255,.10);color:#fff}


nav, .nav-links, .top-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}
nav a, .nav-links a, .top-nav a {
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 11px 16px !important;
  border-radius: 9px !important;
  background: #3b434b !important;
  border: none !important;
  font-weight: 600 !important;
}
nav a:hover, .nav-links a:hover, .top-nav a:hover {
  background: #4a545e !important;
}
nav a.active, .nav-links a.active, .top-nav a.active {
  background: #ef7d00 !important;
  color: #ffffff !important;
}


/* RB-Consulting Software Footer */
.rb-footer {
  margin-top: 18px;
  background: #252b31;
  color: #ffffff;
  border-top: 4px solid #ef7d00;
  min-height: 58px;
  padding: 10px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 18px;
  box-sizing: border-box;
  font-size: 13px;
}
.rb-footer-left { text-align: left; }
.rb-footer-center { text-align: center; }
.rb-footer-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  text-align: right;
  font-weight: 600;
}
.rb-footer-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 5px;
  padding: 2px;
}
@media (max-width: 900px) {
  .rb-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .rb-footer-left,
  .rb-footer-center,
  .rb-footer-right {
    justify-content: center;
    text-align: center;
  }
}


/* Kontextmenü: anwesende Personen */
.department-card {
  cursor: pointer;
}
.department-card:focus {
  outline: 3px solid rgba(239, 125, 0, .45);
  outline-offset: 2px;
}
.present-people-menu {
  position: fixed;
  z-index: 10000;
  display: none;
  width: 320px;
  max-height: 380px;
  overflow: hidden;
  background: #252b31;
  color: #ffffff;
  border: 1px solid #4a535c;
  border-top: 4px solid #ef7d00;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .35);
}
.present-people-menu.open {
  display: block;
}
.present-people-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #30373e;
}
.present-people-header button {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.present-people-list {
  max-height: 310px;
  overflow-y: auto;
  padding: 8px 14px 14px;
}
.present-person {
  padding: 10px 6px;
  border-bottom: 1px solid #414950;
}
.present-person:last-child {
  border-bottom: 0;
}
.present-person-empty {
  padding: 14px 6px;
  color: #c8cdd2;
}
