/* ============================================================
   H CARE · Wellness & Retreat — luxury black & gold theme
   ============================================================ */

:root {
  --gold-100: #f6e9c2;
  --gold-300: #e5cd8a;
  --gold-500: #d9b95c;
  --gold-600: #b9963c;
  --gold-700: #a8842e;
  --gold-800: #8a6a22;
  --gold-grad: linear-gradient(135deg, #f6e9c2 0%, #d9b95c 40%, #a8842e 78%, #8a6a22 100%);
  --gold-grad-soft: linear-gradient(135deg, #e5cd8a 0%, #b9963c 100%);

  --bg: #070604;
  --panel: #121008;
  --panel-2: #1a160b;
  --line: rgba(217, 185, 92, 0.18);
  --line-soft: rgba(217, 185, 92, 0.10);
  --ink: #f2ecdd;
  --muted: #c3b697;
  --label: #e7dcbb;

  --ok: #7fe0a7;
  --ok-bg: rgba(38, 118, 74, 0.22);
  --bad: #f08f8f;
  --bad-bg: rgba(150, 40, 44, 0.22);
  --warn: #e7b04b;
  --warn-bg: rgba(140, 96, 20, 0.20);

  --font-display: "Cormorant Garamond", "Tajawal", Georgia, serif;
  --font-body: "Jost", "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

html { font-size: 15.5px; }

.hc-body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(217, 185, 92, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(217, 185, 92, 0.05), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  min-height: 100vh;
  letter-spacing: 0.01em;
}

::selection { background: rgba(217, 185, 92, 0.35); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0906; }
::-webkit-scrollbar-thumb { background: #2c2513; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #4a3d1e; }

a { color: var(--gold-300); text-decoration: none; }
a:hover { color: var(--gold-100); }

h1, h2, h3, h4, .hc-topbar-title { font-family: var(--font-display); }

.hc-shell { display: flex; min-height: 100vh; }

/* ---------- Logo ---------- */
.hc-logo {
  position: relative;
  display: inline-block;
  padding-top: 16px;
  line-height: 1;
}

.hc-logo-leaf {
  position: absolute;
  top: -2px;
  left: 46%;
  width: 26px;
  height: 26px;
  transform: rotate(8deg);
}

.hc-logo-word {
  font-family: var(--font-body);
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-size: 2rem;
  letter-spacing: 0.01em;
}

.hc-logo-word b { font-weight: 600; font-size: 1.15em; }
.hc-logo-word i { font-style: normal; font-weight: 300; }

.hc-logo-sub {
  color: var(--gold-500);
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  margin-top: 0.45rem;
  font-weight: 400;
}

/* ---------- Sidebar ---------- */
.hc-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0a0805 0%, #070604 100%);
  border-inline-end: 1px solid var(--line-soft);
  padding: 1.6rem 1.1rem;
  display: flex;
  flex-direction: column;
}

.hc-brand { text-decoration: none; display: block; }
.hc-brand-sub { display: none; }

.hc-sidebar .hc-nav { margin-top: 2.2rem; display: flex; flex-direction: column; gap: 0.15rem; }

.hc-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #d8cca9;
  text-decoration: none;
  padding: 0.65rem 0.9rem;
  border-radius: 4px;
  font-weight: 400;
  font-size: 0.94rem;
  letter-spacing: 0.05em;
  border-inline-start: 2px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hc-nav-link:hover { color: var(--gold-100); background: rgba(217, 185, 92, 0.05); }

.hc-nav-link.active {
  color: var(--gold-300);
  background: linear-gradient(90deg, rgba(217, 185, 92, 0.12), transparent 80%);
  border-inline-start-color: var(--gold-500);
}

.hc-nav-ico { width: 1.4rem; text-align: center; opacity: 0.85; filter: grayscale(0.4) sepia(0.4); }

.hc-nav-sep { height: 1px; background: var(--line-soft); margin: 0.9rem 0.3rem; }

.hc-nav-caret { margin-inline-start: auto; font-size: 0.7rem; opacity: 0.6; transition: transform 0.2s ease; }
.hc-nav-link[aria-expanded="true"] .hc-nav-caret { transform: rotate(180deg); }

.hc-nav-sub {
  display: block;
  color: #cfc2a0;
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  padding: 0.45rem 0.9rem;
  margin-inline-start: 2.1rem;
  border-inline-start: 1px solid var(--line-soft);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hc-nav-sub:hover { color: var(--gold-100); }

.hc-nav-sub.active {
  color: var(--gold-300);
  border-inline-start-color: var(--gold-500);
}

/* ---------- Topbar / main ---------- */
.hc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.hc-topbar {
  background: rgba(7, 6, 4, 0.85);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.8rem;
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(6px);
}

.hc-topbar-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--gold-100);
  letter-spacing: 0.02em;
}

.hc-topbar-actions { display: flex; align-items: center; gap: 0.7rem; }

.hc-user { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; }

.hc-brand-top .hc-logo-word { font-size: 1.35rem; }
.hc-brand-top .hc-logo-sub { display: none; }
.hc-brand-top .hc-logo { padding-top: 10px; }
.hc-brand-top .hc-logo-leaf { width: 18px; height: 18px; }

.hc-content { padding: 1.9rem 1.9rem; flex: 1; }

.hc-footer {
  padding: 0.85rem 1.9rem;
  font-size: 0.72rem;
  color: #6b6047;
  border-top: 1px solid var(--line-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Panels & stat cards ---------- */
.hc-card, .hc-stat {
  background: linear-gradient(160deg, var(--panel-2) 0%, var(--panel) 55%);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.hc-card { padding: 1.4rem 1.5rem; margin-bottom: 1.4rem; }

.hc-card h5, .hc-card h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--gold-100);
  font-size: 1.35rem;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hc-stat { padding: 1.15rem 1.3rem 1rem; height: 100%; position: relative; overflow: hidden; }

.hc-stat::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 18%;
  bottom: 18%;
  width: 2px;
  background: var(--gold-grad);
  opacity: 0.9;
}

.hc-stat .hc-stat-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hc-stat .hc-stat-label {
  color: var(--label);
  font-size: 0.73rem;
  font-weight: 500;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.hc-stat.stat-green::after { background: linear-gradient(180deg, #7fe0a7, #2b7a4d); }
.hc-stat.stat-amber::after { background: linear-gradient(180deg, #e7b04b, #8c6014); }
.hc-stat.stat-red::after { background: linear-gradient(180deg, #f08f8f, #8f2a2e); }
.hc-stat.stat-blue::after { background: var(--gold-grad); }

/* ---------- Forms ---------- */
.form-label {
  color: var(--label);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
}

.form-control, .form-select, .input-group-text {
  background-color: #0c0a06;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 300;
}

.form-control:focus, .form-select:focus {
  background-color: #0e0c07;
  border-color: var(--gold-600);
  color: var(--ink);
  box-shadow: 0 0 0 0.2rem rgba(217, 185, 92, 0.14);
}

.form-control::placeholder { color: #6b6047; }

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23d9b95c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

[dir="rtl"] .form-select {
  background-position: left 0.75rem center;
}

.form-select option { background: #14110a; color: var(--ink); }

.input-group-text { color: var(--muted); }

.form-check-input {
  background-color: #0c0a06;
  border-color: var(--line);
}

.form-check-input:checked { background-color: var(--gold-600); border-color: var(--gold-600); }

input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8) sepia(0.5); }

/* ---------- Buttons ---------- */
.btn { border-radius: 4px; letter-spacing: 0.06em; }

.btn-hc, .btn-primary {
  background: var(--gold-grad);
  border: none;
  color: #14100a;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(217, 185, 92, 0.22);
}

.btn-hc:hover, .btn-hc:focus, .btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #fdf3d4 0%, #e5cd8a 40%, #b9963c 80%);
  color: #0c0905;
  box-shadow: 0 8px 22px rgba(217, 185, 92, 0.32);
}

.btn-outline-secondary, .btn-outline-light {
  border-color: var(--line);
  color: var(--gold-300);
}

.btn-outline-secondary:hover, .btn-outline-light:hover {
  background: rgba(217, 185, 92, 0.12);
  border-color: var(--gold-600);
  color: var(--gold-100);
}

.btn-outline-danger { border-color: rgba(240, 143, 143, 0.4); color: var(--bad); }
.btn-outline-danger:hover { background: var(--bad-bg); border-color: var(--bad); color: #ffd9d9; }

.btn-outline-success { border-color: rgba(127, 224, 167, 0.4); color: var(--ok); }
.btn-outline-success:hover { background: var(--ok-bg); border-color: var(--ok); color: #dcffe9; }

.btn-outline-warning { border-color: rgba(231, 176, 75, 0.45); color: var(--warn); }
.btn-outline-warning:hover { background: var(--warn-bg); border-color: var(--warn); color: #ffe9c2; }

.btn-warning { background: var(--warn); border-color: var(--warn); color: #14100a; }

/* ---------- Tables ---------- */
.table { color: var(--ink); border-color: var(--line-soft); }

.table > thead th {
  color: var(--gold-500);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.table > :not(caption) > * > * {
  background: transparent;
  border-bottom-color: var(--line-soft);
  vertical-align: middle;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.table-hover > tbody > tr:hover > * { background: rgba(217, 185, 92, 0.05); color: var(--ink); }

.table-active > * { background: rgba(217, 185, 92, 0.08) !important; color: var(--ink); }

.font-monospace { font-family: Consolas, "Courier New", monospace; color: var(--gold-500); letter-spacing: 0.05em; }

.text-muted { color: var(--muted) !important; }
.text-success { color: var(--ok) !important; }
.text-danger { color: var(--bad) !important; }
.text-warning { color: var(--warn) !important; }

/* ---------- Pagination ---------- */
.page-link {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--gold-300);
}

.page-link:hover { background: rgba(217, 185, 92, 0.1); border-color: var(--line); color: var(--gold-100); }

.page-item.active .page-link {
  background: var(--gold-grad);
  border-color: var(--gold-600);
  color: #14100a;
  font-weight: 500;
}

/* ---------- Alerts ---------- */
.alert { border-radius: 4px; border: 1px solid; }
.alert-success { background: var(--ok-bg); border-color: rgba(127, 224, 167, 0.35); color: #c9f4db; }
.alert-danger { background: var(--bad-bg); border-color: rgba(240, 143, 143, 0.35); color: #ffd9d9; }
.alert .btn-close { filter: invert(1); }

/* ---------- Status badges ---------- */
.badge-status {
  font-size: 0.68rem;
  padding: 0.42em 0.9em;
  border-radius: 3px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid;
}

.badge-status.status-active { background: var(--ok-bg); color: var(--ok); border-color: rgba(127, 224, 167, 0.35); }
.badge-status.status-expired { background: var(--bad-bg); color: var(--bad); border-color: rgba(240, 143, 143, 0.35); }
.badge-status.status-suspended { background: var(--warn-bg); color: var(--warn); border-color: rgba(231, 176, 75, 0.4); }
.badge-status.status-none { background: rgba(120, 110, 90, 0.15); color: #9a8f74; border-color: rgba(154, 143, 116, 0.3); }

/* ---------- Avatars ---------- */
.hc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #1c1810;
  border: 1px solid var(--line);
}

.hc-avatar-lg {
  width: 116px;
  height: 116px;
  border-radius: 6px;
  object-fit: cover;
  background: #1c1810;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

/* ---------- Check-in screen ---------- */
.hc-scan-input {
  font-size: 1.5rem;
  padding: 0.85rem 1.1rem;
  letter-spacing: 0.12em;
  font-family: Consolas, monospace;
  color: var(--gold-100);
}

.hc-scan-result { min-height: 280px; transition: border-color 0.25s ease, box-shadow 0.25s ease; }

.hc-scan-photo {
  width: 132px;
  height: 132px;
  border-radius: 6px;
  object-fit: cover;
  background: #1c1810;
  border: 1px solid var(--line);
}

.hc-scan-ok { border-color: rgba(127, 224, 167, 0.6) !important; box-shadow: 0 0 0 1px rgba(127, 224, 167, 0.35), 0 14px 40px rgba(38, 118, 74, 0.25) !important; }
.hc-scan-bad { border-color: rgba(240, 143, 143, 0.6) !important; box-shadow: 0 0 0 1px rgba(240, 143, 143, 0.35), 0 14px 40px rgba(150, 40, 44, 0.25) !important; }
.hc-scan-warn { border-color: rgba(231, 176, 75, 0.65) !important; box-shadow: 0 0 0 1px rgba(231, 176, 75, 0.4), 0 14px 40px rgba(140, 96, 20, 0.25) !important; }

/* ---------- Membership card (screen + print) ---------- */
.member-card {
  width: 430px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(320px 180px at 88% -20%, rgba(217, 185, 92, 0.16), transparent 65%),
    radial-gradient(260px 160px at -10% 120%, rgba(217, 185, 92, 0.10), transparent 60%),
    linear-gradient(150deg, #14110a 0%, #0a0805 60%);
  border: 1px solid rgba(217, 185, 92, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  color: var(--ink);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.member-card .mc-head {
  padding: 0.9rem 1.2rem 0.6rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}

.member-card .mc-head .hc-logo-word { font-size: 1.3rem; }
.member-card .mc-head .hc-logo { padding-top: 12px; }
.member-card .mc-head .hc-logo-leaf { width: 19px; height: 19px; }
.member-card .mc-head .hc-logo-sub { font-size: 0.5rem; letter-spacing: 0.34em; margin-top: 0.3rem; }

.member-card .mc-type {
  color: var(--gold-600);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-top: 0.9rem;
}

.member-card .mc-body { display: flex; gap: 1.1rem; padding: 1.1rem 1.2rem; align-items: center; }

.member-card .mc-photo {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  background: #1c1810;
  border: 1px solid rgba(217, 185, 92, 0.5);
}

.member-card .mc-info { flex: 1; min-width: 0; }

.member-card .mc-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--gold-100);
  line-height: 1.15;
}

.member-card .mc-number {
  font-family: Consolas, monospace;
  color: var(--gold-500);
  letter-spacing: 0.16em;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.member-card .mc-meta { font-size: 0.72rem; color: var(--muted); margin-top: 0.35rem; letter-spacing: 0.04em; }

.member-card .mc-qr-tile {
  background: #ffffff;
  border-radius: 8px;
  padding: 6px;
  border: 1px solid rgba(217, 185, 92, 0.55);
  flex-shrink: 0;
}

.member-card .mc-qr { width: 88px; height: 88px; display: block; }

.member-card .mc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1.2rem;
  border-top: 1px solid var(--line-soft);
  background: rgba(217, 185, 92, 0.05);
  font-size: 0.6rem;
  color: var(--gold-600);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

@media print {
  body, .hc-body { background: #ffffff !important; }
  .hc-content { padding: 0 !important; }
  .member-card { box-shadow: none; margin: 20px; }
  .d-print-none { display: none !important; }
}

/* ---------- Simple bar chart (reports) ---------- */
.hc-bars { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding-top: 14px; }

.hc-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-800));
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  position: relative;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.hc-bar:hover { opacity: 1; }

.hc-bar .hc-bar-tip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  color: var(--gold-300);
  white-space: nowrap;
  margin-bottom: 3px;
}

/* ---------- POS (SPA sales) ---------- */
.hc-pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.7rem;
  max-height: 460px;
  overflow-y: auto;
}

.hc-pos-item {
  background: linear-gradient(160deg, #1a160b, #121008);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 0.85rem 0.8rem;
  text-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.hc-pos-item:hover {
  border-color: var(--gold-600);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.hc-pos-name { font-size: 0.9rem; font-weight: 400; line-height: 1.25; }

.hc-pos-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hc-pos-total { border-top: 1px solid var(--line); padding-top: 0.6rem; color: var(--gold-100); }

.hc-pos-img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line-soft);
}

.hc-pos-img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: #0c0a06;
  color: var(--gold-800);
}

/* ---------- Thermal receipt ---------- */
.hc-receipt {
  width: 302px; /* ~80mm thermal roll */
  background: #ffffff;
  color: #14100a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 16px 14px;
  border-radius: 4px;
}

.hc-receipt .rc-brand { text-align: center; margin-bottom: 6px; }
.hc-receipt .rc-logo { font-size: 18px; font-weight: 700; letter-spacing: 4px; }
.hc-receipt .rc-sub { font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: #6b6047; }

.hc-receipt .rc-line { border-top: 1px dashed #999; margin: 7px 0; }

.hc-receipt .rc-row { display: flex; justify-content: space-between; gap: 8px; }
.hc-receipt .rc-row > span:first-child { color: #666; }

.hc-receipt .rc-item { margin-bottom: 4px; }
.hc-receipt .rc-item-name { font-weight: 700; }
.hc-receipt .rc-item-nums { display: flex; justify-content: space-between; }

.hc-receipt .rc-total { font-size: 15px; font-weight: 700; margin-top: 3px; }
.hc-receipt .rc-total > span:first-child { color: #14100a; }

.hc-receipt .rc-foot { text-align: center; letter-spacing: 2px; text-transform: uppercase; font-size: 10px; }

/* Receipt popup */
.hc-receipt-dialog { max-width: 380px; }

.hc-receipt-modal {
  background: linear-gradient(160deg, var(--panel-2) 0%, var(--panel) 55%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hc-paid-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1rem;
  color: var(--ok);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.hc-paid-check {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ok-bg);
  border: 1px solid var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Print only the receipt (POS popup and invoice details).
   The receipt is copied into a body-level .hc-print-area before printing,
   because fixed-position modals render blank in print. */
.hc-print-area { display: none; }

@media print {
  body.hc-printing > *:not(.hc-print-area) { display: none !important; }
  body.hc-printing .hc-print-area { display: block !important; }
  body.hc-printing { background: #ffffff !important; overflow: visible !important; }
  .hc-print-area .hc-receipt { border-radius: 0; padding: 0 4px; width: 72mm; }
}

/* ---------- Invoice ---------- */
.hc-invoice {
  max-width: 560px;
  background: linear-gradient(160deg, var(--panel-2) 0%, var(--panel) 55%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.6rem 1.8rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.hc-invoice-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.hc-invoice-head .hc-logo-word { font-size: 1.6rem; }

.hc-invoice-meta { text-align: end; color: var(--muted); font-size: 0.82rem; padding-top: 0.6rem; }

.hc-invoice-no {
  font-family: Consolas, monospace;
  color: var(--gold-500);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.hc-invoice-info { font-size: 0.86rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.hc-invoice-info span { color: var(--muted); }

.hc-invoice-table { margin-bottom: 0.6rem; }

.hc-invoice-totals { display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-end; margin-top: 0.6rem; }
.hc-invoice-totals > div { display: flex; justify-content: space-between; width: 240px; font-size: 0.9rem; }
.hc-invoice-totals span { color: var(--muted); }

.hc-invoice-grand {
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
  margin-top: 0.3rem;
  font-size: 1.15rem !important;
}

.hc-invoice-grand b {
  font-family: var(--font-display);
  font-size: 1.5rem;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hc-invoice-foot {
  text-align: center;
  color: var(--gold-600);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border-top: 1px solid var(--line-soft);
  margin-top: 1.2rem;
  padding-top: 0.8rem;
}

@media print {
  .hc-invoice {
    box-shadow: none;
    border: none;
    max-width: 100%;
    background: #ffffff;
    color: #1a1508;
  }
  .hc-invoice .hc-invoice-info span, .hc-invoice .hc-invoice-meta, .hc-invoice-totals span { color: #6b6047; }
  .hc-invoice .table { color: #1a1508; }
  .hc-invoice .table > thead th { color: #8a6a22; }
  .hc-invoice-grand b, .hc-invoice-no { -webkit-text-fill-color: initial; background: none; color: #8a6a22; }
}

/* ---------- Login screen ---------- */
.hc-login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(700px 420px at 50% 8%, rgba(217, 185, 92, 0.10), transparent 65%),
    radial-gradient(900px 600px at 50% 115%, rgba(217, 185, 92, 0.06), transparent 60%),
    var(--bg);
}

.hc-login-frame {
  width: min(400px, 92vw);
  text-align: center;
  animation: hc-login-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hc-login-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hc-login-brand { display: inline-block; margin-bottom: 2.4rem; }
.hc-login-brand .hc-logo-word { font-size: 3rem; }
.hc-login-brand .hc-logo { padding-top: 26px; }
.hc-login-brand .hc-logo-leaf { width: 40px; height: 40px; top: -6px; }
.hc-login-brand .hc-logo-sub { font-size: 0.72rem; margin-top: 0.7rem; }

.hc-login-card {
  background: linear-gradient(160deg, var(--panel-2) 0%, var(--panel) 55%);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  padding: 2.2rem 2.1rem 2rem;
  text-align: start;
}

.hc-login-field { margin-bottom: 1.6rem; }

.hc-login-field label {
  display: block;
  color: var(--gold-300);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  margin-bottom: 0.4rem;
}

.hc-login-field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  padding: 0.45rem 0.1rem;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.25s ease;
}

.hc-login-field input:focus { border-bottom-color: var(--gold-500); }

.hc-login-field input:-webkit-autofill,
.hc-login-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #14110a inset;
  transition: background-color 9999s ease-in-out 0s;
}

.hc-login-error {
  color: var(--bad);
  background: var(--bad-bg);
  border: 1px solid rgba(240, 143, 143, 0.35);
  border-radius: 4px;
  font-size: 0.82rem;
  padding: 0.5rem 0.8rem;
  margin-bottom: 1.2rem;
}

.hc-login-btn {
  width: 100%;
  background: var(--gold-grad);
  border: none;
  border-radius: 4px;
  color: #14100a;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 0.8rem 1rem;
  margin-top: 0.4rem;
  box-shadow: 0 8px 24px rgba(217, 185, 92, 0.25);
  transition: box-shadow 0.25s ease, filter 0.25s ease;
}

.hc-login-btn:hover { filter: brightness(1.12); box-shadow: 0 10px 30px rgba(217, 185, 92, 0.38); }

.hc-login-foot { margin-top: 1.6rem; }

.hc-login-foot a {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.hc-login-foot a:hover { color: var(--gold-300); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hc-sidebar { width: 76px; padding: 1.2rem 0.6rem; }
  .hc-sidebar .hc-logo-word { font-size: 1.1rem; }
  .hc-sidebar .hc-logo-word i { display: none; }
  .hc-sidebar .hc-logo-sub { display: none; }
  .hc-sidebar .hc-logo-leaf { width: 15px; height: 15px; left: 30%; }
  .hc-nav-link { justify-content: center; padding: 0.65rem 0.4rem; }
  .hc-nav-label { display: none; }
  .hc-content { padding: 1.2rem 1rem; }
}
