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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
  background: #F3F4F6;
  color: #111827;
  font-size: 15px;
}

/* ── Header ── */
.cti-staff-header {
  background: #1E3A5F;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.cti-staff-header h1 { font-size: 17px; font-weight: 700; }
.cti-staff-header-right { display: flex; align-items: center; gap: 12px; }
.cti-staff-username { font-size: 13px; color: #93C5FD; }
.cti-staff-logout {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.cti-staff-logout:hover { background: rgba(255,255,255,0.25); }

/* ── Layout ── */
.cti-staff-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ── Login card ── */
.cti-staff-login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
}
.cti-staff-login-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
.cti-staff-login-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 6px;
}
.cti-staff-login-card p {
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 24px;
}
.cti-staff-login-field { margin-bottom: 14px; }
.cti-staff-login-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.cti-staff-login-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #D1D5DB;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.2s;
}
.cti-staff-login-field input:focus {
  outline: none;
  border-color: #2563EB;
}
.cti-staff-login-btn {
  width: 100%;
  padding: 13px;
  background: #2563EB;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}
.cti-staff-login-btn:hover    { background: #1D4ED8; }
.cti-staff-login-btn:disabled { background: #9CA3AF; cursor: not-allowed; }
.cti-staff-login-error {
  color: #DC2626;
  font-size: 13px;
  margin-top: 10px;
  display: none;
}

/* ── Stats bar ── */
.cti-staff-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.cti-staff-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cti-staff-stat-card .num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.cti-staff-stat-card .label {
  font-size: 12px;
  color: #6B7280;
  margin-top: 4px;
}
.stat-pending  .num { color: #D97706; }
.stat-approved .num { color: #16A34A; }
.stat-rejected .num { color: #DC2626; }

/* ── Tabs ── */
.cti-staff-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #fff;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cti-staff-tab {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: #6B7280;
  transition: all 0.2s;
}
.cti-staff-tab.active {
  background: #1E3A5F;
  color: #fff;
}

/* ── Request cards ── */
.cti-staff-list { display: flex; flex-direction: column; gap: 10px; }

.cti-staff-request {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  border-left: 4px solid #E5E7EB;
}
.cti-staff-request.pending  { border-left-color: #F59E0B; }
.cti-staff-request.approved { border-left-color: #22C55E; }
.cti-staff-request.rejected { border-left-color: #EF4444; }

.cti-staff-req-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.cti-staff-req-name  { font-size: 16px; font-weight: 700; color: #1E3A5F; }
.cti-staff-req-store { font-size: 12px; color: #6B7280; margin-top: 2px; }

.cti-staff-status-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-pending  { background: #FEF3C7; color: #92400E; }
.badge-approved { background: #DCFCE7; color: #166534; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }

.cti-staff-req-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #374151;
}
.cti-staff-req-body .item { display: flex; align-items: center; gap: 6px; }
.cti-staff-req-body .item .lbl { color: #9CA3AF; font-size: 12px; min-width: 48px; }

.cti-staff-req-memo {
  font-size: 13px;
  color: #6B7280;
  background: #F9FAFB;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* Action buttons */
.cti-staff-actions { display: flex; gap: 8px; }
.cti-btn-approve {
  flex: 1;
  padding: 10px;
  background: #16A34A;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 44px;
}
.cti-btn-approve:hover { background: #15803D; }
.cti-btn-reject {
  flex: 1;
  padding: 10px;
  background: #fff;
  color: #DC2626;
  border: 1.5px solid #DC2626;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}
.cti-btn-reject:hover { background: #FEF2F2; }

.cti-staff-reviewed {
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 6px;
}
.cti-staff-reject-reason {
  font-size: 13px;
  color: #B91C1C;
  background: #FEE2E2;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 8px;
}

/* ── Reject Modal (white) ── */
.cti-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cti-modal-overlay.show { display: flex; }
.cti-modal-overlay .cti-modal {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  border: none;
  color: #111827;
}
.cti-modal-overlay .cti-modal h3    { font-size: 16px; font-weight: 700; color: #1E3A5F; margin-bottom: 6px; }
.cti-modal-overlay .cti-modal p     { font-size: 13px; color: #6B7280; margin-bottom: 14px; }
.cti-modal-overlay .cti-modal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #D1D5DB;
  border-radius: 8px;
  font-size: 15px;
  min-height: 90px;
  resize: vertical;
  margin-bottom: 14px;
  background: #fff;
  color: #111827;
}
.cti-modal-overlay .cti-modal textarea:focus { outline: none; border-color: #DC2626; }
.cti-modal-actions { display: flex; gap: 8px; }
.cti-modal-cancel {
  flex: 1;
  padding: 11px;
  background: #F3F4F6;
  color: #374151;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.cti-modal-confirm {
  flex: 1;
  padding: 11px;
  background: #DC2626;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.cti-modal-confirm:hover { background: #B91C1C; }

/* ── Toast ── */
.cti-staff-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  display: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.cti-staff-toast.show    { display: block; }
.cti-staff-toast.success { background: #DCFCE7; color: #166534; }
.cti-staff-toast.error   { background: #FEE2E2; color: #991B1B; }
.cti-staff-toast.info    { background: #DBEAFE; color: #1E40AF; }

/* ── Empty / Loading ── */
.cti-staff-empty {
  text-align: center;
  color: #9CA3AF;
  font-size: 14px;
  padding: 40px 0;
}
.cti-staff-empty .icon { font-size: 36px; margin-bottom: 8px; }
.cti-staff-loading {
  text-align: center;
  color: #6B7280;
  font-size: 14px;
  padding: 40px 0;
}

/* ── Main Tabs ── */
.cti-main-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: #1E3A5F;
  padding: 4px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.cti-main-tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
  white-space: nowrap;
}
.cti-main-tab.active {
  background: #fff;
  color: #1E3A5F;
}
.cti-main-tab:hover:not(.active) { color: #fff; }

/* ── Date navigation ── */
.cti-date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  background: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cti-date-nav .date-label {
  font-size: 16px;
  font-weight: 700;
  color: #1E3A5F;
  flex: 1;
}
.cti-date-nav .date-summary {
  font-size: 13px;
  color: #6B7280;
}
.cti-date-btn {
  padding: 6px 14px;
  border: 1.5px solid #D1D5DB;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.cti-date-btn:hover { background: #F3F4F6; border-color: #9CA3AF; }
.cti-date-btn.today-btn { background: #2563EB; color: #fff; border-color: #2563EB; }
.cti-date-btn.today-btn:hover { background: #1D4ED8; }

/* ── Today View ── */
.cti-today-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 4px solid #2563EB;
}
.cti-today-card.status-before { border-left-color: #9CA3AF; }
.cti-today-card.status-active { border-left-color: #16A34A; }
.cti-today-card.status-ended  { border-left-color: #D1D5DB; }
.cti-today-name {
  font-size: 15px;
  font-weight: 700;
  color: #1E3A5F;
  min-width: 90px;
}
.cti-today-time {
  font-size: 14px;
  color: #374151;
  min-width: 110px;
}
.cti-today-status {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.cti-today-status.before { background: #F3F4F6; color: #6B7280; }
.cti-today-status.active { background: #DCFCE7; color: #166534; }
.cti-today-status.ended  { background: #F3F4F6; color: #9CA3AF; }

/* ── Tab content visibility ── */
.cti-tab-content { display: none; }
.cti-tab-content.active { display: block; }

@media (max-width: 600px) {
  .cti-staff-req-body { grid-template-columns: 1fr; }
  .cti-staff-stats { grid-template-columns: repeat(3,1fr); gap: 8px; }
  .cti-staff-stat-card { padding: 12px 8px; }
  .cti-staff-stat-card .num { font-size: 22px; }
  .cti-main-tab { font-size: 11px; padding: 8px 4px; }
  .cti-cal-cell { min-height: 60px; }
  .cti-cal-shift { font-size: 9px; }
}
