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

:root {
  --bg:        #080808;
  --surface:   #111111;
  --surface2:  #1A1A1A;
  --border:    #252525;
  --accent:    #8B35D6;
  --accent2:   #6B1FB8;
  --text:      #F0F0F0;
  --muted:     #5A5A5A;
  --danger:    #C05858;
  --radius:    14px;
  --radius-sm: 8px;
}

html, body { overflow-x: hidden; }

body {
  font-family: '8BitOperator', 'Onest', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 22px;
  min-height: 100vh;
}

/* ---- Nav tabs ---- */
.tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  padding: 0 4px;
}

.tab-btn {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; padding: 10px 2px 10px;
  background: none; border: none;
  cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

.tab-btn::after {
  content: '';
  position: absolute; bottom: 0; left: 25%; right: 25%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
  border-radius: 2px 2px 0 0;
}

.tab-btn.active { color: var(--accent); }
.tab-btn.active::after { transform: scaleX(1); }

.tab-icon {
  width: 24px; height: 24px;
  transition: opacity 0.15s;
}

.tab-btn span { font-weight: 600; }
.tab-btn.hidden { display: none; }

/* ---- Views ---- */
@keyframes slide-exit-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
@keyframes slide-exit-right {
  from { transform: translateX(0); }
  to   { transform: translateX(100%); }
}
@keyframes slide-enter-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes slide-enter-left {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

#views-wrapper { position: relative; clip-path: inset(0); }

.view { display: none; padding: 16px 14px; }
.view.active { display: block; position: relative; z-index: 1; }

.view.slide-exit-left,
.view.slide-exit-right {
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  pointer-events: none;
}
.view.slide-exit-left  { animation: slide-exit-left  0.42s cubic-bezier(0.4,0,0.2,1) both; will-change: transform; }
.view.slide-exit-right { animation: slide-exit-right 0.42s cubic-bezier(0.4,0,0.2,1) both; will-change: transform; }
.view.slide-enter-right { animation: slide-enter-right 0.42s cubic-bezier(0.4,0,0.2,1) both; will-change: transform; }
.view.slide-enter-left  { animation: slide-enter-left  0.42s cubic-bezier(0.4,0,0.2,1) both; will-change: transform; }

.view h2 {
  font-size: 31px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: 16px;
}

/* ---- Schedule grid ---- */
.schedule-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.schedule-wrapper::-webkit-scrollbar { display: none; }

.schedule-grid { border-collapse: collapse; width: 100%; min-width: 300px; }

.schedule-grid th, .schedule-grid td {
  border: 1px solid var(--border); text-align: center; padding: 0;
}

.schedule-grid th {
  background: var(--surface);
  font-size: 19px; font-weight: 600; letter-spacing: 0.01em;
  padding: 6px 3px; color: var(--muted); line-height: 1.35;
}

.th-dow { display: block; opacity: 0.55; font-size: 18px; letter-spacing: 0.02em; }

.schedule-grid th.name-col {
  min-width: 90px; text-align: center; padding-left: 0; color: var(--accent);
}

.schedule-grid td.name-cell {
  font-size: 20px; font-weight: 600; text-align: center; padding: 0 8px;
  white-space: nowrap; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis;
  background: var(--surface); color: var(--text);
}

.day-cell { min-width: 96px; height: 36px; cursor: default; position: relative; background: var(--bg); }

.day-cell.clickable { cursor: pointer; }
.day-cell.clickable:hover { opacity: 0.75; }
.day-cell.clickable:not(.working):hover { background: var(--surface2); }

/* ---- Booking table ---- */
.booking-table td { border-top: none; vertical-align: top; }
.booking-table td.name-cell { font-size: 13px; color: var(--muted); font-weight: 400; text-align: center; vertical-align: middle; }
.booking-inline {
  display: flex; align-items: flex-start; gap: 3px;
  padding: 3px 4px; margin-bottom: 2px;
  background: rgba(123,191,120,0.08); border-radius: var(--radius-sm);
}
.booking-inline-body { flex: 1; min-width: 0; }
.booking-inline-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.booking-inline-meta { font-size: 12px; color: var(--muted); white-space: nowrap; text-align: center; }
.booking-inline-del {
  flex-shrink: 0; background: none; border: none; color: rgba(92,107,90,0.6);
  font-size: 13px; line-height: 1; cursor: pointer; padding: 4px 6px; margin-top: 0;
}
.booking-inline-del:hover { color: var(--danger); }
.booking-day-add {
  width: 100%; height: 36px;
  background: none; border: none;
  color: rgba(92,107,90,0.6); font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.booking-day-add:hover { color: var(--accent); }

/* ---- Booking add sheet ---- */
.booking-sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-close { background: none; border: none; color: var(--muted); font-size: 23px; cursor: pointer; padding: 2px 4px; line-height: 1; }
.booking-pickers-row { display: flex; align-items: center; gap: 4px; margin: 10px 0; }
.booking-pickers-sep { font-size: 25px; font-weight: 300; color: var(--text); flex-shrink: 0; }
.booking-picker-label { font-size: 17px; color: var(--muted); text-align: center; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Wheel picker ---- */
.wheel-wrap { position: relative; flex: 1; height: 180px; overflow: hidden; border-radius: var(--radius); background: var(--bg); }
.wheel-scroll {
  height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.wheel-scroll::-webkit-scrollbar { display: none; }
.wheel-item {
  height: 36px; display: flex; align-items: center; justify-content: center;
  font-size: 27px; font-weight: 400; color: var(--muted);
  scroll-snap-align: center; user-select: none;
}
.wheel-pad { pointer-events: none; }
.wheel-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 30%, transparent 70%, var(--bg) 100%);
}
.wheel-sel {
  position: absolute; top: 50%; left: 6px; right: 6px; height: 36px;
  transform: translateY(-50%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  pointer-events: none;
}

/* ---- Color picker ---- */
.color-input-hidden {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}

/* ---- View header (title + inline controls) ---- */
.view-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.view-header h2 { margin-bottom: 0; }
.color-bar-label {
  font-size: 18px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.color-swatch-rect {
  display: inline-block;
  width: 48px; height: 1em;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  vertical-align: middle;
  transition: border-color 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.color-swatch-rect:hover { border-color: rgba(255,255,255,0.35); }
.color-swatch-rect.open { border-color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,0.3); }

/* ---- Color palette popup ---- */
.color-palette {
  position: fixed;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.15s, transform 0.15s;
}
.color-palette.visible { opacity: 1; transform: translateY(0); }

.palette-color {
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
  position: relative;
}
.palette-color:hover { transform: scale(1.18); border-color: rgba(255,255,255,0.5); z-index: 1; }
.palette-color.selected { border: 2px solid #fff; }

/* ---- Loading / error ---- */
@keyframes content-fade-in { from { opacity: 0; } to { opacity: 1; } }
.schedule-wrapper, .cards-list, .task-list, .dish-list {
  animation: content-fade-in 0.2s ease;
}
.error-msg { text-align: center; padding: 20px; color: var(--danger); font-size: 20px; }

/* ---- Techcard ---- */
.tc-tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 12px; scroll-snap-type: x mandatory;
}
.tc-tabs::-webkit-scrollbar { display: none; }

.tc-tab {
  flex-shrink: 0; padding: 10px 22px; border-radius: 100px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-family: inherit; font-size: 20px;
  font-weight: 600; cursor: pointer; scroll-snap-align: start;
  transition: all 0.15s; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.tc-tab.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.tc-items { animation: content-fade-in 0.2s ease; }

.tc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

.tc-entry { display: flex; flex-direction: column; }

.tc-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: border-color 0.15s, border-radius 0.15s; -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.tc-item.expanded {
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.tc-item-name { font-size: 24px; font-weight: 600; color: var(--text); }
.tc-item-desc { font-size: 18px; color: var(--muted); margin-top: 2px; }
.tc-item-arrow {
  margin-left: auto; color: var(--muted); font-size: 27px; flex-shrink: 0; line-height: 1;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.tc-item.expanded .tc-item-arrow { transform: rotate(90deg); }

.tc-detail-wrap {
  overflow: hidden; max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), border-color 0.1s;
  background: var(--surface);
  border: 1px solid transparent; border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.tc-detail-wrap.open { max-height: 1200px; border-color: var(--border); }

.tc-detail-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 12px; }

.tc-detail-photo {
  width: 100%; border-radius: var(--radius-sm);
  background: var(--surface2); overflow: hidden;
}
.tc-detail-photo img { width: 100%; height: auto; display: block; }
.tc-detail-desc { font-size: 20px; color: var(--muted); line-height: 1.5; margin: 0; }
.tc-detail-ingredients { font-size: 20px; color: var(--text); line-height: 1.8; }
.tc-detail-ingredients strong { color: var(--accent); font-weight: 700; display: block; margin-bottom: 4px; }
.tc-detail-method { font-size: 19px; color: var(--muted); line-height: 1.6; }
.tc-detail-method strong { color: var(--accent); font-weight: 700; display: block; margin-bottom: 4px; font-size: 20px; }

/* ---- Cards ---- */
.cards-list { display: flex; flex-direction: column; gap: 8px; }

.loyalty-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px;
  display: flex; justify-content: space-between; align-items: center;
  transition: border-color 0.15s;
}
.loyalty-card:active { border-color: var(--accent); }

.loyalty-card .card-left { display: flex; flex-direction: column; gap: 4px; }
.loyalty-card .card-number {
  font-size: 18px; color: var(--muted); letter-spacing: 2px;
  font-variant-numeric: tabular-nums; font-weight: 500;
}
.loyalty-card .card-name { font-size: 24px; font-weight: 700; color: var(--text); }
.loyalty-card .card-right { text-align: right; }
.loyalty-card .card-discount { font-size: 31px; font-weight: 700; color: var(--accent); }
.loyalty-card .card-discount-label { font-size: 17px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* ---- Card form ---- */
.card-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cards-search-wrap { margin-bottom: 12px; }
.cards-search {
  width: 100%; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 12px 16px;
  color: var(--text); font-size: 21px; font-family: inherit; outline: none;
  transition: border-color 0.15s;
}
.cards-search:focus { border-color: var(--accent); }
.cards-search::placeholder { color: var(--muted); }

/* ---- Admin panel ---- */
.admin-section-label {
  font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); margin: 18px 0 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.employee-list { list-style: none; padding: 0; margin: 0 0 4px; display: flex; flex-direction: column; gap: 4px; }

.employee-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.employee-item.is-scheduled { border-left: 3px solid var(--accent); }

.emp-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.emp-name { font-size: 21px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-username { font-size: 18px; color: var(--accent2); font-weight: 500; }
.emp-id { font-size: 17px; color: var(--border); font-variant-numeric: tabular-nums; }

.emp-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.btn-toggle {
  padding: 10px 16px; min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  background: transparent; color: var(--muted);
  font-family: inherit; font-size: 18px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; transition: all 0.15s; white-space: nowrap;
}
.btn-toggle.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn-toggle:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

.btn-remove {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 23px; padding: 0 2px;
  transition: color 0.15s; line-height: 1; opacity: 0.5;
}
.btn-remove:hover { color: var(--danger); opacity: 1; }

.add-employee-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* Schedule — admin remove button on name cell */
.btn-del-emp {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 19px; padding: 0 4px 0 0;
  transition: color 0.15s; opacity: 0.4;
}
.btn-del-emp:hover { color: var(--danger); opacity: 1; }

/* ---- Inputs ---- */
input[type="text"], input[type="number"] {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 21px; font-weight: 500; outline: none; width: 100%;
  transition: border-color 0.15s;
}
input[type="text"]:focus, input[type="number"]:focus { border-color: var(--accent); }
input::placeholder { color: var(--muted); }

/* ---- Buttons ---- */
.btn-primary {
  padding: 13px 20px; min-height: 44px;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--accent); color: var(--bg);
  font-family: inherit; font-size: 21px; font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent2); }
.btn-primary:active { transform: scale(0.97); }

.btn-danger {
  padding: 13px 20px; min-height: 44px;
  border: 1px solid rgba(184,88,88,0.4); border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent; color: var(--danger);
  font-family: inherit; font-size: 21px; font-weight: 700;
  transition: background 0.15s, transform 0.1s;
}
.btn-danger:hover { background: rgba(184,88,88,0.1); }
.btn-danger:active { transform: scale(0.97); }

.hint-text { font-size: 19px; color: var(--muted); margin-top: 4px; }

/* ---- Tasks ---- */
#schedule-view { padding-bottom: 16px; }
#tasks-view { padding-bottom: 80px; }

.task-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

.task-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 0.15s;
}
.task-card.task-done { opacity: 0.45; }

.task-check {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; transition: all 0.15s;
  margin-top: 1px;
}
.task-check svg { width: 14px; height: 14px; }
.task-check.checked { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.task-check:hover:not(.checked) { border-color: var(--accent); }

.task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.task-title { font-size: 22px; font-weight: 600; color: var(--text); word-break: break-word; }
.task-done .task-title { text-decoration: line-through; color: var(--muted); }
.task-title-edit {
  font-size: 22px; font-weight: 600; color: var(--text);
  background: rgba(255,255,255,0.05); border: 1px solid var(--accent);
  border-radius: var(--radius-sm); padding: 2px 8px; width: 100%;
  box-sizing: border-box; font-family: inherit; outline: none;
}
.task-meta { font-size: 18px; color: var(--muted); font-weight: 500; }

.task-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.task-due-input {
  background: none; border: none; color: var(--muted);
  font-size: 18px; font-family: inherit; cursor: pointer;
  padding: 0; width: 22px; opacity: 0.5;
  transition: opacity 0.15s;
}
.task-due-input::-webkit-calendar-picker-indicator { opacity: 0; width: 22px; cursor: pointer; }
.task-due-input:hover { opacity: 1; }
.task-del {
  flex-shrink: 0;
  background: none; border: none;
  color: var(--muted); font-size: 21px; cursor: pointer;
  padding: 6px; line-height: 1;
  opacity: 0.4; transition: color 0.15s, opacity 0.15s;
}
.task-del:hover { color: var(--danger); opacity: 1; }

.due-badge {
  font-size: 17px; padding: 2px 8px;
  border-radius: 100px; font-weight: 700; letter-spacing: 0.02em;
}
.due-overdue { background: rgba(184,88,88,0.15); color: #d06060; }
.due-today   { background: rgba(139,53,214,0.2); color: var(--accent); }
.due-soon    { background: rgba(139,53,214,0.1); color: var(--muted); }
.due-future  { background: rgba(255,255,255,0.04); color: var(--muted); }

/* FAB */
.tasks-fab {
  position: fixed; bottom: 24px; right: 20px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent); color: var(--bg);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  transition: background 0.15s, transform 0.1s;
  z-index: 50;
}
.tasks-fab svg { width: 22px; height: 22px; stroke-width: 3; }
.tasks-fab:hover { background: var(--accent2); }
.tasks-fab:active { transform: scale(0.92); }

/* Add / edit sheet */
.task-add-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  z-index: 100;
}
.task-add-sheet.visible { transform: translateY(0); }
.task-sheet-actions { display: flex; gap: 8px; }
.task-sheet-actions .btn-danger,
.task-sheet-actions .btn-primary { flex: 1; }

/* ---- Splash screen ---- */
#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: #080808;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease;
}
#splash-screen.fade-out { opacity: 0; pointer-events: none; }

.splash-content {
  display: flex; flex-direction: column; align-items: center;
  gap: 52px;
}

.splash-logo {
  width: 240px; height: auto;
  animation:
    splash-in 0.7s cubic-bezier(0.2,0,0.2,1) both,
    logo-shimmer 2.2s ease-in-out 0.7s infinite;
}

@keyframes splash-in {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes logo-shimmer {
  0%, 100% {
    filter:
      drop-shadow(0 0  6px rgba(139, 53,214,0.35))
      drop-shadow(0 0 14px rgba(139, 53,214,0.15));
  }
  50% {
    filter:
      drop-shadow(0 0 14px rgba(192,122,255,0.95))
      drop-shadow(0 0 32px rgba(139, 53,214,0.55))
      drop-shadow(0 0 54px rgba(107, 31,184,0.30));
  }
}

/* ---- Smoke bar ---- */
.smoke-bar-wrap {
  position: relative;
  width: 260px;
}

.smoke-bar-track {
  width: 100%; height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  position: relative;
  overflow: visible;
}

.smoke-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  background: linear-gradient(90deg, #5510A8 0%, #8B35D6 55%, #C07AFF 100%);
  box-shadow: 0 0 10px rgba(139,53,214,0.9), 0 0 28px rgba(139,53,214,0.4);
  animation: bar-fill 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.5s;
  position: relative;
}

@keyframes bar-fill {
  0%   { width: 0%; }
  100% { width: 100%; }
}

/* Shimmer on bar */
.smoke-bar-fill::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  background-size: 80px 100%;
  background-repeat: no-repeat;
  animation: shimmer 1.4s linear infinite;
  border-radius: 100px;
}

@keyframes shimmer {
  0%   { background-position: -80px 0; }
  100% { background-position: 340px 0; }
}

/* Smoke head: glowing dot at leading edge */
.smoke-bar-fill::after {
  content: '';
  position: absolute;
  right: -3px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #C07AFF;
  box-shadow: 0 0 8px 4px rgba(192,122,255,0.7), 0 0 20px 8px rgba(139,53,214,0.4);
}

/* Smoke particles above leading edge */
.smoke-particles {
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  overflow: visible;
  pointer-events: none;
}

.smoke-particles span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192,122,255,0.8) 0%, rgba(139,53,214,0.3) 60%, transparent 100%);
  animation: smoke-rise 1.4s ease-out infinite;
}

.smoke-particles span:nth-child(1) { width:10px;height:10px; animation-delay:0.0s; animation-name:smoke-rise-l; }
.smoke-particles span:nth-child(2) { width: 7px;height: 7px; animation-delay:0.28s; animation-name:smoke-rise-r; }
.smoke-particles span:nth-child(3) { width:12px;height:12px; animation-delay:0.56s; animation-name:smoke-rise-c; }
.smoke-particles span:nth-child(4) { width: 6px;height: 6px; animation-delay:0.84s; animation-name:smoke-rise-l; }
.smoke-particles span:nth-child(5) { width: 9px;height: 9px; animation-delay:1.12s; animation-name:smoke-rise-r; }

@keyframes smoke-rise-l {
  0%   { transform:translate(-4px, -2px) scale(0.4); opacity:0.9; filter:blur(0px); }
  50%  { transform:translate(-10px,-18px) scale(1);  opacity:0.5; filter:blur(2px); }
  100% { transform:translate(-6px, -38px) scale(1.8); opacity:0;  filter:blur(5px); }
}
@keyframes smoke-rise-r {
  0%   { transform:translate(4px, -2px) scale(0.4); opacity:0.9; filter:blur(0px); }
  50%  { transform:translate(8px, -20px) scale(1);  opacity:0.5; filter:blur(2px); }
  100% { transform:translate(4px, -40px) scale(1.8); opacity:0;  filter:blur(5px); }
}
@keyframes smoke-rise-c {
  0%   { transform:translate(-2px,-2px) scale(0.3); opacity:0.8; filter:blur(0px); }
  50%  { transform:translate(2px,-22px) scale(0.9); opacity:0.4; filter:blur(3px); }
  100% { transform:translate(-2px,-42px) scale(2);  opacity:0;   filter:blur(6px); }
}
