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

/* Global fix for number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* App Layout */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: white;
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  flex: 0 0 auto;
}

.header-bottom {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.app-header h1 {
  font-size: 1.5rem;
  color: #1a1a1a;
  margin-bottom: 0.125rem;
}

.app-header p {
  color: #666;
  font-size: 0.875rem;
}

.header-dates {
  display: flex;
  gap: 1.5rem;
  margin-right: 2rem;
  align-items: flex-end;
}

.header-dates .date-input {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.header-dates .date-input.compact label {
  font-size: 0.875rem;
  color: #333;
  font-weight: 600;
}

.header-dates .date-input.compact input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  width: 150px;
  font-weight: 500;
}

.date-presets {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
  align-items: center;
}

.preset-label {
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
  margin-right: 0.5rem;
}

.preset-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: #f8f9fa;
  color: #333;
  font-size: 0.813rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.preset-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.preset-btn:active {
  background-color: #dee2e6;
  transform: translateY(1px);
}

.header-support {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.support-row {
  display: flex;
  gap: 0.75rem;
}

.support-input {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.support-input label {
  font-size: 0.625rem;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.support-input input {
  padding: 0.25rem 0.375rem;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 0.75rem;
  width: 60px;
}

/* Team Section */
.team-section {
  margin-top: 2rem;
}

.content-grid {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.capacity-section {
  flex: 1;
  max-width: 600px;
}



.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-row input {
  width: 100%;
}

/* Main Layout */
.main-layout {
  display: flex;
  flex: 1;
  padding: 1.5rem;
  background: #f5f5f5;
}

.main-content.full-width {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar {
  width: 350px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar.sidebar-wide {
  width: 420px;
}

/* Panels */
.panel {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

.panel + .panel {
  margin-top: 1rem;
}

/* Project Table Specific */
.project-table {
  overflow-x: auto;
}

.project-table table {
  width: 100%;
  table-layout: fixed;
}

.project-table th:nth-child(1) { width: 45%; }
.project-table th:nth-child(2) { width: 15%; }
.project-table th:nth-child(3) { width: 15%; }
.project-table th:nth-child(4) { width: 15%; }
.project-table th:nth-child(5) { width: 10%; }

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.panel-header .btn-icon {
  width: 32px;
  height: 32px;
}

.panel h2 {
  font-size: 1.125rem;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.panel h2 svg {
  width: 20px;
  height: 20px;
}

.panel-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.875rem;
  color: #666;
}

/* Time Off Breakdown */
.time-off-breakdown {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

.time-off-details {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.8;
}

.time-off-details strong {
  color: #333;
  font-weight: 600;
}

.time-off-total {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #ddd;
  font-weight: 500;
  color: #333;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 0.5rem;
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
  border-bottom: 1px solid #e5e5e5;
}

td {
  padding: 0.5rem;
  vertical-align: middle;
}

tbody tr {
  border-bottom: 1px solid #f0f0f0;
}

tbody tr:last-child {
  border-bottom: none;
}

tfoot tr {
  border-top: 2px solid #e5e5e5;
}

tfoot td {
  font-size: 0.813rem;
  padding: 0.75rem 0.5rem;
}

table input,
table select {
  width: 100%;
  padding: 0.25rem 0.375rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.75rem;
  background-color: #fff;
  box-sizing: border-box;
}

/* Fix for number input spinners on WebKit */
table input[type="number"] {
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
}

table input[type="number"]::-webkit-inner-spin-button,
table input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

table select {
  width: 100%;
  cursor: pointer;
}

table input:focus,
table select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Team table specific styles */
.team-panel table {
  width: 100%;
}

.team-panel th:nth-child(1),
.team-panel td:nth-child(1) {
  width: 30%;
  min-width: 150px;
}

.team-panel th:nth-child(2),
.team-panel td:nth-child(2) {
  width: 25%;
  min-width: 120px;
}

.team-panel th:nth-child(3),
.team-panel td:nth-child(3) {
  width: 15%;
  min-width: 80px;
}

.team-panel th:nth-child(4),
.team-panel td:nth-child(4) {
  width: 25%;
  min-width: 110px;
}

.team-panel th:nth-child(5),
.team-panel td:nth-child(5) {
  width: 5%;
  text-align: center;
}

/* Team table specific styles */
.team-table {
  overflow-x: auto;
}

.team-table table {
  min-width: 700px;
  table-layout: fixed;
}

.team-table th,
.team-table td {
  padding: 0.375rem 0.5rem;
}

.team-table th:nth-child(1),
.team-table td:nth-child(1) {
  width: 150px;
}

.team-table th:nth-child(2),
.team-table td:nth-child(2) {
  width: 120px;
}

.team-table th:nth-child(3),
.team-table td:nth-child(3) {
  width: 80px;
}

.team-table th:nth-child(4),
.team-table td:nth-child(4) {
  width: 130px;
}

.team-table th:nth-child(5),
.team-table td:nth-child(5) {
  width: 80px;
  text-align: center;
}

.team-table th:nth-child(6),
.team-table td:nth-child(6) {
  width: 50px;
  text-align: center;
}

.input-small {
  width: 2.5rem !important;
  min-width: 2.5rem !important;
  max-width: 2.5rem !important;
  padding: 0.25rem 0.25rem !important;
  font-size: 0.75rem !important;
  text-align: center;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
}

.input-small[type="number"]::-webkit-inner-spin-button,
.input-small[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-date {
  width: 110px !important;
  font-size: 0.813rem !important;
}

.text-center {
  text-align: center;
}

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

.font-bold {
  font-weight: 500;
  font-size: 0.875rem;
}

/* Buttons */
button {
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon {
  background: none;
  border: none;
  padding: 0.375rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon.btn-danger {
  margin-right: 0.5rem;
}

.btn-icon:hover {
  background: #f0f0f0;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

.btn-danger {
  color: #dc2626;
}

.btn-danger:hover {
  background: #fee2e2;
}

/* Project Styles */
.project-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.813rem;
}

.project-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.project-name-input {
  border: 1px solid transparent;
  background: transparent;
  padding: 2px 6px;
  font-size: 0.813rem;
  font-family: inherit;
  color: inherit;
  flex: 1;
  min-width: 0;
  border-radius: 4px;
  transition: all 0.2s;
}

.project-name-input:hover {
  background-color: #f5f5f5;
  border-color: #e0e0e0;
}

.project-name-input:focus {
  outline: none;
  background-color: white;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.project-name-input::placeholder {
  color: #999;
  font-style: italic;
}

/* Capacity View */
.capacity-summary {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.capacity-summary h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.capacity-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 8px;
}

.metric-card.blue {
  background: #dbeafe;
  color: #1e40af;
}

.metric-card.green {
  background: #d1fae5;
  color: #065f46;
}

.metric-card.yellow {
  background: #fef3c7;
  color: #92400e;
}

.metric-card.purple {
  background: #ede9fe;
  color: #5b21b6;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Allocation Breakdown */
.allocation-breakdown {
  margin-top: 2rem;
}

.breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.available-days {
  color: #666;
  font-weight: 400;
}

.allocation-bar {
  height: 2rem;
  background: #e5e5e5;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  margin-bottom: 0.5rem;
}

.allocation-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0 0.5rem;
}

.allocation-segment.projects {
  background: #3b82f6;
}

.allocation-segment.support {
  background: #f59e0b;
}

.allocation-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stores-info {
  color: #6b21a8;
  font-weight: 500;
}

.utilization-bar-container {
  margin-top: 1rem;
}

.utilization-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.utilization-bar {
  height: 0.75rem;
  background: #e5e5e5;
  border-radius: 9999px;
  overflow: hidden;
}

.utilization-fill {
  height: 100%;
  transition: width 0.3s ease;
}

/* Time Off Estimates */
.time-off-estimate {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
}

.time-off-items {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.5rem;
}

.total-time-off {
  font-weight: 600;
  color: #333;
}

/* Calendar View */
.calendar-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.view-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.view-selector button {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid #e5e5e5;
  background: #f9f9f9;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.view-selector button:hover {
  background: #f0f0f0;
}

.view-selector button.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.calendar-header h3 {
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calendar-header h3 svg {
  width: 20px;
  height: 20px;
}

.calendar-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.date-range {
  font-size: 0.875rem;
  color: #666;
}

/* Month View */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e5e5e5;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
}

.calendar-day-header {
  background: #f9f9f9;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
}

.calendar-day {
  background: white;
  padding: 0.5rem;
  min-height: 100px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.calendar-day.other-month {
  background: #fafafa;
}

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

.calendar-day.holiday {
  background: #fee2e2;
}

.day-number {
  font-size: 0.875rem;
  font-weight: 500;
}

.holiday-name {
  font-size: 0.625rem;
  color: #dc2626;
  margin-top: 0.25rem;
}

/* Project Allocations in Calendar */
.day-projects {
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-allocation {
  border-radius: 3px;
  padding: 2px 4px;
  font-size: 0.625rem;
  color: white;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0.9;
}

.project-allocation.full-day {
  min-height: 20px;
}

.project-allocation.half-day {
  min-height: 14px;
  font-size: 0.5rem;
}

.project-allocation.start-day {
  font-weight: 600;
}

.project-name {
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Capacity Indicators */
.calendar-day.has-capacity {
  border: 1px dashed #10b981;
}

.available-capacity-indicator,
.partial-capacity-indicator {
  font-size: 0.625rem;
  color: #10b981;
  text-align: center;
  margin-top: auto;
  padding: 2px 4px;
  background: #d1fae5;
  border-radius: 3px;
}

.partial-capacity-indicator {
  background: #fef3c7;
  color: #92400e;
}

/* Overview */
.months-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.month-card {
  background: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.2s;
}

.month-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.month-card h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.month-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.stat-label {
  color: #666;
}

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

.utilization-section {
  margin-top: 0.5rem;
}

.utilization-section .utilization-bar {
  margin-top: 0.25rem;
}

.utilization-fill.high {
  background: #ef4444;
}

.utilization-fill.medium {
  background: #f59e0b;
}

.utilization-fill.low {
  background: #10b981;
}

.allocated-days {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.5rem;
}

.overview-summary {
  background: #dbeafe;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.overview-summary h4 {
  color: #1e40af;
  margin-bottom: 1rem;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  font-size: 0.875rem;
}

.summary-stats div {
  display: flex;
  justify-content: space-between;
  color: #1e40af;
}

.summary-stats strong {
  color: #1e3a8a;
}

/* Calendar Legend */
.calendar-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-box {
  width: 16px;
  height: 16px;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.legend-box.business-day {
  background: white;
}

.legend-box.weekend {
  background: #f5f5f5;
}

.legend-box.holiday {
  background: #fee2e2;
}

.legend-box.available {
  background: white;
  border: 1px dashed #10b981;
}

/* Warning Alert */
.warning-alert {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: start;
  gap: 1rem;
}

.warning-alert svg {
  width: 20px;
  height: 20px;
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.warning-alert h3 {
  font-size: 1rem;
  color: #92400e;
  margin-bottom: 0.25rem;
}

.warning-alert p {
  font-size: 0.875rem;
  color: #78350f;
}

/* Loading & Error States */
.loading-container,
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e5e5;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-container svg {
  width: 48px;
  height: 48px;
  color: #dc2626;
}

.error-container h2 {
  font-size: 1.5rem;
  color: #1a1a1a;
}

.error-container p {
  color: #666;
}

/* Month and Week View Capacity Summary */
.month-capacity-summary,
.week-capacity-summary {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 6px;
  font-size: 0.875rem;
}

.capacity-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.capacity-stat .stat-label {
  color: #666;
  font-weight: 500;
}

.capacity-stat .stat-value {
  color: #333;
  font-weight: 600;
}

/* Week Grid */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
}

.week-day {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 1rem;
  min-height: 150px;
  display: flex;
  flex-direction: column;
}

.week-day.weekend {
  background: #f5f5f5;
}

.week-day.holiday {
  background: #fee2e2;
}

.week-day.has-capacity {
  border-color: #10b981;
  border-style: dashed;
}

.week-day-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.day-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.day-date {
  font-size: 0.75rem;
  color: #666;
}

/* Store Growth Chart */
.store-growth-chart {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.store-growth-chart h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
}

.store-growth-chart h4 svg {
  width: 20px;
  height: 20px;
  color: #3b82f6;
}

.chart-container {
  display: flex;
  gap: 1rem;
  height: 300px;
  margin-bottom: 2rem;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #666;
  width: 40px;
  text-align: right;
  padding-bottom: 30px;
}

.chart-area {
  flex: 1;
  position: relative;
  border-left: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 30px;
}

.chart-bars {
  display: flex;
  justify-content: space-evenly;
  align-items: flex-end;
  height: calc(100% - 30px);
  padding: 0 1rem;
  gap: 0.5rem;
}

.chart-month {
  flex: 1;
  max-width: 60px;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
}

.chart-bar-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}

.chart-bar {
  width: 45%;
  transition: all 0.3s ease;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}

.chart-bar.utilization-bar {
  background: #3b82f6;
  opacity: 0.8;
}

.chart-bar.store-bar {
  background: #10b981;
  opacity: 0.6;
}

.chart-month:hover .chart-bar {
  opacity: 1;
}

.chart-label {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  font-size: 0.7rem;
  color: #666;
  white-space: nowrap;
  transform-origin: center;
}

.chart-reference-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reference-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed #f59e0b;
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
}

.reference-line span {
  font-size: 0.625rem;
  color: #f59e0b;
  background: white;
  padding: 0 0.25rem;
}

.chart-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.875rem;
}

.chart-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-legend .legend-box {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.chart-legend .legend-box.utilization {
  background: #3b82f6;
  opacity: 0.8;
}

.chart-legend .legend-box.stores {
  background: #10b981;
  opacity: 0.6;
}

/* Team Compact View */
.team-compact-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0 0 0.5rem 0;
}

.team-member-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0.375rem 0.5rem;
  background: #f9f9f9;
  border-radius: 4px;
  font-size: 0.813rem;
  gap: 1rem;
}

.member-info {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.member-name {
  font-weight: 500;
  color: #333;
}

.member-role {
  color: #666;
  font-size: 0.75rem;
}

.member-capacity {
  font-weight: 600;
  color: #333;
  text-align: right;
  min-width: 3rem;
}

.capacity-reduced {
  color: #ef4444;
}

.team-compact-footer {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e5e5;
}

.capacity-total {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: 0.813rem;
  gap: 1rem;
}

.capacity-total strong {
  color: #1a1a1a;
}

/* Responsive */
@media (max-width: 1200px) {
  .header-top {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .header-actions {
    margin-left: 0;
  }
  
  .header-bottom {
    flex-direction: column;
    width: 100%;
  }
  
  .header-dates,
  .header-support {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .content-grid {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
  }
  
  .capacity-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .chart-bars {
    padding: 0 0.25rem;
  }
  
  .chart-bar {
    width: 35%;
  }
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Icon Buttons */
.icon-button {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-button:hover {
  background: #f0f0f0;
  border-color: #999;
}

.modal-overlay {
  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;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #000;
}

.modal-body {
  padding: 20px;
}

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

/* Date Constraint Modal Styles */
.date-constraint-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.date-constraint-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.date-constraint-form label {
  font-weight: 500;
  color: #333;
}

.date-constraint-form .date-input {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.date-constraint-form .date-input:focus {
  outline: none;
  border-color: #4CAF50;
}

/* Calendar Icon Button */
.calendar-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #666;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.calendar-icon-btn:hover {
  color: #4CAF50;
}

.calendar-icon-btn.has-dates {
  color: #4CAF50;
}

/* Settings Panel Styles */
.settings-panel {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.settings-header h2 {
  margin: 0;
  font-size: 24px;
}

.settings-panel .close-button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.settings-panel .close-button:hover {
  color: #000;
}

.settings-panel .error-message, 
.settings-panel .status-message {
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
}

.settings-panel .error-message, 
.settings-panel .status-message.error {
  background: #fee;
  color: #c00;
  border: 1px solid #fcc;
}

.settings-panel .status-message.success {
  background: #efe;
  color: #060;
  border: 1px solid #cfc;
}

.settings-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.export-button, .import-button, .reset-button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.export-button:hover, .import-button:hover {
  background: #f0f0f0;
}

.reset-button {
  margin-left: auto;
  border-color: #fcc;
  color: #c00;
}

.reset-button:hover {
  background: #fee;
}

.settings-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.settings-tabs button {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  border-bottom: 2px solid transparent;
}

.settings-tabs button.active {
  color: #000;
  border-bottom-color: #007bff;
}

.settings-section h3 {
  margin-top: 20px;
  margin-bottom: 15px;
  font-size: 18px;
  color: #333;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.setting-item label {
  flex: 1;
  font-size: 14px;
  color: #666;
}

.setting-item input {
  width: 150px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.export-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.data-export-button {
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}

.data-export-button:hover {
  background: #f0f0f0;
}

.info-box {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
}

.info-box h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
}

.info-box p {
  margin: 0;
}