@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Hind+Siliguri:wght@400;500;600;700&display=swap');
:root { color-scheme:light; --paper:#f7f7ef; --white:#fffefa; --ink:#24342c; --muted:#7e877a; --green:#386b48; --green-dark:#28543a; --line:#e6e9dd; font-family:'DM Sans','Hind Siliguri',sans-serif; font-synthesis:none; text-rendering:optimizeLegibility; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--paper); font-size:14px; }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; -webkit-tap-highlight-color:transparent; }
[hidden] { display:none !important; }
.admin-header { height:77px; padding:0 max(22px,calc((100vw - 1200px)/2)); display:flex; justify-content:space-between; align-items:center; background:var(--white); border-bottom:1px solid var(--line); }
.admin-brand { display:flex; align-items:center; gap:10px; }
.admin-mark { width:39px; height:39px; display:grid; place-items:center; border-radius:12px; background:#e6efe1; font-size:22px; }
.admin-brand>span:last-child { display:flex; flex-direction:column; gap:2px; }
.admin-brand strong { font-family:'Hind Siliguri',sans-serif; font-size:19px; line-height:1.1; }
.admin-brand small { color:#8b9386; font-family:'Hind Siliguri',sans-serif; font-size:10px; }
.admin-header-actions { display:flex; align-items:center; gap:17px; }
.signed-in-user { color:#71806f; font-size:11px; }
.back-to-shop,.logout-button { border:1px solid #e4e8dc; border-radius:7px; padding:8px 12px; background:transparent; color:#52634f; font-family:'Hind Siliguri',sans-serif; font-size:11px; }
.back-to-shop:hover,.logout-button:hover { background:#eff3e9; }
.logout-button { cursor:pointer; }
.admin-main { max-width:1200px; margin:0 auto; padding:37px 24px 70px; }
.login-panel { width:min(100%,470px); margin:58px auto; padding:35px; border:1px solid var(--line); border-radius:15px; background:var(--white); box-shadow:0 18px 45px #26372e0b; text-align:center; }
.login-symbol { width:53px; height:53px; margin:0 auto 18px; display:grid; place-items:center; border-radius:16px; background:#e6efe1; color:var(--green); font-size:28px; }
.admin-kicker { margin:0 0 6px; color:#86967c; font-family:'Hind Siliguri',sans-serif; font-size:11px; font-weight:600; }
.login-panel h1,.dashboard-heading h1 { margin:0; font-family:'Hind Siliguri',sans-serif; font-size:30px; letter-spacing:-.04em; }
.login-description { margin:10px auto 19px; color:#7a8478; font-family:'Hind Siliguri',sans-serif; font-size:13px; line-height:1.65; }
.login-button { width:100%; min-height:46px; display:flex; align-items:center; justify-content:center; gap:9px; border:0; border-radius:8px; background:var(--green); color:white; font-family:'Hind Siliguri',sans-serif; font-size:13px; font-weight:600; }
.login-button:hover,.manual-order-button:hover { background:var(--green-dark); }
.login-button:disabled { opacity:.6; cursor:wait; }
.login-button span { font-family:'DM Sans',sans-serif; font-size:17px; }
.login-panel>small { display:block; margin-top:14px; color:#9ca295; font-family:'Hind Siliguri',sans-serif; font-size:10px; line-height:1.5; }
.login-message { min-height:20px; margin:0 0 10px; color:#9f4a3d; font-family:'Hind Siliguri',sans-serif; font-size:12px; }
.dashboard-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:21px; }
.dashboard-heading>div>p:last-child { margin:6px 0 0; color:#80897d; font-family:'Hind Siliguri',sans-serif; font-size:12px; }
.dashboard-heading h1 { font-size:32px; }
.manual-order-button { min-height:42px; padding:9px 15px; display:inline-flex; align-items:center; gap:7px; border:0; border-radius:7px; background:var(--green); color:#fff; font-family:'Hind Siliguri',sans-serif; font-size:12px; font-weight:600; transition:background .15s; }
.manual-order-button span { font-size:19px; line-height:1; }
.dashboard-notice { margin-bottom:18px; padding:11px 14px; display:flex; align-items:flex-start; gap:10px; border:1px solid #ece4c9; border-radius:8px; background:#fbf7e9; color:#786d4d; }
.dashboard-notice>span { width:17px; height:17px; flex:none; display:grid; place-items:center; border-radius:50%; background:#f2e8c6; font-family:serif; font-weight:bold; font-size:11px; }
.dashboard-notice p { margin:0; font-family:'Hind Siliguri',sans-serif; font-size:11px; line-height:1.5; }
.catalog-management { margin:0 0 18px; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--white); }
.catalog-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.catalog-heading h2 { margin:0; font-family:'Hind Siliguri',sans-serif; font-size:19px; }
.catalog-heading small { color:#8b9488; font-family:'Hind Siliguri',sans-serif; font-size:10px; }
.catalog-toolbar { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:7px; }
.catalog-upload,.catalog-action,.import-confirm { min-height:34px; padding:7px 10px; display:inline-flex; align-items:center; justify-content:center; border:1px solid #dfe6d8; border-radius:6px; background:#fff; color:#4e6549; cursor:pointer; font-family:'Hind Siliguri',sans-serif; font-size:10px; font-weight:600; text-decoration:none; }
.catalog-upload { border-color:#386b48; background:#386b48; color:#fff; }
.catalog-upload:hover { background:#28543a; }
.catalog-upload input { display:none; }
.catalog-action:hover { border-color:#aebfa5; background:#f4f7ef; }
.import-confirm { border-color:#386b48; background:#386b48; color:#fff; }
.import-confirm:hover { background:#28543a; }
.catalog-action:disabled,.import-confirm:disabled { opacity:.55; cursor:wait; }
.catalog-help { margin:10px 0 0; color:#7f897c; font-family:'Hind Siliguri',sans-serif; font-size:10px; line-height:1.55; }
.catalog-message { min-height:16px; margin:6px 0 0; color:#66805e; font-family:'Hind Siliguri',sans-serif; font-size:10px; }
.catalog-message.error { color:#a14940; }
.catalog-posts { margin-top:12px; padding-top:12px; border-top:1px solid #edf0e8; }
.catalog-posts-toolbar { margin-bottom:9px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.catalog-posts-toolbar h3 { margin:0; color:#4c5c4a; font-family:'Hind Siliguri',sans-serif; font-size:13px; }
.catalog-posts-toolbar small { color:#8b9488; font-family:'Hind Siliguri',sans-serif; font-size:9px; }
.catalog-search { width:min(300px,45%); height:34px; padding:0 9px; display:flex; align-items:center; gap:7px; border:1px solid #e5e8de; border-radius:6px; color:#8a9386; }
.catalog-search:focus-within { border-color:#aabda4; box-shadow:0 0 0 3px #386b4812; }
.catalog-search span { font-size:17px; }
.catalog-search input { width:100%; min-width:0; border:0; outline:none; background:transparent; font-family:'Hind Siliguri',sans-serif; font-size:10px; }
.catalog-product-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.catalog-product-card { min-width:0; padding:8px; display:grid; grid-template-columns:46px minmax(0,1fr) auto; align-items:center; gap:9px; border:1px solid #e9ece4; border-radius:7px; background:#fcfdf9; }
.catalog-product-photo { width:46px; height:46px; display:grid; place-items:center; overflow:hidden; border:1px solid #e7eadf; border-radius:6px; background:#f2f4eb; color:#72806c; font-size:20px; }
.catalog-product-photo img { width:100%; height:100%; object-fit:cover; }
.catalog-product-copy { min-width:0; display:flex; flex-direction:column; gap:2px; }
.catalog-product-copy b { overflow:hidden; color:#445341; font-family:'Hind Siliguri',sans-serif; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.catalog-product-copy small { overflow:hidden; color:#899286; font-family:'Hind Siliguri',sans-serif; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.catalog-product-actions { display:flex; gap:4px; }
.catalog-product-actions .catalog-action,.catalog-delete { min-height:29px; padding:5px 7px; font-size:9px; }
.catalog-delete { border:1px solid #efd9d4; border-radius:6px; background:#fffaf9; color:#a14940; cursor:pointer; font-family:'Hind Siliguri',sans-serif; font-weight:600; }
.catalog-delete:hover { border-color:#d8a49a; background:#fbefec; }
.catalog-delete:disabled { opacity:.55; cursor:wait; }
.catalog-products-empty { grid-column:1/-1; margin:0; padding:20px; color:#899286; font-family:'Hind Siliguri',sans-serif; font-size:10px; text-align:center; }
.import-preview { margin-top:7px; border-top:1px solid #edf0e8; }
.preview-heading { padding:12px 0; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.preview-heading>div:first-child { display:flex; flex-direction:column; gap:3px; }
.preview-heading b { color:#445744; font-family:'Hind Siliguri',sans-serif; font-size:12px; }
.preview-heading small { color:#8a9387; font-family:'Hind Siliguri',sans-serif; font-size:9px; }
.preview-heading>div:last-child { display:flex; gap:6px; }
.import-preview-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.import-product-row { min-width:0; padding:11px; border:1px solid #e8ece3; border-radius:8px; background:#fcfdf9; }
.import-row-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.import-row-head>div { min-width:0; display:flex; flex-direction:column; gap:2px; }
.import-row-head b { overflow:hidden; color:#435341; font-family:'Hind Siliguri',sans-serif; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.import-row-head small { color:#929a8e; font-size:9px; }
.image-search-link { flex:none; color:#386b48; font-family:'Hind Siliguri',sans-serif; font-size:9px; text-decoration:underline; text-underline-offset:2px; }
.import-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.import-fields label { min-width:0; display:flex; flex-direction:column; gap:3px; color:#798576; font-family:'Hind Siliguri',sans-serif; font-size:9px; }
.import-fields input { width:100%; min-width:0; height:31px; padding:5px 7px; border:1px solid #e2e7dc; border-radius:5px; outline:none; background:#fff; color:#3c4b3b; font-family:'Hind Siliguri',sans-serif; font-size:10px; }
.import-fields input:focus { border-color:#9eb69a; box-shadow:0 0 0 2px #386b4810; }
.image-preview-line { min-height:54px; margin-top:8px; display:flex; align-items:center; gap:9px; color:#9aa193; font-family:'Hind Siliguri',sans-serif; font-size:9px; }
.image-preview-line img { width:54px; height:54px; object-fit:cover; border:1px solid #e5e9df; border-radius:6px; background:#f2f4eb; }
.import-row-problem { min-height:0; margin:0; color:#58764f; font-family:'Hind Siliguri',sans-serif; font-size:9px; line-height:1.45; }
.import-row-problem.error { margin-top:6px; color:#a14940; }
.manual-product-panel { margin:0 0 18px; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--white); }
.manual-product-heading h2 { margin:0; font-family:'Hind Siliguri',sans-serif; font-size:19px; }
.manual-product-heading p:last-child { margin:5px 0 0; color:#7f897c; font-family:'Hind Siliguri',sans-serif; font-size:10px; line-height:1.5; }
.manual-product-form { margin-top:12px; }
.product-entry-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 14px; }
.product-entry-fields .admin-field { margin:8px 0; }
.product-photo-field input[type="file"] { padding:7px; background:#fff; cursor:pointer; }
.manual-product-image-preview { margin:3px 0 10px; padding:9px; display:flex; align-items:center; gap:11px; border:1px solid #e5e9df; border-radius:8px; background:#fafbf6; }
.manual-product-image-preview img { width:76px; height:76px; object-fit:cover; border:1px solid #e5e9df; border-radius:6px; background:#f2f4eb; }
.manual-product-image-copy { min-width:0; display:flex; flex-direction:column; gap:4px; }
.manual-product-image-copy b { color:#4d5e4c; font-family:'Hind Siliguri',sans-serif; font-size:11px; }
.manual-product-image-copy small { overflow-wrap:anywhere; color:#8b9488; font-size:10px; }
.product-edit-dialog { width:min(100% - 28px,560px); }
.product-edit-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
.product-edit-actions .manual-order-button { margin-top:0; }
.product-edit-actions .catalog-action { min-height:39px; padding:9px 14px; font-size:11px; }
.edit-product-image-preview { margin-bottom:4px; }
.product-form-message { margin:8px 0; }
.stats-row { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:9px; margin-bottom:17px; }
.stat-card { min-width:0; padding:13px 14px; display:flex; flex-direction:column; align-items:flex-start; gap:8px; border:1px solid #e6e9dd; border-radius:9px; background:var(--white); color:#536151; text-align:left; transition:border-color .15s,transform .15s,box-shadow .15s; }
.stat-card:hover { border-color:#b8c9b1; transform:translateY(-1px); }
.stat-card.active { border-color:#a9bea2; box-shadow:0 0 0 2px #386b4814; background:#f6f9f2; }
.stat-card small { overflow:hidden; max-width:100%; color:#869082; font-family:'Hind Siliguri',sans-serif; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.stat-card strong { font-size:21px; font-weight:700; }
.orders-panel { overflow:hidden; border:1px solid var(--line); border-radius:11px; background:var(--white); }
.orders-toolbar { min-height:76px; padding:14px 18px; display:flex; align-items:center; gap:10px; border-bottom:1px solid #eceee6; }
.orders-toolbar>div { margin-right:auto; }
.orders-toolbar h2 { margin:0; font-family:'Hind Siliguri',sans-serif; font-size:18px; }
.orders-toolbar>div>span { color:#959b90; font-family:'Hind Siliguri',sans-serif; font-size:10px; }
.order-search { width:min(290px,36vw); height:38px; padding:0 10px; display:flex; align-items:center; gap:7px; border:1px solid #e5e8de; border-radius:7px; color:#8a9386; }
.order-search:focus-within { border-color:#aabda4; box-shadow:0 0 0 3px #386b4812; }
.order-search span { font-size:19px; }
.order-search input { width:100%; min-width:0; border:0; outline:none; background:transparent; font-family:'Hind Siliguri',sans-serif; font-size:11px; }
.order-search input::placeholder { color:#a0a69b; }
.refresh-button { width:37px; height:37px; border:1px solid #e5e8de; border-radius:7px; background:#fff; color:#65765f; font-size:20px; }
.refresh-button:hover { background:#eff3e9; }
.table-scroll { overflow:auto; }
.order-table { width:100%; border-collapse:collapse; min-width:920px; }
.order-table th { padding:11px 12px; background:#fafbf6; color:#889184; text-align:left; font-family:'Hind Siliguri',sans-serif; font-size:10px; font-weight:600; white-space:nowrap; }
.order-table td { padding:12px; border-top:1px solid #f0f1eb; color:#536052; vertical-align:middle; font-family:'Hind Siliguri',sans-serif; font-size:11px; }
.order-table tr:hover td { background:#fcfdf9; }
.order-code-link { padding:0; border:0; background:none; color:#386b48; font-family:'DM Sans',sans-serif; font-size:11px; font-weight:700; text-align:left; text-decoration:underline; text-underline-offset:3px; }
.customer-name,.customer-phone { display:block; max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.customer-name { color:#39483a; font-weight:600; }
.customer-phone { margin-top:3px; color:#92988e; font-family:'DM Sans','Hind Siliguri',sans-serif; font-size:10px; }
.source-badge { display:inline-block; padding:4px 7px; border-radius:999px; background:#eaf1e6; color:#507049; font-size:9px; white-space:nowrap; }
.source-badge.social { background:#f2ede1; color:#8a7446; }
.order-summary-cell { max-width:180px; overflow:hidden; color:#7d8679 !important; text-overflow:ellipsis; white-space:nowrap; }
.amount-cell { color:#3b503d !important; font-family:'DM Sans','Hind Siliguri',sans-serif !important; font-weight:700; white-space:nowrap; }
.date-cell { min-width:130px; color:#8d9588 !important; font-size:10px !important; white-space:nowrap; }
.status-select { min-width:108px; padding:6px 23px 6px 8px; border:1px solid #e2e7dd; border-radius:6px; outline:none; background:#f8faf5; color:#596a55; font-family:'Hind Siliguri',sans-serif; font-size:10px; }
.status-select:focus { border-color:#99b291; }
.status-select.status-new { background:#fff8e9; color:#896c2a; }
.status-select.status-completed { background:#eaf4e9; color:#3d7449; }
.status-select.status-cancelled { background:#f9eeec; color:#9e554a; }
.orders-empty { min-height:235px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; color:#899386; font-family:'Hind Siliguri',sans-serif; text-align:center; }
.orders-empty>span { font-size:30px; }
.orders-empty b { color:#52604f; font-size:14px; }
.orders-empty small { max-width:360px; font-size:11px; }
.loading-cell { padding:35px !important; color:#8b9588 !important; text-align:center; }
.orders-error { margin:0; padding:12px 18px; color:#9d4a3f; font-family:'Hind Siliguri',sans-serif; font-size:11px; }
.admin-dialog { width:min(100% - 28px,540px); max-height:calc(100% - 28px); padding:0; border:0; border-radius:14px; background:transparent; color:var(--ink); box-shadow:0 24px 80px #24342c36; }
.admin-dialog::backdrop { background:#17251e80; backdrop-filter:blur(3px); }
.dialog-card { position:relative; padding:27px; border:1px solid #e5e9dd; border-radius:14px; background:var(--white); }
.dialog-card h2 { margin:0 32px 7px 0; font-family:'Hind Siliguri',sans-serif; font-size:24px; line-height:1.3; }
.dialog-description { margin:0 0 18px; color:#7e877b; font-family:'Hind Siliguri',sans-serif; font-size:11px; line-height:1.55; }
.dialog-close { position:absolute; top:13px; right:14px; width:30px; height:30px; border:1px solid #e5e9df; border-radius:50%; background:transparent; color:#7e877a; cursor:pointer; font-size:19px; }
.dialog-close:hover { background:#f1f4eb; }
.admin-field { display:flex; flex-direction:column; gap:5px; margin:12px 0; color:#4d5e4c; font-family:'Hind Siliguri',sans-serif; font-size:11px; font-weight:600; }
.admin-field span { color:#bb6257; }
.admin-field small { display:inline; color:#999f93; font-size:9px; font-weight:400; }
.admin-field input,.admin-field textarea { width:100%; padding:9px 10px; border:1px solid #e4e8dd; border-radius:7px; outline:none; background:#fff; color:#29382d; font-family:'Hind Siliguri',sans-serif; font-size:12px; font-weight:400; resize:vertical; }
.admin-field input:focus,.admin-field textarea:focus { border-color:#9eb69a; box-shadow:0 0 0 3px #386b4810; }
.full-width { width:100%; justify-content:center; margin-top:5px; }
.dialog-error { min-height:17px; margin:5px 0; color:#a14940; font-family:'Hind Siliguri',sans-serif; font-size:11px; }
.detail-card { max-width:540px; }
.detail-card h2 { font-family:'DM Sans',sans-serif; font-size:20px; }
.detail-grid { margin:17px 0; display:grid; grid-template-columns:115px 1fr; gap:8px 12px; }
.detail-grid span { color:#8d9589; font-family:'Hind Siliguri',sans-serif; font-size:11px; }
.detail-grid b { color:#445144; font-family:'Hind Siliguri',sans-serif; font-size:11px; font-weight:600; overflow-wrap:anywhere; }
.detail-grid b a { color:#386b48; text-decoration:underline; text-underline-offset:2px; }
.detail-card h3 { margin:18px 0 7px; font-family:'Hind Siliguri',sans-serif; font-size:14px; }
.detail-items { margin:0; padding-left:19px; color:#667263; font-family:'Hind Siliguri',sans-serif; font-size:11px; line-height:1.8; }
.detail-note { margin-top:15px; padding:11px; border-radius:7px; background:#f2f4eb; color:#667263; font-family:'Hind Siliguri',sans-serif; font-size:11px; line-height:1.6; white-space:pre-wrap; }
.admin-toast { position:fixed; z-index:8; bottom:22px; left:50%; max-width:calc(100% - 24px); padding:10px 15px; border-radius:999px; background:#273d30; color:white; box-shadow:0 9px 25px #17261b35; font-family:'Hind Siliguri',sans-serif; font-size:11px; opacity:0; pointer-events:none; transform:translate(-50%,12px); transition:opacity .2s,transform .2s; }
.admin-toast.visible { opacity:1; transform:translate(-50%,0); }
@media (max-width:900px) { .stats-row { grid-template-columns:repeat(4,minmax(0,1fr)); } .order-table { min-width:850px; } }
@media (max-width:600px) {
  .admin-header { height:65px; padding:0 14px; }
  .admin-mark { width:34px; height:34px; border-radius:10px; font-size:19px; }
  .admin-brand strong { font-size:16px; }
  .admin-brand small { font-size:9px; }
  .admin-header-actions { gap:8px; }
  .signed-in-user { display:none; }
  .back-to-shop,.logout-button { padding:7px 8px; font-size:9px; }
  .admin-main { padding:25px 12px 50px; }
  .dashboard-heading { align-items:flex-start; flex-direction:column; gap:13px; }
  .dashboard-heading h1 { font-size:26px; }
  .dashboard-heading>div>p:last-child { max-width:420px; font-size:11px; }
  .manual-order-button { min-height:39px; }
  .dashboard-notice { padding:10px; }
  .dashboard-notice p { font-size:10px; }
  .catalog-management { padding:12px; }
  .catalog-heading { align-items:flex-start; flex-direction:column; }
  .catalog-toolbar { justify-content:flex-start; }
  .catalog-help { font-size:9px; }
  .catalog-posts-toolbar { align-items:stretch; flex-direction:column; }
  .catalog-search { width:100%; }
  .catalog-product-list { grid-template-columns:1fr; }
  .catalog-product-card { grid-template-columns:42px minmax(0,1fr) auto; gap:7px; }
  .catalog-product-photo { width:42px; height:42px; }
  .catalog-product-actions .catalog-action,.catalog-delete { padding:5px 6px; font-size:8px; }
  .manual-product-panel { padding:12px; }
  .product-entry-fields { grid-template-columns:1fr; gap:0; }
  .manual-product-image-preview img { width:64px; height:64px; }
  .import-preview-list { grid-template-columns:1fr; }
  .preview-heading { align-items:flex-start; flex-direction:column; }
  .preview-heading>div:last-child { width:100%; }
  .preview-heading .catalog-action,.preview-heading .import-confirm { flex:1; }
  .stats-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .stat-card { min-height:64px; padding:9px 10px; gap:3px; }
  .stat-card strong { font-size:18px; }
  .orders-toolbar { min-height:0; padding:13px 12px; flex-wrap:wrap; }
  .orders-toolbar>div { width:100%; }
  .order-search { width:auto; flex:1; }
  .table-scroll { margin:0; }
  .order-table { min-width:830px; }
  .login-panel { margin:35px auto; padding:25px 19px; }
  .login-panel h1 { font-size:24px; }
  .dialog-card { padding:23px 17px 18px; }
  .detail-grid { grid-template-columns:90px 1fr; }
  .admin-toast { bottom:16px; }
}
