@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Rubik:wght@400;500;600;700&display=swap");

:root {
  --ink: #2f2a2a;
  --ink-soft: #62595b;
  --cream: #fff8f5;
  --blush: #f4dfd6;
  --rose: #d3a395;
  --sage: #89a287;
  --wine: #b84c65;
  --card: #ffffff;
  --line: #e6cfc8;
  --shadow: 0 12px 24px rgba(78, 36, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Rubik", sans-serif;
  color: var(--ink);
  background: #f6f5f7;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
}

.bg-blob-a {
  width: 360px;
  height: 360px;
  background: rgba(208, 138, 127, 0.32);
  top: -110px;
  right: -120px;
}

.bg-blob-b {
  width: 330px;
  height: 330px;
  background: rgba(139, 161, 132, 0.26);
  left: -120px;
  bottom: -120px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 16px 26px;
  border-bottom: 1px solid #ece8ea;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 35;
}

.topbar > * {
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.58rem;
  color: var(--wine);
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 14px;
}

.page-heading h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  line-height: 1.05;
  color: var(--wine);
  letter-spacing: 0.01em;
}

.page-heading p {
  margin: 6px 0 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 221px;
  height: auto;
  object-fit: contain;
}

.topbar-meta {
  font-size: 0.83rem;
  color: #7f7477;
  margin-left: 4px;
}

.user-badge {
  margin-left: auto;
  padding: 7px 11px;
  border-radius: 2px;
  background: #f8f7f9;
  border: 1px solid #e2dde0;
  font-size: 0.82rem;
}

.support-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid #ead7de;
  background: #fff8fb;
  color: #7b3346;
  text-decoration: none;
  font-size: 0.76rem;
  white-space: nowrap;
}

.support-mini strong {
  color: var(--wine);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mobile-nav-toggle,
.mobile-nav-scrim {
  display: none;
}

.mobile-nav-toggle {
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #e5d7dc;
  background: #fff;
  color: var(--wine);
  cursor: pointer;
  flex-direction: column;
}

.mobile-nav-toggle span {
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

body.nav-open {
  overflow: hidden;
}

main {
  max-width: none;
  margin: 0;
  padding: 20px 24px 28px;
}

.single-col {
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 16px;
}

.landing {
  max-width: 760px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel {
  margin-top: 14px;
}

.card {
  background: var(--card);
  border: 1px solid #e9e3e6;
  box-shadow: var(--shadow);
  border-radius: 2px;
  padding: 18px;
  margin-top: 10px;
}

.card.narrow {
  width: 100%;
}

.auth-shell {
  width: 100%;
  max-width: 460px;
  display: grid;
  gap: 14px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-logo-mark {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.auth-brand-text {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0.18em;
  font-size: 0.94rem;
  color: #6b5f62;
}

.auth-card h2 {
  margin-bottom: 6px;
}

.form-alert {
  border: 1px solid rgba(194, 80, 108, 0.35);
  background: rgba(194, 80, 108, 0.08);
  color: #8a2d45;
  padding: 9px 11px;
  margin: 8px 0 10px;
  font-size: 0.88rem;
}

h2, h3, h4 {
  margin-top: 0;
  color: var(--wine);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

label {
  display: block;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

form.inline-form label {
  margin-bottom: 0 !important;
}

input, select, textarea, button {
  font: inherit;
}

input, select, textarea {
  width: 100%;
  margin-top: 5px;
  padding: 10px 11px;
  border-radius: 2px;
  border: 1px solid #ddd6d9;
  background: #fff;
}

.btn {
  border: 0;
  padding: 10px 14px;
  border-radius: 2px;
  background: var(--wine);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--wine);
  color: var(--wine);
}

.btn-link {
  display: inline-block;
  text-align: center;
  border: 1px solid var(--wine);
  color: var(--wine);
  text-decoration: none;
  border-radius: 2px;
  padding: 10px 12px;
  background: #fff;
}

.topbar .subnav {
  position: fixed;
  left: 0;
  top: 74px;
  bottom: 0;
  width: 248px;
  background: #ffffff;
  border-right: 1px solid #ece8ea;
  z-index: 40;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subnav {
  display: grid;
  gap: 7px;
  overflow-y: auto;
  padding: 12px 6px 10px;
}

.subnav-link {
  color: #7a6268;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 9px 10px;
  background: transparent;
  font-size: 0.87rem;
  display: flex;
  align-items: center;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  min-width: 0;
}

.subnav-link::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 9px;
  color: #9c5b6c;
  font-size: 0.88rem;
  border: 1px solid #e3d6da;
  background: #fff;
}

.subnav-link[href*=\"dashboard\"]::before { content: \"▦\"; }
.subnav-link[href*=\"place-order\"]::before { content: \"✦\"; }
.subnav-link[href*=\"recipients\"]::before { content: \"⌂\"; }
.subnav-link[href*=\"messages\"]::before { content: \"✉\"; }
.subnav-link[href*=\"team\"]::before { content: \"◫\"; }
.subnav-link[href*=\"profile\"]::before { content: \"◎\"; }
.subnav-link[href*=\"orders\"]::before { content: \"▤\"; }
.subnav-link[href*=\"customers\"]::before { content: \"◉\"; }
.subnav-link[href*=\"inquiries\"]::before { content: \"✎\"; }
.subnav-link[href*=\"analytics\"]::before { content: \"△\"; }
.subnav-link[href*=\"serviceability\"]::before { content: \"◇\"; }

.subnav-link:hover {
  background: #faf7f8;
  border-color: #ebe2e6;
  color: #654f55;
}

.subnav-link.active {
  background: #f8ecef;
  border-color: #e2c9d1;
  color: #7c3f50;
  font-weight: 600;
}

.subnav-link.active::before {
  border-color: #d7b4bf;
  color: #b84c65;
}


main {
  margin-left: 248px;
  padding-top: 18px;
}

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

.tab {
  border: 1px solid #d9cbc6;
  background: #fff;
  border-radius: 2px;
  padding: 8px 12px;
  cursor: pointer;
}

.tab.active {
  background: var(--blush);
  border-color: var(--rose);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.hidden {
  display: none !important;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.hint {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

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

.list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fffdfc;
}

.list.compact li {
  padding: 8px 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #ece7e9;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid #efe9ec;
  font-size: 0.88rem;
}

th {
  font-size: 0.79rem;
  color: #81777a;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: #faf9fa;
}

.status-pill {
  display: inline-block;
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-Scheduled,
.status-Pending {
  background: #f8ede4;
  color: #7a4349;
  border-color: #e6d2c5;
}

.status-In-Process,
.status-Confirmed {
  background: #edf2e7;
  color: #405f3a;
  border-color: #d2dfc9;
}

.status-Out-for-Delivery {
  background: #eef4fa;
  color: #315d8f;
  border-color: #d3e3f4;
}

.status-Delivered {
  background: #e6f4ef;
  color: #2b6b56;
  border-color: #cbe4da;
}

.status-Cancelled {
  background: #f8e8e8;
  color: #8d4141;
  border-color: #e6cbcb;
}

.status-Issue-Returned {
  background: #ffeedd;
  color: #8f5124;
  border-color: #f3d6bd;
}

.payment-pill {
  display: inline-block;
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.payment-Pending {
  background: #fff2e7;
  color: #8f5a2c;
  border-color: #f1d9bf;
}

.payment-Processing {
  background: #edf2ff;
  color: #355e95;
  border-color: #d3dff5;
}

.payment-Received {
  background: #e8f5ec;
  color: #2f6f51;
  border-color: #cfe5d7;
}

.payment-Failed {
  background: #fbe9ec;
  color: #8f3d53;
  border-color: #efcfd8;
}

.rec-card {
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 2px;
  background: #fff;
}

.rec-card input {
  width: auto;
  margin-right: 8px;
}

.recipient-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px;
  margin-bottom: 8px;
  background: #fff;
}

.toast {
  position: fixed;
  right: 12px;
  bottom: 12px;
  background: #2f2f2f;
  color: #fff;
  padding: 10px 12px;
  border-radius: 2px;
  z-index: 1000;
}

.link {
  color: var(--wine);
  display: inline-block;
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  main {
    padding: 14px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
  }

  .brand-logo {
    width: 128px;
  }

  .page-heading h1 {
    font-size: clamp(1.5rem, 7vw, 1.9rem);
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .grid.five,
  .grid.six,
  .inline-form,
  .recipient-row {
    grid-template-columns: 1fr;
  }

  .topbar .subnav {
    position: fixed;
    top: 67px;
    right: 12px;
    left: 12px;
    bottom: auto;
    width: auto;
    max-height: calc(100vh - 92px);
    border: 1px solid #e7d9de;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 40px rgba(80, 42, 52, 0.16);
    padding: 12px;
    margin: 0;
    z-index: 55;
    display: none;
    overflow-y: auto;
  }

  .subnav {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
  }

  .topbar,
  main {
    margin-left: 0;
  }

  .user-badge,
  .topbar-meta,
  .support-mini,
  #logoutBtn {
    display: none;
  }

  .brand-mark {
    grid-column: 1 / 2;
  }

  .mobile-nav-toggle {
    grid-column: 2 / 3;
    justify-self: end;
    display: inline-flex;
  }

  .mobile-nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(47, 42, 42, 0.34);
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    transition: opacity 0.16s ease;
  }

  body.nav-open .mobile-nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open .topbar .subnav,
  body.nav-open .topbar .user-badge,
  body.nav-open .topbar .topbar-meta,
  body.nav-open .topbar .support-mini,
  body.nav-open .topbar #logoutBtn {
    display: block;
  }

  body.nav-open .topbar .subnav {
    display: grid;
  }

  body.nav-open .topbar .user-badge,
  body.nav-open .topbar .topbar-meta,
  body.nav-open .topbar .support-mini,
  body.nav-open .topbar #logoutBtn {
    position: fixed;
    right: 12px;
    left: 12px;
    z-index: 55;
    background: #fff;
    border: 1px solid #e7d9de;
    padding: 10px 12px;
  }

  body.nav-open .topbar .user-badge {
    top: calc(67px + 12px + 5 * 47px + 10px);
    margin: 0;
    white-space: normal;
  }

  body.nav-open .topbar .topbar-meta {
    top: calc(67px + 12px + 5 * 47px + 62px);
    font-size: 0.8rem;
  }

  body.nav-open .topbar .support-mini {
    top: calc(67px + 12px + 5 * 47px + 98px);
    margin-left: 0;
    justify-content: center;
  }

  body.nav-open .topbar #logoutBtn {
    top: calc(67px + 12px + 5 * 47px + 148px);
    width: auto;
    justify-self: auto;
  }

  body.nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .brand-logo {
    width: min(146px, 44vw);
  }

  main {
    padding: 12px;
  }
}

.page-loader-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.page-loader-card h3 {
  margin: 0 0 4px;
}

.page-loader-card .loader-flower {
  margin: 0;
  flex: 0 0 auto;
}

.thumb-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thumb-line img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid #e2dadd;
  background: #fff;
}

.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(248, 244, 246, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-card {
  width: min(420px, 92vw);
  border: 1px solid #e4d6dc;
  background: #fff;
  text-align: center;
  padding: 22px;
  box-shadow: 0 14px 28px rgba(102, 55, 70, 0.12);
}

.loader-card h4 {
  margin: 10px 0 6px;
}

.loader-card p {
  margin: 0;
}

.loader-flower {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border: 3px solid #ecd4dd;
  border-top-color: #b84c65;
  border-right-color: #d08a7f;
  animation: spin 0.9s linear infinite;
}

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