*{box-sizing:border-box}
body{margin:0;font-family:Inter,Arial,sans-serif;background:#f3f5f9;color:#172033}
.layout{display:grid;grid-template-columns:240px 1fr;min-height:100vh}
.sidebar{background:#0f172a;color:#cbd5e1;padding:22px 16px;position:sticky;top:0;height:100vh;overflow-y:auto}
.sidebar .logo{font-size:20px;font-weight:800;color:#fff;padding:0 8px 18px;border-bottom:1px solid #1e293b;margin-bottom:14px;display:flex;align-items:center;gap:8px}
.sidebar .logo small{font-size:10px;background:#1677c8;color:#fff;padding:3px 6px;border-radius:4px;font-weight:600}
.sidebar .menu{display:flex;flex-direction:column;gap:4px}
.sidebar .menu a{display:flex;align-items:center;gap:10px;padding:10px 12px;color:#cbd5e1;text-decoration:none;border-radius:8px;font-size:14px}
.sidebar .menu a:hover{background:#1e293b;color:#fff}
.sidebar .menu a.active{background:#1677c8;color:#fff;font-weight:600}
.sidebar .menu .group-title{font-size:11px;text-transform:uppercase;color:#64748b;padding:14px 12px 6px;letter-spacing:.5px}
.sidebar .icon{width:18px;display:inline-block;text-align:center}
.topbar{background:#fff;border-bottom:1px solid #e5e8ef;padding:14px 28px;display:flex;align-items:center;gap:16px;position:sticky;top:0;z-index:5}
.topbar .crumb{font-weight:600;font-size:15px}
.topbar .crumb small{color:#718096;font-weight:400;margin-left:6px}
.topbar .spacer{flex:1}
.topbar .search{display:flex;align-items:center;gap:8px;background:#f3f5f9;border:1px solid #e5e8ef;border-radius:8px;padding:8px 12px;min-width:280px}
.topbar .search input{border:0;background:transparent;outline:0;width:100%;font:inherit}
.topbar .actions{display:flex;gap:8px}
.content{padding:24px 28px;max-width:1600px}
.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:12px;flex-wrap:wrap}
.page-head h1{margin:0;font-size:22px}
.page-head .sub{color:#718096;font-size:13px;margin-top:2px}
.page-head .actions{display:flex;gap:8px;flex-wrap:wrap}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:22px}
.stat{background:#fff;border:1px solid #e4e8ef;border-radius:12px;padding:18px 20px;position:relative;overflow:hidden}
.stat .label{color:#718096;font-size:12px;text-transform:uppercase;letter-spacing:.5px}
.stat .value{font-size:28px;font-weight:700;margin-top:6px;display:block}
.stat .delta{font-size:12px;color:#718096;margin-top:4px}
.stat.success{background:linear-gradient(135deg,#ecfdf5 0%,#fff 100%)}
.stat.success .value{color:#059669}
.stat.warn{background:linear-gradient(135deg,#fffbeb 0%,#fff 100%)}
.stat.warn .value{color:#d97706}
.stat.danger{background:linear-gradient(135deg,#fef2f2 0%,#fff 100%)}
.stat.danger .value{color:#dc2626}
.stat.info .value{color:#1677c8}
.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:14px;flex-wrap:wrap;background:#fff;border:1px solid #e4e8ef;border-radius:12px;padding:12px 14px}
.toolbar .search{display:flex;align-items:center;gap:8px;flex:1;min-width:220px}
.toolbar .search input{width:100%;border:0;outline:0;font:inherit;background:transparent}
.toolbar .tabs{display:flex;gap:4px;background:#f1f5f9;border-radius:8px;padding:3px}
.toolbar .tabs a{padding:7px 14px;border-radius:6px;text-decoration:none;color:#475569;font-size:13px;font-weight:500}
.toolbar .tabs a.active{background:#fff;color:#0f172a;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.card{background:#fff;border:1px solid #e4e8ef;border-radius:12px;overflow:hidden}
.card .ch{padding:14px 18px;border-bottom:1px solid #edf0f4;display:flex;align-items:center;justify-content:space-between}
.card .ch h3{margin:0;font-size:15px}
.card .cb{padding:18px}
.btn,button.btn{border:0;background:#1677c8;color:#fff;padding:9px 14px;border-radius:8px;text-decoration:none;cursor:pointer;font:inherit;font-weight:500;font-size:13px;display:inline-flex;align-items:center;gap:6px}
.btn:hover{background:#0e5fa0}
.btn.secondary{background:#647085}
.btn.secondary:hover{background:#4b5468}
.btn.danger{background:#dc2626}
.btn.danger:hover{background:#b91c1c}
.btn.success{background:#059669}
.btn.success:hover{background:#047857}
.btn.outline{background:#fff;color:#1677c8;border:1px solid #1677c8}
.btn.outline:hover{background:#eef6ff}
.btn.sm{padding:6px 10px;font-size:12px}
table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px}
table.table{background:#fff;border:1px solid #e4e8ef;border-radius:12px;overflow:hidden}
.table th,.table td{padding:12px 14px;border-bottom:1px solid #edf0f4;text-align:left}
.table th{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.5px;font-weight:600}
.table tr:last-child td{border-bottom:0}
.table tr:hover td{background:#fafbfd}
.pill{display:inline-block;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:500}
.pill.green{background:#d1fae5;color:#065f46}
.pill.red{background:#fee2e2;color:#991b1b}
.pill.yellow{background:#fef3c7;color:#92400e}
.pill.blue{background:#dbeafe;color:#1e40af}
.pill.gray{background:#f1f5f9;color:#475569}
.notice{background:#eef6ff;border-left:3px solid #1677c8;padding:10px 14px;border-radius:6px;font-size:13px;color:#1e40af;margin-bottom:14px}
.notice.warn{background:#fffbeb;border-left-color:#f59e0b;color:#92400e}
.notice.danger{background:#fef2f2;border-left-color:#ef4444;color:#991b1b}
.notice.success{background:#ecfdf5;border-left-color:#10b981;color:#065f46}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.cards .gc{background:#fff;border:1px solid #e4e8ef;border-radius:12px;padding:18px;display:flex;flex-direction:column;gap:6px}
.cards .gc h3{margin:0;font-size:16px}
.cards .gc p{margin:0;color:#718096;font-size:13px;min-height:36px}
.cards .gc .meta{display:flex;align-items:center;justify-content:space-between;margin-top:8px}
.cards .gc .cnt{font-size:22px;font-weight:700;color:#1677c8}
.cards .gc .row{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.modal-bg{position:fixed;inset:0;background:rgba(15,23,42,.55);display:none;align-items:center;justify-content:center;z-index:50;padding:20px}
.modal-bg.on{display:flex}
.modal{background:#fff;border-radius:14px;width:100%;max-width:780px;max-height:92vh;overflow-y:auto;box-shadow:0 25px 60px rgba(0,0,0,.25)}
.modal .mh{padding:18px 22px;border-bottom:1px solid #edf0f4;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:#fff;z-index:2}
.modal .mh h2{margin:0;font-size:18px}
.modal .mh .x{cursor:pointer;background:none;border:0;font-size:22px;color:#64748b}
.modal .mb{padding:20px 22px}
.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.formgrid.full>*{grid-column:1/-1}
.cols2{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start;min-width:0}
.cols2>.card{min-width:0}
.field{display:flex;flex-direction:column;gap:5px}
.field label{font-size:12px;font-weight:600;color:#475569}
.field input,.field select,.field textarea{padding:9px 11px;border:1px solid #d7dce5;border-radius:7px;background:#fff;font:inherit;width:100%}
.field input:focus,.field select:focus,.field textarea:focus{outline:0;border-color:#1677c8;box-shadow:0 0 0 3px rgba(22,119,200,.15)}
.field small{color:#94a3b8;font-size:11px}
.vars{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-top:14px;padding:14px;background:#f8fafc;border-radius:10px;border:1px dashed #cbd5e1}
.vars .field{margin:0}
.modal-foot{padding:14px 22px;border-top:1px solid #edf0f4;display:flex;justify-content:flex-end;gap:8px;background:#f8fafc;position:sticky;bottom:0}
.dropzone{border:2px dashed #cbd5e1;border-radius:10px;padding:30px;text-align:center;background:#f8fafc;cursor:pointer;transition:.2s}
.dropzone:hover,.dropzone.over{background:#eef6ff;border-color:#1677c8}
.dropzone input{display:none}
.proof{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}
.proof .box{background:#fff;border:1px solid #e4e8ef;border-radius:10px;overflow:hidden}
.proof .box h4{margin:0;padding:12px 14px;background:#f8fafc;font-size:13px;border-bottom:1px solid #edf0f4;display:flex;align-items:center;gap:8px}
.proof .box h4 .count{margin-left:auto;background:#f1f5f9;color:#475569;padding:2px 8px;border-radius:999px;font-size:11px}
.proof .box.success h4{background:#ecfdf5;color:#065f46}
.proof .box.warn h4{background:#fffbeb;color:#92400e}
.proof .box ul{list-style:none;margin:0;padding:0;max-height:240px;overflow-y:auto}
.proof .box li{padding:8px 14px;border-bottom:1px solid #f1f5f9;font-size:13px;display:flex;justify-content:space-between;gap:10px}
.proof .box li:last-child{border-bottom:0}
.proof .box .empty{padding:18px 14px;color:#94a3b8;text-align:center;font-size:13px}
a{color:#1677c8;text-decoration:none}
a:hover{text-decoration:underline}
.card.rlist{border-radius:12px}
.autostatus{position:sticky;top:0;background:#fffbeb;color:#92400e;font-size:12px;padding:8px 14px;border-bottom:1px solid #fde68a;z-index:5}
.auto{font-size:12px;color:#94a3b8;font-style:italic}
.who{display:flex;align-items:center;gap:10px}
.av{width:32px;height:32px;border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex:0 0 32px}
.wrow{display:flex;flex-direction:column;gap:3px;line-height:1.2}
.wname{font-weight:600;display:flex;align-items:center;gap:6px;color:#172033;text-decoration:none}
a.wname:hover{text-decoration:underline}
.chcnt{color:#94a3b8;font-weight:400;font-size:12px;margin-left:6px}
.ic{opacity:.6;margin-right:4px;font-size:12px}
.wrap{word-break:break-all}
.fetched{color:#059669;font-weight:700;font-size:11px}
.fbtn{border:0;background:#eef6ff;color:#1677c8;font-size:11px;padding:2px 9px;border-radius:999px;cursor:pointer;width:fit-content;font-weight:600;font-family:inherit}
.fbtn:hover{background:#dbeafe}
.fbtn.busy{color:#64748b;background:#f1f5f9}
.fbtn:disabled{opacity:.65;cursor:default}
.muted{color:#94a3b8}
.mono{font-variant-numeric:tabular-nums}
.mwrap{position:relative;display:inline-block}
.mbtn{background:none;border:0;font-size:18px;color:#64748b;cursor:pointer;padding:4px 8px;border-radius:6px;line-height:1;font-family:inherit}
.mbtn:hover{background:#f1f5f9;color:#0f172a}
.mpop{position:absolute;right:0;top:calc(100% + 4px);background:#fff;border:1px solid #e4e8ef;border-radius:10px;box-shadow:0 12px 32px rgba(15,23,42,.12);min-width:150px;padding:6px;display:none;z-index:20}
.mwrap.open .mpop{display:flex;flex-direction:column}
.mpop a{padding:8px 10px;border-radius:7px;font-size:13px;color:#334155;display:flex;align-items:center;gap:8px}
.mpop a:hover{background:#f1f5f9;text-decoration:none}
.mpop a.danger{color:#dc2626}
@media(max-width:900px){.layout{grid-template-columns:1fr}.sidebar{position:fixed;left:-240px;transition:.25s}.sidebar.on{left:0;z-index:30}.formgrid{grid-template-columns:1fr}.cols2{grid-template-columns:1fr}}

/* ---------- Selkeymart-style Contacts page ---------- */
.i{width:18px;height:18px;flex:0 0 auto}
.i.sm{width:14px;height:14px}
.i.lg{width:60px;height:60px}
.btn.grad{background:linear-gradient(90deg,#2563eb,#7c3aed)}
.btn.grad:hover{filter:brightness(1.08);box-shadow:0 8px 18px rgba(124,58,237,.3)}
.ct-page{display:flex;flex-direction:column;gap:18px}
.ct-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ct-head h1{display:flex;align-items:center;gap:10px;margin:0;font-size:24px}
.ct-head h1 .i{color:#2563eb}
.ct-head .sub{color:#718096;font-size:13px;margin-top:2px}
.gsearch{position:relative;flex:1;min-width:240px}
.gsearch .i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#64748b}
.gsearch input{width:100%;padding:12px 14px 12px 42px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;font:inherit;outline:0}
.gsearch input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.15)}
.ggrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}
.gcard{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px;box-shadow:0 6px 18px rgba(15,23,42,.05);transition:transform .15s ease,box-shadow .15s ease}
.gcard:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(15,23,42,.1)}
.gtop{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px}
.gidc{width:42px;height:42px;border-radius:10px;background:#dbeafe;color:#2563eb;display:flex;align-items:center;justify-content:center;flex:0 0 42px}
.gtx{flex:1;min-width:0}
.gtx h3{margin:0;font-size:17px;font-weight:700;color:#1e293b;word-break:break-word}
.gtx p{margin:2px 0 0;font-size:12.5px;color:#64748b}
.gacts{display:flex;gap:4px}
.abtn{width:30px;height:30px;border:0;background:transparent;border-radius:8px;cursor:pointer;color:#64748b;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.abtn:hover{background:#f1f5f9;color:#0f172a}
.abtn.d{color:#f87171}
.abtn.d:hover{background:#fef2f2;color:#dc2626}
.gstats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}
.gt{padding:12px 10px;border-radius:12px;text-align:center}
.gt b{display:block;font-size:22px;font-weight:700;line-height:1.1}
.gt span{font-size:11px;color:#64748b;font-weight:600;text-transform:uppercase;letter-spacing:.3px}
.gt.ot{background:#f1f5f9;color:#1e293b}
.gt.ok{background:#d1fae5;color:#059669}
.gt.ob{background:#fee2e2;color:#dc2626}
.gbtnr{display:flex;gap:8px;margin-top:8px}
.gbtn{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:10px;padding:10px 12px;font:inherit;font-size:13px;font-weight:600;cursor:pointer;color:#fff;transition:box-shadow .15s}
.gbtn:hover{box-shadow:0 8px 18px rgba(37,99,235,.25)}
.gbtn.vi{background:linear-gradient(90deg,#4f46e5,#2563eb)}
.gbtn.fh{flex:0 0 auto;width:44px;background:linear-gradient(90deg,#059669,#10b981)}
.gbtn.fh:hover{box-shadow:0 8px 18px rgba(16,185,129,.3)}
.gbtn.ad{background:linear-gradient(90deg,#2563eb,#7c3aed)}
.gbtn.ad:hover{box-shadow:0 8px 18px rgba(124,58,237,.3)}
.gbtn.cp{flex:0 0 auto;width:44px;background:#e2e8f0;color:#334155}
.gbtn.cp:hover{background:#cbd5e1;box-shadow:none}
.gbtn:disabled{opacity:.6;cursor:default}
.emptyc{text-align:center;padding:60px 20px;border:2px dashed #cbd5e1;border-radius:16px;background:#f8fafc;color:#64748b}
.emptyc .i{color:#94a3b8;margin-bottom:10px}
.emptyc h3{margin:0 0 6px;font-size:18px;color:#334155}
.emptyc p{margin:0 0 18px;font-size:13px}
.tabs{display:flex;gap:2px;border-bottom:1px solid #e2e8f0;margin-bottom:18px}
.tb{padding:10px 16px;border:0;background:transparent;font:inherit;font-weight:600;font-size:14px;color:#64748b;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}
.tb.active{color:#2563eb;border-bottom-color:#2563eb}
.tbp{display:none}
.tbp.active{display:block}
.btn.full{width:100%;justify-content:center}
.vchips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.vchip{border:0;padding:8px 14px;border-radius:10px;font:inherit;font-weight:600;font-size:13px;cursor:pointer;background:#e2e8f0;color:#334155}
.vchip.sel{color:#fff;box-shadow:0 6px 14px rgba(37,99,235,.25)}
.vchip.sel.all{background:linear-gradient(90deg,#2563eb,#7c3aed)}
.vchip.sel.ok{background:linear-gradient(90deg,#059669,#10b981)}
.vchip.sel.bad{background:linear-gradient(90deg,#dc2626,#f43f5e)}
.vchip.sel.pend{background:linear-gradient(90deg,#d97706,#f59e0b)}
.vchip.bgred{background:linear-gradient(90deg,#dc2626,#f43f5e);color:#fff}
.fetchline{background:#fffbeb;color:#92400e;font-size:12.5px;padding:8px 12px;border-radius:8px;margin-bottom:12px;border:1px solid #fde68a}
.vw{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;margin-bottom:8px}
.vidx{width:34px;height:34px;border-radius:50%;background:#e2e8f0;color:#334155;font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:center;flex:0 0 34px}
.vmain{flex:1;min-width:0}
.vphone{font-weight:700;color:#1e293b;font-variant-numeric:tabular-nums;word-break:break-all}
.vn{font-size:13px;color:#64748b}
.vside{display:flex;align-items:center;gap:8px}
.chip{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.chip.ok{background:#d1fae5;color:#059669}
.chip.bad{background:#fee2e2;color:#dc2626}
.chip.pend{background:#fef3c7;color:#d97706}
.vdummy{text-align:center;padding:40px 10px;color:#94a3b8}
.vdummy .i{color:#94a3b8;margin-bottom:8px;width:56px;height:56px}
.spin{display:inline-block;width:22px;height:22px;border:3px solid #bfdbfe;border-top-color:#2563eb;border-radius:50%;animation:spin .8s linear infinite;vertical-align:middle}
@keyframes spin{to{transform:rotate(360deg)}}
#toasts{position:fixed;top:16px;right:16px;z-index:200;display:flex;flex-direction:column;gap:8px}
.ntoast{background:#0f172a;color:#fff;padding:10px 16px;border-radius:10px;font-size:13px;box-shadow:0 10px 24px rgba(15,23,42,.25);animation:tin .25s ease;max-width:380px}
.ntoast.err{background:#dc2626}
.ntoast.out{opacity:0;transform:translateX(10px);transition:.3s}
@keyframes tin{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.dzico .i{width:40px;height:40px;color:#64748b}
.exname{font-size:13px;color:#059669;margin-top:8px}
@media(max-width:900px){.upload-area{grid-template-columns:1fr}.ggrid{grid-template-columns:1fr}}
