/* ==========================================================================
   GoDash Design System
   Source: Docs/godash-components.html
   Typography: Manrope | Icons: Hugeicons Stroke Rounded
   ========================================================================== */

:root {
  --red: #D90217;
  --red-1: #FF1304;
  --accent: #AE0212;
  --white: #FFFFFF;
  --white-2: #EAEAEA;
  --white-3: #F5F5F5;
  --white-4: #E0E0E0;
  --gray-1: #8C8C8D;
  --elevated: #E9E9E9;
  --text: #000000;
  --text-2: #8C8C8D;
  --text-3: #E0E0E0;
  --text-inv: #FFFFFF;
  --success: #1A9E3F;
  --warning: #B67B00;
  --danger: #D90217;
  --info: #1677FF;
  --radius-btn: 20px;
  --radius-card: 28px;
  --radius-input: 20px;
  --radius-sm: 13px;
  --shadow-1: rgba(0, 0, 0, 0.06) 0px 2px 70px 10px;
  --shadow-sm: rgba(0, 0, 0, 0.04) 0px 1px 10px 0px;
  --pad: 40px;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  background: var(--white);
  color: var(--text);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

section {
  padding: 48px 0;
  border-bottom: 1px solid var(--white-2);
}

.section-head {
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.14px;
}

.section-head p {
  color: var(--text-2);
  font-size: 15px;
  margin-top: 6px;
}

/* Grids & Flex */
.grid { display: grid; gap: 20px; }
.g1 { grid-template-columns: 1fr; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g6 { grid-template-columns: repeat(6, 1fr); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--text-2); }
code, kbd { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ===== TYPOGRAPHY ===== */
h1.hero { font-size: 54px; font-weight: 900; letter-spacing: -0.3px; line-height: 1.1; }
.h1s { font-size: 48px; font-weight: 900; letter-spacing: -.3px; }
.h2s { font-size: 32px; font-weight: 900; letter-spacing: -.175px; }
.h3s { font-size: 26px; font-weight: 900; letter-spacing: -.16px; }
.h4s { font-size: 20px; font-weight: 700; letter-spacing: -.13px; }
.bodys { font-size: 16px; font-weight: 400; }
.smalls { font-size: 14px; color: var(--text-2); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-btn);
  padding: 16px 24px;
  font-size: 15px;
  text-decoration: none !important;
  transition: opacity .15s, background-color .15s, transform .05s;
}

.btn:hover { opacity: .88; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-secondary { background: var(--white-3); color: var(--text); }
.btn-secondary:hover { background: var(--white-4); }
.btn-outline { background: transparent; color: var(--red); border: 1.5px solid var(--red); }
.btn-outline:hover { background: rgba(217, 2, 23, 0.05); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--white-3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-disabled, .btn:disabled { background: var(--white-3) !important; color: var(--text-3) !important; cursor: not-allowed !important; opacity: 0.6; }
.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 20px 32px; font-size: 17px; }
.btn-icon { width: 48px; height: 48px; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 36px; height: 36px; }

.btn-group {
  display: inline-flex;
  border-radius: var(--radius-btn);
  overflow: hidden;
  border: 1px solid var(--white-4);
}
.btn-group .btn { border-radius: 0; background: var(--white); border-right: 1px solid var(--white-4); }
.btn-group .btn:last-child { border-right: none; }
.btn-group .btn.active { background: var(--red); color: #fff; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.badge-primary { background: rgba(217, 2, 23, .1); color: var(--red); }
.badge-success { background: rgba(26, 158, 63, .1); color: var(--success); }
.badge-warning { background: rgba(182, 123, 0, .1); color: var(--warning); }
.badge-danger { background: var(--danger); color: #fff; }
.badge-info { background: rgba(22, 119, 255, .1); color: var(--info); }
.badge-outline { background: transparent; border: 1px solid var(--white-4); color: var(--text); }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ===== ALERTS ===== */
.alert {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.alert i { font-size: 20px; margin-top: 1px; flex-shrink: 0; }
.alert-info { background: rgba(22, 119, 255, .08); color: #0B4FB3; }
.alert-success { background: rgba(26, 158, 63, .08); color: #0F6B2A; }
.alert-warning { background: rgba(182, 123, 0, .08); color: #7A5300; }
.alert-danger { background: rgba(217, 2, 23, .08); color: var(--red); }

/* ===== FORM CONTROLS ===== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 700; }
.input, textarea.input, select.input {
  background: var(--white-3);
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  padding: 16px 20px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  color: var(--text);
  text-align: left;
  transition: border-color .15s, background .15s;
}
.input::placeholder { color: var(--text-2); }
.input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(174, 2, 18, .1); }
.input-error { border-color: var(--danger) !important; }
.helper { font-size: 12px; color: var(--text-2); text-align: left; margin-top: 4px; }
.helper.error { color: var(--danger); font-weight: 600; }
textarea.input { min-height: 110px; resize: vertical; }

/* Floating Label inputs */
.field-float { position: relative; display: flex; flex-direction: column; margin-bottom: 16px; }
.field-float .input { text-align: left; }
.field-float.icon .input { padding-left: 46px; }
.field-float label {
  position: absolute;
  left: 20px;
  top: 17px;
  text-align: left;
  font-size: 15px;
  color: var(--text-2);
  pointer-events: none;
  transition: all .15s ease;
}
.field-float.icon label { left: 46px; }
.field-float .icon-lead {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  z-index: 1;
}

.field-float .input:focus ~ label,
.field-float .input:not(:placeholder-shown) ~ label,
.field-float select.input ~ label,
.field-float .combo-trigger ~ label,
.field-float .date-trigger ~ label,
.field-float .input[type="date"] ~ label {
  top: -9px;
  left: 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  background: var(--white);
  border-radius: 4px;
  padding: 0 6px;
  width: fit-content;
}
.field-float .input:focus ~ label { color: var(--accent); }

/* Combo select */
.select-wrap { position: relative; }
.combo-trigger {
  display: flex;
  align-items: center;
  padding-right: 44px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.combo.open .sel-chevron { transform: translateY(-50%) rotate(180deg); }
.sel-chevron {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
  font-size: 14px;
  transition: transform .15s ease;
}
.combo-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 0.8px solid var(--white-2);
  border-radius: 20px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease;
}
.combo.open .combo-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.combo-search { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--white-2); }
.combo-search input { border: none; outline: none; font-family: inherit; font-size: 14px; width: 100%; background: transparent; }
.combo-options { max-height: 180px; overflow-y: auto; padding: 6px; }
.combo-option { padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.combo-option:hover { background: var(--white-3); }
.combo-option.selected { color: var(--red); background: rgba(217, 2, 23, .06); }

/* Checkbox, Radio, Switch */
.checkbox, .radio { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; user-select: none; }
.checkbox input, .radio input { width: 18px; height: 18px; accent-color: var(--red); }
.switch { position: relative; width: 46px; height: 26px; display: inline-block; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--white-4); border-radius: 999px; transition: .2s; cursor: pointer; }
.switch .track:before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .track { background: var(--red); }
.switch input:checked + .track:before { transform: translateX(20px); }

/* Upload Area */
.upload {
  border: 1.5px dashed var(--white-4);
  border-radius: var(--radius-input);
  padding: 32px;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  background: var(--white-3);
  transition: border-color .15s, background .15s;
}
.upload:hover { border-color: var(--red); background: #fff; }

/* Phone & OTP */
.phone-input { display: flex; background: var(--white-3); border-radius: var(--radius-input); overflow: hidden; }
.phone-input .flag { display: flex; align-items: center; gap: 6px; padding: 0 16px; font-size: 14px; font-weight: 700; border-right: 1px solid var(--white-4); }
.phone-input input { border: none; background: transparent; padding: 16px 20px; font-size: 15px; flex: 1; outline: none; }
.otp { display: flex; gap: 10px; justify-content: center; }
.otp input { width: 50px; height: 58px; text-align: center; font-size: 22px; font-weight: 800; background: var(--white-3); border: none; border-radius: 14px; outline: none; }
.otp input:focus { border: 2px solid var(--accent); background: #fff; }

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border: 0.8px solid var(--white-2);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-1);
}
.card-stat .num { font-size: 32px; font-weight: 900; }
.card-stat .lbl { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.card-notification { display: flex; gap: 14px; padding: 18px 20px; border-radius: 18px; background: var(--white-3); }

/* ===== AVATARS ===== */
.avatar { border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.avatar.xs { width: 28px; height: 28px; font-size: 11px; }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.avatar.md { width: 52px; height: 52px; font-size: 17px; }
.avatar.lg { width: 76px; height: 76px; font-size: 24px; }

/* ===== STEPS & WIZARD ===== */
.steps { display: flex; align-items: center; }
.step { display: flex; align-items: center; gap: 10px; }
.step .circ { width: 32px; height: 32px; border-radius: 50%; background: var(--white-3); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--text-2); }
.step.done .circ { background: var(--success); color: #fff; }
.step.active .circ { background: var(--red); color: #fff; }
.step-line { width: 40px; height: 2px; background: var(--white-4); margin: 0 6px; }
.step-line.done { background: var(--success); }

.wizard-steps { justify-content: space-between; margin-bottom: 32px; }
.wizard-steps .step { flex-direction: column; gap: 8px; text-align: center; }
.wizard-steps .step span { font-size: 12px; font-weight: 700; color: var(--text-2); }
.wizard-steps .step.active span, .wizard-steps .step.done span { color: var(--text); }
.wizard-steps .step-line { flex: 1; margin: 0 4px 22px; }
.wizard-steps .step-line.done { background: var(--red); }
[x-cloak] { display: none !important; }
.wizard-panel { display: none !important; }
.wizard-panel.active { display: block !important; }
.wizard-foot { display: flex; justify-content: space-between; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--white-2); }

/* ===== KPI BAR ===== */
.kpi-bar { display: grid; grid-template-columns: repeat(4, 1fr); border: 0.8px solid var(--white-2); border-radius: var(--radius-card); overflow: hidden; background: #fff; }
.kpi { padding: 22px 24px; border-right: 1px solid var(--white-2); }
.kpi:last-child { border-right: none; }
.kpi .lbl { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.kpi .val { font-size: 24px; font-weight: 900; }
.kpi .trend { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.trend.up { color: var(--success); }
.trend.down { color: var(--danger); }

/* ===== DATA TABLES ===== */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--text-2); font-size: 12px; text-transform: none; padding: 14px 18px; border-bottom: 1px solid var(--white-2); }
td { padding: 16px 18px; border-bottom: 1px solid var(--white-2); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0, 0, 0, 0.015); }

/* ===== TABS ===== */
.tabs { display: flex; gap: 6px; background: var(--white-3); padding: 6px; border-radius: var(--radius-input); width: fit-content; }
.tab { padding: 10px 20px; border-radius: 14px; font-size: 14px; font-weight: 700; color: var(--text-2); cursor: pointer; text-decoration: none !important; }
.tab.active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

/* ===== ORDER QUEUE ===== */
.order-queue { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.order-col h4 { font-size: 13px; margin-bottom: 12px; display: flex; justify-content: space-between; color: var(--text-2); font-weight: 800; }
.order-card { background: #fff; border: 0.8px solid var(--white-2); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.order-card .o-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-card .o-id { font-weight: 800; font-size: 14px; }
.timer-chip { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(217, 2, 23, .1); color: var(--red); }
.order-card .o-meta { font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.order-card .o-actions { display: flex; gap: 8px; }
.order-card .o-actions .btn { flex: 1; padding: 10px; font-size: 12px; }

/* ===== LAYOUT SHELLS (PANEL) ===== */
.panel-layout { display: flex; min-height: 100vh; background: #FAFAFA; }
.panel-sidebar { width: 250px; background: #fff; border-right: 1px solid var(--white-2); padding: 24px 16px; display: flex; flex-direction: column; flex-shrink: 0; }
.panel-brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 900; color: var(--red); padding: 0 12px 24px 12px; border-bottom: 1px solid var(--white-2); margin-bottom: 16px; }
.panel-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.panel-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none !important;
  transition: background .15s, color .15s;
}
.panel-nav-item i { font-size: 20px; }
.panel-nav-item:hover { background: var(--white-3); color: var(--text); }
.panel-nav-item.active { background: var(--red); color: #fff; font-weight: 700; }
.panel-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.panel-header { height: 72px; background: #fff; border-bottom: 1px solid var(--white-2); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; }
.panel-body { padding: 32px; flex: 1; }

/* ===== RTL SUPPORT ===== */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .input, [dir="rtl"] textarea.input { text-align: right; }
[dir="rtl"] .field-float label { left: auto; right: 20px; text-align: right; }
[dir="rtl"] .field-float.icon label { right: 46px; left: auto; }
[dir="rtl"] .field-float .icon-lead { left: auto; right: 18px; }
[dir="rtl"] .field-float.icon .input { padding-left: 20px; padding-right: 46px; }
[dir="rtl"] th { text-align: right; }
[dir="rtl"] .panel-sidebar { border-right: none; border-left: 1px solid var(--white-2); }
[dir="rtl"] .sel-chevron { right: auto; left: 18px; }
[dir="rtl"] .kpi { border-right: none; border-left: 1px solid var(--white-2); }
[dir="rtl"] .kpi:last-child { border-left: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .g4, .g3 { grid-template-columns: repeat(2, 1fr); }
  .kpi-bar { grid-template-columns: repeat(2, 1fr); }
  .order-queue { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .g2, .g3, .g4, .g6 { grid-template-columns: 1fr; }
  .panel-layout { flex-direction: column; }
  .panel-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--white-2); }
  .wrap { padding: 0 16px; }
}
