:root {
  --navy: #0b1f3a;
  --deep: #071427;
  --cream: #f8f4ea;
  --gold: #ffd700;
  --muted: #99a8bc;
  --line: #ffffff14;
  --panel: #10243e;
  --green: #8dd8b0;
  --red: #ff9d99;
  --blue: #9cc9ff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--deep);
  color: var(--cream);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
a {
  color: var(--gold);
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff08;
  color: var(--cream);
  padding: 10px 16px;
  font-weight: 600;
}
button:hover {
  background: #ffffff12;
}
.primary {
  background: var(--gold);
  color: var(--deep);
  border-color: var(--gold);
}
.primary:hover {
  background: #ffec80;
}
.danger {
  color: var(--red);
  border-color: #ff9d993c;
}
.small {
  padding: 6px 11px;
  font-size: 14px;
}
.ghost {
  border: 0;
  background: none;
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 245px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  position: fixed;
  width: 245px;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 32px 18px 20px;
}
.brand {
  padding: 0 15px 30px;
}
.brand-word {
  font-family: Georgia, serif;
  font-size: 35px;
  letter-spacing: 5px;
  color: var(--gold);
}
.brand small {
  font-size: 11px;
  letter-spacing: 3px;
  display: block;
  color: var(--cream);
}
.nav-section {
  padding: 15px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.nav {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  margin-bottom: 4px;
  border: 0;
  font-size: 14px;
  background: transparent;
  padding: 11px 14px;
  font-weight: 500;
  color: #b6c2d2;
}
.nav.active {
  background: #ffd70015;
  color: var(--gold);
}
.nav svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.7;
}
.sidebar-foot {
  margin-top: auto;
  padding: 18px 12px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.crumb {
  color: var(--muted);
  font-size: 14px;
}
.crumb b {
  color: var(--cream);
  font-weight: 500;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.avatar {
  background: #ffd70020;
  color: var(--gold);
  width: 37px;
  height: 37px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.account {
  font-size: 14px;
  line-height: 1.3;
}
.account small {
  color: var(--muted);
  font-size: 12px;
}
.content {
  padding: 32px 38px 50px;
  max-width: 1700px;
  margin: auto;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
h1 {
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 8px;
}
h2 {
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  margin: 0;
}
h3 {
  margin: 0 0 15px;
  font-size: 17px;
}
p {
  margin: 8px 0 15px;
}
.muted {
  color: var(--muted);
}
.caption {
  font-size: 13px;
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  position: relative;
}
.stat label {
  color: #b6c2d2;
  font-size: 14px;
}
.stat strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 32px;
  margin: 10px 0 6px;
  letter-spacing: -1px;
}
.stat small {
  color: var(--muted);
  font-size: 12px;
}
.stat .stat-icon {
  position: absolute;
  right: 20px;
  top: 20px;
  color: var(--gold);
}
.stat.highlight {
  border-color: #8c7a4f;
  background: linear-gradient(130deg, #192e43, #13273d);
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr);
  gap: 24px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.panel-head {
  padding: 21px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}
.panel-body {
  padding: 24px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}
th {
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #07142735;
}
th,
td {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr.clickable:hover {
  background: #ffffff04;
  cursor: pointer;
}
td b {
  font-weight: 500;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.badge {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 12px;
  background: #ffffff0b;
  color: #c0ccdc;
  white-space: nowrap;
}
.badge.green {
  background: #8dd8b013;
  color: var(--green);
}
.badge.gold {
  background: #ffd70015;
  color: #f6db6b;
}
.badge.blue {
  background: #9cc9ff15;
  color: var(--blue);
}
.badge.red {
  background: #ff9d9915;
  color: var(--red);
}
.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty svg {
  display: block;
  margin: 0 auto 15px;
  color: #8c7a4f;
  width: 36px;
  height: 36px;
}
.empty strong {
  display: block;
  color: var(--cream);
  font-weight: 500;
  margin-bottom: 6px;
}
.empty button {
  margin-top: 20px;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar input {
  max-width: 340px;
}
.toolbar select {
  max-width: 230px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.field label {
  font-size: 14px;
  color: #c0ccdc;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  background: #091a30;
  border: 1px solid #ffffff20;
  color: var(--cream);
  border-radius: 7px;
  min-width: 0;
}
input::placeholder,
textarea::placeholder {
  color: #73869f;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2399a8bc'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
option {
  background: var(--navy);
}
textarea {
  resize: vertical;
  min-height: 85px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.full {
  grid-column: 1/-1;
}
.form-note {
  padding: 13px 16px;
  border-left: 2px solid var(--gold);
  background: #ffd70009;
  color: #d8cfa8;
  font-size: 14px;
  margin: 14px 0 20px;
}
.section-title {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin: 24px 0 15px;
}
.gold {
  color: var(--gold);
}
.red {
  color: var(--red);
}
.green-text {
  color: var(--green);
}
.right {
  text-align: right;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.product-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
}
.product-card img {
  width: 100%;
  height: 175px;
  object-fit: cover;
  background: #1a2e46;
}
.product-card .info {
  padding: 18px;
}
.product-card h3 {
  font-family: Georgia, serif;
  font-size: 21px;
  line-height: 1.25;
  min-height: 52px;
  margin: 8px 0;
}
.product-card .spec {
  font-size: 13px;
  color: var(--muted);
  min-height: 38px;
}
.product-card .price {
  margin: 15px 0;
  font-size: 16px;
  color: var(--gold);
}
.product-card .actions {
  justify-content: space-between;
}
.timeline-item {
  display: flex;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item:last-child {
  border: 0;
}
.timeline-icon {
  color: var(--gold);
  background: #ffd70010;
  border-radius: 9px;
  padding: 10px;
  height: 40px;
}
.timeline-item h3 {
  font-size: 14px;
  margin: 0 0 4px;
}
.welcome {
  position: relative;
  padding: 25px;
  background: linear-gradient(120deg, #16334b, #10243e);
  border: 1px solid #8c7a4f60;
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
}
.welcome:after {
  content: "T";
  position: absolute;
  right: 20px;
  top: -30px;
  font-family: Georgia, serif;
  font-size: 200px;
  line-height: 1;
  color: #ffd70009;
}
.welcome h2 {
  font-size: 26px;
  position: relative;
}
.welcome p {
  max-width: 500px;
  font-size: 14px;
  color: #b5c4d4;
  margin-bottom: 0;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-story {
  background:
    radial-gradient(ellipse at 20% 20%, #1c3d5a, transparent 70%), var(--navy);
  padding: 8vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #8c7a4f55;
}
.login-story .brand {
  padding: 0;
}
.login-story h1 {
  font-size: 60px;
  max-width: 500px;
  line-height: 1.12;
}
.login-story h1 em {
  color: var(--gold);
  font-weight: 400;
}
.login-story p {
  color: #b8c7d7;
  max-width: 400px;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-box {
  width: 100%;
  max-width: 370px;
}
.login-box h2 {
  font-size: 32px;
  margin-bottom: 12px;
}
.login-box form {
  margin-top: 32px;
}
.login-box .primary {
  width: 100%;
  margin-top: 10px;
}
.error {
  background: #ff9d9912;
  color: var(--red);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  margin: 12px 0;
}
.login-footer {
  margin-top: 28px;
  font-size: 12px;
  color: var(--muted);
}
.seal {
  width: 92px;
  height: 92px;
  border: 1px solid #8c7a4f;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 42px;
  margin-bottom: 30px;
}
.workflow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.work-column {
  background: #10243e70;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.work-column h3 {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.work-card {
  background: #142b46;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  font-size: 14px;
}
.work-card .code {
  color: var(--gold);
  font-size: 12px;
}
.work-card ul {
  padding-left: 16px;
  margin: 12px 0;
}
.work-card p {
  font-size: 13px;
  color: var(--muted);
}
dialog {
  background: var(--navy);
  color: var(--cream);
  border: 1px solid #8c7a4f90;
  border-radius: 14px;
  padding: 0;
  width: min(850px, 94vw);
  max-height: 90vh;
}
dialog::backdrop {
  background: #010b18cc;
  backdrop-filter: blur(5px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--navy);
  z-index: 1;
}
.modal-content {
  padding: 25px 28px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.order-line {
  display: grid;
  grid-template-columns: 1fr 85px 110px 34px;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}
.order-line .field {
  margin: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.detail-grid dl {
  margin: 0;
}
.detail-grid dt {
  font-size: 12px;
  color: var(--muted);
  margin-top: 13px;
}
.detail-grid dd {
  margin: 3px 0;
  font-size: 15px;
}
.money-box {
  background: #07142775;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 8px;
}
.money-row {
  display: flex;
  justify-content: space-between;
  margin: 7px 0;
  font-size: 14px;
}
.money-row.total {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
  font-size: 19px;
  color: var(--gold);
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.mobile-menu {
  display: none;
}
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  max-width: 420px;
  background: var(--cream);
  color: var(--deep);
  padding: 14px 22px;
  border-radius: 9px;
  box-shadow: 0 8px 30px #0005;
  z-index: 200;
  display: none;
  font-size: 14px;
}
#toast.show {
  display: block;
}
.invoice {
  background: white;
  color: #182333;
  max-width: 800px;
  margin: 20px auto;
  padding: 50px;
}
.invoice .brand-word {
  color: #0b1f3a;
}
.invoice th,
.invoice td {
  border-bottom: 1px solid #ddd;
}
.invoice th {
  color: #555;
  background: #f5f5f5;
}
.invoice .muted,
.invoice .caption {
  color: #666;
}
.invoice h1 {
  color: #0b1f3a;
}
.invoice .badge {
  color: #555;
}
.invoice .money-box {
  background: #f6f6f6;
  border-color: #ddd;
}
.invoice .money-row.total {
  color: #0b1f3a;
  border-color: #ddd;
}
.invoice-actions {
  text-align: center;
  padding: 20px;
}
.store-header {
  text-align: center;
  padding: 50px 20px 30px;
  border-bottom: 1px solid var(--line);
}
.store-main {
  max-width: 1250px;
  margin: auto;
  padding: 35px 24px;
}
.store-intro {
  text-align: center;
  margin-bottom: 35px;
}
.store-cart {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 10;
  box-shadow: 0 8px 30px #0008;
}
.spacer {
  height: 20px;
}
.nowrap {
  white-space: nowrap;
}
@media (min-width: 1500px) {
  .content {
    padding: 40px 55px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 210px 1fr;
  }
  .sidebar {
    width: 210px;
  }
  .content {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 27px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .workflow {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
    width: 245px;
    z-index: 50;
    box-shadow: 0 0 0 100vw #0008;
  }
  .sidebar.open {
    display: flex;
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    height: 70px;
    padding: 0 16px;
  }
  .crumb {
    display: none;
  }
  .account {
    display: none;
  }
  .top-actions {
    gap: 7px;
  }
  .content {
    padding: 24px 16px;
  }
  .heading {
    align-items: flex-start;
    gap: 12px;
  }
  .heading .primary {
    font-size: 13px;
    padding: 10px;
    white-space: nowrap;
  }
  h1 {
    font-size: 29px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat label {
    font-size: 12px;
  }
  .stat strong {
    font-size: 27px;
  }
  .stat .stat-icon {
    display: none;
  }
  .panel-head,
  .panel-body {
    padding: 18px;
  }
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    display: none;
  }
  .login-form {
    padding: 36px 24px;
    min-height: 100vh;
  }
  .login-box:before {
    content: "TATAME";
    display: block;
    font-family: Georgia, serif;
    font-size: 36px;
    letter-spacing: 5px;
    color: var(--gold);
    margin-bottom: 45px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .product-card img {
    height: 140px;
  }
  .product-card .info {
    padding: 13px;
  }
  .product-card h3 {
    font-size: 18px;
  }
  .product-card .spec {
    font-size: 12px;
  }
  .product-card .actions {
    align-items: flex-start;
    gap: 8px;
  }
  .workflow {
    grid-template-columns: 1fr;
  }
  .modal-head {
    padding: 18px;
  }
  .modal-content {
    padding: 20px 16px;
  }
  .order-line {
    grid-template-columns: 1fr 65px 80px 28px;
    gap: 5px;
  }
  .order-line label {
    font-size: 11px;
  }
  .order-line input,
  .order-line select {
    font-size: 13px;
    padding: 9px 5px;
  }
  .order-line select {
    padding-right: 17px;
  }
  .top-actions .small {
    font-size: 12px;
  }
  .invoice {
    padding: 24px 16px;
  }
  .invoice table {
    white-space: normal;
  }
  .invoice th,
  .invoice td {
    padding: 10px 6px;
  }
  #toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
  }
  .section-title {
    margin-top: 20px;
  }
}
@media print {
  body {
    background: white;
  }
  .invoice-actions,
  #toast {
    display: none !important;
  }
  .invoice {
    margin: 0;
    padding: 15px;
    max-width: none;
  }
  .invoice * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  @page {
    size: A4;
    margin: 16mm;
  }
}
