/* ============================================================ *\
   Zatr — Minimal dashboard (Le Labo inspired)
   Monochrome, cream/ink, hairlines, square edges, typographic.
   All rules scoped under .dash so other pages are untouched.
\* ============================================================ */

:root {
  --ink: #1c1b18;
  --muted: #8a857c;
  --sub: #3a3833;
  --line: #e7e1d6;
  --soft: #f1ece3;
  --cream: #faf8f5;
}

.dash {
  background: var(--cream);
  color: var(--ink);
  font-family: "ModamWeb", serif;
  padding: 40px 0 64px;
  min-height: 70vh;
}

.dash .container { max-width: 1180px; }

/* shared section label (eyebrow) */
.dash-eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 400;
}

/* ---------------------------------------------------------- *\
   Sidebar
\* ---------------------------------------------------------- */
.dash-aside { padding-top: 4px; }

.dash-profile {
  text-align: center;
  padding-bottom: 22px;
  border-bottom: 0.5px solid var(--line);
}
.dash-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 14px;
  border: 0.5px solid var(--ink);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  letter-spacing: 0.06em;
  overflow: hidden;
  background: var(--soft);
}
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-name { font-size: 16px; letter-spacing: 0.04em; }
.dash-since {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
  letter-spacing: 0.1em;
}

.dash-nav {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  color: var(--sub);
  text-decoration: none;
  border-right: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
.dash-nav a i {
  font-size: 17px;
  color: var(--muted);
  width: 20px;
  text-align: center;
  transition: color 0.2s ease;
}
.dash-nav a:hover { color: var(--ink); background: #f5f1ea; }
.dash-nav a:hover i { color: var(--ink); }
.dash-nav a.is-active {
  color: var(--ink);
  background: var(--soft);
  border-right-color: var(--ink);
}
.dash-nav a.is-active i { color: var(--ink); }
.dash-nav .dash-nav-sep { margin-top: 8px; border-top: 0.5px solid var(--line); }

/* ---------------------------------------------------------- *\
   Stats grid
\* ---------------------------------------------------------- */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 0.5px solid var(--line);
  border-right: 0.5px solid var(--line);
  margin-bottom: 44px;
}
.dash-stat {
  border-bottom: 0.5px solid var(--line);
  border-left: 0.5px solid var(--line);
  padding: 22px 20px;
}
.dash-stat b { font-size: 27px; font-weight: 400; display: block; line-height: 1; }
.dash-stat span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 9px;
}

/* ---------------------------------------------------------- *\
   Tables
\* ---------------------------------------------------------- */
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table thead th {
  text-align: right;
  padding: 12px 8px;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  border-bottom: 0.5px solid var(--ink);
}
.dash-table tbody td { padding: 16px 8px; border-bottom: 0.5px solid var(--line); vertical-align: middle; }
.dash-table tbody tr:hover { background: #f5f1ea; }
.dash-table .num { color: var(--sub); }
.dash-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 13px; letter-spacing: 0.05em; }

/* status as a monochrome dot + label */
.dash-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.dash-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); flex: none; }
.dash-status.is-soft .dot { background: transparent; border: 1px solid var(--ink); }
.dash-status.is-muted .dot { background: var(--muted); }

/* ---------------------------------------------------------- *\
   Links & buttons
\* ---------------------------------------------------------- */
.dash-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 0.5px solid var(--ink);
  padding-bottom: 2px;
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: opacity 0.2s ease;
}
.dash-link:hover { opacity: 0.55; color: var(--ink); }

.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 12px 30px;
  font-family: "ModamWeb", serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.dash-btn:hover { background: #000; color: #fff; }
.dash-btn--ghost { background: transparent; color: var(--ink); }
.dash-btn--ghost:hover { background: var(--ink); color: #fff; }
.dash-btn--sm { padding: 8px 18px; }

/* ---------------------------------------------------------- *\
   Product / recommendation grid
\* ---------------------------------------------------------- */
.dash-rec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dash-rec .item { text-decoration: none; color: var(--ink); }
.dash-rec .thumb {
  aspect-ratio: 1;
  background: var(--soft);
  border: 0.5px solid var(--line);
  overflow: hidden;
  display: block;
}
.dash-rec .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dash-rec .name { font-size: 13px; margin-top: 12px; line-height: 1.6; }
.dash-rec .price { font-size: 13px; color: var(--sub); margin-top: 4px; }
.dash-rec .price del { color: var(--muted); margin-left: 8px; }

/* ---------------------------------------------------------- *\
   Cards / panels (addresses, forms, notifications)
\* ---------------------------------------------------------- */
.dash-card {
  border: 0.5px solid var(--line);
  background: #fff;
  padding: 22px;
  margin-bottom: 18px;
}
.dash-card--soft { background: transparent; }

/* forms */
.dash-form label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 8px;
}
.dash-form .field { margin-bottom: 20px; }
.dash-form input[type="text"],
.dash-form input[type="tel"],
.dash-form input[type="email"],
.dash-form input[type="password"],
.dash-form input[type="number"],
.dash-form textarea,
.dash-form select {
  width: 100%;
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  font-family: "ModamWeb", serif;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
.dash-form input:focus,
.dash-form textarea:focus,
.dash-form select:focus { outline: none; border-color: var(--ink); }
.dash-form textarea { min-height: 96px; resize: vertical; }

/* pagination */
.dash-pager { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.dash-pager a, .dash-pager span {
  min-width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0.5px solid var(--line);
  color: var(--sub); text-decoration: none;
  font-size: 13px;
}
.dash-pager a:hover { border-color: var(--ink); color: var(--ink); }
.dash-pager .is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.dash-pager .gap { border: none; }

.dash-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid var(--line);
}
.dash-title { font-size: 18px; font-weight: 400; letter-spacing: 0.06em; margin: 0; }

.dash-deflist { width: 100%; border-collapse: collapse; }
.dash-deflist tr { border-bottom: 0.5px solid var(--line); }
.dash-deflist tr:last-child { border-bottom: none; }
.dash-deflist th {
  text-align: right;
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 14px 4px;
  width: 38%;
  vertical-align: top;
}
.dash-deflist td { padding: 14px 4px; font-size: 14px; color: var(--ink); }
.dash-deflist--summary th { width: 70%; }
.dash-deflist--summary td { text-align: left; }
.dash-deflist .total th, .dash-deflist .total td { font-size: 15px; color: var(--ink); padding-top: 18px; }

/* cart / order item rows */
.dash-item {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 0.5px solid var(--line);
}
.dash-item .thumb {
  width: 72px; height: 90px; flex: none;
  background: var(--soft); border: 0.5px solid var(--line); overflow: hidden;
}
.dash-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.dash-item .body { flex: 1; min-width: 0; }
.dash-item .t { font-size: 14px; margin-bottom: 8px; }
.dash-item .meta { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; line-height: 2; }
.dash-item .meta b { color: var(--sub); font-weight: 400; }
.dash-item .side { text-align: left; flex: none; display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.dash-item .price { font-size: 14px; }
.dash-iconbtn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 6px; padding: 0;
  transition: color 0.2s ease;
}
.dash-iconbtn:hover { color: var(--ink); }

/* address cards */
.dash-addr { border: 0.5px solid var(--line); padding: 20px 22px; margin-bottom: 16px; position: relative; }
.dash-addr.is-default { border-color: var(--ink); }
.dash-addr .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dash-addr .title { font-size: 15px; letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px; }
.dash-addr .title i { font-size: 16px; color: var(--muted); }
.dash-addr .pill { font-size: 10px; letter-spacing: 0.14em; border: 0.5px solid var(--ink); padding: 4px 10px; color: var(--ink); }
.dash-addr .lines { font-size: 13px; color: var(--sub); line-height: 2.1; }
.dash-addr .lines i { color: var(--muted); width: 18px; font-size: 14px; }
.dash-addr .acts { display: flex; gap: 10px; margin-top: 16px; }
.dash-addr .acts form { margin: 0; }

/* notifications */
.dash-note { border: 0.5px solid var(--line); padding: 18px 20px; margin-bottom: 14px; }
.dash-note .msg { font-size: 14px; line-height: 1.9; display: flex; gap: 10px; }
.dash-note .msg i { color: var(--muted); font-size: 17px; margin-top: 2px; }
.dash-note .when { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; margin-top: 10px; display: flex; gap: 18px; flex-wrap: wrap; }

/* helper / intro text */
.dash-lead { font-size: 13px; color: var(--sub); line-height: 2; margin-bottom: 10px; }
.dash-hint { font-size: 12px; color: var(--muted); line-height: 1.9; }

/* address modal (minimal override of bootstrap modal) */
.dash-modal { background: rgba(28, 27, 24, 0.32); }
.dash-modal .modal-dialog { max-width: 460px; margin: 7vh auto; }
.dash-modal .modal-content {
  background: var(--cream);
  border: 0.5px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  font-family: "ModamWeb", serif;
  color: var(--ink);
}
.dash-modal .modal-header {
  border-bottom: 0.5px solid var(--line);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-modal .modal-title {
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ink);
  margin: 0;
}
.dash-modal .modal-body { padding: 24px; }
.dash-modal .close {
  color: var(--muted); opacity: 1; text-shadow: none; font-weight: 200;
  font-size: 26px; line-height: 1; margin: 0; padding: 0; float: none;
  background: none; border: none; cursor: pointer;
}
.dash-modal .close:hover { color: var(--ink); }
.dash-modal .form-group { margin-bottom: 16px; }
.dash-modal label { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 7px; display: block; }
.dash-modal .dash-btn { width: 100%; margin-top: 8px; }
.dash-modal .form-check, .dash-modal [type="checkbox"] { accent-color: var(--ink); }
.dash-modal textarea { height: 88px; min-height: 88px; }
.dash-modal .form-group:last-of-type label { display: inline; margin: 0; font-size: 13px; letter-spacing: 0.02em; color: var(--ink); }

/* ---------------------------------------------------------- *\
   Responsive
\* ---------------------------------------------------------- */
@media (max-width: 991px) {
  .dash { padding-top: 26px; }
  .dash .container { padding-left: 20px; padding-right: 20px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-rec { grid-template-columns: repeat(2, 1fr); }
  .dash-aside { margin-bottom: 34px; }
  .dash-head { flex-wrap: wrap; }
}

@media (max-width: 767px) {
  .dash .container { padding-left: 16px; padding-right: 16px; }
  .dash-stat { padding: 16px 14px; }
  .dash-stat b { font-size: 23px; }

  /* tables become stacked cards so nothing overflows off-screen */
  .dash-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dash-table, .dash-table tbody, .dash-table tr, .dash-table td { display: block; width: 100%; }
  .dash-table tr { border: 0.5px solid var(--line); padding: 4px 14px; margin-bottom: 14px; }
  .dash-table tbody tr:hover { background: transparent; }
  .dash-table td {
    border: none; border-bottom: 0.5px solid var(--line);
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 11px 0; text-align: left;
  }
  .dash-table td:last-child { border-bottom: none; }
  .dash-table td::before {
    content: attr(data-label);
    color: var(--muted); font-size: 11px; letter-spacing: 0.08em;
    white-space: nowrap;
  }
  .dash-table td:empty { display: none; }

  /* cart/order item rows wrap nicely */
  .dash-item { flex-wrap: wrap; }
  .dash-item .side { align-items: flex-start; flex-direction: row; gap: 22px; width: 100%; justify-content: space-between; }

  /* definition lists: stack label above value */
  .dash-deflist th, .dash-deflist td { display: block; width: 100%; padding: 4px; }
  .dash-deflist th { padding-top: 14px; }
  .dash-deflist td { padding-bottom: 14px; }
  .dash-deflist--summary th, .dash-deflist--summary td { display: table-cell; width: auto; }
}

@media (max-width: 575px) {
  .dash-rec { grid-template-columns: 1fr 1fr; gap: 14px; }
}
