:root {
  color-scheme: light;
  --violet-900: #3b1e8a;
  --violet-800: #4a2fa3;
  --violet-700: #5a3bc4;
  --violet-600: #6c4be0;
  --violet-100: #f2efff;
  --text-dark: #1f2030;
  --text-muted: #6b6f85;
  --card-bg: #ffffff;
  --shadow: 0 16px 40px rgba(50, 26, 99, 0.18);
}

* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f1ecff 0%, #f7f4ff 40%, #ffffff 100%);
  color: var(--text-dark);
  min-height: 100vh;
}

body.app-booting #authScreen,
body.app-booting #appScreen {
  visibility: hidden;
}

body.app-ready #authScreen:not(.hidden),
body.app-ready #appScreen:not(.hidden) {
  animation: screenFadeIn 0.28s ease-out;
}


.hidden {
  display: none !important;
}

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

button {
  border: none;
  cursor: pointer;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d6d2ef;
  background: #faf9ff;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  outline: none;
  border-color: var(--violet-600);
  box-shadow: 0 0 0 3px rgba(108, 75, 224, 0.2);
}

label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

label input {
  margin-top: 6px;
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--card-bg);
  border-radius: 28px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.brand {
  font-weight: 700;
  color: var(--violet-800);
  letter-spacing: 0.08em;
  font-size: 14px;
}

.auth-card h1 {
  margin: 8px 0 4px;
  font-size: 22px;
}

.auth-card p {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #efeafd;
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 16px;
}

.auth-tab {
  padding: 10px 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
}

.auth-tab.active {
  background: var(--violet-700);
  color: #fff;
  box-shadow: 0 8px 18px rgba(90, 59, 196, 0.3);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form button {
  background: var(--violet-700);
  color: #fff;
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
  box-shadow: 0 12px 24px rgba(90, 59, 196, 0.25);
}

.auth-phone-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.auth-phone-row label {
  margin-bottom: 0;
}

.auth-phone-row .auth-send-code {
  padding: 12px 14px;
  font-size: 13px;
  border-radius: 12px;
  white-space: nowrap;
  min-width: 140px;
}

.auth-phone-row .auth-send-code:disabled,
.auth-form button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

@media (max-width: 460px) {
  .auth-phone-row {
    grid-template-columns: 1fr;
  }

  .auth-phone-row .auth-send-code {
    width: 100%;
  }
}

.auth-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.auth-note .auth-link {
  border: none;
  background: none;
  padding: 0;
  margin-left: 4px;
  color: var(--violet-700);
  font: inherit;
  cursor: pointer;
}

.auth-note .auth-link:focus-visible {
  outline: 2px solid rgba(90, 59, 196, 0.4);
  outline-offset: 2px;
  border-radius: 8px;
}

.auth-message {
  display: none;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6f1ff;
  color: #4b2ea7;
  font-size: 12px;
  text-align: center;
}

.auth-message.visible {
  display: block;
}

.auth-message.auth-message--error {
  background: #fff0f1;
  color: #b42318;
}

.client-switch {
  display: flex;
  background: #efeafd;
  border-radius: 18px;
  padding: 6px;
  gap: 6px;
}

.client-switch label {
  margin-bottom: 0;
  flex: 1;
}

.client-switch input {
  display: none;
}

.client-switch span {
  display: block;
  text-align: center;
  padding: 10px 0;
  border-radius: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.client-switch input:checked + span {
  background: var(--violet-700);
  color: #fff;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  padding-bottom: 120px;
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 8px;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
}

.side-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100dvh;
  background: linear-gradient(180deg, #4b2ea7 0%, #3b1e8a 100%);
  color: #fff;
  padding: 28px 18px;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.34s ease;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.side-menu.open {
  transform: translateX(280px);
  box-shadow: 0 16px 46px rgba(15, 10, 35, 0.45);
}

.menu-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 12px;
}

.menu-title {
  font-size: 14px;
  font-weight: 700;
}

.menu-subtitle {
  font-size: 12px;
  opacity: 0.8;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 4px;
}

.menu-item {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 44px;
  color: #fff;
  text-align: left;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.menu-item:visited,
.menu-item:hover,
.menu-item:focus {
  color: #fff;
  text-decoration: none;
}

.menu-item:hover,
.menu-item:focus-visible {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.2);
}

.menu-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.menu-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.menu-exit {
  margin-top: 12px;
  background: #ff5d5d;
  color: #fff;
  padding: 12px;
  border-radius: 12px;
}

.menu-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 35, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 35;
}

.menu-scrim.visible {
  opacity: 1;
  pointer-events: auto;
}

.app-header {
  background: linear-gradient(135deg, #6a49c8 0%, #845ef2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 20;
}

.tracking-header .menu-toggle span {
  background: #fff;
}

.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.header-logo {
  width: 78px;
  height: auto;
  display: block;
padding: 7px;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
}

.header-subtitle {
  font-size: 12px;
  opacity: 0.8;
}

.header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 16px;
  border: none;
  cursor: pointer;
  padding: 0;
}

.header-avatar svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.app-content {
  padding: 0px 16px 0;
  display: grid;
  gap: 16px;
}

.tracking-content {
  padding-top: 12px;
  padding-bottom: 32px;
  gap: 12px;
}

.tracking-hero {
  background: linear-gradient(180deg, rgba(58, 35, 124, 0.7), rgba(58, 35, 124, 0.85)), url("img/hero/hero.png");
  background-size: cover;
  background-position: center;
  color: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.tracking-hero h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.tracking-hero p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.tracking-details {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow);
}

.tracking-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 130px) minmax(0, 1fr);
  gap: 8px;
  font-size: 12px;
}

.tracking-detail-label {
  color: var(--text-muted);
}

.tracking-detail-value {
  color: #2f2a44;
  word-break: break-word;
}

.tracking-detail-bin {
  font-size: 11px;
  letter-spacing: 0.4px;
}

.tracking-progress {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.tracking-progress-title {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tracking-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e6defa;
  overflow: hidden;
}

.tracking-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6a49c8, #8d68f2);
}

.tracking-timeline {
  display: grid;
  gap: 10px;
}

.tracking-timeline-card {
  background: #fff;
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 20px;
  box-shadow: var(--shadow);
}

.tracking-timeline-card:not(.current) {
  background: #e6def6;
  box-shadow: none;
}

.tracking-timeline-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.tracking-timeline-icon img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  animation: tracking-icon-float 2.6s ease-in-out infinite;
}

.tracking-timeline-title {
  font-weight: 600;
  font-size: 14px;
}

.tracking-timeline-card:not(.current) .tracking-timeline-title {
  color: #3f3855;
}

.tracking-timeline-date {
  font-size: 11px;
  color: var(--text-muted);
}

.tracking-timeline-desc {
  font-size: 12px;
  color: #5f5a75;
  margin-top: 4px;
}

.tracking-timeline-card:not(.current) .tracking-timeline-desc {
  color: #4c4564;
}

.tracking-status-banner {
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
}

.tracking-status-banner--cancelled {
  background: #fff1f1;
  color: #b42318;
  border: 1px solid #f8d3d3;
}

.tracking-info-card {
  background-color: #f2ecff;
  background-image: linear-gradient(180deg, rgba(230, 222, 246) 0%, rgba(255, 255, 255, 0.18) 100%), url('/img/metal1.png');
  background-repeat: no-repeat;
  background-position: right;
  background-size: cover;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tracking-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

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

.tracking-manager-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: grid;
  place-items: center;
  font-size: 20px;
  overflow: hidden;
}

.tracking-manager-label {
  font-size: 12px;
  color: var(--text-muted);
}

.tracking-manager-name {
  font-weight: 600;
}

.tracking-manager-phone {
  color: var(--violet-700);
  font-size: 13px;
  text-decoration: none;
}

.tracking-manager-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-wrap: wrap;
}

.tracking-manager-whatsapp {
  color: #1f9c57;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


.tracking-map-button {
  width: fit-content;
  background: #6a49c8;
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
}

.tracking-call-button {
  background: #6a49c8;
  color: #fff;
  border-radius: 16px;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
}

.history-content {
  padding-top: 12px;
  padding-bottom: 32px;
  gap: 14px;
}

.contacts-content {
  padding-top: 12px;
  padding-bottom: 32px;
  gap: 14px;
}

.notifications-content {
  padding-top: 12px;
  padding-bottom: 32px;
  gap: 14px;
}

.notifications-hero {
  background: linear-gradient(135deg, rgba(74, 47, 163, 0.9), rgba(108, 75, 224, 0.95));
  color: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.notifications-hero h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.notifications-hero p {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
}

.notifications-hero-pill {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.notifications-permission {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.notifications-permission-title {
  font-weight: 700;
  color: #2b2443;
  font-size: 14px;
}

.notifications-permission-text {
  margin: 6px 0 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.notifications-permission-status {
  font-size: 12px;
  color: var(--violet-700);
  font-weight: 600;
}

.notifications-list {
  display: grid;
  gap: 12px;
}

.notifications-empty {
  background: #f7f3ff;
  color: var(--text-muted);
  padding: 14px;
  border-radius: 16px;
  font-size: 12px;
  text-align: center;
}

.notification-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.notification-card-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.notification-card-title {
  font-weight: 700;
  color: #2b2443;
  font-size: 14px;
}

.notification-card-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.notification-card-message {
  font-size: 13px;
  color: #2b2443;
}

.contacts-hero {
  background: linear-gradient(135deg, rgba(74, 47, 163, 0.9), rgba(108, 75, 224, 0.95));
  color: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.contacts-hero h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.contacts-hero p {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
}

.contacts-hero-pill {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.contacts-grid {
  display: grid;
  gap: 12px;
}

.contacts-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.contacts-card h3 {
  margin: 0;
  font-size: 15px;
}

.contacts-card a {
  color: var(--violet-700);
  font-weight: 600;
  text-decoration: none;
}

.contacts-card p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.history-hero {
  background: linear-gradient(135deg, rgba(74, 47, 163, 0.9), rgba(108, 75, 224, 0.95));
  color: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.history-hero h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.history-hero p {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
}

.history-hero-pill {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.history-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: #efeafd;
  padding: 6px;
  border-radius: 16px;
}

.history-filter {
  padding: 10px 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
}

.history-filter.active {
  background: var(--violet-700);
  color: #fff;
  box-shadow: 0 10px 20px rgba(90, 59, 196, 0.25);
}

.history-group {
  display: grid;
  gap: 12px;
}

.bonuses-content {
  display: grid;
  gap: 16px;
  padding-top: 15px;
}

.bonus-card {
  align-content: start;
}

.bonus-card-title {
  font-weight: 700;
  font-size: 14px;
  color: #2b2443;
}

.bonus-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--violet-700);
}

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

.bonus-empty {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: #f7f3ff;
  padding: 10px;
  border-radius: 12px;
}


.history-group-title {
  font-weight: 700;
  color: #2b2443;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.history-cards {
  display: grid;
  gap: 12px;
}

.delivery-card {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.delivery-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.delivery-card-title {
  font-weight: 700;
  font-size: 15px;
}

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

.delivery-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: #f7f3ff;
  border-radius: 14px;
  padding: 10px;
}

.delivery-card-meta .meta-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.delivery-card-meta .meta-value {
  font-weight: 600;
  font-size: 12px;
  color: #2f2a44;
}

.delivery-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  gap: 12px;
}

.delivery-card-footer .ghost-button {
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #efeafd;
  color: #5b4a86;
  white-space: nowrap;
}

.status-pill--in-progress {
  background: rgba(106, 73, 200, 0.15);
  color: #5a3bc4;
}

.status-pill--pending {
  background: rgba(255, 186, 73, 0.2);
  color: #a15d0a;
}

.status-pill--success {
  background: rgba(79, 173, 104, 0.2);
  color: #2f7a43;
}

.status-pill--cancelled {
  background: rgba(239, 94, 86, 0.18);
  color: #b33b35;
}

.history-table {
  background: #fff;
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.history-table-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(70px, 1fr) minmax(110px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.history-table-row:not(.history-table-header) {
  background: #f7f3ff;
}

.history-table-header {
  font-weight: 600;
  color: var(--text-muted);
}

.hero-slider {
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 0 -16px;
}

.hero-slide {
  min-height: 230px;
  background-image: var(--hero-image);
  background-position: center;
  position: relative;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(43, 33, 88, 0.88) 0%, rgba(43, 33, 88, 0.2) 100%);
}


.hero-content {
  position: relative;
  color: #fff;
  padding: 22px;
  max-width: 260px;
  display: grid;
  gap: 8px;
}

.hero-content h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.hero-content p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.ghost-button {
  width: fit-content;
  padding: 8px 16px;
  border-radius: 20px;
  background: #fff;
  color: var(--violet-800);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 600;

}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.promo-card {
  border-radius: 18px;
  padding: 16px;
  color: #fff;
  background-image: linear-gradient(120deg, rgba(44, 30, 92, 0.82), rgba(44, 30, 92, 0.45)), var(--card-image);
  background-position: center;
  display: grid;
  gap: 6px;
  min-height: 140px;
  background-size: cover;
}

.promo-badge {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 11px;
  width: fit-content;
}

.promo-card h3 {
  margin: 0;
  font-size: 16px;
}

.promo-card p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.action-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 12px 0px;
  box-shadow: 0 10px 20px rgba(88, 64, 161, 0.12);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border: none;
  width: 100%;
  text-align: left;
  font: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.action-card--dark {
  background: linear-gradient(135deg, #5a3bc4 0%, #8a6cf4 100%);
  color: #fff;
}

.action-card h4 {
  margin: 0;
  font-size: 14px;
}

.action-card p {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
}

.action-card--dark h4,
.action-card--dark p {
  color: #fff;
}

.action-card.is-clickable {
  cursor: pointer;
}

.action-card.is-clickable:hover,
.action-card.is-clickable:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(66, 45, 130, 0.15);
}

.action-card.is-clickable:focus-visible {
  outline: 2px solid rgba(90, 59, 196, 0.5);
  outline-offset: 2px;
}

.action-icon {
  width: 60px;
  height: 45px;
  object-fit: fill;
}

.whatsapp-banner {
  border-radius: 20px;
  padding: 16px;
  background-image: linear-gradient(181deg, rgb(124 88 229 / 92%), rgb(106 73 200 / 28%)), url(img/tiles/metal.png);
  background-position: center;
  background-size: 700px;
  color: #fff;
  box-shadow: 0 12px 24px rgba(20, 120, 70, 0.2);
  display: grid;
  gap: 12px;
}

.whatsapp-banner--tracking {
  margin-top: 8px;
}

.whatsapp-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.whatsapp-banner-icon {
  width: 56px;
  height: 48px;
  object-fit: contain;
}

.whatsapp-banner h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.whatsapp-banner p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.whatsapp-banner .whatsapp {
  align-self: flex-start;
}

.b24-widget-button-wrapper,
.b24-widget-button {
  display: none !important;
}

.card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.track-card {
  display: grid;
  gap: 12px;
}

.track-card h3 {
  margin: 0;
  font-size: 16px;
}

.track-card p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.track-card button {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: var(--violet-700);
  color: #fff;
  font-size: 15px;
}

.chat-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 520px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.chat-icon {
  width: 40px;
  height: 40px;
  background: #ede9ff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.chat-info p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.chat-button {
  background: var(--violet-700);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-button img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.info-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.delivery-card {
  border: 1px solid #e5e1f8;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  background: #fff;
}

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

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

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.timeline-item {
  display: grid;
  gap: 4px;
  padding-left: 18px;
  position: relative;
}

.timeline-item.future,
.timeline-item.past {
  color: #3f3855;
}


.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d3c9f5;
}

.timeline-item.future .timeline-dot {
  background: #b8acd9;
}

.timeline-item.current .timeline-dot {
  background: var(--violet-700);
  animation: timeline-pulse 1.8s ease-in-out infinite;
}

.timeline-item.past .timeline-dot {
  background: #7b5ee5;
}

.timeline-title {
  font-weight: 600;
}

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

.timeline-item.future .timeline-desc,
.timeline-item.future .timeline-date,
.timeline-item.past .timeline-desc,
.timeline-item.past .timeline-date {
  color: #4c4564;
}

@keyframes tracking-icon-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes timeline-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(106, 73, 200, 0.45);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(106, 73, 200, 0);
  }
}


.comment,
.documents {
  margin-top: 12px;
  font-size: 13px;
  background: #f4f1ff;
  padding: 12px;
  border-radius: 12px;
}

.manager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.manager-phone {
  color: var(--violet-700);
}

.whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #7d58e6;
  color: #fff;
  padding: 8px 12px;
  border-radius: 14px;
  text-decoration: none;
}

.whatsapp img {
  width: 18px;
  height: 18px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  padding: 12px;
  border-radius: 14px;
  background: #f6f4ff;
  display: grid;
  gap: 4px;
}

.history-title {
  display: block;
  font-weight: 600;
  font-size: 13px;
}

.history-meta {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.documents-content {
  gap: 14px;
}

.documents-group {
  gap: 10px;
}

.documents-orders {
  display: grid;
  gap: 12px;
}

.documents-order-card .documents-grid {
  margin-top: 2px;
}

.documents-grid {
  display: grid;
  gap: 8px;
}

.document-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #f7f3ff;
  color: #2f2a44;
  text-decoration: none;
  border: 1px solid rgba(106, 73, 200, 0.08);
}

.document-card.is-disabled {
  opacity: 0.55;
}

.document-icon {
  min-width: 34px;
  height: 24px;
  border-radius: 8px;
  background: rgba(106, 73, 200, 0.15);
  color: #5a3bc4;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.document-name {
  font-size: 12px;
  font-weight: 600;
}

.documents-empty {
  font-size: 12px;
  color: var(--text-muted);
  background: #f7f3ff;
  padding: 12px;
  border-radius: 12px;
}

.popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 10, 38, 0.5);
  z-index: 50;
}

.popup-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.popup-card.profile-card {
  max-width: 360px;
  text-align: left;
}

.profile-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.profile-section {
  display: grid;
  gap: 12px;
}

.profile-section.hidden {
  display: none;
}

.popup-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.popup-actions button {
  flex: 1;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--violet-700);
  color: #fff;
}

.popup-card.delivery-choice-card {
  text-align: left;
  position: relative;
  padding: 20px 18px 18px;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}

.popup-subtitle {
  margin: 6px 0 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.delivery-choice-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.delivery-choice-item {
  border: 1px solid #e6e2ff;
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  background: #f8f6ff;
  cursor: pointer;
}

.delivery-choice-item.is-selected {
  border-color: #b7a6ff;
  box-shadow: 0 0 0 2px rgba(128, 97, 255, 0.15);
  background: #efeaff;
}

.delivery-choice-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--violet-900);
}

.delivery-choice-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.delivery-choice-confirm {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 10px 16px;
  background: var(--violet-700);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}


.popup-actions button.secondary {
  background: #ece9ff;
  color: var(--violet-800);
  padding: 10px 18px;
  border-radius: 12px;
}

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #ded7fb;
  border-top: 3px solid var(--violet-700);
  animation: spin 1s linear infinite;
  margin: 0 auto 8px;
}

.loading-text {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 420px) {
  .auth-card {
    padding: 22px;
  }

  .header-logo {
    width: 72px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
#authScreen,
#appScreen {
  visibility: visible;
}

.history-table-row[data-history-track-row],
.delivery-card[data-history-track-card] {
  cursor: pointer;
}

.history-table-row[data-history-track-row]:focus-visible,
.delivery-card[data-history-track-card]:focus-visible {
  outline: 2px solid #6a49c8;
  outline-offset: 2px;
}

.tracking-detail-value--documents {
  display: block;
}

.tracking-documents-list {
  display: inline;
}

.tracking-document-link {
  color: #5a3bc4;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 12px;
}

.tracking-document-link.is-disabled {
  color: var(--text-muted);
  text-decoration: none;
}