/* Employee Hours & Cost Analysis - Web Interface Styles */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-employee: #3b82f6;
  --color-freelancer: #10b981;
  --color-absence: #f59e0b;
  --color-fw: #6366f1;
  --color-sap: #ec4899;
  --color-eplanning: #14b8a6;
  --color-bg: #f8fafc;
  --color-white: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-hover: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius: 6px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.main-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  height: 60px;
}

.logo {
  font-size: 18px;
  font-weight: 600;
}

.logo a {
  color: var(--color-text);
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 8px;
}

.main-nav a {
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--color-text-light);
  font-weight: 500;
  transition: all 0.15s;
}

.main-nav a:hover {
  background: var(--color-hover);
  text-decoration: none;
  color: var(--color-text);
}

.main-nav a.active {
  background: var(--color-primary);
  color: white;
}

/* Type Filter */
.type-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: var(--color-bg);
  border-radius: var(--radius);
  margin-left: 16px;
}

.type-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.type-filter-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  user-select: none;
}

.type-filter-option input[type="checkbox"] {
  display: none;
}

.type-filter-checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.type-filter-checkbox::after {
  content: '✓';
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s;
}

.type-filter-option input:checked + .type-filter-checkbox::after {
  opacity: 1;
  transform: scale(1);
}

.type-filter-option.freelancer {
  color: var(--color-freelancer);
}

.type-filter-option.freelancer .type-filter-checkbox {
  border-color: var(--color-freelancer);
}

.type-filter-option.freelancer input:checked + .type-filter-checkbox {
  background: var(--color-freelancer);
  border-color: var(--color-freelancer);
}

.type-filter-option.freelancer .type-filter-checkbox::after {
  color: white;
}

.type-filter-option.staff {
  color: var(--color-employee);
}

.type-filter-option.staff .type-filter-checkbox {
  border-color: var(--color-employee);
}

.type-filter-option.staff input:checked + .type-filter-checkbox {
  background: var(--color-employee);
  border-color: var(--color-employee);
}

.type-filter-option.staff .type-filter-checkbox::after {
  color: white;
}

.type-filter-option:hover {
  background: var(--color-hover);
}

/* Date Range Bar */
.date-range-bar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 24px;
}

.date-range-form {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.date-range-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-light);
  font-size: 13px;
}

.date-range-form input[type="date"] {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
}

.date-range-form button {
  padding: 6px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.date-range-form button:hover {
  background: var(--color-primary-dark);
}

.quick-dates {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.quick-dates a {
  font-size: 13px;
  color: var(--color-text-light);
}

.quick-dates a:hover {
  color: var(--color-primary);
}

.quick-dates .nav-btn {
  font-weight: 500;
  padding: 2px 8px;
  background: var(--color-hover);
  border-radius: var(--radius);
}

.quick-dates .nav-btn:hover {
  background: var(--color-primary);
  color: white;
  text-decoration: none;
}

.quick-dates .date-separator {
  color: var(--color-border);
}

/* Date inputs with European display */
.date-inputs {
  display: flex;
  align-items: center;
  gap: 16px;
}

.date-inputs label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-label {
  color: var(--color-text-light);
  font-size: 13px;
}

.date-display {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg);
  padding: 4px 10px;
  border-radius: var(--radius);
  min-width: 100px;
  text-align: center;
}

/* Hide native date input, show display */
.date-inputs input[type="date"] {
  position: absolute;
  opacity: 0;
  width: 100px;
  height: 30px;
  cursor: pointer;
}

.date-inputs label {
  position: relative;
}

/* Main Content */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--color-text-light);
}

.breadcrumbs a {
  color: var(--color-text-light);
}

.breadcrumbs span {
  color: var(--color-text);
}

/* Page Header */
.page-header {
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--color-text-light);
}

/* Cards */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.card-header a {
  font-size: 13px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: 4px;
}

.stat-card.employees .stat-value { color: var(--color-employee); }
.stat-card.freelancers .stat-value { color: var(--color-freelancer); }
.stat-card.cost .stat-value { color: var(--color-absence); }

/* Tables */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 600;
  color: var(--color-text-light);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--color-bg);
}

tr:hover td {
  background: var(--color-hover);
}

tr.clickable {
  cursor: pointer;
}

tr.subteam-row {
  background: var(--color-bg);
}

tr.subteam-row:hover td {
  background: var(--color-hover);
}

td.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  color: var(--color-primary);
}

th.sorted-asc::after { content: ' \2191'; }
th.sorted-desc::after { content: ' \2193'; }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.badge-employee { background: #dbeafe; color: #1e40af; }
.badge-freelancer { background: #d1fae5; color: #065f46; }
.badge-fw { background: #e0e7ff; color: #3730a3; }
.badge-sap { background: #fce7f3; color: #9d174d; }
.badge-eplanning { background: #ccfbf1; color: #115e59; }

.source-badges {
  display: flex;
  gap: 4px;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.source-badge.active { opacity: 1; }
.source-badge.inactive { opacity: 0.2; }

.source-badge.fw { background: #e0e7ff; color: #3730a3; }
.source-badge.sap { background: #fce7f3; color: #9d174d; }
.source-badge.ep { background: #ccfbf1; color: #115e59; }

/* Type Pills */
.type-employee { color: var(--color-employee); }
.type-freelancer { color: var(--color-freelancer); }

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filters select,
.filters input[type="text"] {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--color-white);
}

.filters select:focus,
.filters input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
}

.search-box::before {
  content: '\1F50D';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.5;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--color-text);
}

.pagination a:hover {
  background: var(--color-hover);
  text-decoration: none;
}

.pagination span.current {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Detail Page Header */
.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.detail-header .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  flex-shrink: 0;
}

.detail-header .info h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.detail-header .meta {
  color: var(--color-text-light);
  font-size: 14px;
}

.detail-header .badges {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

/* Grid Layout */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Billing Rates Table */
.billing-rates th,
.billing-rates td {
  padding: 8px 12px;
}

.billing-rates .amount {
  font-weight: 600;
  color: var(--color-freelancer);
}

/* Activity Items */
.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-date {
  font-size: 12px;
  color: var(--color-text-light);
  width: 80px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-project {
  font-size: 12px;
  color: var(--color-text-light);
}

.activity-hours {
  font-weight: 500;
  color: var(--color-primary);
}

/* Export Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn:hover {
  background: var(--color-hover);
}

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

.btn-primary:hover {
  background: var(--color-primary-dark);
}

/* Footer */
.main-footer {
  text-align: center;
  padding: 24px;
  color: var(--color-text-light);
  font-size: 12px;
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-light);
}

.empty-state p {
  margin-top: 8px;
}

/* Hours Bar */
.hours-bar {
  width: 100px;
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.hours-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
}

/* Person Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

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

.info-label {
  font-size: 12px;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-weight: 500;
}

/* Calendar View */
.calendar-grid {
  margin-top: 16px;
}

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

.calendar-weekday {
  text-align: center;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-light);
  text-transform: uppercase;
}

.calendar-weekday.weekend {
  color: var(--color-text-light);
  opacity: 0.7;
}

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

.calendar-day {
  min-height: 65px;
  padding: 6px 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.15s;
}

.calendar-day:hover {
  border-color: var(--color-primary);
  text-decoration: none;
}

.calendar-day.empty {
  background: transparent;
  border: none;
}

.calendar-day.weekend {
  background: #f1f5f9;
}

.calendar-day.today {
  border-color: var(--color-primary);
  border-width: 2px;
}

.calendar-day.has-events {
  cursor: pointer;
}

.calendar-day.activity-1 {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
}

.calendar-day.activity-2 {
  background: linear-gradient(135deg, #bfdbfe 0%, #c7d2fe 100%);
}

.calendar-day.activity-3 {
  background: linear-gradient(135deg, #93c5fd 0%, #a5b4fc 100%);
}

.day-number {
  font-weight: 600;
  font-size: 14px;
}

.day-stats {
  margin-top: auto;
  font-size: 10px;
  color: var(--color-text-light);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.day-hours {
  font-weight: 600;
  color: var(--color-primary);
}

.day-cost {
  font-weight: 600;
  color: var(--color-freelancer);
}

.day-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  font-weight: 600;
}

.day-stat-freelancer {
  color: #047857;
}

.day-stat-staff {
  color: #1e40af;
}

.day-total-cost {
  color: var(--color-freelancer);
}

.calendar-legend {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-light);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.legend-color.activity-1 {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
}

.legend-color.activity-2 {
  background: linear-gradient(135deg, #bfdbfe 0%, #c7d2fe 100%);
}

.legend-color.activity-3 {
  background: linear-gradient(135deg, #93c5fd 0%, #a5b4fc 100%);
}

/* Timeline View */
.timeline-card {
  padding: 0;
  overflow: visible;
}

.timeline-container {
  overflow-x: auto;
  overflow-y: visible;
}

.timeline-header {
  display: flex;
  background: #374151;
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.timeline-label-col {
  width: 160px;
  min-width: 160px;
  padding: 8px 12px;
  font-weight: 600;
  background: #1f2937;
}

.timeline-hours {
  display: flex;
  flex: 1;
}

.timeline-hour {
  flex: 1;
  min-width: 50px;
  text-align: center;
  padding: 8px 4px;
  font-size: 11px;
  border-left: 1px solid #4b5563;
}

.timeline-body {
  min-height: 200px;
}

.timeline-row {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  min-height: 60px;
}

.timeline-row:nth-child(even) {
  background: #f9fafb;
}

.timeline-label {
  width: 160px;
  min-width: 160px;
  padding: 8px 12px;
  background: #f3f4f6;
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.timeline-label strong {
  font-size: 13px;
  color: var(--color-text);
}

.timeline-label-count {
  font-size: 11px;
  color: var(--color-text-light);
}

.timeline-label-cost {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-freelancer);
}

/* Toggle button for detailed view */
.view-toggle {
  margin-left: auto;
}

.btn-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 500;
  transition: all 0.2s;
}

.btn-toggle:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
}

.btn-toggle.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.toggle-icon {
  font-size: 10px;
  transition: transform 0.2s;
}

/* Sujet sub-rows */
.timeline-sujet-row {
  background: #f8fafc;
  border-left: 3px solid var(--color-primary);
}

.timeline-label-sujet {
  padding-left: 24px;
  background: #f1f5f9;
}

.timeline-label-sujet .sujet-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-label-sujet .sujet-persons {
  font-size: 10px;
  color: var(--color-text-light);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.timeline-track-sujet {
  background: #fafbfc;
  min-height: 50px;
}

.timeline-track {
  flex: 1;
  position: relative;
  min-height: 60px;
}

.timeline-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
}

.timeline-event {
  position: absolute;
  top: 4px;
  bottom: 4px;
  min-height: 24px;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s, box-shadow 0.1s;
  z-index: 1;
}

.timeline-event:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  z-index: 5;
}

.timeline-event.event-employee {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: white;
}

.timeline-event.event-freelancer {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: white;
}

.event-person {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-time {
  font-size: 10px;
  opacity: 0.9;
  white-space: nowrap;
}

/* Modal */
.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: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 8px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text-light);
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-text);
}

.modal-content h3 {
  margin-bottom: 16px;
  font-size: 18px;
}

.modal-details {
  margin-bottom: 20px;
}

.modal-row {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}

.modal-row:last-child {
  border-bottom: none;
}

.modal-label {
  font-weight: 600;
  color: var(--color-text-light);
  min-width: 80px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Wide modal for event details */
.modal-wide {
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.modal-section {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.modal-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.modal-row-wrap {
  flex-wrap: wrap;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.status-confirmed {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.status-booked {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.status-tentative {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.status-penciled {
  background: #f3e8ff;
  color: #6b21a8;
}

/* Involved resources list */
.modal-involved-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.involved-item {
  display: inline-block;
  padding: 3px 10px;
  background: #f1f5f9;
  border-radius: 12px;
  font-size: 12px;
  color: var(--color-text);
}

/* Cost display */
.modal-cost {
  font-weight: 600;
  font-size: 14px;
}

.modal-cost.cost-internal {
  color: var(--color-employee);
}

.modal-cost.cost-freelancer {
  color: var(--color-freelancer);
}

.modal-cost.cost-unknown {
  color: var(--color-text-light);
  font-style: italic;
  font-weight: normal;
}

.modal-rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--color-border);
}

.modal-rate-row:last-child {
  border-bottom: none;
}

.rate-code {
  color: var(--color-text-light);
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rate-cost {
  font-weight: 500;
  color: var(--color-freelancer);
  text-align: right;
}

.rate-inactive {
  opacity: 0.4;
  text-decoration: line-through;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    height: auto;
    padding: 12px 0;
    gap: 12px;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .date-range-form {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-dates {
    margin-left: 0;
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
