:root{
  --yellow:#FFC413;
  --yellow-soft:#ffd349;
  --yellow-deep:#e3ad00;

  --black:#0E1414;
  --black-2:#131a1a;
  --black-3:#1c2424;
  --black-4:#243030;

  --white:#ffffff;
  --bg:#f5f6f7;
  --surface:#ffffff;
  --surface-soft:#f8f9fa;
  --line:#dde2e6;
  --line-dark:#2b3434;

  --text:#111818;
  --text-soft:#5f6b6b;
  --text-invert:#f7f9f9;

  --success-bg:#e7f8ed;
  --success-text:#177245;
  --danger-bg:#fdeaea;
  --danger-text:#9f2525;
  --warning-bg:#fff6d8;
  --warning-text:#8b6a00;
  --info-bg:#e8f3ff;
  --info-text:#1f5b94;

  --radius-xs:10px;
  --radius-sm:14px;
  --radius-md:18px;
  --radius-lg:24px;
  --radius-xl:32px;

  --shadow-sm:0 8px 20px rgba(14,20,20,.06);
  --shadow-md:0 16px 40px rgba(14,20,20,.10);
  --shadow-lg:0 24px 70px rgba(14,20,20,.18);
}

*{
  box-sizing:border-box;
}

html,body{
  margin:0;
  padding:0;
  font-family:Inter,Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

body.modal-open{
  overflow:hidden;
}

a{
  text-decoration:none;
  color:inherit;
}

button,input,select{
  font:inherit;
}

/* =========================
   LOGIN
========================= */
.login-body{
  min-height:100vh;
  padding:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at top left, rgba(255,196,19,.12), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255,196,19,.08), transparent 22%),
    linear-gradient(135deg, #0e1414 0%, #121919 50%, #0e1414 100%);
}

.login-shell{
  width:100%;
  max-width:1220px;
  display:grid;
  grid-template-columns:1.1fr .85fr;
  gap:28px;
  align-items:stretch;
}

.login-brand-panel{
  position:relative;
  overflow:hidden;
  border-radius:var(--radius-xl);
  padding:44px;
  background:
    linear-gradient(160deg, rgba(255,196,19,.12) 0%, rgba(255,196,19,.03) 42%, rgba(255,255,255,.02) 100%),
    linear-gradient(180deg, #121919 0%, #0e1414 100%);
  border:1px solid rgba(255,196,19,.16);
  box-shadow:var(--shadow-lg);
  color:var(--text-invert);
}

.login-brand-panel::before{
  content:"";
  position:absolute;
  right:-60px;
  top:-60px;
  width:220px;
  height:220px;
  border-radius:50%;
  background:rgba(255,196,19,.08);
  filter:blur(4px);
}

.login-brand-panel::after{
  content:"";
  position:absolute;
  left:-80px;
  bottom:-80px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:rgba(255,196,19,.06);
}

.brand-badge{
  position:relative;
  z-index:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 14px;
  border-radius:999px;
  background:rgba(255,196,19,.12);
  border:1px solid rgba(255,196,19,.25);
  color:var(--yellow);
  font-size:12px;
  font-weight:800;
  letter-spacing:.09em;
  margin-bottom:18px;
}

.login-brand-panel h1{
  position:relative;
  z-index:2;
  margin:0 0 16px;
  font-size:46px;
  line-height:1.05;
  letter-spacing:-.04em;
  color:#fff;
  max-width:700px;
}

.login-brand-panel p{
  position:relative;
  z-index:2;
  margin:0;
  max-width:650px;
  color:rgba(255,255,255,.76);
  font-size:16px;
  line-height:1.75;
}

.brand-points{
  position:relative;
  z-index:2;
  display:grid;
  gap:14px;
  margin-top:34px;
  max-width:620px;
}

.brand-point{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:16px 18px;
  border-radius:var(--radius-md);
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
}

.brand-point strong{
  color:#fff;
  font-size:15px;
  font-weight:800;
}

.brand-point span{
  color:rgba(255,255,255,.72);
  font-size:14px;
  line-height:1.55;
}

.login-card{
  background:var(--surface);
  border-radius:28px;
  padding:38px 34px;
  box-shadow:var(--shadow-lg);
  border:1px solid #eceff1;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.login-card-top{
  margin-bottom:8px;
}

.mini-label{
  display:inline-flex;
  margin-bottom:10px;
  color:#7a6200;
  background:#fff3c6;
  border:1px solid #ffe08a;
  border-radius:999px;
  padding:7px 11px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
}

.login-card-top h2{
  margin:0 0 8px;
  font-size:34px;
  line-height:1.08;
  letter-spacing:-.03em;
  color:var(--black);
}

.login-card-top p{
  margin:0 0 22px;
  color:var(--text-soft);
  line-height:1.65;
}

.login-form label{
  display:block;
  margin:16px 0 8px;
  font-weight:700;
  color:var(--black);
}

.login-form input{
  width:100%;
  height:54px;
  border:1px solid #d7dfe3;
  border-radius:var(--radius-sm);
  padding:0 16px;
  background:#fff;
  color:var(--black);
  outline:none;
  transition:.2s ease;
}

.login-form input::placeholder{
  color:#98a3a3;
}

.login-form input:focus{
  border-color:var(--yellow);
  box-shadow:0 0 0 4px rgba(255,196,19,.20);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:46px;
  padding:0 18px;
  border:0;
  border-radius:14px;
  cursor:pointer;
  font-weight:800;
  transition:.2s ease;
  white-space:nowrap;
}

.btn-primary{
  background:var(--yellow);
  color:var(--black);
}

.btn-primary:hover{
  background:var(--yellow-soft);
  transform:translateY(-1px);
}

.btn-dark{
  background:var(--black);
  color:#fff;
}

.btn-dark:hover{
  background:#182020;
}

.btn-light{
  background:#f0f2f3;
  color:var(--black);
}

.btn-light:hover{
  background:#e7ebed;
}

.btn-full{
  width:100%;
  margin-top:22px;
}

/* =========================
   PANEL TOPBAR
========================= */
.panel-body{
  background:linear-gradient(180deg,#f3f5f6 0%, #f8f9fa 100%);
}

.panel-topbar{
  position:sticky;
  top:0;
  z-index:30;
  background:linear-gradient(180deg, #0e1414 0%, #121919 100%);
  border-bottom:1px solid rgba(255,196,19,.12);
  box-shadow:0 10px 30px rgba(14,20,20,.08);
}

.panel-topbar-inner{
  max-width:1680px;
  margin:0 auto;
  padding:22px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.topbar-left{
  display:flex;
  align-items:center;
  gap:18px;
}

.brand-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:14px;
  background:rgba(255,196,19,.14);
  border:1px solid rgba(255,196,19,.24);
  color:var(--yellow);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
}

.topbar-left h1{
  margin:0;
  color:#fff;
  font-size:30px;
  line-height:1.1;
  letter-spacing:-.03em;
}

.topbar-left p{
  margin:6px 0 0;
  color:rgba(255,255,255,.68);
  font-size:14px;
}

/* =========================
   CONTAINER / CARDS
========================= */
.panel-container{
  max-width:1680px;
  margin:26px auto 42px;
  padding:0 24px;
}

.panel-card{
  background:var(--surface);
  border:1px solid #e7ebee;
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-md);
  padding:22px;
  margin-bottom:18px;
}

.card-head h2,
.table-head h2{
  margin:4px 0 0;
  font-size:24px;
  line-height:1.15;
  letter-spacing:-.02em;
  color:var(--black);
}

.card-head p{
  margin:8px 0 0;
  color:var(--text-soft);
  line-height:1.65;
}

.upload-card{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.upload-form{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.upload-form input[type=file]{
  flex:1 1 340px;
  min-height:50px;
  border:1px dashed #cbd4d9;
  border-radius:14px;
  background:#fafbfc;
  padding:12px 14px;
  color:var(--black);
}

/* =========================
   STATS
========================= */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(140px,1fr));
  gap:14px;
  margin-bottom:18px;
}

.stat-card{
  position:relative;
  overflow:hidden;
  background:linear-gradient(180deg,#ffffff 0%, #fbfcfc 100%);
  border:1px solid #e7ebee;
  border-radius:20px;
  padding:18px;
  box-shadow:var(--shadow-sm);
}

.stat-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:4px;
  background:var(--yellow);
}

.stat-card span{
  display:block;
  color:var(--text-soft);
  font-size:13px;
  margin-bottom:10px;
}

.stat-card strong{
  display:block;
  color:var(--black);
  font-size:34px;
  line-height:1;
  letter-spacing:-.03em;
}

/* =========================
   FILTERS
========================= */
.filters{
  display:grid;
  grid-template-columns:180px 200px 1fr auto;
  gap:14px;
  align-items:end;
}

.filter-group{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.filter-group label{
  font-size:13px;
  font-weight:700;
  color:var(--black-4);
}

.filter-group input,
.filter-group select{
  height:48px;
  border:1px solid #d7dfe3;
  border-radius:14px;
  padding:0 14px;
  background:#fff;
  color:var(--black);
  outline:none;
  transition:.2s ease;
}

.filter-group input:focus,
.filter-group select:focus{
  border-color:var(--yellow);
  box-shadow:0 0 0 4px rgba(255,196,19,.18);
}

.filter-actions{
  display:flex;
  gap:10px;
  align-items:end;
}

/* =========================
   TABLE
========================= */
.table-card{
  padding:0;
  overflow:hidden;
}

.table-head{
  padding:22px 22px 0;
}

.table-wrap{
  overflow:auto;
  padding:18px 22px 22px;
}

.orders-table{
  width:100%;
  min-width:1320px;
  border-collapse:separate;
  border-spacing:0;
}

.orders-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:var(--black);
  color:#fff;
  text-align:left;
  padding:16px 14px;
  font-size:13px;
  font-weight:800;
  border-bottom:0;
  white-space:nowrap;
}

.orders-table thead th:first-child{
  border-top-left-radius:16px;
}

.orders-table thead th:last-child{
  border-top-right-radius:16px;
}

.orders-table tbody td{
  padding:16px 14px;
  border-bottom:1px solid #edf1f4;
  vertical-align:top;
  background:#fff;
  font-size:14px;
  color:var(--text);
}

.orders-table tbody tr:nth-child(even) td{
  background:#fcfcfd;
}

.orders-table tbody tr:hover td{
  background:#fffbea;
}

.order-no{
  font-weight:800;
  color:var(--black);
}

.customer-cell{
  font-weight:700;
  color:var(--black);
}

.product-cell{
  min-width:280px;
  color:var(--black);
}

.nowrap{
  white-space:nowrap;
}

.center{
  text-align:center;
}

.empty-state{
  text-align:center;
  color:#718080;
  padding:42px 20px !important;
}

.status-form select{
  min-width:170px;
  height:44px;
  border:1px solid #d7dfe3;
  border-radius:14px;
  padding:0 14px;
  background:#fff;
  color:var(--black);
  outline:none;
}

.status-form select:focus{
  border-color:var(--yellow);
  box-shadow:0 0 0 4px rgba(255,196,19,.18);
}

.btn-detail{
  height:38px;
  padding:0 14px;
  border-radius:12px;
  background:var(--yellow);
  color:var(--black);
  font-size:13px;
  font-weight:800;
}

.btn-detail:hover{
  background:var(--yellow-soft);
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:7px 12px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.badge-success{
  background:#e7f8ed;
  color:#177245;
}

.badge-warning{
  background:#fff6d8;
  color:#8b6a00;
}

.badge-info{
  background:#e8f3ff;
  color:#1f5b94;
}

.badge-muted{
  background:#eff2f4;
  color:#556363;
}

/* =========================
   ALERTS
========================= */
.alert{
  padding:14px 16px;
  border-radius:16px;
  margin-bottom:16px;
  border:1px solid transparent;
  font-weight:600;
}

.alert-success{
  background:var(--success-bg);
  color:var(--success-text);
  border-color:#ccefd7;
}

.alert-error{
  background:var(--danger-bg);
  color:var(--danger-text);
  border-color:#f7c9c9;
}

/* =========================
   MODAL
========================= */
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(14,20,20,.72);
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:200;
}

.modal-backdrop.active{
  display:flex;
}

.modal-box{
  width:min(980px,100%);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border-radius:28px;
  box-shadow:0 30px 90px rgba(0,0,0,.30);
  padding:26px;
  border:1px solid #eceff1;
}

.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}

.modal-head h3{
  margin:4px 0 0;
  font-size:28px;
  line-height:1.1;
  letter-spacing:-.03em;
  color:var(--black);
}

.modal-close{
  width:42px;
  height:42px;
  border:0;
  border-radius:12px;
  background:#f0f3f5;
  color:var(--black);
  font-size:28px;
  cursor:pointer;
  transition:.2s ease;
}

.modal-close:hover{
  background:#e7ebef;
}

.modal-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.detail-item,
.detail-block{
  background:#fafbfc;
  border:1px solid #e7ebef;
  border-radius:18px;
  padding:16px;
}

.detail-item span,
.detail-block span{
  display:block;
  font-size:11px;
  font-weight:800;
  color:#7a6200;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:10px;
}

.detail-item strong{
  font-size:16px;
  line-height:1.45;
  color:var(--black);
}

.detail-block{
  margin-bottom:14px;
}

.detail-block strong{
  display:block;
  color:var(--black);
  font-size:15px;
  line-height:1.6;
}

.detail-block p{
  margin:0;
  font-size:15px;
  line-height:1.7;
  color:var(--black);
  white-space:pre-wrap;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width:1200px){
  .stats-grid{
    grid-template-columns:repeat(4,minmax(140px,1fr));
  }

  .filters{
    grid-template-columns:1fr 1fr;
  }

  .filter-search{
    grid-column:1 / -1;
  }
}

@media (max-width:980px){
  .login-shell{
    grid-template-columns:1fr;
  }

  .login-brand-panel{
    display:none;
  }

  .panel-topbar-inner{
    flex-direction:column;
    align-items:flex-start;
  }

  .stats-grid{
    grid-template-columns:repeat(2,minmax(140px,1fr));
  }

  .modal-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
  .login-body{
    padding:16px;
  }

  .login-card{
    padding:24px 20px;
    border-radius:22px;
  }

  .login-card-top h2{
    font-size:28px;
  }

  .panel-container{
    padding:0 14px;
  }

  .panel-card{
    padding:16px;
    border-radius:18px;
  }

  .table-wrap{
    padding:14px;
  }

  .filters{
    grid-template-columns:1fr;
  }

  .filter-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .stats-grid{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .topbar-left h1{
    font-size:24px;
  }

  .modal-box{
    padding:18px;
    border-radius:18px;
  }

  .modal-head h3{
    font-size:22px;
  }
}