:root{
  --orders-ink:#12161b;
  --orders-panel:#f5efe3;
  --orders-panel-soft:#fbf8f1;
  --orders-line:rgba(18,22,27,.1);
  --orders-line-strong:rgba(18,22,27,.18);
  --orders-green:#9be1a5;
  --orders-orange:#ffc18f;
}

.orders-page{
  padding:24px 0 56px;
}

.summary-tile{
  padding:18px;
  border:1px solid rgba(17,17,17,.08);
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,244,236,.86));
}

.summary-tile span{
  display:block;
  font-size:10px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
}

.summary-tile strong{
  display:block;
  margin-top:12px;
  font-family:"Cormorant Garamond", serif;
  font-size:34px;
  line-height:1;
}

.summary-tile small{
  display:block;
  margin-top:10px;
  color:var(--muted);
  line-height:1.6;
}

.orders-workspace-wrap{
  padding-top:8px;
}

.orders-workspace-wrap .shell-inner{
  width:min(1600px, calc(100vw - 36px));
}

.orders-app{
  display:grid;
  grid-template-columns:270px minmax(0, 1fr);
  gap:0;
  padding:10px;
  background:var(--orders-ink);
  border-radius:28px;
  border:1px solid rgba(17,17,17,.7);
  box-shadow:0 28px 72px rgba(17,17,17,.14);
}

.orders-sidebar{
  padding:22px 16px 16px;
  display:flex;
  flex-direction:column;
  color:rgba(255,255,255,.92);
}

.sidebar-brand{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:12px 12px 18px;
}

.sidebar-brand .brand-logo{
  width:34px;
  height:34px;
}

.sidebar-brand-mark{
  font-family:"Italiana", serif;
  font-size:36px;
  letter-spacing:.04em;
}

.sidebar-brand-sub{
  font-size:11px;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:rgba(255,255,255,.58);
}

.sidebar-nav{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.sidebar-link{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:15px 16px;
  border:none;
  border-radius:18px;
  background:transparent;
  color:rgba(255,255,255,.72);
  text-align:left;
  transition:transform .18s ease, color .18s ease, background .18s ease;
}

.sidebar-link:hover{
  transform:translateX(2px);
  color:var(--white);
}

.sidebar-link.active{
  background:linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,244,236,.94));
  color:var(--orders-ink);
}

.sidebar-icon{
  width:18px;
  height:18px;
  border-radius:6px;
  border:1.4px solid currentColor;
}

.sidebar-footer{
  margin-top:auto;
  padding:18px 12px 4px;
  border-top:1px solid rgba(255,255,255,.08);
}

.sidebar-note{
  margin:0 0 18px;
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.06);
}

.sidebar-note span{
  display:block;
  font-size:10px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(255,255,255,.54);
}

.sidebar-note strong{
  display:block;
  margin-top:10px;
  font-family:"Cormorant Garamond", serif;
  font-size:32px;
  line-height:1;
}

.sidebar-note small,
.sidebar-muted{
  color:rgba(255,255,255,.62);
}

.sidebar-note small{
  display:block;
  margin-top:10px;
  line-height:1.7;
}

.sidebar-muted{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.orders-stage{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 340px;
  gap:18px;
  padding:18px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(245,239,227,.98), rgba(239,232,221,.95));
}

.orders-board,
.order-detail-card{
  border:1px solid rgba(255,255,255,.68);
  background:rgba(247,242,233,.9);
}

.orders-board{
  border-radius:24px;
  padding:24px;
}

.order-detail-card{
  border-radius:24px;
  padding:0;
  display:grid;
  align-content:start;
  gap:0;
  overflow:hidden;
}

.board-topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

.board-topbar h2,
.detail-head h2,
.detail-customer h3{
  margin:0;
  font-weight:500;
}

.board-topbar h2{
  font-family:"Cormorant Garamond", serif;
  font-size:52px;
  line-height:.92;
  letter-spacing:.01em;
}

.detail-head h2{
  font-family:"Cormorant Garamond", serif;
}

.detail-customer h3{
  font-family:"DM Sans", sans-serif;
}

.board-subtitle{
  margin:10px 0 0;
  max-width:38rem;
  color:var(--muted);
  font-size:15px;
  line-height:1.7;
}

.board-profile{
  display:flex;
  align-items:center;
  gap:10px;
}

.icon-pill{
  width:54px;
  height:54px;
  border:1px solid var(--orders-line);
  border-radius:18px;
  background:rgba(255,255,255,.72);
  display:grid;
  place-items:center;
}

.icon-pill span{
  width:18px;
  height:18px;
  border:1.5px solid var(--orders-ink);
  border-radius:5px;
}

.board-filters{
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-top:28px;
  flex-wrap:wrap;
}

.orders-highlights{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-top:18px;
}

.order-highlight-card{
  padding:18px 18px 16px;
  border:1px solid rgba(18,22,27,.08);
  border-radius:20px;
  background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,240,227,.88));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.76);
}

.order-highlight-card span{
  display:block;
  font-size:10px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
}

.order-highlight-card strong{
  display:block;
  margin-top:12px;
  font-family:"Cormorant Garamond", serif;
  font-size:34px;
  line-height:.94;
  color:var(--orders-ink);
}

.order-highlight-card small{
  display:block;
  margin-top:8px;
  color:var(--muted);
  line-height:1.55;
}

.filter-left,
.filter-right{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.filter-control{
  display:block;
  position:relative;
}

.filter-control span{
  display:none;
}

.filter-control select{
  appearance:none;
  min-width:190px;
  padding:17px 50px 17px 18px;
  border:1px solid var(--orders-line);
  border-radius:18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,240,226,.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1.25L7 7.25L13 1.25' stroke='%23151B20' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center/14px 9px;
  color:var(--orders-ink);
  font-size:16px;
  font-weight:500;
  letter-spacing:.01em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72), 0 16px 30px rgba(21,27,32,.05);
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.filter-control select:hover{
  border-color:rgba(188,154,87,.34);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.84), 0 18px 34px rgba(21,27,32,.08);
}

.filter-control select:focus{
  outline:none;
  border-color:rgba(188,154,87,.58);
  box-shadow:0 0 0 4px rgba(188,154,87,.14), inset 0 1px 0 rgba(255,255,255,.9), 0 20px 36px rgba(21,27,32,.1);
  transform:translateY(-1px);
}

.sort-control select{
  min-width:220px;
}

.orders-table-shell{
  margin-top:22px;
}

.orders-table-head,
.order-row{
  display:grid;
  grid-template-columns:56px 1.05fr 1.55fr 1fr .9fr .7fr 40px;
  gap:18px;
  align-items:center;
}

.orders-table-head{
  padding:0 10px 16px;
  color:var(--orders-ink);
  font-size:15px;
  border-bottom:1px solid var(--orders-line);
}

.orders-table-toggle{
  width:30px;
  height:30px;
  border-radius:10px;
  background:var(--orders-ink);
  color:var(--white);
  display:grid;
  place-items:center;
  font-size:21px;
  line-height:1;
}

.orders-table-body{
  display:grid;
  gap:4px;
}

.order-row{
  width:100%;
  padding:18px 10px;
  border:none;
  border-radius:20px;
  background:transparent;
  text-align:left;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.order-row:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.46);
}

.order-row.is-active{
  background:rgba(255,255,255,.94);
  box-shadow:0 12px 24px rgba(17,17,17,.08);
}

.order-row.is-empty{
  grid-template-columns:1fr;
  justify-items:start;
  cursor:default;
}

.order-customer{
  display:flex;
  align-items:center;
  gap:12px;
}

.row-check{
  width:32px;
  height:32px;
  border-radius:11px;
  border:1.5px solid var(--orders-line-strong);
  display:grid;
  place-items:center;
  flex-shrink:0;
  background:transparent;
  color:transparent;
}

.row-check.is-checked{
  background:var(--orders-ink);
  border-color:var(--orders-ink);
  color:var(--white);
}

.customer-badge,
.detail-avatar{
  width:44px;
  height:44px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex-shrink:0;
  background:linear-gradient(135deg, var(--gold), #ead7a3);
  color:var(--orders-ink);
  font-size:13px;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.customer-badge.tone-2,
.detail-avatar.tone-2{
  background:linear-gradient(135deg, #f0b6c6, #f7dfc9);
}

.customer-badge.tone-3,
.detail-avatar.tone-3{
  background:linear-gradient(135deg, #d8cfbc, #efe3ce);
}

.customer-badge.tone-4,
.detail-avatar.tone-4{
  background:linear-gradient(135deg, #c89b7b, #ead2b9);
}

.detail-avatar{
  width:92px;
  height:92px;
  font-size:24px;
}

.customer-meta strong,
.detail-item strong:last-child,
.detail-total strong{
  display:block;
}

.row-menu{
  color:var(--orders-ink);
  font-size:24px;
  line-height:1;
  text-align:center;
  letter-spacing:.08em;
  opacity:.7;
}

.customer-meta small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:92px;
  padding:10px 14px;
  border-radius:12px;
  font-size:14px;
}

.status-pill.paid{
  background:#ffe27a;
  color:var(--orders-ink);
}

.status-pill.delivered{
  background:var(--orders-orange);
  color:var(--orders-ink);
}

.status-pill.shipped,
.status-pill.completed{
  background:rgba(155,225,165,.9);
  color:var(--orders-ink);
}

.status-pill.review,
.status-pill.packing{
  background:rgba(18,22,27,.08);
  color:var(--orders-ink);
}

.detail-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  padding:26px 24px 18px;
}

.detail-head h2{
  font-size:34px;
  line-height:1.04;
}

.detail-meta{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:12px;
  color:var(--muted);
}

.detail-close{
  width:46px;
  height:46px;
  border:none;
  border-radius:50%;
  background:rgba(17,17,17,.06);
  color:var(--orders-ink);
  font-size:32px;
  line-height:1;
}

.detail-customer{
  padding:34px 24px 28px;
  border-top:1px solid var(--orders-line);
  border-bottom:1px solid var(--orders-line);
  display:grid;
  justify-items:center;
  text-align:center;
}

.detail-customer h3{
  margin-top:16px;
  font-size:34px;
}

.detail-customer p{
  margin:6px 0 0;
  color:var(--muted);
}

.detail-actions{
  display:flex;
  gap:10px;
  margin-top:18px;
}

.detail-action{
  min-width:72px;
  padding:12px 14px;
  border:none;
  border-radius:999px;
  background:rgba(17,17,17,.06);
  color:var(--orders-ink);
}

.detail-section-head span,
.detail-item p,
.detail-total span{
  display:block;
  color:var(--muted);
}

.detail-section-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-bottom:10px;
  padding:0 24px;
}

.detail-section-head h4{
  margin:0;
  font-family:"DM Sans", sans-serif;
  font-size:20px;
  font-weight:500;
}

.detail-items{
  padding:22px 0 18px;
  border-bottom:1px solid var(--orders-line);
}

.detail-item-list{
  display:grid;
  gap:6px;
  padding:0 16px;
}

.detail-item{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  padding:10px 8px;
}

.detail-item-main{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.detail-thumb{
  width:72px;
  height:72px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, rgba(244,221,139,.7), rgba(255,255,255,.72));
  color:var(--orders-ink);
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  flex-shrink:0;
  overflow:hidden;
}

.detail-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.detail-item strong{
  font-size:15px;
  font-weight:500;
}

.detail-item p{
  margin:4px 0 0;
}

.detail-total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:22px 24px;
  border-bottom:1px solid var(--orders-line);
}

.detail-total strong{
  font-family:"DM Sans", sans-serif;
  font-size:24px;
  font-weight:500;
  line-height:1;
}

.detail-footer{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  padding:22px 24px 24px;
}

.detail-btn{
  border:none;
  border-radius:18px;
  padding:19px 18px;
  font-size:16px;
}

.detail-btn-dark{
  background:var(--orders-ink);
  color:var(--white);
}

.detail-btn-gold{
  background:linear-gradient(135deg, #f4dd8b, #e9c964);
  color:var(--orders-ink);
}

@media (max-width: 1180px){
  .orders-stage{
    grid-template-columns:1fr;
  }

  .orders-app{
    grid-template-columns:1fr;
  }
}

@media (max-width: 860px){
  .orders-page{
    padding-top:24px;
  }

  .orders-board,
  .order-detail-card{
    padding:22px;
  }

  .order-detail-card{
    padding:0;
  }

  .detail-footer{
    grid-template-columns:1fr;
  }

  .board-topbar,
  .board-filters,
  .filter-left,
  .filter-right,
  .detail-head,
  .detail-meta{
    flex-direction:column;
    align-items:flex-start;
  }

  .filter-left,
  .filter-right,
  .filter-control,
  .filter-control select,
  .sort-control select{
    width:100%;
  }

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

  .orders-table-head{
    display:none;
  }

  .order-row{
    grid-template-columns:1fr;
  }

  .detail-actions{
    width:100%;
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px){
  .orders-highlights{
    grid-template-columns:1fr;
  }
}
