/* ==========================================================================
   Modern SaaS / Hospital Dashboard Design System
   Font: Pretendard & JetBrains Mono
   ========================================================================== */

:root {
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Colors */
  --bg-app: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #10b981;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #475569;

  /* Brand / Accents */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;

  --secondary: #475569;
  --secondary-hover: #334155;

  --accent-blue: #2563eb;
  --accent-purple: #6366f1;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --warning: #f59e0b;

  /* Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 90px;
}

.code-font {
  font-family: var(--font-mono) !important;
}

/* ==========================================================================
   Header
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.brand-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
  margin-left: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.status-badge.waiting .status-dot { background-color: var(--text-muted); }
.status-badge.success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.status-badge.success .status-dot { background-color: #10b981; }
.status-badge.error { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.status-badge.error .status-dot { background-color: #ef4444; }
.status-badge.loading { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.status-badge.loading .status-dot { background-color: #3b82f6; animation: pulse 1.2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--secondary);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.btn-simulator {
  background: #0f172a;
  color: #34d399;
  border-color: #334155;
}
.btn-simulator:hover {
  background: #1e293b;
  color: #6ee7b7;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--surface-muted);
  color: var(--text-main);
}

.btn-outline {
  background: #ffffff;
  border-color: var(--primary-border);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}

.text-danger { color: var(--danger) !important; }
.text-danger:hover { background: #fef2f2 !important; }

.icon {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Main Layout & KPI Grid
   ========================================================================== */
.app-main {
  max-width: 1280px;
  margin: 24px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card.highlight {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border-color: var(--primary-border);
}

.kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.kpi-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.kpi-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   Cards & Sections
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-header.border-bottom {
  border-bottom: 1px solid var(--border);
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  font-size: 22px;
  line-height: 1;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.icon-toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-toggle:hover {
  background: var(--surface-muted);
  color: var(--text-main);
}
.chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}
.collapsed .chevron {
  transform: rotate(-90deg);
}

/* ==========================================================================
   Settings Card (GAS & Deployment Inputs)
   ========================================================================== */
.settings-card .card-body {
  padding: 0 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.integration-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.badge-tag {
  display: inline-block;
  background: #10b981;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.banner-info strong {
  display: block;
  font-size: 14px;
  color: #065f46;
  margin-bottom: 2px;
}

.banner-info p {
  font-size: 12.5px;
  color: #047857;
}

.banner-info code {
  background: rgba(255, 255, 255, 0.7);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.banner-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 480px;
}

.banner-controls input {
  flex: 1;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
}

.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.text-btn:hover {
  text-decoration: underline;
}

input, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

/* ==========================================================================
   Slide Cards Container & Item UI
   ========================================================================== */
.slides-section {
  background: var(--surface);
}

.bulk-drawer {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  padding: 18px 22px;
}

.bulk-label strong {
  display: block;
  font-size: 13.5px;
  color: var(--text-main);
}
.bulk-label span {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.bulk-footer {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hint-text {
  font-size: 12px;
  color: #d97706;
}

.slides-container {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Modern Slide Card */
.slide-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 40px 180px 1fr 140px;
  gap: 16px;
  align-items: center;
  transition: all 0.18s ease;
  position: relative;
}

.slide-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.slide-card.dragging {
  opacity: 0.4;
  background: var(--surface-muted);
}

.slide-card.drag-over {
  border-top: 2px solid var(--primary);
}

/* Drag & Order */
.slide-card-order {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.drag-grip {
  cursor: grab;
  font-size: 18px;
  color: #94a3b8;
  user-select: none;
  padding: 4px;
}
.drag-grip:active { cursor: grabbing; }

.order-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

/* 16:9 Thumbnail Box */
.slide-card-thumb {
  width: 180px;
  height: 102px;
  border-radius: var(--radius-md);
  background: #0f172a;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.slide-card-thumb:hover .thumb-image {
  transform: scale(1.05);
}

.thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 11.5px;
}

/* Slide Fields */
.slide-card-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-sm-wrap label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 3px;
}

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

/* Action Controls */
.slide-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  align-items: stretch;
}

.btn-icon-group {
  display: flex;
  gap: 6px;
}
.btn-icon-group .btn {
  flex: 1;
}

/* Empty State */
.empty-state {
  padding: 50px 20px;
  text-align: center;
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--text-muted); }

/* ==========================================================================
   JSON Section
   ========================================================================== */
.json-section .card-body {
  padding: 0 22px 22px;
}
.json-section textarea {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  background: #0f172a;
  color: #f1f5f9;
  border-color: #334155;
}

/* ==========================================================================
   Floating Bottom Action Bar
   ========================================================================== */
.floating-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-float);
  z-index: 50;
}

.floating-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.save-status {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.floating-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card.wide {
  max-width: 780px;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon { font-size: 22px; }
.modal-title-group h3 {
  font-size: 17px;
  font-weight: 700;
}

.icon-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.icon-close-btn:hover {
  background: var(--surface-muted);
  color: var(--text-main);
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}

/* File Drop Zone */
.file-drop-zone {
  display: block;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
}
.file-drop-zone:hover, .file-drop-zone.dragover {
  border-color: var(--primary);
  background: #ecfdf5;
}
.drop-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.drop-main { font-weight: 600; font-size: 14px; color: var(--text-main); display: block; }
.drop-sub { font-size: 12px; color: var(--text-muted); display: block; margin-top: 4px; }

.divider-text {
  text-align: center;
  margin: 18px 0;
  position: relative;
}
.divider-text::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.divider-text span {
  position: relative;
  background: #ffffff;
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Guide Modal Steps */
.guide-step {
  margin-bottom: 24px;
}
.step-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.guide-step h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}
.guide-step ol, .guide-step ul {
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--text-sub);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.code-box {
  margin-top: 12px;
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 12px;
}
.code-box pre {
  padding: 14px;
  color: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-x: auto;
  line-height: 1.5;
}

/* ==========================================================================
   Simulator Fullscreen Modal
   ========================================================================== */
.simulator-container {
  width: 96vw;
  max-width: 1400px;
  height: 92vh;
  background: #09090b;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid #27272a;
}

.simulator-header {
  background: #18181b;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #27272a;
}

.sim-badge {
  background: #059669;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 8px;
}

.sim-title {
  color: #f4f4f5;
  font-weight: 600;
  font-size: 14px;
}

.sim-info {
  color: #a1a1aa;
  font-size: 13px;
  font-weight: 500;
}

.sim-close-btn {
  background: #27272a;
  color: #f4f4f5;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.sim-close-btn:hover {
  background: #3f3f46;
}

.simulator-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050505;
  overflow: hidden;
}

.sim-slide-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 50px;
}

.sim-slide-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sim-fallback {
  text-align: center;
  color: #e4e4e7;
}
.sim-fallback-icon { font-size: 48px; margin-bottom: 12px; }
.sim-fallback-title { font-size: 24px; font-weight: 700; display: block; }
.sim-fallback-sub { font-size: 13px; color: #71717a; margin-top: 6px; display: block; }

.sim-notice-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.simulator-controls {
  background: #18181b;
  padding: 12px 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid #27272a;
}

.sim-btn {
  background: #27272a;
  color: #f4f4f5;
  border: 1px solid #3f3f46;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.sim-btn:hover {
  background: #3f3f46;
}
.sim-btn.accent {
  background: #059669;
  border-color: #10b981;
}
.sim-btn.accent:hover {
  background: #047857;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .integration-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .banner-controls {
    min-width: 0;
  }
  .slide-card {
    grid-template-columns: 36px 140px 1fr 120px;
  }
  .slide-card-thumb {
    width: 140px;
    height: 80px;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  .header-actions {
    justify-content: flex-end;
  }
  .slide-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .slide-card-order {
    flex-direction: row;
    justify-content: space-between;
  }
  .slide-card-thumb {
    width: 100%;
    height: 180px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .slide-card-actions {
    flex-direction: row;
  }
}

/* ==========================================================================
   Option B: Image Drop Banner & Upload Styles
   ========================================================================== */
.btn-upload-label {
  cursor: pointer;
}

.image-drop-banner {
  margin: 16px 20px 0;
  border: 2px dashed #93c5fd;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.image-drop-banner:hover, .image-drop-banner.dragover {
  border-color: #3b82f6;
  background: #dbeafe;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.drop-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.drop-banner-icon {
  font-size: 36px;
  line-height: 1;
}

.drop-banner-texts strong {
  display: block;
  font-size: 14.5px;
  color: #1e3a8a;
  margin-bottom: 3px;
}

.drop-banner-texts span {
  font-size: 12.5px;
  color: #3b82f6;
}

/* 슬라이드 썸네일 박스 내 파일 업로드 오버레이 */
.thumb-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease;
  cursor: pointer;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
}

.slide-card-thumb:hover .thumb-upload-overlay {
  opacity: 1;
}

.badge-local-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 7px;
  border-radius: 4px;
}

/* ==========================================================================
   History Modal & Timeline
   ========================================================================== */
.history-intro {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-sub);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 4px;
}

.history-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.18s ease;
}

.history-item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
  background: #fafafa;
}

.history-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-version-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
}

.history-tag-current {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

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

.history-meta {
  font-size: 12.5px;
  color: var(--text-sub);
  display: flex;
  gap: 12px;
}

.history-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   보안 락 스크린 (Lock Screen Overlay)
   ========================================================================== */
.lock-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lockFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lock-screen-overlay[hidden] {
  display: none !important;
}

@keyframes lockFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lock-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 36px 30px 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  text-align: center;
  position: relative;
  animation: lockCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.lock-card.shake {
  animation: lockShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes lockShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

.lock-icon-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.lock-avatar {
  font-size: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--primary-light);
  border-radius: 50%;
  box-shadow: 0 0 0 8px #f0fdf4;
}

.lock-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  font-size: 16px;
  background: #0f172a;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.lock-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.lock-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.45;
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lock-input-wrap {
  display: flex;
  gap: 8px;
}

.lock-input-wrap input {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.15s ease;
  font-family: inherit;
}

.lock-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.lock-input-wrap .btn-primary {
  padding: 0 20px;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.lock-error {
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: left;
}

.lock-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* ==========================================================================
   프리셋 버튼 칩 (Preset Chips)
   ========================================================================== */
.input-with-presets {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.preset-chip {
  background: var(--surface-muted);
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.preset-chip:hover {
  background: #e2e8f0;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.preset-chip.active {
  background: var(--primary-light);
  color: var(--primary-hover);
  border-color: var(--primary-border);
  font-weight: 700;
}

.label-subtext {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}

/* ==========================================================================
   비밀번호 변경 모달 폼
   ========================================================================== */
.pwd-change-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   GitHub 연동 배너 & 모달 스타일
   ========================================================================== */
.github-banner {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
}

.github-badge {
  background: #24292f;
  color: #ffffff;
}

.gas-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid var(--primary-border);
}

.gas-badge {
  background: #10b981;
  color: #ffffff;
}

.banner-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
}

.status-chip.neutral {
  background: #e2e8f0;
  color: #475569;
}

.status-chip.success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-chip.error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.status-chip.loading {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.github-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 520px;
}

.github-token-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.github-token-wrap input {
  padding-right: 36px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.btn-token-eye {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.btn-token-eye:hover {
  opacity: 1;
}

/* 배포 진행 상태 모달 */
.deploy-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 20px;
}

.deploy-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  transition: all 0.2s ease;
}

.deploy-step-item.active {
  background: #f0fdf4;
  border-color: var(--primary-border);
  color: var(--primary-hover);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.deploy-step-item.done {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.deploy-step-item.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--danger);
  font-weight: 700;
}

.step-status-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.deploy-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.deploy-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.deploy-status-subtext {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}


