/* JJ77 CRM V3.2 — easier-to-read layout for daily staff work. Loaded after the inline styles. */
:root{--bg:#081321;--p:#0f1d2e;--p2:#122438;--line:#243a54;--txt:#eef4fb;--muted:#9db0c6;--gold:#e8b23a}
html{font-size:14px}
body{font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased}
input,select,textarea,button{font-size:14px!important;line-height:1.3}
input,select{height:40px;padding:0 12px}
textarea{padding:10px 12px;min-height:72px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px #e8b23a33}
input[disabled],select[disabled]{opacity:.6;cursor:not-allowed}
input[type=date]{color-scheme:dark}
::placeholder{color:#62778f}

/* Buttons */
.btn{height:36px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:600;border-radius:8px;text-decoration:none;color:#fff;white-space:nowrap;transition:background .12s,border-color .12s}
.btn:hover{border-color:#3d5a7c;background:#18304a}
.btn.small{height:30px;padding:0 10px;font-size:13px!important}
.btn.primary{color:#1a1203;background:linear-gradient(#f0c050,#d39b22);border-color:#e3a92e}
.btn.primary:hover{background:linear-gradient(#f6cb61,#dca52b)}
.btn.green{background:#17573a;border-color:#23875a}.btn.green:hover{background:#1d6b47}
.btn.red{background:#5a2229;border-color:#8e3a45}.btn.red:hover{background:#6c2932}
.btn[disabled]{opacity:.45;cursor:not-allowed}
a.btn{text-decoration:none}

/* Sidebar */
.app{grid-template-columns:232px 1fr}
.side{padding:16px 10px 30px;scrollbar-width:thin}
.side .logo{margin:0 10px 10px;font-size:28px}
.side .nav-group{font-size:11px;letter-spacing:.06em;color:#7088a3;text-transform:uppercase;margin:14px 12px 4px;font-weight:700}
.nav{display:flex;align-items:center;gap:10px;padding:9px 12px;margin:1px 0;font-size:14px;color:#d1dcea;border-radius:8px}
.nav .ico{width:20px;text-align:center;flex:none;font-size:15px}
.nav .zh{color:#7d93ad;font-size:12px;margin-left:auto}
.nav.active .zh{color:#ffe8b0}
.nav.active{font-weight:700}
.nav .notice-count{margin-left:6px}

/* Top bar */
.top{height:60px;padding:0 22px}
.top h2{font-size:20px;margin:0}
.top .btn{height:34px}

/* Cards & tables */
.content{padding:20px 22px;max-width:1700px}
.card{margin-bottom:16px;border-radius:12px}
.head{padding:14px 18px;gap:10px}
.head h3{font-size:16px}
.body{padding:14px 18px}
.toolbar{gap:8px;align-items:center;margin-bottom:12px}
.toolbar input{width:230px}
.toolbar input[data-record-filter]{width:150px}
.toolbar input[type=date]{width:160px}
#tableV,.body>table{overflow-x:auto}
table{font-size:13.5px}
thead th{position:sticky;top:0;background:#102136;z-index:1;font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:#9fb3ca;padding:10px 10px}
td{padding:10px 10px;vertical-align:middle}
tbody tr:nth-child(even) td{background:#ffffff05}
tbody tr:hover td{background:#e8b23a12}
td .muted{font-size:12px}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
.empty-row{padding:28px!important;text-align:center}

/* Status badges */
.status{display:inline-block;font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px;background:#26394f;color:#c7d5e5}
.status.Paid,.status.Approved,.status.Active,.status.Verified,.status.Enable,.status.Claimed,.status.Closed-ok{background:#153b2b;color:#86f0b2}
.status.Pending,.status.Processing,.status.Review,.status.New,.status.Unclaimed{background:#4f3b0f;color:#ffd76b}
.status.Rejected,.status.Suspended,.status.Disable,.status.Disabled{background:#4a1f27;color:#ffa1aa}
.status.Contacted{background:#1b3459;color:#9cc4ff}

/* Phones in tables */
.phone-more{display:inline-block;margin-left:6px;font-size:11px;padding:1px 6px;border-radius:999px;background:#1c3654;color:#9cc4ff;cursor:help}

/* Modal */
.modal{padding:16px;align-items:start;overflow:auto}
.modalbox{width:min(760px,96vw);max-height:none;margin:3vh auto;padding:0;overflow:visible;box-shadow:0 30px 90px #000a}
.mh{position:sticky;top:0;z-index:2;align-items:center;padding:16px 20px;border-bottom:1px solid var(--line);background:#0c1a2a;border-radius:14px 14px 0 0}
.mh h3{font-size:18px}
#mb{padding:18px 20px 20px}
.x{width:36px;height:36px;border-radius:8px}.x:hover{background:#1a2c42;color:#fff}
.formgrid{gap:14px 16px;align-items:start}
.formgrid .field{margin:0}
.field label{font-size:12.5px;font-weight:600;color:#a9bbd0;margin-bottom:6px}
.formgrid .field.full:last-child{position:sticky;bottom:0;background:#0b1725;padding-top:10px;margin-top:4px;border-top:1px solid #1d3047;z-index:1}
.formgrid .field.full:last-child .btn.primary{min-width:140px;height:40px}
.formgrid h3{font-size:14px;margin:4px 0 8px;color:#cfdbea}
.notice{font-size:13px;line-height:1.55;border-radius:10px}
.err{min-height:0;margin-bottom:6px}
.err:not(:empty){padding:8px 10px;border-radius:8px;background:#4a1f27;color:#ffc3c9;border:1px solid #8e3a45}

/* Multiple phone numbers */
.phone-list{display:grid;gap:8px;margin-bottom:8px}
.phone-row{display:grid;grid-template-columns:110px 1fr 40px;gap:8px;align-items:center}
.phone-tag{font-size:12px;color:#9db0c6;font-weight:600}
.phone-row:first-child .phone-tag{color:var(--gold)}
.phone-row .btn{height:40px;padding:0}

/* Time picker (hour + minute dropdowns) */
.time-pick{display:grid;grid-template-columns:1fr auto 90px;gap:6px;align-items:center}
.time-pick span{color:var(--muted);font-weight:700}

/* Customer bank rows */
.customer-bank-row{grid-template-columns:110px 1fr 1fr 110px 90px;gap:8px}

/* Dashboard */
.kpis{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.kpi{padding:16px 18px}
.kpi .l{font-size:12.5px;font-weight:600}
.kpi .v{font-size:22px}
.kpi.link{cursor:pointer;transition:border-color .12s,transform .12s}
.kpi.link:hover{border-color:var(--gold);transform:translateY(-1px)}
.kpi.alert .v{color:#ffd76b}

/* Toasts */
#toastsV{position:fixed;right:18px;bottom:18px;z-index:60;display:grid;gap:8px;max-width:min(420px,92vw)}
.toastV{padding:12px 16px;border-radius:10px;background:#143a2a;border:1px solid #23875a;color:#e6fff1;font-size:14px;box-shadow:0 10px 30px #0009;cursor:pointer;white-space:pre-line;animation:toastIn .18s ease-out}
.toastV.bad{background:#4a1f27;border-color:#8e3a45;color:#ffe3e6}
@keyframes toastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* Login */
.loginbox{padding:32px}
.loginbox .btn.primary{height:44px}

@media(max-width:1100px){.app{grid-template-columns:200px 1fr}.nav .zh{display:none}}
@media(max-width:760px){.formgrid{grid-template-columns:1fr}.phone-row{grid-template-columns:1fr 40px}.phone-tag{display:none}.customer-bank-row{grid-template-columns:1fr}.toolbar input,.toolbar input[type=date],.toolbar input[data-record-filter]{width:100%}}
.app{grid-template-columns:250px 1fr}
.nav span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav .zh{flex:none}
.x{font-size:24px!important;line-height:1}
td{padding:9px 8px}
@media(max-width:1100px){.app{grid-template-columns:200px 1fr}}
@media(max-width:760px){.app{grid-template-columns:1fr}}
/* Keep the Action column (Approve / Edit buttons) visible on wide tables */
#tableV td.act,#tableV th.act{position:sticky;right:0;background:#0f1d2e;box-shadow:-8px 0 12px -6px #0009;z-index:2}
#tableV thead th.act{background:#102136;z-index:3}
#tableV tbody tr:hover td.act{background:#1c2a33}
