:root {
  --surface: #ffffff;
  --surface-alt: #ffffff;
  --primary: #054f9f;
  --accent: #e97047;
  --text: #000000;
  --muted: rgba(0, 0, 0, 0.6);
  --border: rgba(0, 0, 0, 0.08);
  --radius: 22px;
  --header-height: 90px;
  --nav-height: 78px;
  --shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
  font-size: 16px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  background: #ffffff;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

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

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

[data-app-header] {
  width: 100%;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-header .title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.app-header .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.user-chip {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(5, 79, 159, 0.2), rgba(13, 110, 253, 0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.app-content {
  flex: 1;
  padding: 1.25rem;
  padding-top: calc(var(--header-height) + 1rem);
  padding-bottom: calc(var(--nav-height) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.app-card {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

.app-card + .app-card {
  margin-top: 0.5rem;
}

.btn,
.btn:focus {
  border-radius: 18px;
  font-weight: 600;
  padding: 0.9rem 1rem;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #054f9f, #0d6efd);
  box-shadow: 0 12px 30px rgba(5, 79, 159, 0.35);
}

.btn-outline-primary {
  border: 1px solid rgba(8, 79, 159, 0.35) !important;
  color: var(--primary);
  background: rgba(8, 79, 159, 0.05);
}

.btn-soft {
  border: 1px solid rgba(8, 79, 159, 0.25);
  background: rgba(8, 79, 159, 0.07);
  color: var(--primary);
}

.btn-soft:hover {
  background: rgba(8, 79, 159, 0.12);
  color: var(--primary);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.badge-soft {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(8, 79, 159, 0.12);
  color: var(--primary);
}

.status-pill {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.status-pill.pending { background: #e97047; }
.status-pill.approved { background: #054f9f; }
.status-pill.delivered { background: #0d6efd; }
.status-pill.rejected,
.status-pill.cancelled { background: #111111; }
.status-pill.processing { background: linear-gradient(135deg, #054f9f, #0d6efd); }

.input-group .form-control,
.form-control,
.form-select,
textarea {
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.95);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
}

.suggestion-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  border: none;
  z-index: 100;
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 0.8rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.suggestion-item:hover {
  background: rgba(8, 79, 159, 0.08);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(5, 79, 159, 0.1);
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.suggestion-item__meta {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.suggestion-item__name {
  font-weight: 600;
  color: var(--text);
}

.suggestion-item__sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.list-card {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-card li {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.sticky-search {
  position: sticky;
  top: 80px;
  z-index: 30;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  padding-bottom: 0.5rem;
}

.gift-card.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 55;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  box-shadow: 0 -18px 35px rgba(0, 0, 0, 0.08);
}

.app-nav button {
  border: none;
  background: transparent;
  padding: 0.8rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.app-nav button i {
  font-size: 1.3rem;
}

.app-nav button.active {
  color: var(--primary);
  font-weight: 600;
}

.toast-container {
  z-index: 2000;
}

@media (max-width: 400px) {
  :root {
    font-size: 15px;
    --header-height: 82px;
    --nav-height: 74px;
  }
  .app-content {
    padding: 1rem;
    padding-top: calc(var(--header-height) + 0.75rem);
    padding-bottom: calc(var(--nav-height) + 1rem);
  }
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 520px;
    margin: 0 auto;
    border-radius: 40px;
    min-height: calc(100vh - 2rem);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
    position: relative;
    padding-top: 1rem;
  }
  .app-header {
    width: min(520px, 100%);
    left: 50%;
    transform: translateX(-50%);
    border-radius: 30px;
  }
  .app-nav {
    width: min(520px, 100%);
    left: 50%;
    transform: translateX(-50%);
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
  }
}
.orders-screen .filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.filter-panel {
  padding: 0;
  overflow: hidden;
}

.filter-panel__header {
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  text-align: left;
}

.filter-panel__eyebrow {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.filter-panel__header strong {
  font-size: 1rem;
  font-weight: 600;
}

.filter-panel__header .bi {
  font-size: 1.25rem;
  transition: transform 0.2s ease;
  color: var(--primary);
}

.filter-panel__body {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem 1.5rem;
  max-height: 550px;
  transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.2s ease;
}

.filter-panel.collapsed .filter-panel__body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  pointer-events: none;
}

.filter-panel.collapsed .filter-panel__header .bi {
  transform: none;
}

.filter-panel:not(.collapsed) .filter-panel__header .bi {
  transform: rotate(180deg);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-chip {
  border: 1px solid rgba(8, 79, 159, 0.22);
  background: rgba(8, 79, 159, 0.05);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.filter-chip.active {
  background: linear-gradient(135deg, #054f9f, #0d6efd);
  color: #fff;
  border-color: transparent;
}

.order-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.order-card:active {
  transform: scale(0.99);
}

.order-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.order-card__label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.order-card__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.order-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.order-card__value {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.home-hero {
  background: linear-gradient(135deg, #054f9f, #0d6efd);
  color: #fff;
  border: none;
}

.home-hero__info h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.home-hero__eyebrow {
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  opacity: 0.8;
}

.home-hero__area {
  margin: 0.4rem 0 0;
  opacity: 0.9;
}

.home-hero__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.badge-tag {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 500;
  font-size: 0.85rem;
}

.home-hero__phone {
  margin: 0;
  font-weight: 500;
}

.profile-screen .profile-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(5, 79, 159, 0.15), rgba(13, 110, 253, 0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
}

.profile-hero__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted);
}

.profile-hero__designation,
.profile-hero__area,
.profile-hero__phone {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

/* removed old meta block since status now lives below avatar */

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.2);
  color: #0f5132;
  font-weight: 600;
  font-size: 0.85rem;
}

.profile-status:not(.is-active) {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.profile-form-card .form-label {
  font-weight: 500;
  color: var(--muted);
}

.profile-actions {
  text-align: center;
}

.limit-card {
  position: relative;
}

.limit-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.limit-card__label {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.limit-card__stats {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.limit-card__value {
  margin: 0.2rem 0 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.limit-progress {
  height: 10px;
  background: rgba(79, 70, 229, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.limit-progress__bar {
  height: 100%;
  background: linear-gradient(135deg, #054f9f, #0d6efd);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(8, 79, 159, 0.18);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  color: var(--text);
}

.action-card small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}

.action-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(5, 79, 159, 0.35);
  background: linear-gradient(135deg, rgba(5, 79, 159, 0.2), rgba(13, 110, 253, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
}

.action-card p {
  margin: 0;
  font-weight: 600;
}

.recent-orders {
  margin-top: 0.5rem;
}

.recent-orders__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.quick-actions-card .action-grid {
  margin-top: 0.5rem;
}

.product-slider {
  overflow: hidden;
}

.product-slider__viewport {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-slider__track {
  display: flex;
  transition: transform 0.6s ease;
}

.product-slide {
  min-width: 100%;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.product-slide__image {
  flex: 0 0 40%;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: linear-gradient(135deg, rgba(5, 79, 159, 0.08), rgba(13, 110, 253, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.product-slide__image img {
  width: 100%;
  height: 110px;
  object-fit: contain;
}

.product-slide__info {
  flex: 1;
}

.product-slide__label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.product-slide__info h5 {
  margin: 0;
}

.product-slide__info small {
  color: var(--muted);
}

.gift-doctor-field {
  position: relative;
}

.quick-doctor-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  z-index: 10;
  max-height: 220px;
  overflow-y: auto;
}

.recent-orders__header a {
  font-size: 0.9rem;
  color: var(--primary);
  text-decoration: none;
}

.order-card--mini {
  margin-bottom: 0.75rem;
  padding: 1rem;
}

.gift-screen .gift-grid {
  display: grid;
  gap: 1rem;
}

.gift-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.gift-card__header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.gift-card__image {
  width: 96px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.04);
  overflow: hidden;
  flex-shrink: 0;
}

.gift-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-card__body h5 {
  margin-bottom: 0.25rem;
}

.gift-card__desc {
  margin-bottom: 0.4rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gift-card__desc.expanded {
  -webkit-line-clamp: initial;
  max-height: none;
}

.gift-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.gift-tag {
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  font-weight: 600;
  font-size: 0.75rem;
}

.gift-tag.inactive {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.5);
}

.gift-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.variant-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.gift-readmore {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 500;
  padding: 0;
}
.gift-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.gift-modal__content {
  position: relative;
  background: #fff;
  padding: 1rem;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  max-width: 90vw;
  max-height: 80vh;
}

.gift-modal__content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gift-modal__close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  border: none;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  color: #000;
}
.action-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(5, 79, 159, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
}
.order-page .form-group {
  margin-bottom: 1rem;
}

.order-limit-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.gift-select-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.gift-picker {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.gift-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.gift-picker__panel {
  position: relative;
  width: min(90vw, 420px);
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gift-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.gift-picker__search .input-group-text {
  background: transparent;
  border-right: none;
}

.gift-picker__search .form-control {
  border-left: none;
}

.gift-picker__list {
  overflow-y: auto;
  max-height: 40vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gift-option {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.85rem;
  display: flex;
  gap: 0.75rem;
  cursor: pointer;
}

.gift-option__image {
  width: 64px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.gift-option__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-option.selected {
  border-color: var(--primary);
  background: rgba(5, 79, 159, 0.05);
}

.gift-picker__variants {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.gift-order-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.gift-order-modal.d-none {
  display: none;
}

.gift-order-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.gift-order-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  width: min(420px, calc(100% - 2rem));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  z-index: 1201;
}

.gift-order-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
}
