/* ============================================================
   ZEITERFASSUNG - GFOS-STYLE
   Professional & Modern Design
   ============================================================ */

:root {
  --color-primary: #0066cc;
  --color-primary-dark: #004a99;
  --color-primary-light: #3385d6;
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-danger: #dc3545;
  --color-info: #17a2b8;
  --color-gray-100: #f8f9fa;
  --color-gray-200: #e9ecef;
  --color-gray-300: #dee2e6;
  --color-gray-400: #ced4da;
  --color-gray-500: #6c757d;
  --color-gray-600: #495057;
  --color-gray-700: #343a40;
  --color-gray-800: #212529;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* ============================================================
   RESET & GLOBAL STYLES
   ============================================================ */

.mp-time-container *,
.mp-time-admin-container * {
  box-sizing: border-box;
}

/* ============================================================
   MITARBEITER CONTAINER
   ============================================================ */

.mp-time-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f7fa;
  min-height: 100vh;
}

/* Header mit Status-Leiste */
.mp-time-header {
  margin-bottom: 30px;
  position: relative;
}

.mp-time-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-gray-800);
  margin: 0 0 20px 0;
  letter-spacing: -0.5px;
}

.mp-time-status-bar {
  display: flex;
  gap: 25px;
  padding: 20px 25px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
  border-left: 5px solid var(--color-primary);
}

.mp-time-status-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-time-status-label {
  font-size: 11px;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.mp-time-status-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-gray-800);
}

.mp-time-status-value.active {
  color: var(--color-success);
  text-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
}

.mp-time-status-value.inactive {
  color: var(--color-gray-400);
}

/* Grid Layout */
.mp-time-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 30px;
  align-items: start;
}

@media (max-width: 1024px) {
  .mp-time-grid {
    grid-template-columns: 1fr;
  }
}

.mp-time-col-left,
.mp-time-col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Cards */
.mp-time-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 25px;
  transition: var(--transition);
}

.mp-time-card:hover {
  box-shadow: var(--shadow-lg);
}

.mp-time-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-gray-800);
  margin: 0 0 20px 0;
}

.mp-time-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-gray-700);
  margin: 0 0 15px 0;
}

/* ============================================================
   STEMPEL-KARTE
   ============================================================ */

.mp-time-stamp-card {
  text-align: center;
  padding: 40px 30px;
}

.mp-time-stamp-info {
  margin-bottom: 30px;
}

.mp-time-stamp-label {
  font-size: 14px;
  color: var(--color-gray-500);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mp-time-stamp-time {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-gray-800);
  margin-bottom: 10px;
}

.mp-time-stamp-duration {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-primary);
  margin-top: 10px;
}

.mp-time-stamp-icon {
  font-size: 80px;
  margin: 20px 0;
  opacity: 0.5;
}

.mp-time-stamp-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Stempel-Button */
.mp-time-btn-stamp {
  padding: 20px 40px;
  font-size: 20px;
  font-weight: 700;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-md);
}

.mp-time-btn-stamp:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.mp-time-btn-stamp:active:not(:disabled) {
  transform: translateY(0);
}

.mp-time-btn-login {
  background: linear-gradient(135deg, var(--color-success) 0%, #20c997 100%);
  color: white;
}

.mp-time-btn-logout {
  background: linear-gradient(135deg, var(--color-danger) 0%, #fd7e14 100%);
  color: white;
}

.mp-time-break-input {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

/* ============================================================
   QUICK ACTIONS
   ============================================================ */

.mp-time-actions-card {
  padding: 20px;
}

.mp-time-actions-grid {
  display: grid;
  gap: 12px;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.mp-time-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.mp-time-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mp-time-btn-primary {
  background: var(--color-primary);
  color: white;
}

.mp-time-btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
}

.mp-time-btn-secondary {
  background: var(--color-gray-200);
  color: var(--color-gray-700);
}

.mp-time-btn-secondary:hover:not(:disabled) {
  background: var(--color-gray-300);
}

.mp-time-btn-success {
  background: var(--color-success);
  color: white;
}

.mp-time-btn-danger {
  background: var(--color-danger);
  color: white;
}

.mp-time-btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.mp-time-btn-back {
  background: var(--color-gray-200);
  color: var(--color-gray-700);
  margin-bottom: 20px;
}

/* ============================================================
   STATISTIKEN
   ============================================================ */

.mp-time-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.mp-time-stat-box {
  background: var(--color-gray-100);
  padding: 20px;
  border-radius: var(--border-radius);
  text-align: center;
}

.mp-time-stat-label {
  font-size: 12px;
  color: var(--color-gray-500);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.mp-time-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-gray-800);
}

.mp-time-stat-diff {
  font-size: 14px;
  font-weight: 600;
  margin-top: 5px;
}

.mp-time-stat-diff.positive {
  color: var(--color-success);
}

.mp-time-stat-diff.negative {
  color: var(--color-danger);
}

/* ============================================================
   MONATSPICKER
   ============================================================ */

.mp-time-month-picker {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ============================================================
   TABELLEN
   ============================================================ */

.mp-time-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.mp-time-table thead {
  background: var(--color-gray-100);
}

.mp-time-table th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: var(--color-gray-700);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--color-gray-300);
}

.mp-time-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--color-gray-200);
}

.mp-time-table tbody tr {
  transition: var(--transition);
}

.mp-time-table tbody tr:hover {
  background: var(--color-gray-100);
}

.mp-time-table tbody tr.status-open {
  background: #fff3cd;
}

.mp-time-table tbody tr.row-warning {
  background: #f8d7da;
}

.mp-time-table-sum {
  background: var(--color-gray-100);
  font-weight: 600;
  border-top: 2px solid var(--color-gray-300);
}

/* Status Badges */
.mp-time-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-open,
.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-closed,
.status-approved {
  background: #d4edda;
  color: #155724;
}

.status-corrected {
  background: #d1ecf1;
  color: #0c5460;
}

.status-rejected {
  background: #f8d7da;
  color: #721c24;
}

/* ============================================================
   FORMULARE
   ============================================================ */

.mp-time-form-card {
  max-width: 800px;
}

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

.mp-time-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.mp-time-label {
  display: block;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: 8px;
  font-size: 14px;
}

.mp-time-input,
.mp-time-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: var(--transition);
  font-family: inherit;
}

.mp-time-input:focus,
.mp-time-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.mp-time-textarea {
  resize: vertical;
  min-height: 100px;
}

.mp-time-checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-time-checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.mp-time-reason-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-time-rejection-row {
  background: #f8d7da;
  color: #721c24;
}

.mp-time-rejection-row td {
  padding: 15px;
}

/* ============================================================
   ADMIN CONTAINER
   ============================================================ */

.mp-time-admin-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

.mp-time-admin-header {
  margin-bottom: 30px;
}

.mp-time-admin-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-gray-800);
  margin: 0;
}

/* Navigation */
.mp-time-admin-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--color-gray-200);
  padding-bottom: 15px;
  flex-wrap: wrap;
}

.mp-time-admin-nav-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-gray-600);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.mp-time-admin-nav-btn:hover {
  color: var(--color-primary);
  background: var(--color-gray-100);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.mp-time-admin-nav-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.mp-time-admin-content {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.mp-time-admin-content h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-gray-800);
  margin: 0 0 25px 0;
}

/* Statistik-Karten */
.mp-time-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.mp-time-stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.mp-time-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.mp-time-stat-card.stat-warning {
  border-left: 5px solid var(--color-warning);
}

.mp-time-stat-card.stat-info {
  border-left: 5px solid var(--color-info);
}

.mp-time-stat-card.stat-success {
  border-left: 5px solid var(--color-success);
}

.mp-time-stat-icon {
  font-size: 48px;
}

.mp-time-stat-info {
  flex: 1;
}

.mp-time-stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-gray-800);
  line-height: 1;
}

/* Filter */
.mp-time-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mp-time-filter-btn {
  padding: 8px 16px;
  background: var(--color-gray-100);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gray-700);
  cursor: pointer;
  transition: var(--transition);
}

.mp-time-filter-btn:hover {
  background: var(--color-gray-200);
}

.mp-time-filter-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary-dark);
}

/* Report Selector */
.mp-time-report-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  align-items: center;
}

.mp-time-report-card {
  min-height: 400px;
}

/* Modal */
.mp-time-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.mp-time-modal-content {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px;
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.mp-time-modal-content h3 {
  margin: 0 0 25px 0;
  font-size: 20px;
  color: var(--color-gray-800);
}

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

/* Empty State */
.mp-time-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-gray-500);
  font-size: 16px;
}

/* Error */
.mp-time-error {
  background: #f8d7da;
  color: #721c24;
  padding: 20px;
  border-radius: var(--border-radius);
  border-left: 5px solid var(--color-danger);
  margin: 20px 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .mp-time-grid {
    grid-template-columns: 1fr;
  }
  
  .mp-time-status-bar {
    flex-direction: column;
  }
  
  .mp-time-stamp-card {
    padding: 30px 20px;
  }
  
  .mp-time-btn-stamp {
    padding: 16px 32px;
    font-size: 18px;
  }
  
  .mp-time-admin-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  
  .mp-time-table {
    font-size: 12px;
  }
  
  .mp-time-table th,
  .mp-time-table td {
    padding: 8px 10px;
  }
  
  .mp-time-form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   ANIMATIONEN
   ============================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mp-time-card,
.mp-time-stat-card {
  animation: fadeIn 0.3s ease;
}

/* Print Styles */
@media print {
  .mp-time-admin-nav,
  .mp-time-btn,
  .mp-time-filter {
    display: none;
  }
  
  .mp-time-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ============================================================
   KALENDERANSICHT
   ============================================================ */

.mp-time-calendar-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.mp-time-calendar-header h2 {
  flex: 1;
  margin: 0;
}

.mp-time-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.mp-time-calendar-nav h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.mp-time-calendar-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 20px;
  margin-bottom: 30px;
}

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

.mp-time-calendar-weekday {
  text-align: center;
  font-weight: 600;
  padding: 12px 8px;
  background: #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  color: #495057;
}

.mp-time-calendar-day {
  min-height: 80px;
  padding: 8px;
  border-radius: 8px;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: all 0.2s;
  position: relative;
}

.mp-time-calendar-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mp-time-calendar-day-number {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.mp-time-calendar-day-label {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* Farbcodierung */

/* Grau: normale Arbeitstage */
.mp-time-calendar-workday {
  background: #e9ecef;
  color: #495057;
}

/* Dunkelgrau: Wochenende */
.mp-time-calendar-weekend {
  background: #ced4da;
  color: #6c757d;
}

/* Rot: unvollständig/fehlend */
.mp-time-calendar-incomplete,
.mp-time-calendar-missing {
  background: #ffe5e5;
  border-color: #ff6b6b;
  color: #c92a2a;
}

/* Gelb: Urlaub */
.mp-time-calendar-vacation {
  background: #fff3bf;
  border-color: #fab005;
  color: #c77700;
}

/* Blau: Krank */
.mp-time-calendar-sick {
  background: #d0ebff;
  border-color: #339af0;
  color: #1864ab;
}

/* Grün: Feiertage */
.mp-time-calendar-holiday {
  background: #d3f9d8;
  border-color: #51cf66;
  color: #2b8a3e;
}

/* Hellblau: Sonderurlaub */
.mp-time-calendar-special {
  background: #e7f5ff;
  border-color: #74c0fc;
  color: #1971c2;
}

/* Leere Tage */
.mp-time-calendar-empty {
  background: transparent;
  pointer-events: none;
}

/* Legende */
.mp-time-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  justify-content: center;
}

.mp-time-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.mp-time-legend-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid transparent;
}

.mp-time-legend-workday {
  background: #e9ecef;
}

.mp-time-legend-weekend {
  background: #ced4da;
}

.mp-time-legend-vacation {
  background: #fff3bf;
  border-color: #fab005;
}

.mp-time-legend-sick {
  background: #d0ebff;
  border-color: #339af0;
}

.mp-time-legend-holiday {
  background: #d3f9d8;
  border-color: #51cf66;
}

.mp-time-legend-incomplete {
  background: #ffe5e5;
  border-color: #ff6b6b;
}

/* Button-Styling für Aktionen */
.mp-time-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mp-time-btn-secondary {
  background: #6c757d;
  color: white;
}

.mp-time-btn-secondary:hover {
  background: #5a6268;
}

/* Responsive */
@media (max-width: 768px) {
  .mp-time-calendar-grid {
    gap: 4px;
  }
  
  .mp-time-calendar-day {
    min-height: 60px;
    padding: 4px;
  }
  
  .mp-time-calendar-day-number {
    font-size: 14px;
  }
  
  .mp-time-calendar-day-label {
    font-size: 9px;
  }
  
  .mp-time-calendar-legend {
    gap: 10px;
  }
  
  .mp-time-legend-item {
    font-size: 12px;
  }
}

/* ============================================================
   ABWESENHEITS-MODAL
   ============================================================ */

.mp-time-modal-large {
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.mp-time-checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-time-checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.mp-time-checkbox-group label {
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.mp-time-info-box {
  background: #e7f5ff;
  border-left: 4px solid #339af0;
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
}

.mp-time-info-box strong {
  display: block;
  margin-bottom: 10px;
  color: #1971c2;
}

.mp-time-info-box ul {
  margin: 0;
  padding-left: 20px;
}

.mp-time-info-box li {
  margin-bottom: 5px;
  color: #495057;
  font-size: 14px;
}

.mp-time-btn-success {
  background: #51cf66;
  color: white;
}

.mp-time-btn-success:hover {
  background: #40c057;
}

select.mp-time-input,
textarea.mp-time-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  font-family: inherit;
}

select.mp-time-input {
  cursor: pointer;
}

textarea.mp-time-input {
  resize: vertical;
}

select.mp-time-input:focus,
textarea.mp-time-input:focus {
  outline: none;
  border-color: #228be6;
  box-shadow: 0 0 0 3px rgba(34, 139, 230, 0.1);
}

/* ============================================================
   KALENDER: MEHRZEILIGE LABELS
   ============================================================ */

.mp-time-calendar-day-label {
  font-size: 11px;
  color: #495057;
  text-align: center;
  white-space: pre-line;
  line-height: 1.3;
  margin-top: 2px;
}
