@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Inter:wght@400;500;600;700&display=swap");
:root {
  --ink: #24202a;
  --muted: #77707e;
  --cream: #f7f2eb;
  --paper: #fffdf9;
  --rose: #8f4960;
  --rose2: #b87587;
  --gold: #c29b5b;
  --line: #e6dbd2;
  --green: #45765e;
  --red: #a84848;
  --shadow: 0 12px 35px #503a4b16;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font:
    14px/1.5 Inter,
    Arial,
    sans-serif;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 245px;
  background: #2d2430;
  color: #f7edf1;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.brand {
  font: 700 28px "Cormorant Garamond";
  color: #fff;
  text-decoration: none;
  padding: 0 12px 24px;
  border-bottom: 1px solid #ffffff18;
}
.brand span {
  color: var(--gold);
}
.brand small {
  display: block;
  font: 10px Inter;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #cdbdc8;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 20px;
  flex: 1;
}
nav a {
  color: #dfd2da;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}
nav a:hover {
  background: #ffffff10;
  color: #fff;
}
.logout {
  width: 100%;
  background: transparent;
  border: 1px solid #ffffff20;
  color: #d8c7d1;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}
main {
  margin-left: 245px;
  padding: 32px 40px;
  max-width: 1600px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
h1,
h2,
h3 {
  font-family: "Cormorant Garamond";
  margin: 0;
}
h1 {
  font-size: 38px;
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 20px;
  margin: 20px 0 8px;
}
header p {
  color: var(--muted);
  margin: 0;
}
.moon {
  font-size: 34px;
  color: var(--gold);
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-head,
.toolbar,
.receipt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}
.stats article {
  background: linear-gradient(135deg, #fffdf9, #f8ecee);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.stats small,
.transaction-row small,
.stock-row small,
.catalog-row small,
.permissions small {
  display: block;
  color: var(--muted);
}
.stats strong {
  display: block;
  font: 700 29px "Cormorant Garamond";
  margin-top: 7px;
}

.stats .stat-breakdown {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.alert-row,
.transaction-row,
.catalog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.transaction-row {
  text-decoration: none;
  color: inherit;
}
.transaction-row strong.sale,
.positive {
  color: var(--green);
}
.transaction-row strong.purchase,
.negative {
  color: var(--red);
}
.empty {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}
.button,
button {
  background: var(--rose);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
button:hover,
.button:hover {
  background: #753a4e;
}
.link {
  background: none;
  padding: 0;
  color: var(--rose);
  font-weight: 500;
}
.link.danger,
.danger {
  color: var(--red);
}
.flash {
  padding: 13px 16px;
  border-radius: 9px;
  margin-bottom: 20px;
}
.flash.success {
  background: #e5f3ea;
  color: #285f43;
}
.flash.error {
  background: #fae8e5;
  color: #873b36;
}
.flash ul {
  margin: 6px 0;
}
.table-wrap {
  overflow: auto;
  padding: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  background: #faf6f2;
}
th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td a {
  color: var(--rose);
}
.actions {
  display: flex;
  gap: 12px;
}
.actions form {
  display: inline;
}
.badge,
.tags span {
  display: inline-block;
  background: #f1e4e7;
  color: #733c50;
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 11px;
}
.form {
  max-width: 1100px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.form label {
  display: block;
  color: #514b53;
  font-weight: 600;
}
.form input,
.form select,
.form textarea,
.stock-row input,
.stock-row select,
.toolbar input {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d8ccc5;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  font: inherit;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid #c99aad;
  border-color: transparent;
}
.check,
.mini-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.check input,
.mini-check input {
  width: auto;
  margin: 0;
}
.recipe {
  background: #f8f1ee;
  border-radius: 10px;
  padding: 18px;
  margin-top: 20px;
}
.recipe p,
.hint {
  color: var(--muted);
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 22px;
}
.form-actions a {
  color: var(--muted);
}
.stock-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 150px 85px;
  gap: 10px;
  align-items: end;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.stock-row .mini-check {
  grid-column: 1/3;
}
.catalog {
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.catalog-row input.qty {
  width: 110px;
}
.checkout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #302631;
  color: #fff;
  border-radius: 10px;
  padding: 18px;
  margin-top: 18px;
}
.checkout strong {
  font: 700 26px "Cormorant Garamond";
}
.checkout small {
  display: block;
  color: #cdbfc8;
}
.inline-form {
  max-width: none;
  display: grid;
  grid-template-columns: 180px 180px 1fr auto;
  gap: 15px;
  align-items: end;
  margin-bottom: 20px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 15px 0;
}
.permissions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.permissions .check {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
}
.search {
  justify-content: flex-start;
}
.search input {
  width: 350px;
  margin: 0;
}
.receipt {
  max-width: 1000px;
}
.receipt-meta {
  background: #f8f1ee;
  padding: 15px;
  border-radius: 10px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #58394d, #211c25 65%);
}
.login-card {
  width: min(420px, 90vw);
  padding: 40px;
  background: #fffaf6;
  border: 1px solid #ffffff40;
  border-radius: 20px;
  box-shadow: 0 25px 70px #0005;
}
.login-card .sigil {
  text-align: center;
  font-size: 50px;
  color: var(--gold);
}
.login-card h1 {
  text-align: center;
  font-size: 48px;
  color: var(--rose);
}
.login-card > p {
  text-align: center;
  color: var(--muted);
  margin-top: -5px;
}
.login-card label {
  display: block;
  margin-top: 15px;
  font-weight: 600;
}
.login-card input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 6px;
}
.login-card .check {
  display: flex;
}
.login-card .check input {
  width: auto;
}
.login-card button {
  width: 100%;
  margin-top: 22px;
  padding: 13px;
}
@media (max-width: 900px) {
  aside {
    position: static;
    width: auto;
  }
  nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  main {
    margin: 0;
    padding: 22px;
  }
  .grid2,
  .cards,
  .stats {
    grid-template-columns: 1fr;
  }
  .form-grid,
  .permissions {
    grid-template-columns: 1fr;
  }
  .inline-form {
    grid-template-columns: 1fr;
  }
  .stock-row {
    grid-template-columns: 1fr;
  }
  .stock-row .mini-check {
    grid-column: auto;
  }
}
