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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0f0c29;
  min-height: 100vh;
  color: #e0e0e0;
}

/* ======================== AUTH ======================== */
.auth-container {
  display: none;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
}

.auth-container.show {
  display: block;
}

.auth-container h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 28px;
  background: linear-gradient(90deg, #00d2ff, #7b2ff7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-container .subtitle {
  text-align: center;
  color: #999;
  margin-bottom: 30px;
  font-size: 14px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #7b2ff7;
  box-shadow: 0 0 0 3px rgba(123,47,247,0.2);
}

.form-group input::placeholder { color: #666; }

.btn-primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(90deg, #7b2ff7, #00d2ff);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }

.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #888;
}
.auth-link a { color: #00d2ff; text-decoration: none; font-weight: 500; }
.auth-link a:hover { text-decoration: underline; }

.remember-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #aaa;
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #7b2ff7;
  cursor: pointer;
}

.error-msg {
  background: rgba(255,71,87,0.15);
  border: 1px solid rgba(255,71,87,0.3);
  color: #ff4757;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.error-msg.show { display: block; }

.success-msg {
  background: rgba(46,213,115,0.15);
  border: 1px solid rgba(46,213,115,0.3);
  color: #2ed573;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.success-msg.show { display: block; }

/* ======================== LAYOUT ======================== */
.dashboard {
  display: none;
  height: 100vh;
  overflow: hidden;
}
.dashboard.active { display: flex; }

/* Sidebar */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: rgba(255,255,255,0.03);
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  padding: 0;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-brand h2 {
  font-size: 22px;
  background: linear-gradient(90deg, #00d2ff, #7b2ff7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-brand .sidebar-user {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #999;
  transition: all 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #ccc;
}

.nav-item.active {
  background: rgba(123,47,247,0.15);
  color: #fff;
  border: 1px solid rgba(123,47,247,0.3);
}

.nav-item .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #ff4757;
  background: none;
  border: 1px solid rgba(255,71,87,0.2);
  width: 100%;
  transition: background 0.3s;
}
.btn-logout:hover { background: rgba(255,71,87,0.1); }

/* Main Content */
.main-content {
  flex: 1;
  overflow-y: auto;
  height: 100vh;
  padding: 36px 40px;
}

.tab-page { display: none; }
.tab-page.active { display: block; }

/* ======================== STEMPELN ======================== */
.stempel-status {
  text-align: center;
  margin-bottom: 32px;
}

.stempel-status .status-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.nicht-gestempelt {
  background: rgba(255,255,255,0.08);
  color: #999;
  border: 1px solid rgba(255,255,255,0.12);
}
.status-badge.aktiv {
  background: rgba(46,213,115,0.15);
  color: #2ed573;
  border: 1px solid rgba(46,213,115,0.3);
}
.status-badge.pause {
  background: rgba(255,165,2,0.15);
  color: #ffa502;
  border: 1px solid rgba(255,165,2,0.3);
}

.stempel-clock {
  text-align: center;
  margin: 24px 0;
}

.stempel-clock .time-big {
  font-size: 72px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #00d2ff, #7b2ff7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

.stempel-clock .date-text {
  font-size: 16px;
  color: #888;
  margin-top: 4px;
}

.stempel-timer {
  text-align: center;
  margin: 20px 0 32px;
}

.stempel-timer .worked-label {
  font-size: 13px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stempel-timer .worked-time {
  font-size: 36px;
  font-weight: 600;
  color: #2ed573;
  font-variant-numeric: tabular-nums;
}

.stempel-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn-stempel {
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-stempel:active { transform: scale(0.97); }
.btn-stempel:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.btn-einstempeln {
  background: linear-gradient(90deg, #2ed573, #1abc9c);
  color: #fff;
}
.btn-ausstempeln {
  background: linear-gradient(90deg, #ff4757, #ff6b81);
  color: #fff;
}
.btn-pause {
  background: linear-gradient(90deg, #ffa502, #ff6348);
  color: #fff;
}
.btn-pause-end {
  background: linear-gradient(90deg, #7b2ff7, #00d2ff);
  color: #fff;
}

.btn-stempel:hover:not(:disabled) { opacity: 0.85; }

/* Today log */
.today-log h3 {
  font-size: 17px;
  margin-bottom: 14px;
  color: #ccc;
}

.log-table {
  width: 100%;
  border-collapse: collapse;
}

.log-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.log-table td {
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.log-table tr:last-child td { border-bottom: none; }

.log-table .type-in { color: #2ed573; }
.log-table .type-out { color: #ff4757; }
.log-table .type-pause-start { color: #ffa502; }
.log-table .type-pause-end { color: #7b2ff7; }

/* ======================== KALENDER ======================== */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.calendar-header h3 {
  font-size: 22px;
  color: #ddd;
}

.cal-nav-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ccc;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.cal-nav-btn:hover { background: rgba(255,255,255,0.12); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day-header {
  text-align: center;
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  padding: 8px 0;
  font-weight: 600;
}

.cal-day {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px 10px;
  min-height: 80px;
  font-size: 13px;
  transition: background 0.2s;
  cursor: default;
}

.cal-day:hover { background: rgba(255,255,255,0.07); }

.cal-day.empty { background: transparent; border-color: transparent; }

.cal-day .day-num {
  font-weight: 600;
  color: #aaa;
  margin-bottom: 6px;
}

.cal-day.today .day-num {
  color: #00d2ff;
}

.cal-day.today {
  border-color: rgba(0,210,255,0.3);
}

.cal-day .day-hours {
  font-size: 11px;
  color: #2ed573;
  font-weight: 600;
}

.cal-day .day-shifts {
  font-size: 10px;
  color: #7b2ff7;
  margin-top: 2px;
}

/* ======================== SCHICHTEN ======================== */
.schichten-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.schichten-header h3 {
  font-size: 22px;
  color: #ddd;
}

.btn-add-shift {
  padding: 10px 20px;
  background: linear-gradient(90deg, #7b2ff7, #00d2ff);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-add-shift:hover { opacity: 0.85; }

.shifts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shift-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px 22px;
}

.shift-info .shift-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.shift-info .shift-times {
  font-size: 13px;
  color: #888;
}

.shift-info .shift-role {
  font-size: 12px;
  color: #7b2ff7;
  margin-top: 4px;
}

.shift-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-shift-delete {
  background: none;
  border: none;
  color: #ff4757;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s;
}
.btn-shift-delete:hover { background: rgba(255,71,87,0.15); }

.no-entries {
  text-align: center;
  color: #555;
  padding: 40px;
  font-size: 14px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }

.modal {
  background: #1e1b3a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.modal h3 {
  margin-bottom: 20px;
  font-size: 18px;
  color: #ddd;
}

.modal .form-group { margin-bottom: 16px; }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.btn-cancel {
  padding: 10px 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #ccc;
  cursor: pointer;
  font-size: 14px;
}

.btn-save {
  padding: 10px 20px;
  background: linear-gradient(90deg, #7b2ff7, #00d2ff);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-save:hover { opacity: 0.85; }
.btn-cancel:hover { background: rgba(255,255,255,0.12); }

/* ======================== STATISTIK ======================== */
.stats-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.stats-filter label {
  font-size: 13px;
  color: #888;
  font-weight: 500;
}

.stats-filter input[type="date"] {
  padding: 8px 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
}

.stats-filter input[type="date"]:focus {
  outline: none;
  border-color: #7b2ff7;
}

/* Stats Controls */
.stats-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.stats-quick-range {
  display: flex;
  gap: 6px;
  margin-left: 8px;
}

.btn-quick-range {
  padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #aaa;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-quick-range:hover {
  background: rgba(123,47,247,0.15);
  color: #b57bff;
  border-color: rgba(123,47,247,0.3);
}

.stats-employee-filter {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-emp-label {
  font-size: 13px;
  color: #888;
  font-weight: 500;
  padding-top: 6px;
  flex-shrink: 0;
}

.stats-emp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stats-emp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 13px;
  color: #aaa;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.stats-emp-chip:hover {
  background: rgba(255,255,255,0.1);
  color: #ddd;
}
.stats-emp-chip.active {
  background: rgba(123,47,247,0.2);
  border-color: rgba(123,47,247,0.4);
  color: #b57bff;
}
.stats-emp-chip .chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stats-export-row {
  display: flex;
  gap: 10px;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}
.btn-export:hover { opacity: 0.85; }

.btn-export-csv {
  background: linear-gradient(135deg, #2ed573, #00b894);
  color: #fff;
}
.btn-export-pdf {
  background: linear-gradient(135deg, #ff6b81, #ff4757);
  color: #fff;
}

.stats-overview-cards {
  display: flex;
  gap: 14px;
  margin-bottom: 32px;
}

.stat-ov-card {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-ov-value {
  font-size: 22px;
  font-weight: 700;
  color: #00d2ff;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.stat-ov-label {
  font-size: 12px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-days {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stats-day-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
}

.stats-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.stats-day-date {
  font-weight: 600;
  font-size: 15px;
  color: #ddd;
}

.stats-day-totals {
  display: flex;
  gap: 10px;
}

.stats-tag {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.stats-tag.work {
  background: rgba(46,213,115,0.12);
  color: #2ed573;
  border: 1px solid rgba(46,213,115,0.25);
}

.stats-tag.pause {
  background: rgba(255,165,2,0.12);
  color: #ffa502;
  border: 1px solid rgba(255,165,2,0.25);
}

.stats-log-table {
  width: 100%;
}

.stats-log-table th {
  text-align: left;
  padding: 10px 20px;
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-log-table td {
  padding: 10px 20px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ======================== NAV DIVIDER ======================== */
.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 16px;
}

/* ======================== SELECT ======================== */
select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

select:focus {
  outline: none;
  border-color: #7b2ff7;
}

select option {
  background: #1e1b3a;
  color: #fff;
}

/* ======================== PROFILE ======================== */
.profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 28px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7b2ff7, #00d2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  color: #eee;
}

.profile-role {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
}

.profile-role[data-role="Admin"] {
  background: rgba(255,71,87,0.15);
  color: #ff4757;
  border: 1px solid rgba(255,71,87,0.3);
}
.profile-role[data-role="Teamleiter"] {
  background: rgba(123,47,247,0.15);
  color: #b57bff;
  border: 1px solid rgba(123,47,247,0.3);
}
.profile-role[data-role="Projektleiter"] {
  background: rgba(0,210,255,0.15);
  color: #00d2ff;
  border: 1px solid rgba(0,210,255,0.3);
}
.profile-role[data-role="Personalverwaltung"] {
  background: rgba(46,213,115,0.15);
  color: #2ed573;
  border: 1px solid rgba(46,213,115,0.3);
}
.profile-role[data-role="Mitarbeiter"] {
  background: rgba(255,165,2,0.15);
  color: #ffa502;
  border: 1px solid rgba(255,165,2,0.3);
}
.profile-role[data-role="Buchhaltung"],
.emp-role-badge[data-role="Buchhaltung"] {
  background: rgba(255,107,129,0.15);
  color: #ff6b81;
  border: 1px solid rgba(255,107,129,0.3);
}
.profile-role[data-role="Lagerarbeiter"],
.emp-role-badge[data-role="Lagerarbeiter"] {
  background: rgba(116,185,255,0.15);
  color: #74b9ff;
  border: 1px solid rgba(116,185,255,0.3);
}
.profile-role[data-role="Lagerleiter"],
.emp-role-badge[data-role="Lagerleiter"] {
  background: rgba(9,132,227,0.15);
  color: #0984e3;
  border: 1px solid rgba(9,132,227,0.3);
}
.profile-role[data-role="Teamleiter Lager"],
.emp-role-badge[data-role="Teamleiter Lager"] {
  background: rgba(108,92,231,0.15);
  color: #6c5ce7;
  border: 1px solid rgba(108,92,231,0.3);
}
.profile-role[data-role="Auszubildende/r"],
.emp-role-badge[data-role="Auszubildende/r"] {
  background: rgba(253,203,110,0.15);
  color: #fdcb6e;
  border: 1px solid rgba(253,203,110,0.3);
}
.profile-role[data-role="Praktikant/in"],
.emp-role-badge[data-role="Praktikant/in"] {
  background: rgba(0,206,209,0.15);
  color: #00ced1;
  border: 1px solid rgba(0,206,209,0.3);
}

.profile-email {
  font-size: 14px;
  color: #888;
}

.profile-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 24px 28px;
}

/* ======================== EMPLOYEE CARDS ======================== */
.emp-role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  margin-top: 4px;
}

.emp-role-badge[data-role="Admin"] {
  background: rgba(255,71,87,0.15);
  color: #ff4757;
  border: 1px solid rgba(255,71,87,0.3);
}
.emp-role-badge[data-role="Teamleiter"] {
  background: rgba(123,47,247,0.15);
  color: #b57bff;
  border: 1px solid rgba(123,47,247,0.3);
}
.emp-role-badge[data-role="Projektleiter"] {
  background: rgba(0,210,255,0.15);
  color: #00d2ff;
  border: 1px solid rgba(0,210,255,0.3);
}
.emp-role-badge[data-role="Personalverwaltung"] {
  background: rgba(46,213,115,0.15);
  color: #2ed573;
  border: 1px solid rgba(46,213,115,0.3);
}
.emp-role-badge[data-role="Mitarbeiter"] {
  background: rgba(255,165,2,0.15);
  color: #ffa502;
  border: 1px solid rgba(255,165,2,0.3);
}

/* ======================== STECKBRIEF MODAL ======================== */
.modal-wide {
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-wide::-webkit-scrollbar { width: 6px; }
.modal-wide::-webkit-scrollbar-track { background: transparent; }
.modal-wide::-webkit-scrollbar-thumb { background: rgba(123,47,247,0.4); border-radius: 3px; }

.modal-section {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  margin-top: 20px;
}
.modal-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.modal-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #7b2ff7;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-row-2 .form-group { margin-bottom: 14px; }

.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-group select option {
  background: #1e1b3a;
  color: #fff;
}

/* Document Upload */
.doc-upload-area {
  border: 2px dashed rgba(123,47,247,0.35);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  color: #888;
  font-size: 14px;
  transition: border-color 0.3s, background 0.3s;
  cursor: pointer;
}
.doc-upload-area:hover {
  border-color: #7b2ff7;
  background: rgba(123,47,247,0.05);
}
.doc-upload-area.drag-over {
  border-color: #00d2ff;
  background: rgba(0,210,255,0.08);
}
.doc-upload-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.5;
}
.doc-upload-hint {
  font-size: 12px;
  color: #555;
  margin-top: 8px;
}
.btn-doc-browse {
  background: rgba(123,47,247,0.2);
  border: 1px solid rgba(123,47,247,0.4);
  border-radius: 6px;
  color: #b57bff;
  padding: 6px 16px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s;
}
.btn-doc-browse:hover { background: rgba(123,47,247,0.35); }

.doc-list { margin-top: 12px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #ccc;
}
.doc-item-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.doc-item-info {
  flex: 1;
  min-width: 0;
}
.doc-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: #eee;
}
.doc-item-size {
  font-size: 11px;
  color: #666;
}
.doc-item-btn {
  background: none;
  border: none;
  color: #ff6b81;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.doc-item-btn:hover { opacity: 1; }

/* Employee Card Extended */
.emp-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  color: #888;
}
.emp-card-details span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.emp-card-details .emp-detail-label {
  color: #555;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.emp-card-details .emp-detail-value {
  color: #bbb;
}
.emp-card-docs {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.emp-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(0,210,255,0.08);
  border: 1px solid rgba(0,210,255,0.2);
  border-radius: 6px;
  font-size: 11px;
  color: #00d2ff;
  cursor: pointer;
  transition: background 0.2s;
}
.emp-doc-badge:hover { background: rgba(0,210,255,0.18); }

/* ======================== ROLLENVERWALTUNG ======================== */
.role-description {
  font-size: 13px;
  color: #777;
  margin-bottom: 20px;
  line-height: 1.5;
}

.role-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.role-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.role-color-swatch:hover { transform: scale(1.15); }
.role-color-swatch.selected {
  border-color: #fff;
  transform: scale(1.15);
}

.role-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  margin-bottom: 10px;
}
.role-card-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.role-card-info {
  flex: 1;
  min-width: 0;
}
.role-card-name {
  font-size: 15px;
  font-weight: 600;
  color: #eee;
}
.role-card-meta {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}
.role-card-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.role-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-role-delete {
  background: none;
  border: 1px solid rgba(255,107,129,0.3);
  border-radius: 6px;
  color: #ff6b81;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.btn-role-delete:hover { opacity: 1; background: rgba(255,107,129,0.1); }
.btn-role-delete:disabled { opacity: 0.2; cursor: default; }

/* ======================== TOPBAR & NOTIFICATIONS ======================== */
.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  margin-bottom: 24px;
}

.notif-bell {
  font-size: 22px;
  cursor: pointer;
  position: relative;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.2s;
  user-select: none;
}
.notif-bell:hover { background: rgba(255,255,255,0.06); }

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ff4757;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notif-panel {
  display: none;
  position: absolute;
  top: 52px;
  right: 0;
  width: 340px;
  max-height: 400px;
  background: #1e1b3a;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 90;
  overflow: hidden;
}
.notif-panel.open { display: block; }

.notif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
  font-weight: 600;
  color: #ddd;
}

.notif-clear {
  background: none;
  border: none;
  color: #7b2ff7;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}
.notif-clear:hover { background: rgba(123,47,247,0.15); }

.notif-list {
  max-height: 340px;
  overflow-y: auto;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(123,47,247,0.3); border-radius: 2px; }

.notif-item {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  color: #bbb;
  line-height: 1.5;
}
.notif-item.unread { background: rgba(123,47,247,0.06); }
.notif-item-time {
  font-size: 11px;
  color: #555;
  margin-top: 4px;
}
.notif-empty {
  padding: 24px;
  text-align: center;
  color: #555;
  font-size: 13px;
}

/* ======================== EINSTELLUNGEN ======================== */
.settings-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #7b2ff7;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.settings-label-text {
  font-size: 15px;
  color: #eee;
  font-weight: 500;
}
.settings-label-desc {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 26px;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(90deg, #7b2ff7, #00d2ff);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.toggle-switch-sm {
  width: 38px;
  height: 22px;
}
.toggle-switch-sm .toggle-slider::before {
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
}
.toggle-switch-sm input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.settings-section-header .settings-section-title {
  margin-bottom: 0;
}

/* ======================== ZEITEN KORRIGIEREN ======================== */
.corr-log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.corr-log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.corr-log-item:hover {
  background: rgba(123,47,247,0.1);
  border-color: rgba(123,47,247,0.3);
}

.corr-log-type {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  min-width: 70px;
  text-align: center;
}
.corr-log-type.t-in { background: rgba(46,213,115,0.15); color: #2ed573; }
.corr-log-type.t-out { background: rgba(255,71,87,0.15); color: #ff4757; }
.corr-log-type.t-pause-start { background: rgba(255,165,2,0.15); color: #ffa502; }
.corr-log-type.t-pause-end { background: rgba(123,47,247,0.15); color: #b57bff; }

.corr-log-time {
  font-size: 14px;
  color: #eee;
  font-variant-numeric: tabular-nums;
}
.corr-log-dur {
  font-size: 12px;
  color: #777;
  margin-left: auto;
}

.corr-edit-area {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(123,47,247,0.25);
  border-radius: 12px;
  padding: 20px;
  margin-top: 12px;
}

.batch-weekdays {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.batch-wd-btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #333;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.batch-wd-btn:hover { border-color: #7b2ff7; color: #7b2ff7; }

.batch-wd-btn.active {
  background: rgba(123,47,247,0.15);
  border-color: #7b2ff7;
  color: #7b2ff7;
}

.tpl-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tpl-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tpl-info {
  flex: 1;
}

.tpl-name { font-weight: 600; color: #eee; font-size: 15px; }
.tpl-meta { color: #888; font-size: 13px; margin-top: 2px; }

body.light-mode .tpl-name { color: #333; }
body.light-mode .tpl-meta { color: #999; }
body.light-mode .batch-wd-btn { border-color: #ddd; color: #999; }
body.light-mode .batch-wd-btn.active { background: rgba(123,47,247,0.08); border-color: #7b2ff7; color: #7b2ff7; }

/* ======================== LIGHT MODE ======================== */
body.light-mode {
  background: #f0f2f5;
  color: #333;
}

body.light-mode .sidebar {
  background: #fff;
  border-right-color: #e0e0e0;
}

body.light-mode .sidebar-brand .sidebar-user { color: #888; }

body.light-mode .nav-item { color: #666; }
body.light-mode .nav-item:hover { background: rgba(0,0,0,0.04); color: #333; }
body.light-mode .nav-item.active {
  background: rgba(123,47,247,0.1);
  color: #5a25cc;
  border-color: rgba(123,47,247,0.25);
}

body.light-mode .main-content { background: #f0f2f5; }

body.light-mode .settings-section,
body.light-mode .profile-card,
body.light-mode .shift-card,
body.light-mode .stats-day-card,
body.light-mode .role-card,
body.light-mode .corr-log-item {
  background: #fff;
  border-color: #e0e0e0;
}

body.light-mode .notif-panel {
  background: #fff;
  border-color: #e0e0e0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

body.light-mode .modal {
  background: #fff;
  border-color: #e0e0e0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

body.light-mode .modal-section-title { color: #7b2ff7; }

body.light-mode h3, body.light-mode h4 { color: #333 !important; }
body.light-mode .settings-label-text { color: #333; }
body.light-mode .shift-name { color: #222; }
body.light-mode .shift-times { color: #666; }
body.light-mode .profile-name { color: #222; }
body.light-mode .profile-email { color: #666; }

body.light-mode .form-group input,
body.light-mode .form-group select,
body.light-mode .stats-filter input[type="date"],
body.light-mode select {
  background: #f5f5f5;
  border-color: #d0d0d0;
  color: #333;
}
body.light-mode .form-group input:focus,
body.light-mode .form-group select:focus {
  border-color: #7b2ff7;
}

body.light-mode .form-group label,
body.light-mode .stats-filter label,
body.light-mode .role-description,
body.light-mode .settings-label-desc,
body.light-mode .cal-day-header { color: #888; }

body.light-mode .cal-day {
  background: #fff;
  border-color: #e0e0e0;
}
body.light-mode .cal-day:hover { background: #f5f5f5; }
body.light-mode .cal-day .day-num { color: #555; }
body.light-mode .cal-day.today .day-num { color: #7b2ff7; }

body.light-mode .time-big { color: #333; }
body.light-mode .date-text { color: #666; }
body.light-mode .worked-label { color: #888; }
body.light-mode .worked-time { color: #333; }

body.light-mode .stat-ov-card { background: #fff; border-color: #e0e0e0; }
body.light-mode .stat-ov-label { color: #888; }

body.light-mode .log-table th { color: #888; }
body.light-mode .log-table td { color: #555; border-bottom-color: #eee; }

body.light-mode .btn-stempel.btn-einstempeln { background: linear-gradient(90deg, #2ed573, #00b894); }
body.light-mode .btn-stempel.btn-ausstempeln { background: linear-gradient(90deg, #ff4757, #e17055); }
body.light-mode .btn-stempel.btn-pause { background: linear-gradient(90deg, #ffa502, #ff7675); }

body.light-mode .toggle-slider { background: #ccc; }

body.light-mode .doc-upload-area {
  border-color: #ccc;
  color: #888;
}

body.light-mode .auth-container {
  background: rgba(255,255,255,0.85);
  border-color: #e0e0e0;
}
body.light-mode .auth-container .subtitle { color: #888; }

body.light-mode .no-entries { color: #999; }

body.light-mode .today-log { background: #fff; border-color: #e0e0e0; }

body.light-mode .emp-card-details { border-top-color: #eee; }

body.light-mode .emp-doc-badge {
  background: rgba(0,210,255,0.06);
  border-color: rgba(0,210,255,0.2);
  color: #0984e3;
}

body.light-mode select option {
  background: #f5f5f5;
  color: #333;
}

body.light-mode .modal .form-group select option {
  background: #fff;
  color: #333;
}

body.light-mode .sidebar-brand h2 { background: linear-gradient(90deg, #00d2ff, #7b2ff7); }

body.light-mode .status-badge.nicht-gestempelt {
  background: #f0f0f0;
  color: #888;
  border-color: #ddd;
}
body.light-mode .status-badge.aktiv {
  background: rgba(46,213,115,0.1);
  color: #27ae60;
  border-color: rgba(46,213,115,0.25);
}
body.light-mode .status-badge.pause {
  background: rgba(255,165,2,0.1);
  color: #e67e22;
  border-color: rgba(255,165,2,0.25);
}

body.light-mode .shift-role { color: #888; }
body.light-mode .profile-role { border-color: #ddd; }
body.light-mode .nav-divider { background: #e0e0e0; }

body.light-mode .corr-log-item { cursor: pointer; }
body.light-mode .corr-log-item:hover { background: rgba(123,47,247,0.06); border-color: rgba(123,47,247,0.2); }
body.light-mode .corr-edit-area { background: #fafafa; border-color: rgba(123,47,247,0.2); }

body.light-mode .btn-logout { color: #e74c3c; border-color: rgba(231,76,60,0.2); }
body.light-mode .btn-logout:hover { background: rgba(231,76,60,0.08); }

body.light-mode .notif-item { color: #555; border-bottom-color: #f0f0f0; }
body.light-mode .notif-item.unread { background: rgba(123,47,247,0.04); }
body.light-mode .notif-item-time { color: #999; }
body.light-mode .notif-empty { color: #bbb; }
body.light-mode .notif-panel-header { color: #333; border-bottom-color: #eee; }

body.light-mode .role-card-name { color: #333; }
body.light-mode .role-card-meta { color: #999; }

body.light-mode .btn-quick-range { background: #f0f0f0; border-color: #ddd; color: #888; }
body.light-mode .btn-quick-range:hover { background: rgba(123,47,247,0.08); color: #7b2ff7; border-color: rgba(123,47,247,0.2); }

body.light-mode .stats-emp-chip { background: #f0f0f0; border-color: #ddd; color: #888; }
body.light-mode .stats-emp-chip:hover { background: #e8e8e8; color: #555; }
body.light-mode .stats-emp-chip.active { background: rgba(123,47,247,0.08); border-color: rgba(123,47,247,0.25); color: #7b2ff7; }

body.light-mode .stats-controls { border-bottom-color: #e0e0e0; }

body.light-mode textarea {
  background: #fff;
  border-color: #ddd;
  color: #333;
}

/* Audit-Log Cards */
#tab-auditlog .shift-card {
  transition: background 0.2s;
}
#tab-auditlog .shift-card:hover {
  background: rgba(123, 47, 247, 0.1);
}

/* Assigned Shift Cards (read-only) */
.shift-card-assigned {
  opacity: 0.75;
  border-left: 3px solid #555;
}
body.light-mode .shift-card-assigned {
  border-left-color: #bbb;
}

/* Feedback Stars */
.feedback-star {
  font-size: 24px;
  color: #444;
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}
.feedback-star:hover,
.feedback-star.active {
  color: #ffa502;
  transform: scale(1.15);
}

/* Paywall & Abo */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.plan-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}
.plan-card:hover {
  border-color: rgba(123,47,247,0.4);
  transform: translateY(-2px);
}
.plan-active {
  border-color: #7b2ff7 !important;
  background: rgba(123,47,247,0.08);
}
.plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #7b2ff7;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.plan-name {
  font-size: 18px;
  font-weight: 700;
  color: #eee;
  margin-bottom: 8px;
}
.plan-price {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}
.plan-period {
  font-size: 14px;
  font-weight: 400;
  color: #888;
}
.plan-price-contact {
  font-size: 22px !important;
  color: #7b2ff7 !important;
}
.plan-features {
  text-align: left;
  margin-bottom: 4px;
}
.plan-feature {
  font-size: 13px;
  color: #aaa;
  padding: 4px 0;
}
.plan-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.plan-usage {
  margin-top: 8px;
}
.plan-usage-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.plan-usage-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s;
}
body.light-mode .plan-card {
  background: #f5f5fa;
  border-color: #ddd;
}
body.light-mode .plan-active {
  background: rgba(123,47,247,0.06);
}
body.light-mode .plan-name { color: #333; }
body.light-mode .plan-price { color: #222; }
body.light-mode .plan-feature { color: #666; }
body.light-mode .plan-usage-bar { background: #e0e0e0; }
