/* Peace Out Dispatch — Shared Design System */

/* ── Reset & Variables ──────────────────────────────────── */
*{box-sizing:border-box;margin:0;padding:0;font-family:'Inter',sans-serif}
:root{
  --blue:#2563eb;--blue-dark:#1d4ed8;--blue-light:#eff6ff;--blue-mid:#dbeafe;
  --text:#0f172a;--text-2:#475569;--text-3:#94a3b8;
  --border:#e8edf2;--bg:#f5f8ff;--white:#ffffff;
  --green:#16a34a;--green-bg:#f0fdf4;--green-border:#bbf7d0;
  --amber:#d97706;--amber-bg:#fffbeb;--amber-border:#fde68a;
  --red:#dc2626;--red-bg:#fff1f2;--red-border:#fecaca;
  --purple:#7c3aed;--purple-bg:#f5f3ff;
  --radius:12px;--radius-lg:16px;
  --shadow:0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:0 4px 16px rgba(0,0,0,0.10);
}


/* ── Body ──────────────────────────────────────────────── */
body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);min-height:100vh;display:flex;flex-direction:column;font-size:14px}

/* ── Nav ───────────────────────────────────────────────── */
.nav{background:var(--white);border-bottom:1px solid var(--border);padding:0 24px;height:64px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:50}
.nav-left{display:flex;align-items:center;gap:10px}
.nav-logo{width:38px;height:38px;border-radius:9px;overflow:hidden;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.nav-logo img{width:100%;height:100%;object-fit:cover;display:block}
.nav-logo svg{width:20px;height:20px;fill:white}
.nav-title{font-size:17px;font-weight:700;color:var(--text)}
.nav-badge{background:var(--blue-light);color:var(--blue);font-size:12px;font-weight:600;padding:3px 10px;border-radius:20px}
.nav-date{font-size:14px;color:var(--text-3)}
.nav-user{display:flex;align-items:center;gap:8px}
.user-avatar{width:34px;height:34px;background:var(--blue);border-radius:50%;display:flex;align-items:center;justify-content:center;color:white;font-size:14px;font-weight:700}
.user-name{font-size:14px;font-weight:600;color:var(--text-2)}
.logout-btn{background:none;border:1px solid #e2e8f0;border-radius:20px;padding:6px 13px;font-size:13px;font-weight:500;color:#374151;cursor:pointer;font-family:inherit}
.logout-btn:hover{background:var(--bg);color:var(--text)}
.nav-partner-logo{height:36px;width:auto;object-fit:contain;border-radius:6px;border:1px solid var(--border);padding:3px;background:var(--white)}


/* ── Main / Pages ──────────────────────────────────────── */
.main{flex:1;padding:20px 24px;width:100%}
.page{display:none}.page.active{display:block}

/* ── Login Screen ──────────────────────────────────────── */
.login-screen{display:flex;align-items:center;justify-content:center;flex:1;padding:32px}
.login-card{background:var(--white);border:1px solid var(--border);border-radius:var(--radius-lg);padding:48px 40px;max-width:500px;width:100%;box-shadow:var(--shadow-md);text-align:center}
.login-logo{width:64px;height:64px;background:var(--blue);border-radius:16px;display:flex;align-items:center;justify-content:center;margin:0 auto 20px;overflow:hidden;transition:all 0.2s}
.login-logo svg{width:34px;height:34px;fill:white}
.login-logo.has-partner-logo{width:140px;height:140px;background:transparent;border-radius:12px;border:1px solid var(--border);padding:10px}
.login-logo.has-partner-logo svg{display:none}
.login-logo.has-partner-logo img{display:block !important}
#partnerLogoImg{display:none;width:100%;height:100%;object-fit:contain}
.login-title{font-size:24px;font-weight:700;margin-bottom:6px}
.login-sub{font-size:14px;color:var(--text-2);margin-bottom:36px}
.login-prompt{font-size:13px;font-weight:600;color:var(--text-3);text-transform:uppercase;letter-spacing:0.07em;margin-bottom:16px}
.user-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.user-btn{background:var(--white);border:2px solid var(--border);border-radius:var(--radius-lg);padding:20px 16px;cursor:pointer;transition:all 0.15s;font-family:inherit;display:flex;flex-direction:column;align-items:center;gap:10px;width:100%}
.user-btn:hover{border-color:var(--blue);background:var(--blue-light);transform:translateY(-2px);box-shadow:var(--shadow-md)}
.user-btn-avatar{width:48px;height:48px;background:var(--blue);border-radius:12px;display:flex;align-items:center;justify-content:center;color:white;font-size:20px;font-weight:700}
.user-btn-name{font-size:15px;font-weight:700;color:var(--text)}
.user-btn-role{font-size:11px;color:var(--text-3)}

/* ── Not Found (partner portal) ────────────────────────── */
.not-found{display:flex;align-items:center;justify-content:center;flex:1;padding:32px;text-align:center}
.not-found-card{background:var(--white);border:1px solid var(--border);border-radius:var(--radius-lg);padding:48px 40px;max-width:400px;box-shadow:var(--shadow-md)}
.not-found-icon{font-size:48px;margin-bottom:16px}
.not-found-title{font-size:20px;font-weight:700;margin-bottom:8px}
.not-found-sub{font-size:14px;color:var(--text-2)}

/* ── Buttons ───────────────────────────────────────────── */
.btn{padding:8px 16px;font-size:13px;font-weight:500;border:none;border-radius:20px;cursor:pointer;transition:all 0.15s;font-family:inherit;display:inline-flex;align-items:center;gap:6px;white-space:nowrap;box-sizing:border-box;min-height:36px;line-height:1}
.btn:hover{opacity:0.88}.btn:disabled{opacity:0.4;cursor:not-allowed}
.btn-primary{background:#3b82f6;color:white}
.btn-primary:hover{background:#2563eb;opacity:1}
.btn-success{background:var(--green);color:white}
.btn-danger{background:#ef4444;color:white;border:none}
.btn-danger:hover{background:#dc2626;opacity:1}
.btn-outline{background:var(--white);color:#374151;border:1px solid #e2e8f0}
.btn-outline:hover{background:#f8fafc;opacity:1}
.btn-ghost{background:transparent;color:var(--text-2);border:1px solid transparent}
.btn-ghost:hover{background:var(--bg);color:var(--text);opacity:1}
.btn-sm{padding:5px 12px;font-size:12px;min-height:30px}
.btn svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;fill:none;flex-shrink:0}

/* ── Toolbar ───────────────────────────────────────────── */
.toolbar{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap}
.toolbar select{appearance:none;-webkit-appearance:none;padding:0 34px 0 12px;height:36px;font-size:13px;font-weight:500;border:1px solid var(--border);border-radius:var(--radius);background-color:var(--white);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;background-size:10px 6px;color:var(--text);font-family:inherit;cursor:pointer;outline:none;transition:border-color 0.15s,box-shadow 0.15s;box-sizing:border-box}
.toolbar select:hover{border-color:#94a3b8}
.toolbar select:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,0.1)}
.ftrig{appearance:none;display:inline-flex;align-items:center;padding:0 34px 0 12px;height:36px;font-size:13px;font-weight:500;border:1px solid var(--border);border-radius:20px;background-color:var(--white);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;background-size:10px 6px;color:var(--text);font-family:inherit;cursor:pointer;outline:none;transition:border-color 0.15s;white-space:nowrap;box-sizing:border-box}
.ftrig:hover{border-color:#94a3b8}
.ftrig.is-filtered,.ftrig.fp-open{border-color:var(--blue);color:var(--blue);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%233b82f6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")}
.bulk-bar{display:none;align-items:center;gap:10px;padding:10px 16px;background:var(--blue);color:white;border-radius:var(--radius-lg);margin-bottom:12px}
.bulk-bar.visible{display:flex}
.bulk-count-label{font-size:14px;font-weight:700}
.bulk-btn-dispatch{background:white;color:var(--blue);font-size:12px;padding:6px 14px;border:none;font-weight:600;display:flex;align-items:center}
.bulk-btn-dispatch:hover{background:#f0f4ff}
.bulk-btn-delete{background:#fecaca;color:#dc2626;font-size:12px;padding:6px 14px;border:none;font-weight:600;display:flex;align-items:center}
.bulk-btn-delete:hover{background:#fca5a5}
.bulk-btn-clear{background:rgba(255,255,255,0.15);color:white;font-size:12px;padding:6px 12px;border:1px solid rgba(255,255,255,0.4);font-weight:600}
.bulk-btn-clear:hover{background:rgba(255,255,255,0.25)}
.cb-sel{width:15px;height:15px;cursor:pointer;accent-color:var(--blue)}
tr.row-selected td{background:#eff6ff}
th.col-cb,td.col-cb{width:32px;padding:0 4px 0 12px;text-align:center}
.spacer{flex:1}

/* ── Table ─────────────────────────────────────────────── */
.table-wrap{background:var(--white);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);overflow-x:auto}
table{width:100%;border-collapse:collapse}
thead th{padding:11px 12px;font-size:12px;font-weight:600;text-align:left;color:var(--text-3);text-transform:uppercase;letter-spacing:0.05em;background:var(--bg);border-bottom:2px solid var(--border)}
tbody td{padding:14px 12px;font-size:14px;border-bottom:1px solid var(--border);vertical-align:middle;color:var(--text)}
tbody tr:last-child td{border-bottom:none}
tbody tr:hover td{background:#f8fafc}
.order-num{font-weight:600;color:var(--blue);font-size:inherit;letter-spacing:0.02em}
.client-name{font-weight:600;color:var(--text)}
.item-text{font-size:12px;color:var(--text-3);max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.time-text{font-size:11px;color:var(--text-2)}
.inline-edit-td{cursor:pointer;transition:background 0.12s;position:relative}
.inline-edit-td:hover{background:#eff6ff}
.inline-edit-td > span:first-child::after{content:'';display:inline-block;width:12px;height:12px;margin-left:5px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 1 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;vertical-align:middle;opacity:0;transition:opacity 0.15s}
.inline-edit-td:hover > span:first-child::after{opacity:0.8}

/* ── Badges ────────────────────────────────────────────── */
.badge{display:inline-flex;align-items:center;justify-content:flex-start;gap:7px;padding:5px 14px;border-radius:20px;font-size:11px;font-weight:500;color:#ffffff;white-space:nowrap;border:none;min-width:116px}
.badge::before{content:'';display:block;width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,0.6);flex-shrink:0}
.badge-received{background:#3b82f6}
.badge-in-progress{background:#f97316}
.badge-booked{background:#22c55e}
.badge-completed{background:#16a34a}
.badge-on-hold{background:#f59e0b}
.badge-delivery-issue{background:#ef4444}
.badge-dispatched{background:#0d9488}
.badge-canceled{background:#64748b}
.badge-pending{background:#64748b}

/* ── Empty State ───────────────────────────────────────── */
.empty-state{text-align:center;padding:5rem 2rem}
.empty-icon{font-size:44px;margin-bottom:14px;opacity:0.35}
.empty-icon svg{width:44px;height:44px;stroke-width:1.5}
.empty-title{font-size:16px;font-weight:600;color:var(--text-2);margin-bottom:5px}
.empty-sub{font-size:14px;color:var(--text-3)}

/* ── Upload Zone ───────────────────────────────────────── */
.upload-wrap{max-width:700px;margin:0 auto}
.page-title{font-size:26px;font-weight:700;margin-bottom:8px}
.page-sub{font-size:15px;color:var(--text-2);margin-bottom:28px;line-height:1.6}
.drop-zone{border:2px dashed var(--border);border-radius:16px;padding:0;text-align:center;background:var(--white);cursor:pointer;transition:all 0.15s;position:relative;min-height:200px}
.drop-zone.over,.drop-zone:hover{border-color:var(--blue);background:var(--blue-light)}
.drop-zone label{position:absolute;inset:0;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:2.5rem}
.drop-zone input{display:none}
.drop-icon{width:80px;height:80px;background:var(--blue-light);border-radius:20px;display:flex;align-items:center;justify-content:center;font-size:36px;margin-bottom:6px;flex-shrink:0}
.drop-icon svg{width:36px;height:36px;stroke:var(--blue);stroke-width:1.5;fill:none}
.drop-lbl{font-size:24px;font-weight:700;color:var(--text)}
.drop-sub{font-size:15px;color:var(--text-3)}
.drop-sub span{color:var(--blue);font-weight:600}
.drop-tags{display:flex;gap:10px;justify-content:center;margin-top:8px;flex-wrap:wrap}
.drop-tag{font-size:12px;font-weight:600;padding:5px 14px;border-radius:20px;background:var(--blue-light);color:var(--blue);border:1px solid var(--blue-mid)}
.drop-tag-blue{background:var(--blue-light);color:var(--blue);border:1px solid var(--blue-mid)}
.drop-tag-gray{background:#f1f5f9;color:#64748b;border:1px solid #e2e8f0}

/* ── File List ─────────────────────────────────────────── */
.file-list{margin-top:14px;display:flex;flex-direction:column;gap:7px}
.file-item{display:flex;align-items:center;padding:11px 15px;background:var(--white);border:1px solid var(--border);border-radius:var(--radius);gap:10px}
.file-item .fi-icon{font-size:16px;flex-shrink:0;display:flex;align-items:center}
.file-item .fi-icon svg{width:16px;height:16px;stroke:var(--blue);stroke-width:2;fill:none}
.file-item .fi-name{font-size:14px;font-weight:500;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-item .fi-status{font-size:11px;color:var(--text-3);white-space:nowrap}
.file-item .fi-rm{background:none;border:none;cursor:pointer;color:var(--text-3);font-size:15px;padding:0;line-height:1}
.file-item .fi-rm:hover{color:var(--red)}

/* ── Progress ──────────────────────────────────────────── */
.prog-wrap{margin-top:12px;display:none}
.prog-track{height:5px;background:var(--border);border-radius:4px;overflow:hidden}
.prog-fill{height:100%;background:var(--blue);transition:width 0.25s;width:0%;border-radius:4px}
.prog-label{font-size:12px;color:var(--text-3);margin-top:6px}
.upload-actions{margin-top:18px;display:none;gap:10px}

/* ── Result Box ────────────────────────────────────────── */
.result-box{margin-top:16px;border-radius:var(--radius);padding:18px}
.result-box.success{background:var(--green-bg);border:1px solid var(--green-border)}
.result-box.success h4{font-size:15px;font-weight:700;color:#166534;margin-bottom:10px}
.result-box.success li{font-size:13px;color:#166534;line-height:2;list-style:none}
.result-box.success li::before{content:'✓  ';font-weight:700}
.result-box.error{background:var(--red-bg);border:1px solid var(--red-border);font-size:13px;color:var(--red)}
.result-box.warn{background:var(--amber-bg);border:1px solid var(--amber-border);font-size:13px;color:var(--amber)}

/* ── Stat Cards ────────────────────────────────────────── */
.stat{background:var(--white);border:1px solid var(--border);border-top:3px solid #3b82f6;border-radius:var(--radius-lg);padding:24px;box-shadow:var(--shadow);display:flex;align-items:center;gap:18px;transition:box-shadow 0.2s}
.stat:hover{box-shadow:var(--shadow-md)}
.stat-icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}
.stat-icon.blue{background:var(--blue-light)}.stat-icon.amber{background:var(--amber-bg)}.stat-icon.green{background:var(--green-bg)}.stat-icon.purple{background:var(--purple-bg)}.stat-icon.red{background:var(--red-bg)}.stat-icon.orange{background:#fff7ed}.stat-icon.gray{background:#f1f5f9}
.stat-val{font-size:30px;font-weight:700;color:var(--text);line-height:1}
.stat-lbl{font-size:14px;color:var(--text-3);margin-top:4px}

/* ── Lucide Icon Utilities ─────────────────────────────── */
.lucide-stat{width:18px;height:18px;stroke:currentColor;stroke-width:1.75;fill:none;flex-shrink:0}
.stat-icon.blue svg,.stat-icon.blue .lucide-stat{color:var(--blue)}
.stat-icon.amber svg,.stat-icon.amber .lucide-stat{color:var(--amber)}
.stat-icon.green svg,.stat-icon.green .lucide-stat{color:var(--green)}
.stat-icon.purple svg,.stat-icon.purple .lucide-stat{color:var(--purple)}
.stat-icon.red svg,.stat-icon.red .lucide-stat{color:var(--red)}
.stat-icon.orange svg,.stat-icon.orange .lucide-stat{color:#d97706}
.stat-icon.gray svg,.stat-icon.gray .lucide-stat{color:var(--text-3)}

/* ── Modal ─────────────────────────────────────────────── */
.modal-bg{display:none;position:fixed;inset:0;background:rgba(15,23,42,0.5);z-index:200;align-items:center;justify-content:center;padding:1rem;backdrop-filter:blur(3px)}
.modal-bg.open{display:flex}
.modal{background:var(--white);border-radius:16px;padding:32px 36px;width:100%;max-width:680px;box-shadow:0 24px 64px rgba(0,0,0,0.18);max-height:90vh;overflow-y:auto}
.modal-title{font-size:22px;font-weight:700;color:var(--text);margin-bottom:4px}
.modal-sub{font-size:14px;color:var(--text-2);margin-bottom:26px}
.modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.modal-footer{display:flex;gap:10px;margin-top:28px;justify-content:flex-end;border-top:1px solid var(--border);padding-top:24px}
/* Large profile modal */
.modal-lg{max-width:900px;padding:0;max-height:92vh;display:flex;flex-direction:column;overflow:hidden}
.modal-prof-hd{padding:22px 32px 18px;border-bottom:1px solid var(--border);flex-shrink:0}
.modal-prof-hd-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.modal-prof-hd-title{font-size:24px;font-weight:800;color:var(--text);line-height:1.1;letter-spacing:-0.3px}
.modal-prof-hd-meta{font-size:13px;color:var(--text-2);margin-top:5px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.modal-prof-hd-close{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:8px;background:none;border:none;cursor:pointer;color:var(--text-3);flex-shrink:0;transition:background .15s,color .15s;font-size:17px;line-height:1}
.modal-prof-hd-close:hover{background:#f1f5f9;color:var(--text)}
.modal-prof-body{flex:1;overflow-y:auto;padding:28px 32px}
.modal-prof-ft{padding:16px 32px;border-top:1px solid var(--border);background:#f8fafc;border-radius:0 0 16px 16px;display:flex;justify-content:space-between;align-items:center;flex-shrink:0;gap:12px}
.modal-section{margin-bottom:28px}
.modal-section:last-child{margin-bottom:0}
.modal-section-lbl{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.09em;color:var(--text-3);margin-bottom:14px;display:flex;align-items:center;gap:8px}
.modal-section-lbl::after{content:'';flex:1;height:1px;background:var(--border)}
.modal-2col{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.modal-3col{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px}

/* ── Fields ────────────────────────────────────────────── */
.field{display:flex;flex-direction:column;gap:7px}
.field label{font-size:11px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:0.07em}
.field input,.field select,.field textarea{width:100%;height:44px;padding:0 13px;font-size:14px;border:1.5px solid var(--border);border-radius:12px;font-family:inherit;color:var(--text);background:var(--white);outline:none;transition:border-color 0.15s,box-shadow 0.15s;box-sizing:border-box;appearance:none;-webkit-appearance:none}
.field select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 13px center;padding-right:36px}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,0.08)}
.field input::placeholder{text-transform:none;color:var(--text-3)}
.field input[type=date]{color:var(--text) !important}
.field input[type=date]::-webkit-datetime-edit{color:var(--text) !important}
.field input[type=date]::-webkit-datetime-edit-fields-wrapper{color:var(--text) !important}
.field input[type=date]::-webkit-datetime-edit-text{color:var(--text) !important}
.field input[type=date]::-webkit-datetime-edit-year-field,
.field input[type=date]::-webkit-datetime-edit-month-field,
.field input[type=date]::-webkit-datetime-edit-day-field{color:var(--text) !important}
.field textarea{height:auto;min-height:72px;padding:11px 13px;resize:vertical}
.field-hint{font-size:11px;color:var(--text-3);margin-top:4px}

/* ── Item Rows ─────────────────────────────────────────── */
.item-rows{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}
.item-row{display:grid;grid-template-columns:1fr 140px 70px 34px;gap:8px;align-items:center}
.item-row input{height:42px;padding:0 11px;border:1.5px solid var(--border);border-radius:10px;font-size:14px;font-family:inherit;color:var(--text);background:var(--white);width:100%;transition:border-color 0.15s;box-sizing:border-box}
.item-row input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,0.08)}
.item-row input[type=number]{text-align:center;padding:0 6px}
.item-row-del{background:none;border:1.5px solid var(--border);border-radius:10px;width:34px;height:42px;cursor:pointer;color:var(--text-3);font-size:17px;display:flex;align-items:center;justify-content:center;transition:all 0.1s;flex-shrink:0}
.item-row-del:hover{background:#fef2f2;border-color:var(--red);color:var(--red)}
.item-row-headers{display:grid;grid-template-columns:1fr 140px 70px 34px;gap:8px;margin-bottom:6px}
.item-row-headers span{font-size:11px;font-weight:700;color:var(--text-3);text-transform:uppercase;letter-spacing:0.05em}
.add-item-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 14px;font-size:13px;font-weight:600;border:1.5px dashed var(--border);border-radius:10px;background:var(--bg);color:var(--text-2);cursor:pointer;font-family:inherit;transition:all 0.15s;width:100%}
.add-item-btn:hover{border-color:var(--blue);color:var(--blue);background:var(--blue-light)}
.add-item-btn svg{width:14px;height:14px;stroke:currentColor;stroke-width:2.5;fill:none;flex-shrink:0}

/* ── Partners Grid ─────────────────────────────────────── */
.partners-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:20px}
.partner-card{background:var(--white);border:1px solid #e2e8f0;border-radius:var(--radius-lg);padding:24px;box-shadow:0 2px 6px rgba(0,0,0,0.05);display:flex;flex-direction:column;gap:16px}
.partner-card-top{display:flex;align-items:flex-start;gap:14px}
.partner-card-avatar{width:46px;height:46px;background:var(--blue);border-radius:12px;display:flex;align-items:center;justify-content:center;color:white;font-size:20px;font-weight:700;flex-shrink:0}
.partner-card-info{flex:1;min-width:0}
.partner-card-name{font-size:15px;font-weight:700;color:var(--text);margin-bottom:3px}
.partner-card-slug{font-size:12px;color:var(--text-3)}
.partner-card-staff{display:flex;flex-wrap:wrap;gap:6px}
.staff-chip{font-size:11px;font-weight:600;padding:3px 10px;border-radius:20px;background:var(--blue-light);color:var(--blue);border:1px solid var(--blue-mid)}
.staff-tag-list{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px;min-height:0}
.staff-tag{display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:600;padding:4px 10px;border-radius:20px;background:var(--blue-light);color:var(--blue);border:1px solid var(--blue-mid)}
.staff-tag-remove{background:none;border:none;cursor:pointer;color:var(--blue);font-size:15px;line-height:1;padding:0;display:flex;align-items:center;opacity:0.6}
.staff-tag-remove:hover{opacity:1}
.staff-add-row{display:flex;gap:8px}
.staff-add-row input{flex:1}
.staff-add-row button{flex-shrink:0}
.partner-card-actions{display:flex;gap:8px;align-items:center}
.portal-link{font-size:12px;color:var(--blue);font-weight:600;text-decoration:none;display:flex;align-items:center;gap:4px}
.portal-link:hover{text-decoration:underline}
.portal-link svg{width:13px;height:13px;stroke:currentColor;stroke-width:2;fill:none;flex-shrink:0}

/* ── Spin ──────────────────────────────────────────────── */
.spin{display:inline-block;width:13px;height:13px;border:2px solid rgba(255,255,255,0.3);border-top-color:white;border-radius:50%;animation:sp 0.7s linear infinite;vertical-align:middle;margin-right:6px}
@keyframes sp{to{transform:rotate(360deg)}}

/* ── Responsive ────────────────────────────────────────── */
@media(max-width:900px){
  .main{padding:16px}
  .nav{padding-left:16px;padding-right:16px}
  .user-grid{grid-template-columns:1fr 1fr}
  .login-card{padding:32px 20px}
}

/* ── Time-based greeting (shared between admin and Moe's portal) ─── */
.dash-greeting{margin-bottom:16px}
.dash-greeting-title{font-size:24px;font-weight:600;color:var(--text);line-height:1.2}
.dash-greeting-sub{font-size:13px;color:#94a3b8;margin-top:4px}

/* ── Custom Select Dropdown (csel) — matches loc-combo style ── */
.csel-wrap{position:relative}
.csel-btn{width:100%;height:44px;padding:0 14px;font-size:14px;border:1.5px solid var(--border);border-radius:10px;background:var(--white);cursor:pointer;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:8px;transition:border-color .15s,box-shadow .15s;font-family:inherit;color:var(--text)}
.csel-btn:hover,.csel-btn.open{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.08)}
.csel-chevron{font-size:11px;color:var(--text-3);transition:transform .2s;flex-shrink:0}
.csel-btn.open .csel-chevron{transform:rotate(180deg)}
.csel-drop{display:none;position:fixed;min-width:180px;z-index:2000;border:1px solid var(--border);border-radius:12px;background:var(--white);box-shadow:0 6px 28px rgba(0,0,0,.13);overflow:hidden}
.csel-drop.open{display:block}
.csel-opt{padding:11px 16px;cursor:pointer;font-size:14px;color:var(--text);transition:background .1s;font-family:inherit}
.csel-opt:not(:last-child){border-bottom:1px solid #f1f5f9}
.csel-opt:hover{background:#f8fafc}
.csel-opt.csel-selected{color:var(--blue);font-weight:600;background:var(--blue-light)}
.csel-placeholder{color:var(--text-3)}

/* ── Consistent page header (shared) ─────────────────────── */
.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--border)}
.page-header-body{flex:1;min-width:0}
.page-header-title{font-size:24px;font-weight:600;color:var(--text);line-height:1.2;margin-bottom:4px}
.page-header-sub{font-size:13px;color:#94a3b8}
.page-header-actions{display:flex;align-items:center;gap:10px;flex-shrink:0;padding-top:4px}
