/* UI contrast tune (không đổi layout/chức năng) */
:root{
  /* Surfaces */
  --bg:#f2f4f7;
  --card:#ffffff;

  /* Text */
  --text:#101828;
  --muted:#344054;

  /* Lines */
  --border:#d0d5dd;

  /* Brand */
  --primary:#101828;
  --accent:#2563eb;
  --accent2:#7c3aed;

  /* States */
  --success:#d6f5dd;
  --error:#ffe0e0;

  /* Layout */
  --content-max:100%;
  --gutter:clamp(12px, 2vw, 20px);
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--text);background:var(--bg)}
a{color:inherit;text-decoration:none}

/* clickable text link (Liên kết bấm được) */
a.link{ text-decoration:underline; }
a.link:hover{ opacity:0.85; }

/* Layout */
.container, .container.wide{max-width:var(--content-max);margin:0 auto;padding:18px var(--gutter);width:100%}

/* App shell + Sidebar (Khung app + Thanh bên) */
.app-shell{display:flex;min-height:100vh;width:100%}
.app-main{flex:1;min-width:0;display:flex;flex-direction:column}
.app-content{flex:1;min-width:0}

/* Header inside main */
.app-header{height:56px;display:flex;align-items:center;gap:10px;justify-content:space-between;padding:10px var(--gutter);border-bottom:1px solid var(--border);background:#fff;position:sticky;top:0;z-index:40}
.header-spacer{flex:1}
.header-user{display:flex;align-items:center;gap:10px}
.icon-btn.sidebar-mobile-open{display:none !important}

/* Overlay for mobile drawer */
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:900}

/* Icon button */
.icon-btn{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:10px;background:#fff;cursor:pointer}
.icon-btn:hover{background:#f9fafb}
.icon-btn svg{width:18px;height:18px;display:block}

/* Focus ring (tương phản rõ, dễ nhìn) */
:where(a, button, input, select, textarea, .icon-btn, .btn, .nav-item):focus-visible{
  outline:3px solid rgba(37, 99, 235, 0.35);
  outline-offset:2px;
}

/* Sidebar */
.sidebar{width:240px;flex:0 0 auto;background:#fff;border-right:1px solid var(--border);position:sticky;top:0;height:100vh;display:flex;flex-direction:column;z-index:60}
body.sidebar-collapsed .sidebar{width:72px}

.sidebar-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:12px 10px;border-bottom:1px solid var(--border)}

/* Brand: 2 dòng (Logo -> Ads Analytics), ẩn subtitle */
.sidebar-brand{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
.brand-mark{width:36px;height:36px;border-radius:12px;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900;letter-spacing:.4px;flex:0 0 auto}
.brand-text{display:flex;flex-direction:column;gap:0;min-width:0}
.brand-text .brand-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.1}
.sidebar-brand .brand-sub{display:none}
body.sidebar-collapsed .brand-text{display:none}

/* Khi thu gọn: logo nhỏ lại */
body.sidebar-collapsed .sidebar-top{align-items:center}
body.sidebar-collapsed .sidebar-brand{align-items:center;gap:0}
body.sidebar-collapsed .brand-mark{width:30px;height:30px;border-radius:10px;font-size:14px}

/* Toggle arrow rotates when collapsed */
.sidebar-toggle svg{transition:transform .15s ease}
body.sidebar-collapsed .sidebar-toggle svg{transform:rotate(180deg)}

.sidebar-nav{padding:8px 0;overflow:auto;flex:1}
.nav-item{display:flex;align-items:center;gap:10px;padding:10px 12px;margin:4px 8px;border-radius:12px;border:1px solid transparent;background:transparent}
a.nav-item{text-decoration:none}
.nav-item:hover{background:#f9fafb;border-color:#eaecf0}
.nav-item.active{border-color:rgba(37,99,235,0.28);background:rgba(37,99,235,0.08)}
.nav-item svg{width:18px;height:18px;display:block;flex:0 0 18px;max-width:18px;max-height:18px}
.nav-label{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.sidebar-collapsed .nav-label{display:none}
body.sidebar-collapsed .nav-item{justify-content:center;padding:10px 0}
body.sidebar-collapsed .nav-item svg{margin:0}

/* Sidebar bottom */
.sidebar-bottom{padding:10px 10px 12px;border-top:1px solid var(--border)}
.sidebar-user{display:flex;align-items:center;gap:10px;margin:6px 8px;padding:10px 10px;border:1px solid var(--border);border-radius:14px;background:#fff}
.avatar{width:32px;height:32px;border-radius:12px;background:#f9fafb;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-weight:900;flex:0 0 auto}
.user-meta{min-width:0}
.user-name{font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-role{font-size:12px;color:var(--muted)}
body.sidebar-collapsed .user-meta{display:none}

.logout-form{margin-top:8px}
button.nav-item{cursor:pointer;width:calc(100% - 16px);text-align:left;font:inherit}
.nav-logout{background:#fff}
body.sidebar-collapsed button.nav-item{width:auto}

/* Mobile: sidebar as drawer */
@media (max-width: 640px){
  .sidebar{position:fixed;left:0;top:0;transform:translateX(-105%);transition:transform .18s ease;width:280px;z-index:1000}
  body.sidebar-open .sidebar{transform:translateX(0)}
  body.sidebar-open .sidebar-overlay{display:block}

  .icon-btn.sidebar-mobile-open{display:inline-flex !important}
  .app-header{z-index:80}

  /* On mobile, always show labels to avoid confusion */
  body.sidebar-collapsed .brand-text{display:flex}
  body.sidebar-collapsed .nav-label{display:inline}
  body.sidebar-collapsed .nav-item{justify-content:flex-start;padding:10px 12px}
  body.sidebar-collapsed .sidebar{width:280px}
  body.sidebar-collapsed button.nav-item{width:calc(100% - 16px)}
}

.topbar{background:#fff;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:50}
.topbar:after{content:"";display:block;height:2px;background:linear-gradient(90deg,var(--accent),var(--accent2));opacity:.9}
.topbar-inner{max-width:1400px;margin:0 auto;padding:10px 18px;display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.brand{display:flex;flex-direction:column;gap:2px}
.brand-title{font-weight:800;letter-spacing:.2px}
.brand-sub{font-size:12px;color:var(--muted)}

.nav{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.nav a{padding:8px 10px;border-radius:10px;border:1px solid transparent}
.nav a:hover{background:#f9fafb;border-color:#eaecf0}
.nav a.active{border-color:rgba(37,99,235,0.28);background:rgba(37,99,235,0.08)}

.userbox{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.username{font-size:13px;color:var(--muted)}

/* Subtle data grid in main only */
main.container{position:relative}
main.container:before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(to right, rgba(17,17,17,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17,17,17,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  opacity:.55;
}
main.container > *{position:relative}

.footer{padding:16px 0;color:var(--muted);font-size:13px;border-top:1px solid var(--border);background:#fff}

/* Components */
.card{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:14px;margin:12px 0;box-shadow:0 1px 2px rgba(16,24,40,0.04)}
/* Auth layout */
.auth-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:36px var(--gutter)}
.auth-card{
  width:min(1040px, calc(100vw - 2*var(--gutter)));
  margin:0;
  padding:44px 48px;
  border-radius:26px;
  box-shadow:0 14px 42px rgba(17,17,17,0.08);
}

/* Login page */
.login-grid{display:grid;grid-template-columns:1fr 460px;gap:56px;align-items:center}
.login-left h1{margin:0 0 10px 0;font-size:40px;letter-spacing:-0.4px}
.login-sub{color:var(--text);font-size:13px}
.login-right{min-width:0}
.login-form{display:flex;flex-direction:column;gap:12px}
.login-form input{width:100%;padding:12px 12px;border-radius:8px}
.login-note{margin-top:4px;color:var(--muted);font-size:12px;text-align:center}
.login-actions{display:flex;justify-content:flex-end;margin-top:6px}
.btn.btn-login{
  background:#0b57d0;
  border-color:#0b57d0;
  color:#fff;
  padding:10px 22px;
  border-radius:999px;
  font-weight:700;
}
.btn.btn-login:hover{filter:brightness(1.03)}

@media (max-width: 980px){
  .auth-card{padding:28px 24px}
  .login-grid{grid-template-columns:1fr;gap:22px}
  .login-left h1{font-size:34px}
}

@media (max-width: 520px){
  .auth-shell{padding:18px var(--gutter)}
  .auth-card{width:calc(100vw - 2*var(--gutter))}
  .login-actions{justify-content:stretch}
  .btn.btn-login{width:100%}
}

.page-head{padding:12px 0 2px 0}
h1{margin:0 0 6px 0;font-size:22px}
h2{margin:0 0 10px 0;font-size:18px}
.muted{color:var(--muted);font-size:13px}
.hint{color:var(--muted);font-size:12px;margin-top:8px}

.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row.space-between{justify-content:space-between}

label{font-size:13px;color:var(--muted)}
input,select,textarea{padding:10px 10px;border:1px solid var(--border);border-radius:10px;font-size:14px;background:#fff}
textarea{resize:vertical}

input:focus,select:focus,textarea:focus{
  border-color: rgba(37,99,235,0.55);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  outline:none;
}

.btn{padding:9px 12px;border-radius:10px;border:1px solid var(--border);background:#fff;cursor:pointer;font-size:14px}
.btn:hover{background:#f9fafb}
.btn-primary{background:var(--primary);color:#fff;border-color:var(--primary)}
.btn-light{background:#fff}

.btn-primary:hover{filter:brightness(1.03)}

.alert{padding:10px 12px;border-radius:10px;margin:10px 0;border:1px solid var(--border);background:#fff}
.alert.success{background:var(--success)}
.alert.error{background:var(--error)}
.alert.warn{background:#fff7ed;border-color:#fed7aa}

.filters{background:#fff;border:1px solid var(--border);border-radius:14px;padding:12px;margin:12px 0}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}

.table-wrap{overflow:auto}
.table{width:100%;border-collapse:collapse;background:#fff}
.table th,.table td{padding:10px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top;font-size:14px}
.table th{font-size:13px;color:var(--muted);background:#f9fafb}
.table .right{text-align:right}

/* Zebra + hover để đọc số liệu rõ hơn */
.table tbody tr:nth-child(even){background:#fcfcfd}
.table tbody tr:hover{background:#f9fafb}

.cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;align-items:stretch}
.kpi{padding:12px;min-width:0}
.kpi-title{color:var(--muted);font-size:12px}
.kpi-value{font-weight:800;font-size:18px;margin-top:6px}



.row-green{background:#e8f5e9}
.row-orange{background:#fff3e0}
.row-red{background:#ffebee}

.badge{display:inline-block;padding:3px 8px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid var(--border);background:#f9fafb}
.badge.green{background:var(--success)}
.badge.orange{background:#fff3cd}
.badge.red{background:var(--error)}
.badge.na{background:#eee}

#chart{width:100%;height:360px;display:block}

@media (max-width: 980px){
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid,.grid3{grid-template-columns:1fr}
  .topbar-inner{flex-direction:column;align-items:flex-start}
  #chart{height:320px}
}


@media (max-width: 520px){
  .cards{grid-template-columns:1fr}
}
/* ===== KPI gradient + alignment hard override (fix not showing gradient) ===== */
.cards > .card.kpi{
  /* default gradient (will be overridden per nth-child) */
  background: linear-gradient(135deg,#6ee2f5,#6454f0) !important;
  color:#fff !important;
  border-color: rgba(255,255,255,.22) !important;
}
.cards > .card.kpi .kpi-title{color:rgba(255,255,255,.86) !important}
.cards > .card.kpi .kpi-value{color:#fff !important}

/* 5 gradients theo thứ tự 5 card */
.cards > .card.kpi:nth-child(1){background:linear-gradient(135deg,#ffcf18,#ff8818) !important}
.cards > .card.kpi:nth-child(2){background:linear-gradient(135deg,#6ee2f5,#6454f0) !important}
.cards > .card.kpi:nth-child(3){background:linear-gradient(135deg,#a0d6fe,#0c96fe) !important}
.cards > .card.kpi:nth-child(4){background:linear-gradient(135deg,#abe349,#569e20) !important}
.cards > .card.kpi:nth-child(5){background:linear-gradient(135deg,#cb9ef6,#a92173) !important}

/* căn phải chữ trong KPI */
.cards > .card.kpi .kpi-title,
.cards > .card.kpi .kpi-value{
  text-align:right !important;
}

/* tránh số bị tràn */
.cards > .card.kpi .kpi-value{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
/* ===== Chart legend top-right + summary (dashboard pie) ===== */
.chart-legend.legend-topright{
  margin-top:0 !important;
  margin-left:auto !important;
  display:flex !important;
  flex-direction:column !important;
  flex-wrap:nowrap !important;
  align-items:flex-start !important;
  gap:6px !important;
  padding:8px 10px !important;
  border:1px solid var(--border) !important;
  border-radius:12px !important;
  background:#fff !important;
  max-width:420px;
}
.chart-legend.legend-topright .legend-item{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  white-space:nowrap;
  line-height:1.35;
}
.chart-legend.legend-topright .legend-swatch{
  width:10px !important;
  height:10px !important;
  border-radius:999px !important;
}

/* Ẩn thanh nút chọn chế độ biểu đồ (chart toolbar) */
.chart-toolbar{
  display:none !important;
}

.chart-summary{
  margin-top:8px;
  text-align:center;
  font-weight:800;
  font-size:13px;
  color:#111;
}

@media (max-width: 980px){
  .chart-legend.legend-topright{
    max-width:100%;
    white-space:normal;
  }
  .chart-legend.legend-topright .legend-item{
    white-space:normal;
  }
}

/* ===== Line chart legend (bottom-center) ===== */
.chart-legend{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:22px;
  flex-wrap:wrap;
  margin-top:10px;
  color:#111;
  font-size:13px;
}
.chart-legend .legend-item{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.chart-legend .legend-swatch{
  width:22px;
  height:2px;
  border-radius:2px;
}

/* ===== Chart tooltip (Hover) - match reference screenshot ===== */
.chart-tooltip{
  position:fixed;
  left:0;
  top:0;
  z-index:2000;
  pointer-events:none;
  display:none;
  padding:8px 10px;
  border:1px solid #3366cc;
  border-radius:2px;
  background:#fff;
  color:#111;
  box-shadow:none;
  font-size:12px;
  line-height:1.35;
  max-width:320px;
}
.chart-tooltip .tt-title{
  font-weight:700;
  margin-bottom:6px;
}
.chart-tooltip .tt-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.chart-tooltip .tt-left{
  display:flex;
  align-items:center;
  gap:6px;
}
.chart-tooltip .tt-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  display:inline-block;
}
.chart-tooltip .tt-label{
  color:#111;
}
.chart-tooltip .tt-val{
  font-weight:700;
}


/* ===== Date Range Picker (Bộ chọn khoảng ngày) ===== */
.drp{
  position:fixed;
  z-index:3500;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.10);
  width:720px;
  max-width:calc(100vw - 20px);
  overflow:hidden;
  display:flex;
  color:#111;
}
.drp *{box-sizing:border-box}

.drp-left{
  width:180px;
  border-right:1px solid var(--border);
  background:#fff;
  padding:8px 0;
}
.drp-preset{
  width:100%;
  text-align:left;
  padding:10px 14px;
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:13px;
  color:#222;
}
.drp-preset:hover{background:#f6f7fb}
.drp-preset.active{
  background:#eef2ff;
  color:#111;
  font-weight:700;
}

.drp-right{flex:1; padding:10px 12px}
.drp-top{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
}
.drp-top-input{
  width:140px;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  font-size:13px;
}
.drp-top-arrow{color:#666; font-size:13px}

.drp-cals{
  display:flex;
  gap:14px;
}
.drp-cal{flex:1; min-width:0}
.drp-cal-head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  margin-bottom:6px;
}
.drp-cal-head-right{
  justify-content:flex-end;
}
.drp-month{
  flex:1;
  text-align:center;
  font-weight:700;
  font-size:13px;
  color:#111;
}
.drp-nav{
  width:28px;
  height:28px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  cursor:pointer;
  font-size:13px;
  color:#222;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.drp-nav:hover{background:#f6f7fb}

.drp-week{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:4px;
  margin-bottom:4px;
}
.drp-wd{
  text-align:center;
  font-size:12px;
  color:#666;
  padding:4px 0;
}

.drp-days{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:4px;
}
.drp-day{
  width:100%;
  height:30px;
  border:none;
  border-radius:8px;
  background:transparent;
  cursor:pointer;
  font-size:13px;
  color:#111;
}
.drp-day:hover{background:#f2f3f7}
.drp-day.off{color:#b2b6c2}
.drp-day.today{
  outline:1px solid rgba(91,108,255,0.55);
  outline-offset:-1px;
}

.drp-day.in-range{background:#e9efff}
.drp-day.start,
.drp-day.end{
  background:#0b57d0;
  color:#fff;
}
.drp-day.start.in-range,
.drp-day.end.in-range{
  background:#0b57d0;
  color:#fff;
}

.drp-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-top:10px;
  margin-top:10px;
  border-top:1px solid var(--border);
}
.drp-mode{
  font-size:13px;
  color:#666;
}
.drp-actions-right{
  display:flex;
  gap:10px;
}

/* Small screens: stack calendars */
@media (max-width: 820px){
  .drp{flex-direction:column; width:420px}
  .drp-left{
    width:auto;
    border-right:none;
    border-bottom:1px solid var(--border);
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    padding:8px;
  }
  .drp-preset{
    width:auto;
    border:1px solid var(--border);
    border-radius:999px;
    padding:6px 10px;
  }
  .drp-cals{flex-direction:column}
}


/* Filters compact (Bộ lọc gọn) */
.filters.filters-compact{
  padding: 12px;
}
.filters.filters-compact .filter-bar{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.filters.filters-compact .filter-main{
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.filters.filters-compact .field{
  min-width: 180px;
}
.filters.filters-compact .dr-field{
  min-width: 260px;
}
.filters.filters-compact .dr-range{
  width: 260px;
  min-width: 260px;
}
.filters.filters-compact .filter-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filters.filters-compact .filters-adv{
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.filters.filters-compact.adv-open .filters-adv{
  display: block;
}
.filters.filters-compact .dr-adv-btn{
  white-space: nowrap;
}
.filters.filters-compact .grid{
  margin-top: 0;
}
.filters.filters-compact .pickblock{
  margin-top: 0;
}
.filters.filters-compact .hint{
  margin-top: 6px;
}
@media (max-width: 980px){
  .filters.filters-compact .dr-range{
    width: 100%;
    min-width: 220px;
  }
  .filters.filters-compact .dr-field{
    width: 100%;
    min-width: 220px;
  }
}



/* Entry (Nhập số liệu) */
.page-entry .entry-form .entry-toolbar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:8px 0 10px;
}
.page-entry .entry-toolbar-spacer{ flex:1 1 auto; }
.page-entry .entry-toolbar-hint{ white-space:nowrap; }

.page-entry .entry-table-wrap{
  border:1px solid var(--border);
  border-radius:12px;
  overflow-x:auto;
  overflow-y:visible;
  max-height:56vh;
}
.page-entry .entry-table{
  margin:0;
  border:none;
}
.page-entry .entry-table th,
.page-entry .entry-table td{
  vertical-align:middle;
}
.page-entry .entry-table select,
.page-entry .entry-table input{
  width:100%;
  min-width:140px;
}
.page-entry .entry-table .entry-col-product{ min-width:260px; }
.page-entry .entry-table input{
  padding:10px 10px;
}
.page-entry .entry-table select{
  padding:10px 10px;
}

.page-entry .icon-btn{
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  border-radius:10px;
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.page-entry .icon-btn svg{ width:18px; height:18px; fill:currentColor; }
.page-entry .icon-btn:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.page-entry .entry-actions-bar{
  position:sticky;
  bottom:0;
  z-index:5;
  background:var(--card);
  padding:10px 0 0;
  margin-top:10px;
  border-top:1px solid var(--border);
  display:flex;
  align-items:center;
  gap:10px;
}
.page-entry .entry-actions-right{ margin-left:auto; }

.page-entry .entry-product-picker{
  position:relative;
  min-width:220px;
}
.page-entry .entry-product-id{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.page-entry .entry-product-search{
  width:100%;
  min-width:0;
}
.page-entry .entry-product-picker.open .entry-product-search{
  border-bottom-left-radius:8px;
  border-bottom-right-radius:8px;
}
.page-entry .entry-product-picker.is-invalid .entry-product-search{
  border-color:#ef4444;
  box-shadow:0 0 0 3px rgba(239,68,68,.12);
}
.page-entry .entry-product-menu{
  position:fixed;
  top:0;
  left:0;
  z-index:1200;
  width:min(560px, calc(100vw - 24px));
  max-height:260px;
  overflow:auto;
  padding:6px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  box-shadow:0 14px 32px rgba(16,24,40,.16);
}
.page-entry .entry-product-menu[hidden]{
  display:none !important;
}
.page-entry .entry-product-option{
  width:100%;
  display:block;
  text-align:left;
  padding:9px 10px;
  border:none;
  border-radius:10px;
  background:transparent;
  color:var(--text);
  cursor:pointer;
  font:inherit;
}
.page-entry .entry-product-option:hover,
.page-entry .entry-product-option.active{
  background:#eef4ff;
}
.page-entry .entry-product-option-label{
  display:block;
  font-size:14px;
  line-height:1.35;
}
.page-entry .entry-product-empty{
  padding:10px;
  font-size:13px;
  color:var(--muted);
}

@media (max-width: 900px){
  .page-entry .entry-table .entry-col-product{ min-width:220px; }
  .page-entry .entry-table select,
  .page-entry .entry-table input{ min-width:120px; }
}
