* {
  box-sizing: border-box;
}

.modal.hidden {
  display: none !important;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ffffff;
  color: #1b1f2a;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(24, 32, 50, 0.12);
  transform: translateY(-200%);
  transition: transform 0.2s ease;
  z-index: 1000;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #f6f7fb;
  color: #1b1f2a;
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  padding-left: calc(24px + env(safe-area-inset-left));
  padding-right: calc(24px + env(safe-area-inset-right));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.title-group h1 {
  margin: 0;
  font-size: 28px;
}

.subtitle {
  margin: 4px 0 0;
  color: #6a7283;
}

.progress {
  min-width: 220px;
  text-align: right;
}

.progress-bar {
  height: 8px;
  background: #e2e6f0;
  border-radius: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #2a66f5;
  transition: width 0.2s ease;
}

.app-body {
  flex: 1;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 18px rgba(24, 32, 50, 0.08);
}

.hidden {
  display: none !important;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  color: #2b3140;
}

input,
select,
textarea {
  border: 1px solid #d8dde8;
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  color: #1b1f2a;
  background: #ffffff;
  min-height: 44px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input[type="number"] {
  font-variant-numeric: tabular-nums;
}

.system-value input {
  background: #ffffff;
  border-color: #c7cedb;
  font-weight: 700;
  color: #0b1320;
}

.system-value.highlight input {
  border-color: #2a66f5;
  box-shadow: 0 0 0 2px rgba(42, 102, 245, 0.1);
}

.step2-total-display {
  margin-top: 24px;
  padding: 16px;
  background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
  border-radius: 12px;
  border: 2px solid #2a66f5;
}

.step2-total-display .system-value {
  margin: 0;
}

.step2-total-display input {
  font-size: 24px;
  text-align: center;
  background: #fff;
}

.helper {
  font-size: 13px;
  font-weight: 500;
  color: #6a7283;
}

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

.list {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.list-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: center;
  background: #f9fafc;
  padding: 12px;
  border-radius: 12px;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 16px;
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid rgba(42, 102, 245, 0.35);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary {
  background: #2a66f5;
  color: #fff;
}

.secondary {
  background: #e7ecf7;
  color: #2a66f5;
}

.tertiary {
  background: #f0f2f7;
  color: #4a5568;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  background: #eef2ff;
  color: #2a66f5;
}

.chip.active {
  background: #2a66f5;
  color: #fff;
}

.cash-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 20px;
}

.cash-group {
  min-width: 260px;
}

.cash-group .denoms {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 10px;
}

.cash-group .denoms label {
  display: grid;
  gap: 6px;
}

.callout {
  padding: 12px;
  background: #fef5d8;
  border-radius: 12px;
  margin-bottom: 12px;
  color: #6b4e00;
  font-weight: 600;
}

.snapshot {
  background: #f6f8fb;
  padding: 16px;
  border-radius: 14px;
}

.status-pill {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-block;
  background: #edf2f7;
}

.status-pill.green {
  background: #dcf7e3;
  color: #1d7d35;
}

.status-pill.amber {
  background: #fff4d6;
  color: #8a5b00;
}

.status-pill.red {
  background: #fde2e1;
  color: #b42318;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.achievements {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.achievements span {
  background: #f2f5ff;
  padding: 8px 12px;
  border-radius: 999px;
}

.submit-message {
  margin-top: 12px;
  font-weight: 600;
  color: #1d7d35;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  bottom: 12px;
  background: #fff;
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(24, 32, 50, 0.08);
}

.app-footer.only-next {
  justify-content: flex-end;
}

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

.active-shift {
  display: grid;
  gap: 16px;
}

.active-shift-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.shift-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.state-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
}

.state-dot.live {
  background: #22c55e;
}

.state-dot.overdue {
  background: #f59e0b;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 999;
  overscroll-behavior: contain;
}

.modal-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  width: min(720px, 100%);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  display: grid;
  gap: 16px;
}

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

.review-panel {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  display: grid;
  gap: 12px;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 768px) {
  .app-footer {
    flex-direction: column;
  }
  .progress {
    width: 100%;
    text-align: left;
  }
}

/* ============================================
   Connection Status Indicator
   ============================================ */

#connection-status {
  position: fixed;
  top: 12px;
  right: 12px;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

#connection-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

#connection-status.online {
  background: #dcf7e3;
  color: #1d7d35;
}

#connection-status.online .status-dot {
  background: #22c55e;
}

#connection-status.offline {
  background: #fde2e1;
  color: #b42318;
}

#connection-status.offline .status-dot {
  background: #ef4444;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

#connection-status.syncing {
  background: #fff4d6;
  color: #8a5b00;
}

#connection-status.syncing .status-dot {
  background: #f59e0b;
  animation: pulse-dot 1s ease-in-out infinite;
}

#connection-status.synced {
  background: #dcf7e3;
  color: #1d7d35;
}

#connection-status.synced .status-dot {
  background: #22c55e;
}

#connection-status.failed,
#connection-status.partial {
  background: #fef5d8;
  color: #6b4e00;
}

#connection-status.failed .status-dot,
#connection-status.partial .status-dot {
  background: #f59e0b;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ============================================
   Sync Notification Toast
   ============================================ */

.sync-notification {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 1001;
  max-width: 90%;
  text-align: center;
}

.sync-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.sync-notification.success {
  background: #dcf7e3;
  color: #1d7d35;
}

.sync-notification.warning {
  background: #fff4d6;
  color: #8a5b00;
}

.sync-notification.error {
  background: #fde2e1;
  color: #b42318;
}

/* ============================================
   Pending Sync Badge
   ============================================ */

.pending-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ============================================
   Drafts List
   ============================================ */

.drafts-list {
  margin-top: 20px;
}

.draft-card {
  background: #f9fafc;
  border: 1px solid #e2e6f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.draft-info {
  flex: 1;
}

.draft-info h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
}

.draft-info p {
  margin: 0;
  font-size: 13px;
  color: #6a7283;
}

.draft-actions {
  display: flex;
  gap: 8px;
}

.draft-actions button {
  padding: 8px 14px;
  font-size: 14px;
}

/* ============================================
   Queue Status Panel
   ============================================ */

.queue-status {
  background: #f6f8fb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.queue-status h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #6a7283;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.queue-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.queue-stat {
  display: flex;
  flex-direction: column;
}

.queue-stat .value {
  font-size: 24px;
  font-weight: 700;
  color: #1b1f2a;
}

.queue-stat .label {
  font-size: 12px;
  color: #6a7283;
}

/* ============================================
   iPad Optimizations
   ============================================ */

@media (max-width: 1024px) {
  #connection-status {
    top: auto;
    bottom: 90px;
    right: 12px;
    font-size: 12px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  #connection-status {
    bottom: 100px;
    right: 8px;
    left: 8px;
    justify-content: center;
  }
}

/* ============================================
   iPad UX Improvements
   ============================================ */

/* Prevent zoom on input focus (iOS) */
@media screen and (max-width: 1024px) {
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Larger touch targets */
button,
.btn,
input,
select,
textarea {
  min-height: 48px;
  min-width: 48px;
}

/* Stepper buttons container */
.stepper-input {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stepper-input input {
  text-align: center;
  width: 80px;
  flex-shrink: 0;
  -moz-appearance: textfield;
}

.stepper-input input::-webkit-outer-spin-button,
.stepper-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e7ecf7;
  color: #2a66f5;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
}

.stepper-btn:active {
  background: #2a66f5;
  color: white;
  transform: scale(0.95);
}

.stepper-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Cash count grid with steppers */
.cash-grid-stepper {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.cash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #f9fafc;
  border-radius: 12px;
}

.cash-item-label {
  font-weight: 600;
  font-size: 16px;
  min-width: 60px;
}

.cash-item-total {
  font-weight: 700;
  font-size: 14px;
  color: #2a66f5;
  min-width: 80px;
  text-align: right;
}

/* Enhanced button sizes for touch */
.button-row button {
  padding: 14px 24px;
  font-size: 16px;
}

/* Primary button pulse effect */
.primary:not(:disabled) {
  position: relative;
  overflow: hidden;
}

.primary:not(:disabled):after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.2);
  opacity: 0;
  transition: opacity 0.2s;
}

.primary:not(:disabled):active:after {
  opacity: 1;
}

/* Improved list row for touch */
.list-row {
  padding: 16px;
  gap: 12px;
}

.list-row input,
.list-row select {
  min-height: 48px;
}

.list-row .remove-row {
  min-width: 80px;
  padding: 12px;
}

/* Better form labels */
label {
  font-size: 15px;
}

/* Improved select appearance */
select {
  appearance: none;
  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='%236a7283' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Haptic feedback simulation */
button:active,
.chip:active {
  transform: scale(0.97);
}

/* Better focus states for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(42, 102, 245, 0.5);
  outline-offset: 2px;
}

/* Improved card shadows for depth */
.card {
  box-shadow: 0 4px 12px rgba(24, 32, 50, 0.06), 0 1px 3px rgba(24, 32, 50, 0.08);
}

/* Better progress header visibility */
#progress-header {
  background: white;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Sticky nav improvements */
.app-footer {
  padding: 16px 20px;
  gap: 16px;
}

.app-footer button {
  flex: 1;
  max-width: 200px;
}

/* Safe area padding for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
  .app-footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

/* Landscape mode optimizations */
@media (orientation: landscape) and (max-height: 600px) {
  .app {
    padding: 16px;
  }
  
  .card {
    padding: 16px;
  }
  
  .app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 24px;
  }
  
  .app-body {
    padding-bottom: 80px;
  }
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
  /* Can add dark mode styles here */
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .app-footer,
  #connection-status,
  .skip-link {
    display: none !important;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #e2e8f0;
  }
}

/* ============================================
   Cash Counter - New Layout
   ============================================ */

.cash-counter-section {
  margin: 16px 0;
}

.cash-counter-grid {
  display: grid;
  gap: 8px;
  max-width: 400px;
}

.cash-counter-grid h4 {
  margin: 16px 0 8px 0;
  font-size: 14px;
  color: #6a7283;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cash-counter-grid h4:first-child {
  margin-top: 0;
}

.cash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f9fafc;
  border-radius: 12px;
  gap: 12px;
}

.denom-label {
  font-weight: 600;
  font-size: 16px;
  min-width: 60px;
  color: #1b1f2a;
}

.stepper-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stepper-group input.cash-count {
  width: 70px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  border: 2px solid #e2e6f0;
  border-radius: 8px;
  padding: 8px;
  -moz-appearance: textfield;
}

.stepper-group input.cash-count::-webkit-outer-spin-button,
.stepper-group input.cash-count::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.stepper-btn.plus {
  background: #2a66f5;
  color: white;
}

.stepper-btn.plus:hover {
  background: #1d4ed8;
}

.stepper-btn.plus:active {
  transform: scale(0.95);
}

.stepper-btn.minus {
  background: #e7ecf7;
  color: #2a66f5;
}

.stepper-btn.minus:hover:not(:disabled) {
  background: #d1daf0;
}

.stepper-btn.minus:active:not(:disabled) {
  transform: scale(0.95);
}

.stepper-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cash-total-display {
  margin-top: 20px;
  padding: 16px;
  background: #eef2ff;
  border-radius: 12px;
}

.cash-total-display input {
  font-size: 24px;
  font-weight: 700;
  background: white;
}

/* ============================================
   Discount/Void Row Improvements
   ============================================ */

.list-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 100px 140px 1fr auto;
  align-items: center;
  background: #f9fafc;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .list-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .list-row .remove-row {
    grid-column: span 2;
  }
}

.list-row input,
.list-row select {
  min-height: 44px;
}

.list-row .remove-row {
  background: #fde2e1;
  color: #b42318;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.list-row .remove-row:hover {
  background: #fecaca;
}

/* ============================================
   Main Screen - New Workflow
   ============================================ */

.main-screen {
  min-height: 60vh;
}

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

.main-header h2 {
  margin: 0;
}

.shifts-list {
  display: grid;
  gap: 12px;
}

.shift-card {
  background: #f9fafc;
  border: 2px solid #e2e6f0;
  border-radius: 16px;
  padding: 20px;
  display: grid;
  gap: 12px;
}

.shift-card.active {
  border-color: #2a66f5;
  background: #f0f4ff;
}

.shift-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.shift-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #1b1f2a;
}

.shift-card-meta {
  font-size: 14px;
  color: #6a7283;
  margin: 4px 0 0 0;
}

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

.delete-shift-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.delete-shift-btn:hover {
  opacity: 1;
}

.shift-card-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.shift-card-badge.open {
  background: #dcf7e3;
  color: #1d7d35;
}

.shift-card-badge.submitted {
  background: #e7ecf7;
  color: #2a66f5;
}

.shift-card-events {
  font-size: 14px;
  color: #6a7283;
}

.shift-card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.shift-card-actions button {
  flex: 1;
  min-width: 120px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6a7283;
  font-size: 16px;
}

/* ============================================
   Shift Header (in Finish Form)
   ============================================ */

.shift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f0f4ff;
  border-radius: 12px;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.shift-info h3 {
  margin: 0;
  font-size: 18px;
}

.shift-info p {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: #6a7283;
}

/* ============================================
   Event Modal
   ============================================ */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: white;
  border-radius: 20px;
  width: min(500px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f0f2f7;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #e2e6f0;
}

.modal-body {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e2e6f0;
  justify-content: flex-end;
}

/* Radio Group */
.radio-group {
  display: flex;
  gap: 20px;
  padding: 8px 0;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: auto;
}

/* ============================================
   Events List
   ============================================ */

.events-list {
  display: grid;
  gap: 12px;
}

.event-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #f9fafc;
  border-radius: 12px;
  align-items: flex-start;
}

.event-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #e7ecf7;
}

.event-content {
  flex: 1;
}

.event-type {
  font-weight: 600;
  font-size: 16px;
  margin: 0;
}

.event-time {
  font-size: 13px;
  color: #6a7283;
  margin: 2px 0 0 0;
}

.event-description {
  font-size: 14px;
  color: #4a5568;
  margin: 8px 0 0 0;
}

.event-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.event-status.started {
  background: #fff4d6;
  color: #8a5b00;
}

.event-status.resolved {
  background: #dcf7e3;
  color: #1d7d35;
}

.event-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

.event-actions .edit-event-btn {
  padding: 4px 12px;
  font-size: 12px;
}

/* ============================================
   Section Headers
   ============================================ */

#open-shifts-container h3,
#recent-shifts-container h3 {
  font-size: 14px;
  color: #6a7283;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
}

#recent-shifts-container {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e6f0;
}

/* ============================================
   Consistent List Row with Remove Button
   ============================================ */

.list-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f9fafc;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.list-row > input,
.list-row > select {
  width: 100%;
}

.list-row .row-inputs {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.list-row .remove-row,
.list-row .secondary.remove-row {
  align-self: flex-start;
  background: #fde2e1;
  color: #b42318;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  width: auto;
  min-width: 100px;
}

.list-row .remove-row:hover {
  background: #fecaca;
}

/* Grid layout for inputs within list row */
@media (min-width: 600px) {
  .list-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) auto;
    align-items: center;
  }
  
  .list-row .remove-row {
    grid-column: -1;
  }
}

/* ============================================
   Void & Discount Rows - Inline Layout
   ============================================ */

.list-row-with-remove {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: #f9fafc;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.list-row-with-remove .row-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  align-items: center;
}

.list-row-with-remove .row-fields input,
.list-row-with-remove .row-fields select {
  min-height: 44px;
  padding: 10px 12px;
  border: 2px solid #e2e6f0;
  border-radius: 8px;
  font-size: 14px;
}

.list-row-with-remove .row-fields input[type="text"] {
  min-width: 100px;
  flex: 1;
}

.list-row-with-remove .row-fields input[type="number"] {
  width: 90px;
  flex: 0 0 auto;
}

.list-row-with-remove .row-fields select {
  min-width: 140px;
}

.list-row-with-remove .remove-row-btn {
  background: #fde2e1;
  color: #b42318;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
}

.list-row-with-remove .remove-row-btn:hover {
  background: #fecaca;
}

/* Mobile: stack vertically on small screens */
@media (max-width: 600px) {
  .list-row-with-remove {
    flex-direction: column !important;
    align-items: stretch;
  }
  
  .list-row-with-remove .row-fields {
    flex-direction: column;
  }
  
  .list-row-with-remove .row-fields input,
  .list-row-with-remove .row-fields select {
    width: 100%;
  }
  
  .list-row-with-remove .remove-row-btn {
    width: 100%;
  }
}

/* ============================================
   File Upload Button
   ============================================ */

.file-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #e7ecf7;
  color: #2a66f5;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.file-upload-btn:hover {
  background: #d1daf0;
}

.file-upload-btn input[type="file"] {
  display: none;
}
