/* Modern Reports Page - iOS-inspired Design System */
.modern-reports-root {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  height: calc(100vh - 64px);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #f8fafc;
  padding: 24px 32px 48px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
}

/* Header & Controls */
.rep-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.rep-title-group h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rep-title-group p {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0;
}

.rep-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rep-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000000;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.rep-btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.rep-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rep-btn-outline:hover {
  background: #f1f5f9;
}

/* Duration Filter Toolbar */
.rep-filter-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.rep-pill-tabs {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}

.rep-pill {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.rep-pill:hover {
  color: #0f172a;
}

.rep-pill.active {
  background: #000000;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.rep-custom-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rep-date-input {
  font-size: 13px;
  padding: 7px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease;
}

.rep-date-input:focus {
  border-color: #000000;
}

.rep-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 14px;
  min-width: 240px;
}

.rep-search-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: #0f172a;
  width: 100%;
}

/* 5 KPI Metric Cards */
.rep-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1300px) {
  .rep-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .rep-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .rep-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.rep-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.rep-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}

.rep-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.rep-kpi-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.rep-kpi-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #0f172a;
}

.rep-kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.2;
}

.rep-kpi-subtext {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Accent Types */
.rep-kpi-card.sales .rep-kpi-icon-wrap { background: #000000; color: #ffffff; }
.rep-kpi-card.profit .rep-kpi-value { color: #0f172a; }
.rep-kpi-card.profit .rep-kpi-icon-wrap { background: #0f172a; color: #ffffff; }
.rep-kpi-card.revenue .rep-kpi-icon-wrap { background: #f8fafc; border: 1px solid #e2e8f0; color: #0f172a; }
.rep-kpi-card.cost .rep-kpi-icon-wrap { background: #f8fafc; border: 1px solid #e2e8f0; color: #64748b; }
.rep-kpi-card.tax .rep-kpi-icon-wrap { background: #f8fafc; border: 1px solid #e2e8f0; color: #64748b; }

/* Table Container */
.rep-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  overflow: hidden;
}

.rep-table-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rep-table-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.rep-order-count {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 20px;
}

.rep-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.rep-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.rep-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 18px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.rep-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.rep-table tbody tr {
  transition: background-color 0.15s ease;
}

.rep-table tbody tr:hover {
  background-color: #f8fafc;
}

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

/* Table Specific Cell Styles */
.rep-tracking-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
}

.rep-waiter-name {
  font-weight: 600;
  color: #0f172a;
}

.rep-table-pill {
  display: inline-block;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  color: #475569;
}

.rep-items-summary {
  font-size: 12px;
  color: #64748b;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rep-amount-cell {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}

.rep-profit-cell {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.rep-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: #ecfdf5;
  color: #059669;
  text-transform: capitalize;
}

.rep-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

/* Empty State */
.rep-empty {
  padding: 48px 24px;
  text-align: center;
  color: #64748b;
}

.rep-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: #cbd5e1;
}

.rep-empty h3 {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 6px;
}

.rep-empty p {
  font-size: 13px;
  margin: 0;
  color: #94a3b8;
}
