/* ===== AIServe360 Files — dashboard styles ===== */
:root{
  --top:#16171d; --top-2:#24252d; --side:#f6f7f9; --bg:#ffffff; --line:#e6e8ec; --line-2:#eef0f3;
  --text:#1d2330; --muted:#6b7280; --faint:#9aa1ad;
  --brand:#0f766e; --brand-h:#0b5f58; --brand-soft:#e6f6f4; --accent:#14b8a6;
  --danger:#d92d20; --danger-soft:#fdecea; --warn:#b54708; --warn-soft:#fef4e6; --ok:#12805c; --ok-soft:#e7f6ef;
  --radius:10px; --shadow:0 1px 2px rgba(16,24,40,.05); --shadow-lg:0 12px 32px rgba(16,24,40,.16);
  --top-h:60px; --side-w:248px;
  font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
.inline{display:inline}
html,body{margin:0}
body{color:var(--text);background:var(--bg);font-size:14.5px;line-height:1.5;-webkit-font-smoothing:antialiased}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
h1{font-size:24px;line-height:1.25;margin:0;font-weight:650;letter-spacing:-.01em}
h2{font-size:17px;margin:0 0 4px;font-weight:650}
code,.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.92em}
.muted{color:var(--muted)} .small{font-size:12.5px} .center{text-align:center}
.ic{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ---------- shell ---------- */
.topbar{position:fixed;inset:0 0 auto 0;height:var(--top-h);background:var(--top);color:#fff;display:flex;align-items:center;gap:20px;padding:0 20px;z-index:30}
.brand{display:flex;align-items:center;gap:10px;color:#fff;font-weight:700;font-size:16px;letter-spacing:-.01em;white-space:nowrap;min-width:calc(var(--side-w) - 40px)}
.brand:hover{text-decoration:none}
.search{flex:1;max-width:720px;display:flex;align-items:center;gap:10px;height:40px;padding:0 14px;border:1px solid #3a3b45;border-radius:9px;background:var(--top-2);color:#a7abb6}
.search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(20,184,166,.25)}
.search input{flex:1;background:none;border:0;outline:0;color:#fff;font:inherit}
.search input::placeholder{color:#8d919c}
.top-right{margin-left:auto;display:flex;align-items:center;gap:14px}
.toplink{display:flex;align-items:center;gap:6px;color:#d6d8de;font-size:13.5px}
.toplink:hover{color:#fff;text-decoration:none}
.avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--brand));color:#fff;font-weight:700;font-size:14px}
.account{position:relative}
.account summary{list-style:none;cursor:pointer}
.account summary::-webkit-details-marker{display:none}
.topbar .menu-toggle{display:none;color:#fff}

.sidebar{position:fixed;top:var(--top-h);bottom:0;left:0;width:var(--side-w);background:var(--side);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:14px 12px;z-index:20;overflow-y:auto}
.sidebar nav{display:flex;flex-direction:column;gap:2px}
.sidebar nav a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:8px;color:#3b4250;font-weight:500;position:relative}
.sidebar nav a:hover{background:#eceef2;text-decoration:none}
.sidebar nav a.on{background:#e8eaee;color:var(--text);font-weight:600}
.sidebar nav a.on::before{content:"";position:absolute;left:-12px;top:6px;bottom:6px;width:3px;border-radius:0 3px 3px 0;background:var(--brand)}
.sidebar nav a .ic{color:#5b6372}
.sidebar nav a.on .ic{color:var(--brand)}
.side-usage{margin-top:auto;padding:14px 12px;border:1px solid var(--line);border-radius:var(--radius);background:#fff}
.side-usage-top{display:flex;justify-content:space-between;font-weight:600;font-size:13px;margin-bottom:8px}
.side-usage-top span{display:flex;align-items:center;gap:6px}
.side-usage small{display:block;margin-top:8px;color:var(--muted)}
.side-foot{padding:12px 4px 0}
.side-foot a{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px}

.main{margin-left:var(--side-w);padding:calc(var(--top-h) + 20px) 28px 28px;min-height:100vh;display:flex;flex-direction:column}
.foot{margin-top:auto;padding-top:28px;color:var(--faint);font-size:12.5px}

/* ---------- page parts ---------- */
.crumbs{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:13.5px;padding-bottom:14px;border-bottom:1px solid var(--line);margin:0 -28px 22px;padding-left:28px;padding-right:28px}
.crumbs a{color:var(--text);display:inline-flex;align-items:center;gap:6px}
.crumbs .sep{color:#c3c7cf}
.crumbs .ic{width:16px;height:16px}
.pagehead{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.pagehead .title-line{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.pagehead p{margin:6px 0 0}
.uplink{display:inline-flex;align-items:center;gap:5px;font-size:13.5px}
.uplink .ic{width:15px;height:15px}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:18px;overflow-x:auto}
.tabs a{padding:10px 12px;color:#4b5261;font-weight:500;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.tabs a:hover{color:var(--text);text-decoration:none}
.tabs a.on{color:var(--brand);border-bottom-color:var(--brand);font-weight:600}

.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.pad{padding:20px}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.stat{padding:16px 18px}
.stat-top{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;font-weight:500}
.stat-ic{display:grid;place-items:center;width:28px;height:28px;border-radius:7px;background:var(--brand-soft);color:var(--brand)}
.stat-ic .ic{width:16px;height:16px}
.stat-val{font-size:22px;font-weight:650;margin:8px 0 6px;letter-spacing:-.01em}
.stat-val small{font-size:13px;color:var(--muted);font-weight:500}
.bar{height:7px;border-radius:99px;background:#edf0f3;overflow:hidden}
.bar span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--accent),var(--brand))}
.bar-warn span{background:#f79009} .bar-danger span{background:var(--danger)}

/* ---------- toolbar ---------- */
.toolbar{display:flex;align-items:center;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.toolbar .grow{flex:1}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:38px;padding:0 14px;border:1px solid #d5d9e0;border-radius:8px;background:#fff;color:var(--text);font:inherit;font-weight:550;cursor:pointer;white-space:nowrap;box-shadow:var(--shadow)}
.btn:hover{background:#f6f7f9;text-decoration:none}
.btn .ic{width:17px;height:17px}
.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-h)}
.btn-danger{background:var(--danger);border-color:var(--danger);color:#fff}
.btn-danger:hover{background:#b42318}
.btn-ghost-danger{color:var(--danger)}
.btn-sm{height:32px;padding:0 10px;font-size:13px}
.btn-block{width:100%}
.btn-icon{width:36px;height:36px;padding:0}
.iconbtn{display:grid;place-items:center;width:36px;height:36px;border:0;background:none;color:inherit;border-radius:8px;cursor:pointer}
.iconbtn:hover{background:rgba(127,127,127,.15)}
.seg{display:inline-flex;border:1px solid #d5d9e0;border-radius:8px;overflow:hidden;box-shadow:var(--shadow)}
.seg .btn{border:0;border-radius:0;box-shadow:none;border-right:1px solid #d5d9e0}
.seg .btn:last-child{border-right:0}
.dropdown{position:relative}
.dropdown summary{list-style:none}
.dropdown summary::-webkit-details-marker{display:none}
.menu{position:absolute;top:calc(100% + 6px);left:0;min-width:210px;background:#fff;color:var(--text);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-lg);padding:6px;z-index:40}
.menu-right{left:auto;right:0}
.menu a,.menu button{display:flex;align-items:center;gap:10px;width:100%;padding:9px 12px;border:0;background:none;border-radius:7px;color:var(--text);font:inherit;text-align:left;cursor:pointer}
.menu a:hover,.menu button:hover{background:#f3f4f6;text-decoration:none}
.menu .danger{color:var(--danger)}
.menu hr{border:0;border-top:1px solid var(--line);margin:6px 0}
.menu-head{padding:10px 12px;display:flex;flex-direction:column;border-bottom:1px solid var(--line);margin-bottom:6px;font-size:13px}

/* ---------- tables ---------- */
.table-wrap{border:1px solid var(--line);border-radius:var(--radius);overflow:visible;background:#fff}
table.grid{width:100%;border-collapse:collapse}
.grid th{position:sticky;top:var(--top-h);background:#fafbfc;text-align:left;font-size:12.5px;font-weight:600;color:#5b6372;text-transform:none;padding:11px 14px;border-bottom:1px solid var(--line);white-space:nowrap;z-index:2}
.grid th:first-child{border-top-left-radius:var(--radius)} .grid th:last-child{border-top-right-radius:var(--radius)}
.grid td{padding:10px 14px;border-bottom:1px solid var(--line-2);vertical-align:middle}
.grid tr:last-child td{border-bottom:0}
.grid tbody tr:hover{background:#fafbfc}
.grid tr.sel{background:var(--brand-soft)}
.grid .num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.grid .actions{text-align:right;white-space:nowrap}
.grid .actions .btn{margin-left:4px}
.grid .chk{width:40px}
.namecell{display:flex;align-items:center;gap:12px;min-width:0}
.namecell a{color:var(--text);font-weight:500;overflow:hidden;text-overflow:ellipsis}
.namecell .ic{color:#6b7280}
.namecell .ic-folder .ic{color:#e3a008}
.date{color:#4b5261;white-space:nowrap}
.tablefoot{padding:12px 2px;color:var(--muted);font-size:13px}
input[type=checkbox]{width:16px;height:16px;accent-color:var(--brand)}

.pill{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:600;background:#eef0f3;color:#4b5261;white-space:nowrap}
.pill-ok{background:var(--ok-soft);color:var(--ok)} .pill-warn{background:var(--warn-soft);color:var(--warn)} .pill-bad{background:var(--danger-soft);color:var(--danger)} .pill-brand{background:var(--brand-soft);color:var(--brand)}
.dot{width:9px;height:9px;border-radius:50%;flex:none;background:#c3c7cf}
.dot-ok{background:#12b76a;box-shadow:0 0 0 3px #d1fadf} .dot-warn{background:#f79009} .dot-bad{background:var(--danger)}

/* server rows */
.list .row{display:flex;align-items:center;gap:16px;padding:16px 18px;border-bottom:1px solid var(--line-2);color:var(--text)}
.list .row:last-child{border-bottom:0}
.list .row:hover{background:#fafbfc;text-decoration:none}
.row-main{display:flex;flex-direction:column;min-width:0;flex:1}
.row-main strong{font-weight:600}
.row-meta{display:flex;gap:18px;color:var(--muted);font-size:13px;flex-wrap:wrap}
.row-meta span{display:flex;align-items:center;gap:6px}
.row-meta .ic{width:15px;height:15px}
.chev{color:#b0b5bf}

/* connection details */
.kv{display:grid;grid-template-columns:160px 1fr;gap:0;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.kv > div{padding:12px 16px;border-bottom:1px solid var(--line-2);display:flex;align-items:center;gap:10px;min-height:48px}
.kv > div:nth-child(odd){background:#fafbfc;color:var(--muted);font-weight:500}
.kv > div:nth-last-child(-n+2){border-bottom:0}
.copyval{display:flex;align-items:center;gap:8px;justify-content:space-between;width:100%}
.copyval code{background:#f3f4f6;padding:3px 8px;border-radius:6px}
.cols{display:grid;grid-template-columns:1.4fr 1fr;gap:18px}

/* forms */
label{display:block;font-weight:550;font-size:13.5px;margin-bottom:14px}
input[type=text],input[type=email],input[type=password],input[type=search]:not(.search input),input[type=date],input[type=number],input[type=url],input[type=tel],input[type=time],input[type=datetime-local],input:not([type]),select,textarea{display:block;width:100%;margin-top:6px;height:40px;padding:0 12px;border:1px solid #d0d5dd;border-radius:8px;font:inherit;font-weight:400;background:#fff;color:var(--text)}
textarea{height:auto;padding:10px 12px;min-height:90px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px rgba(20,184,166,.18)}
label small{display:block;font-weight:400;margin-top:5px}
.radio-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:6px 0 14px}
.radio-cards label{margin:0;display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid #d0d5dd;border-radius:9px;cursor:pointer;font-weight:500}
.radio-cards label:has(input:checked){border-color:var(--brand);background:var(--brand-soft)}
.radio-cards small{color:var(--muted);font-weight:400;display:block}
.switch{display:flex;align-items:center;gap:10px;font-weight:500}

/* flash + secrets */
.flash{padding:12px 16px;border-radius:9px;margin-bottom:16px;border:1px solid;font-weight:500}
.flash-success{background:var(--ok-soft);border-color:#a6e3c6;color:#085d3a}
.flash-error{background:var(--danger-soft);border-color:#f7c1bb;color:#912018}
.flash-info{background:#eef4ff;border-color:#c7d7fe;color:#1d3a8a}
.secret{display:flex;align-items:center;gap:10px;margin:10px 0 4px}
.secret code{font-size:15px;background:#fff;border:1px dashed #74c4a5;padding:6px 12px;border-radius:7px;color:var(--text)}

/* empty state */
.empty{text-align:center;padding:48px 20px}
.empty-ic{display:inline-grid;place-items:center;width:52px;height:52px;border-radius:14px;background:var(--brand-soft);color:var(--brand);margin-bottom:12px}
.empty-ic .ic{width:26px;height:26px}
.empty p{margin:6px 0 18px}

/* modal */
dialog.modal{border:0;border-radius:14px;padding:0;width:min(520px,calc(100vw - 32px));box-shadow:var(--shadow-lg)}
dialog.modal::backdrop{background:rgba(16,24,40,.45)}
.modal-body{padding:24px}
.modal-body h2{margin-bottom:16px;font-size:18px}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}

/* drop zone */
.dropzone{position:fixed;inset:0;background:rgba(15,118,110,.12);border:3px dashed var(--brand);display:none;place-items:center;z-index:50;font-size:20px;font-weight:650;color:var(--brand)}
.dropzone.on{display:grid}
.progress{position:fixed;right:20px;bottom:20px;width:320px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);padding:14px 16px;z-index:60;display:none}
.progress.on{display:block}
.progress .bar{margin-top:8px}

/* auth page */
body.bare{background:#f6f7f9}
.auth{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}
.auth-side{background:var(--top);color:#fff;padding:56px;display:flex;flex-direction:column;justify-content:center;gap:22px;background-image:radial-gradient(circle at 20% 20%,rgba(20,184,166,.18),transparent 45%),radial-gradient(circle at 80% 90%,rgba(15,118,110,.25),transparent 40%)}
.auth-side h2{font-size:30px;line-height:1.2;max-width:420px;letter-spacing:-.02em}
.brand-lg{font-size:20px}
.ticks{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px;color:#cfd3da}
.ticks li{padding-left:28px;position:relative}
.ticks li::before{content:"";position:absolute;left:0;top:3px;width:18px;height:18px;border-radius:50%;background:rgba(20,184,166,.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232dd4bf' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat}
.auth-main{display:grid;place-items:center;padding:32px}
.auth-card{width:min(400px,100%);padding:32px}
.auth-card h1{margin-bottom:4px}
.auth-card p.muted{margin:0 0 20px}

/* guide */
.steps{counter-reset:s;display:flex;flex-direction:column;gap:12px;padding:0;list-style:none}
.steps li{counter-increment:s;position:relative;padding-left:40px}
.steps li::before{content:counter(s);position:absolute;left:0;top:0;width:26px;height:26px;border-radius:50%;background:var(--brand-soft);color:var(--brand);font-weight:700;display:grid;place-items:center;font-size:13px}

/* ---------- responsive ---------- */
@media (max-width:1100px){ .stats{grid-template-columns:repeat(2,1fr)} .cols{grid-template-columns:1fr} }
@media (max-width:860px){
  .topbar .menu-toggle{display:grid}
  .topbar .brand{min-width:0} .topbar .brand span{display:none}
  .toplink{display:none}
  .topbar{gap:10px;padding:0 12px}
  .search{min-width:0;padding:0 10px}
  .grid td,.grid th{padding:10px 8px}
  .namecell{gap:8px}
  .namecell a{overflow-wrap:anywhere}
  .pagehead h1{font-size:21px}
  .sidebar{transform:translateX(-100%);transition:transform .2s;box-shadow:var(--shadow-lg)}
  body.nav-open .sidebar{transform:none}
  .main{margin-left:0;padding:calc(var(--top-h) + 16px) 16px 20px}
  .crumbs{margin:0 -16px 18px;padding-left:16px;padding-right:16px}
  .hide-sm{display:none}
  .auth{grid-template-columns:1fr} .auth-side{display:none}
  .kv{grid-template-columns:1fr} .kv > div:nth-child(odd){border-bottom:0;min-height:0;padding-bottom:0;background:none}
}

/* admin + billing */
.badge{font-style:normal;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;background:#f79009;color:#1d1300;padding:2px 7px;border-radius:5px;margin-left:4px}
.imp-banner{position:fixed;top:var(--top-h);left:0;right:0;z-index:25;background:#fef0c7;color:#7a2e0e;border-bottom:1px solid #fedf89;padding:7px 20px;font-size:13px;text-align:center}
body:has(.imp-banner) .main{padding-top:calc(var(--top-h) + 56px)}
body:has(.imp-banner) .sidebar{top:calc(var(--top-h) + 34px)}
.side-notice{margin-top:10px;padding:10px 12px;border-radius:9px;font-size:12.5px;font-weight:500;line-height:1.4}
.side-notice-warn{background:var(--warn-soft);color:var(--warn);border:1px solid #fedf89}
.side-notice-bad{background:var(--danger-soft);color:#912018;border:1px solid #f7c1bb}
.side-notice-info{background:#eef4ff;color:#1d3a8a;border:1px solid #c7d7fe}
.side-usage + .side-notice{margin-top:10px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.section{margin-top:22px}
.section > h2{margin-bottom:10px}
.btn-row{display:flex;gap:8px;flex-wrap:wrap}
.creds{background:#f8fafc;border:1px solid var(--line);border-radius:9px;padding:12px 14px;font-family:ui-monospace,Menlo,monospace;font-size:13px;white-space:pre-wrap;margin:8px 0}
@media (max-width:860px){ .grid-2,.grid-3{grid-template-columns:1fr} }

/* grouped sidebar */
.sidebar nav a.has-kids .caret{margin-left:auto;color:#9aa1ad;font-size:12px}
.subnav{display:flex;flex-direction:column;margin:2px 0 6px 30px;border-left:1px solid var(--line);padding-left:8px}
.subnav a{padding:7px 10px !important;font-size:13.5px;font-weight:500;color:#4b5261 !important;border-radius:7px}
.subnav a::before{display:none}
.subnav a.on{background:#e8eaee;color:var(--text) !important;font-weight:600}
.page-intro{max-width:880px;margin:-6px 0 18px;color:#4b5261;line-height:1.6}
.filters{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;margin-bottom:14px}
.filters label{margin:0;font-size:12.5px}
.filters input,.filters select{height:36px;margin-top:4px;min-width:140px}
.pager{display:flex;gap:8px;align-items:center;justify-content:flex-end;padding:12px 0;color:var(--muted);font-size:13px}
.chart{width:100%;height:auto;display:block}
.chart text{font-size:11px;fill:#6b7280;font-family:inherit}
.legend{display:flex;gap:14px;font-size:12.5px;color:var(--muted);margin-top:6px}
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.checklist{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px;max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:9px;padding:10px;margin:6px 0 14px}
.checklist label{margin:0;font-weight:500;display:flex;gap:8px;align-items:center}
.result{white-space:pre-wrap;background:#f8fafc;border:1px solid var(--line);border-radius:9px;padding:12px 14px;font-size:13.5px;max-height:420px;overflow:auto}

.nowrap{white-space:nowrap}
.clip{display:inline-block;max-width:128px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
.table-wrap.scroll-x{overflow-x:auto}
.table-wrap.scroll-x .grid th{position:static}
@media (max-width:1600px){ .hide-md{display:none} }
.md h3{font-size:15px;margin:10px 0 4px}.md ul{margin:4px 0 8px;padding-left:20px}.md p{margin:6px 0}

/* date fields: same look as other inputs, roomy, with a soft calendar icon */
input[type=date],input[type=datetime-local],input[type=time]{position:relative;padding:0 40px 0 12px;font-variant-numeric:tabular-nums;letter-spacing:.2px;cursor:text;min-width:150px}
input[type=date]::-webkit-datetime-edit{padding:0}
input[type=date]::-webkit-datetime-edit-fields-wrapper{padding:0}
input[type=date]::-webkit-datetime-edit-text{color:#98a2b3;padding:0 3px}
input[type=date]:invalid::-webkit-datetime-edit,input[type=date][value=""]::-webkit-datetime-edit{color:#98a2b3}
input[type=date]::-webkit-calendar-picker-indicator{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:24px;height:24px;padding:4px;margin:0;border-radius:6px;cursor:pointer;opacity:1;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center/16px no-repeat}
input[type=date]::-webkit-calendar-picker-indicator:hover{background-color:#f2f4f7}
input[type=date]:focus::-webkit-calendar-picker-indicator{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E")}
@-moz-document url-prefix(){input[type=date]{padding-right:12px}}
input[type=number]{padding-right:8px}
/* log filters: label above each control, even spacing */
.filters{gap:12px 14px}
.filters label{display:flex;flex-direction:column;font-weight:600;color:#344054}
.filters input[type=date]{min-width:168px}
.filters .btn{height:36px}
/* file browser: shared vs private space switcher */
.spacebar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px}
.chip{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border:1px solid #d0d5dd;border-radius:999px;background:#fff;color:#344054;font-size:13px;font-weight:500;text-decoration:none}
.chip svg{width:14px;height:14px}
.chip:hover{background:#f9fafb}
.chip.on{background:var(--brand-soft);border-color:var(--brand);color:var(--brand)}
.pill-muted{background:#f2f4f7;color:#475467}
/* public share page */
.share-page{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:32px 16px;background:#f6f7f9}
.share-card{width:100%;max-width:440px;text-align:center;padding:34px 30px}
.share-card h1{font-size:20px;margin:6px 0 6px;word-break:break-word}
.share-ic{width:56px;height:56px;margin:0 auto 12px;border-radius:14px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center}
.share-ic svg{width:26px;height:26px}
.share-ic-off{background:#f2f4f7;color:#667085}
.share-note{margin:14px 0 4px;padding:10px 14px;border-left:3px solid var(--brand);background:#f9fafb;text-align:left;font-size:14px;color:#344054;border-radius:0 8px 8px 0}
.share-card .btn-lg{height:46px;font-size:15px;margin-top:18px}
.share-pass{margin-top:18px;text-align:left}
@media (max-width:1500px){ .filters .hide-lg{display:none} }
.share-page .brand,.share-page .brand span{color:var(--text)}
.logfilters input,.logfilters select{min-width:0}
.logfilters input[type=date]{width:150px}
.logfilters select{width:155px}
.logfilters input:not([type]),.logfilters input[type=text]{width:125px}
.logfilters select[name=event],.logfilters select[name=result]{width:110px}

/* selection bar (Files.com style) */
.bulkbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:0 0 14px;padding:12px 16px;border:1px solid var(--line,#e4e7ec);border-radius:10px;background:#f9fafb}
.bulkbar[hidden]{display:none}
.bulkbar .bulk-label{font-size:14px;color:#344054;margin-right:4px}
.bulkbar .btn{background:#fff}
.bulkbar form.inline{display:inline}
.linkbtn{background:none;border:0;padding:4px 6px;font:inherit;font-size:14px;color:#344054;text-decoration:underline;cursor:pointer}
.linkbtn:hover{color:var(--brand)}
tr.sel td{background:var(--brand-soft)}
.actions .btn-icon + .btn-icon{margin-left:4px}
.share-files{list-style:none;margin:16px 0 0;padding:0;text-align:left;border:1px solid #e4e7ec;border-radius:10px;max-height:320px;overflow:auto}
.share-files li{display:flex;align-items:center;gap:10px;padding:8px 10px 8px 12px;border-top:1px solid #f2f4f7}
.share-files li:first-child{border-top:0}
.share-files li svg{width:16px;height:16px;flex:none;color:#667085}
.share-files .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.tenant-tag{color:rgba(255,255,255,.8);font-size:15px;margin:-6px 0 18px;line-height:1.5}
.addr-input{display:flex;align-items:stretch;border:1px solid #d0d5dd;border-radius:8px;overflow:hidden;background:#fff;margin-top:6px}
.addr-input:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.addr-input input{border:0 !important;box-shadow:none !important;border-radius:0 !important;flex:1;min-width:80px;margin:0 !important}
.addr-input .pre,.addr-input .post{display:flex;align-items:center;padding:0 10px;background:#f9fafb;color:#667085;font-size:14px;white-space:nowrap}
.addr-input .pre{border-right:1px solid #e4e7ec}.addr-input .post{border-left:1px solid #e4e7ec}
.pill-bad{background:#fef3f2;color:#b42318}

/* password show/hide */
.pw-wrap{position:relative;display:block;margin-top:6px}
label .pw-wrap input{margin-top:0}
.pw-wrap input{width:100%;padding-right:44px !important}
.pw-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:6px;background:transparent;color:#667085;cursor:pointer;padding:0}
.pw-eye:hover{background:#f2f4f7;color:#344054}
.pw-eye:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
.pw-eye svg{width:18px;height:18px}
input::-ms-reveal,input::-ms-clear{display:none}
