:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-sub: #475569;
  --text-muted: #64748b;

  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;

  --accent: #d97706;
  --accent-hover: #b45309;
  --accent-soft: #fef3c7;

  --excel-yellow: #fef08a;
  --excel-yellow-strong: #fde047;

  --success: #15803d;
  --success-soft: #dcfce7;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, "맑은 고딕", "Malgun Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #1e293b;
}

.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ========================================================================= */
/* Auth Gate                                                                 */
/* ========================================================================= */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top right, #dbeafe 0%, #f4f6fa 52%, #fef3c7 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.brand-domain {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.03em;
}

.auth-title {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 800;
}

.auth-desc {
  color: var(--text-sub);
  margin: 0 0 20px;
  font-size: 13.5px;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ========================================================================= */
/* Header & Layout                                                           */
/* ========================================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
}

.nav-tab {
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  color: var(--text);
}

.nav-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.main-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px;
}

/* ========================================================================= */
/* Buttons, Inputs, Cards                                                    */
/* ========================================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.card-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

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

.btn-sm {
  padding: 6px 11px;
  font-size: 12.5px;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 12px;
}

.btn-lg {
  padding: 11px 18px;
  font-size: 14.5px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-accent {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 700;
}
.btn-accent:hover:not(:disabled) {
  background: #eab308;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
}

.btn-ghost {
  background: transparent;
  color: var(--text-sub);
}
.btn-ghost:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--text);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.22);
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 5px;
}

.input {
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.input-sm {
  padding: 7px 10px;
  font-size: 13px;
}

.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}

.alert-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
}

/* ========================================================================= */
/* Dashboard Hero, KPIs & Task Cards                                         */
/* ========================================================================= */
.hero-banner {
  background: linear-gradient(125deg, #0f172a 0%, #1e3a8a 60%, #1d4ed8 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #93c5fd;
  margin-bottom: 6px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-desc {
  margin: 0;
  color: #cbd5e1;
  font-size: 13.5px;
  max-width: 680px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  margin: 6px 0 4px;
  color: var(--text);
}

.kpi-meta {
  font-size: 12px;
  color: var(--text-sub);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.section-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.task-card.featured {
  border: 2px solid #2563eb;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 34%);
}

.task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-cat {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text-sub);
}

.task-card.featured .task-cat {
  background: #dbeafe;
  color: #1e40af;
}

.task-cadence {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.task-title {
  margin: 8px 0 6px;
  font-size: 16px;
  font-weight: 800;
}

.task-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
}

.task-checklist {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.task-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.8px;
  padding: 3px 0;
  color: var(--text);
}

.task-checklist li.done span {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-snippet-bar {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sub);
}

.task-snippet-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, Consolas, monospace;
}

.task-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.task-last-run {
  font-size: 12px;
  color: var(--text-muted);
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========================================================================= */
/* Weekly Headcount Studio                                                   */
/* ========================================================================= */
.studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.studio-date-controls {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.date-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-input {
  width: 148px;
  font-weight: 600;
}

.schedule-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sched-pill {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sched-pill-primary {
  background: var(--primary-soft);
  border-color: #bfdbfe;
  color: var(--primary);
}

.sched-k {
  color: var(--text-muted);
  font-size: 11.5px;
}

.studio-cta-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.upload-card {
  margin-bottom: 14px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.dropzone {
  border: 2px dashed #93c5fd;
  background: #f8fbff;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.dropzone-icon {
  font-size: 26px;
  margin-bottom: 6px;
}

.dropzone-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.dropzone-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.upload-status-panel {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.upload-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.uploaded-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.empty-chip {
  font-size: 12px;
  color: var(--text-muted);
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.file-chip.meal {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.file-chip.daily {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e40af;
}

.file-chip.output {
  border-color: #fcd34d;
  background: #fefce8;
  color: #92400e;
}

.weekday-check-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.wd-badge {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.wd-ok {
  background: var(--success-soft);
  color: var(--success);
}

.wd-warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.wd-idle {
  background: #f1f5f9;
  color: var(--text-muted);
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.carry-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.toggle-wrap,
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
}

/* ========================================================================= */
/* Smartwork Excel Sheet Interactive Table                                   */
/* ========================================================================= */
.sheet-card {
  margin-bottom: 16px;
}

.sheet-banner-top {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.sheet-yellow-header {
  background: var(--excel-yellow);
  border: 2px solid #0f172a;
  padding: 10px 16px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #000000;
  border-radius: 4px;
  margin-bottom: 10px;
}

.sheet-help-note {
  font-size: 12.5px;
  color: var(--text-sub);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.table-scroll {
  overflow-x: auto;
}

.sw-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
  border: 2px solid #0f172a;
}

.sw-table th,
.sw-table td {
  border: 1px solid #334155;
  padding: 7px 8px;
  text-align: center;
  vertical-align: middle;
  font-size: 13px;
}

.sw-section-th {
  background: var(--excel-yellow);
  color: #000000;
  font-weight: 800;
  font-size: 13.5px;
  border-bottom: 2px solid #0f172a !important;
}

.sw-date-th {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
  width: 10.2%;
}

.sw-date-th.weekend {
  color: #64748b;
  background: #f1f5f9;
}

.sw-label-th {
  background: #f8fafc;
  font-weight: 700;
  text-align: center;
  width: 18%;
}

.sw-sum-th {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 800;
  width: 11.5%;
}

.sw-editable-td {
  cursor: pointer;
  position: relative;
  background: #ffffff;
  transition: background 0.12s ease;
  min-height: 38px;
}

.sw-editable-td.weekend {
  background: #fafafa;
}

.sw-editable-td:hover {
  background: #eff6ff;
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

.cell-main-val {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}

.cell-empty-val {
  color: #cbd5e1;
  font-size: 12px;
}

.cell-formula-tag {
  display: block;
  font-size: 10.5px;
  color: #2563eb;
  font-family: ui-monospace, Consolas, monospace;
  margin-top: 1px;
}

.cell-meta-tag {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-top: 1px;
}

.cell-meta-tag.warn {
  color: #d97706;
  font-weight: 700;
}

.sw-sum-td {
  background: #f8fafc;
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
  cursor: pointer;
}

.sw-sum-td:hover {
  background: #dbeafe;
}

.sw-grand-row td {
  background: #f1f5f9;
  font-weight: 800;
  border-top: 2px solid #0f172a;
}

.sw-grand-row .sw-sum-td {
  background: #fef9c3;
  color: #000000;
  font-size: 15px;
}

.inline-cell-input {
  width: 100%;
  border: 2px solid var(--primary);
  border-radius: 4px;
  padding: 4px 6px;
  text-align: center;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  outline: none;
}

/* ========================================================================= */
/* Project Info & Absence Two-Col Grid                                       */
/* ========================================================================= */
.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.textarea-absence {
  font-family: "맑은 고딕", Pretendard, sans-serif;
  line-height: 1.65;
  resize: vertical;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.form-grid-2 .span-2 {
  grid-column: span 2;
}

.preview-pinfo-box {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-sub);
}

/* ========================================================================= */
/* History Chart & Data Table                                                */
/* ========================================================================= */
.history-chart {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  min-height: 170px;
  padding: 14px 8px 4px;
  overflow-x: auto;
}

.chart-col {
  min-width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.chart-total-lbl {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.chart-stack {
  width: 38px;
  height: 120px;
  background: #f1f5f9;
  border-radius: 6px;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  border: 1px solid var(--border);
}

.seg-ind { background: #60a5fa; }
.seg-dir { background: #34d399; }
.seg-out { background: #fbbf24; }

.chart-date-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sub);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.data-table th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--text-sub);
  font-size: 12px;
}

.diff-up { color: #dc2626; font-weight: 700; }
.diff-down { color: #2563eb; font-weight: 700; }
.diff-same { color: var(--text-muted); }

/* ========================================================================= */
/* Guide & Modal & Toast                                                     */
/* ========================================================================= */
.guide-content h4 {
  margin: 16px 0 6px;
  font-size: 14px;
  color: var(--primary);
}
.guide-content ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-sub);
  font-size: 13px;
}
.guide-content li {
  margin-bottom: 5px;
}

.subhead {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

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

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
}

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

.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.18s ease-out;
}

.toast.success { background: #166534; }
.toast.error { background: #991b1b; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload-grid, .two-col-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main-container { padding: 14px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .tasks-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-2 .span-2 { grid-column: span 1; }
}

/* ========================================================================= */
/* Sungdo Lunch Order Studio & Telegram Bot                                  */
/* ========================================================================= */
.lunch-status-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.lunch-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-dot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-sub);
  border: 1px solid var(--border);
}

.status-dot-pill.ok {
  background: var(--success-soft);
  color: var(--success);
  border-color: #bbf7d0;
}

.status-dot-pill.warn {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: #fde68a;
}

.status-dot-pill.muted {
  background: #f1f5f9;
  color: var(--text-muted);
}

.lunch-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lunch-sched-config {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.lunch-time-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-sub);
}

.lunch-time-field {
  width: 112px;
}

.lunch-mini-btns {
  display: flex;
  gap: 6px;
}

.lunch-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.lunch-label-row label {
  margin: 0;
  font-weight: 700;
}

.parse-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
}

.parse-chip.parsed {
  background: var(--primary-soft);
  color: var(--primary);
}

.lunch-textarea {
  font-family: "Pretendard Variable", Pretendard, monospace;
  font-size: 13px;
  line-height: 1.48;
  resize: vertical;
}

.office-selector-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.office-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.office-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.office-chip {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-sub);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.office-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.office-num-input {
  width: 68px;
  text-align: center;
  font-weight: 700;
}

.lunch-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.lunch-kpi-item {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lunch-kpi-item.highlight {
  background: var(--accent-soft);
  border-color: #fcd34d;
}

.lk-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.lk-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.lunch-kpi-item.highlight .lk-val {
  color: var(--accent-hover);
}

.lk-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.lunch-output-wrap {
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.lunch-output-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.lunch-output-pre {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: keep-all;
  color: #fef08a;
}

.lunch-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 768px) {
  .lunch-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lunch-cta-row { grid-template-columns: 1fr; }
}
