@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap');
:root{--bg:#f5f6f8;--ink:#172238;--muted:#7d8594;--line:#e9ecf1;--blue:#4c62e8;--green:#169777}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px 'DM Sans',sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:white;color:var(--ink);border-radius:8px;padding:10px 14px;transition:.15s}button:hover{background:#eef0fe;border-color:#c7ceff}button.primary{background:var(--blue);border-color:var(--blue);color:white}button.danger{color:#bf3c52}aside{position:fixed;width:232px;background:#fff;height:100vh;border-right:1px solid var(--line);padding:31px 18px;display:flex;flex-direction:column}.brand{font-family:Manrope,sans-serif;font-size:21px;font-weight:800;display:flex;align-items:center;gap:10px;padding:0 12px}.brand i{background:var(--blue);color:white;font-size:22px;font-style:normal;border-radius:9px;width:33px;height:33px;text-align:center}.brand small{color:#a1a7b5;font-weight:500}.workspace{margin:31px 8px 21px;border:1px solid var(--line);padding:11px;border-radius:8px;font-size:12px;display:flex;align-items:center;gap:10px}.workspace b{display:block;font-size:13px}.workspace span{color:var(--muted)}.navlabel{font-size:10px;letter-spacing:1.7px;color:#a0a7b3;padding:15px 14px 9px}nav button{width:100%;text-align:left;border:0;padding:12px 14px;background:transparent;color:#737d90;display:flex;align-items:center;gap:12px;margin-bottom:3px;font-weight:500}nav button.active{background:#eef0ff;color:var(--blue)}.ico{width:19px;height:19px;display:inline-flex}.ico svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.asidefoot{margin-top:auto;border-top:1px solid var(--line);padding:20px 9px 0;display:flex;gap:10px;align-items:center}.avatar{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:#eceffd;color:#5266c8;font-weight:700}.asidefoot small{color:var(--muted)}main{margin-left:232px}.topbar{height:78px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 38px}.crumb{color:#8b93a2;font-size:12px}.crumb b{color:#576174;font-weight:500}.topright{display:flex;align-items:center;gap:18px}.search{border:1px solid var(--line);padding:9px 12px;border-radius:7px;background:#fafbfc;width:245px;color:var(--muted)}.content{padding:33px 38px;max-width:1600px;margin:auto}h1,h2,h3{font-family:Manrope,sans-serif}h1{font-size:27px;letter-spacing:-1px;margin:0 0 9px;font-weight:800}h2{font-size:15px;margin:0;font-weight:750}h3{font-size:14px}p{line-height:1.65}.subtitle{color:var(--muted);margin:0;font-size:13px}.heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:27px}.actions{display:flex;gap:9px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:23px}.stat,.panel{background:white;border:1px solid var(--line);border-radius:11px;box-shadow:0 2px 3px #17223802}.stat{padding:21px}.statlabel{display:flex;align-items:center;justify-content:space-between;color:#7b8494;font-size:12px}.statlabel .ico{width:31px;height:31px;background:#f0f2ff;color:var(--blue);padding:7px;border-radius:8px}.stat strong{font-family:Manrope,sans-serif;font-size:29px;letter-spacing:-1px;display:block;margin:9px 0}.stat small{font-size:11px;color:var(--muted)}.stat small em{font-style:normal;color:var(--green)}.grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,1fr);gap:22px;margin-bottom:22px}.panelhead{display:flex;justify-content:space-between;align-items:center;padding:21px 23px;border-bottom:1px solid var(--line)}.panelhead button{border:0;padding:0;color:var(--blue);font-size:12px}.panelbody{padding:20px 23px}.pill{font-size:10px;padding:5px 8px;border-radius:5px;display:inline-block;white-space:nowrap;background:#eef1f7;color:#6f7c92}.pill.green{background:#eaf7f1;color:#238e6b}.pill.red{background:#fcecf0;color:#cc5169}.pill.orange{background:#fff5e8;color:#bf8a37}.serverline{display:flex;gap:13px;align-items:center;margin-bottom:23px}.servericon{width:44px;height:44px;background:#f1f2fa;border-radius:9px;display:flex;align-items:center;justify-content:center;color:#6873c3}.serverline strong{display:block;font-size:13px;margin-bottom:6px}.serverline small{font-size:11px;color:var(--muted)}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.metric label{font-size:11px;color:var(--muted);display:flex;justify-content:space-between}.metric strong{font-size:18px;display:block;margin:10px 0}.bar{height:5px;background:#eff1f6;border-radius:6px;overflow:hidden}.bar i{height:100%;background:var(--blue);display:block;border-radius:6px}.servermeta{display:flex;gap:22px;margin-top:23px;border-top:1px solid var(--line);padding-top:15px;font-size:11px;color:var(--muted)}.alert{display:flex;align-items:flex-start;gap:11px;padding:12px 0;border-bottom:1px solid var(--line)}.alert:last-child{border:0}.alert .dot{background:#fff4e4;border-radius:8px;padding:7px;color:#c18c41}.alert b{font-size:12px;font-weight:600;display:block;margin:2px 0 5px}.alert small{font-size:11px;color:var(--muted)}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:#8a92a2;font-weight:500;background:#fcfcfd;padding:13px 22px;border-bottom:1px solid var(--line)}td{padding:16px 22px;border-bottom:1px solid #f0f2f6;font-size:12px}tr:last-child td{border-bottom:0}.clientcell{display:flex;gap:11px;align-items:center}.clientcell .avatar{width:33px;height:33px;font-size:11px;border-radius:8px}.clientcell b{display:block;font-size:12px}.clientcell small{font-size:10px;color:var(--muted);display:block;margin-top:4px}.empty{text-align:center;padding:32px 18px;color:#8a93a4;font-size:12px}.task{display:flex;align-items:center;gap:10px;padding:13px 0;border-bottom:1px solid var(--line)}.task input{accent-color:var(--blue);width:16px;height:16px}.task b{font-size:12px;font-weight:500;display:block}.task small{font-size:10px;color:var(--muted);display:block;margin-top:5px}.task .pill{margin-left:auto}.footnote{font-size:11px;color:#9aa2b0;display:flex;justify-content:space-between;margin-top:28px}.note{padding:13px 16px;border:1px solid #e4e8fc;background:#f0f3ff;border-radius:8px;color:#6573a5;font-size:12px;margin-bottom:20px;line-height:1.6}.tools{display:flex;gap:10px;margin-bottom:20px;flex-wrap:wrap}.tools input{max-width:400px;flex:1}input,select,textarea{border:1px solid #dde2eb;border-radius:7px;padding:10px 12px;background:#fff;color:var(--ink);outline:none}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px #4c62e811}dialog{border:1px solid var(--line);border-radius:15px;max-width:640px;width:calc(100% - 32px);padding:28px;box-shadow:0 30px 100px #17223833}dialog::backdrop{background:#17223866;backdrop-filter:blur(3px)}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}label.field{font-size:12px;display:flex;flex-direction:column;gap:7px;color:#737d90}.wide{grid-column:1/-1}.modalactions{display:flex;justify-content:flex-end;gap:9px}textarea{min-height:85px;resize:vertical}.close{float:right;border:0;padding:2px 7px;font-size:23px}#toast{position:fixed;bottom:25px;right:25px;background:#24314a;color:white;border-radius:8px;padding:14px 22px;display:none;z-index:10}.login{max-width:420px;margin:14vh auto;padding:35px;background:white;border:1px solid var(--line);border-radius:15px}.login .brand{padding:0;margin-bottom:35px}.login input{width:100%;margin:12px 0}.login button{width:100%;margin-top:8px}.login p{color:var(--muted);font-size:12px}.contracttext{white-space:pre-wrap;line-height:1.8;padding:20px;border:1px solid var(--line);font-size:13px}.rowactions{display:flex;gap:5px}.rowactions button{padding:5px 9px;font-size:11px}.settings{max-width:800px}.settings .panel{padding:24px;margin-bottom:20px}.mobilebrand{display:none}canvas{touch-action:none;border:1px dashed #aeb9d0;border-radius:8px;background:#fafbff;max-width:100%}@media(min-width:1500px){.content{padding-top:40px}.stats{gap:24px}}@media(max-width:1100px){aside{width:195px;padding:25px 10px}main{margin-left:195px}.content{padding:25px}.topbar{padding:0 25px}.grid{grid-template-columns:1fr}.stats{gap:10px}.stat{padding:15px}.stat strong{font-size:24px}.search{width:190px}}@media(max-width:720px){aside{position:relative;width:100%;height:auto;padding:15px}.brand{font-size:20px}.workspace,.navlabel,.asidefoot{display:none}nav{display:flex;overflow:auto;margin-top:16px}nav button{white-space:nowrap;width:auto;font-size:12px;padding:9px}nav .ico{display:none}main{margin:0}.topbar{height:55px;padding:0 16px}.topright .search{width:160px}.content{padding:23px 16px}.heading{align-items:flex-start;gap:15px}h1{font-size:23px}.heading .actions{flex-direction:column}.stats{grid-template-columns:1fr 1fr}.metrics{gap:10px}.panel{overflow:auto}td,th{padding:12px}.formgrid{grid-template-columns:1fr}.wide{grid-column:auto}.footnote{gap:10px}.topright>span{display:none}.servermeta{flex-wrap:wrap;gap:10px}}

/* PORTCODE DARK MODE */
:root {
  color-scheme: dark;
  --bg: #10141e;
  --ink: #e6eaf3;
  --muted: #a2aec3;
  --line: #2a3345;
  --blue: #8394ff;
  --green: #65cfad;
}
body { background: var(--bg); }
aside, .topbar { background: #141a27; }
.stat, .panel, .login, dialog {
  background: #1a2130;
  box-shadow: 0 3px 15px #00000012;
}
button, input, select, textarea {
  background: #20293a;
  color: var(--ink);
  border-color: var(--line);
}
button:hover {
  background: #2a3550;
  border-color: #6474b5;
}
button.primary, .brand i {
  background: #6175e8;
  border-color: #6175e8;
  color: #fff;
}
button.primary:hover { background: #7285ef; }
button:disabled { opacity: .65; cursor: wait; }
input:focus, select:focus, textarea:focus {
  border-color: #8394ff;
  box-shadow: 0 0 0 3px #8394ff20;
}
input::placeholder, textarea::placeholder { color: #929fb6; }
nav button { background: transparent; color: #a9b5ca; }
nav button.active { background: #8394ff20; color: #b0baff; }
nav button:hover { background: #222d42; color: #e6eaf3; }
.search { background: #1a2232; color: var(--ink); }
.crumb, .navlabel, .footnote, .subtitle,
.statlabel, .metric label, label.field { color: var(--muted); }
.crumb b { color: #c6cfe0; }
th { background: #161d2b; color: #a9b5ca; }
td, .task, .alert { border-color: var(--line); }
tbody tr:hover { background: #ffffff03; }
.avatar, .servericon, .statlabel .ico {
  background: #8394ff20;
  color: #b0baff;
}
.clientcell .avatar {
  background: #8394ff20 !important;
  color: #b0baff;
}
.pill { background: #2a3448; color: #c1ccde; }
.pill.green { background: #193e35; color: #83dfbd; }
.pill.red { background: #422737; color: #ffa7b6; }
.pill.orange, .alert .dot {
  background: #413725;
  color: #f3cc89;
}
.bar { background: #2d374b; }
.bar i { background: #8394ff; }
.note {
  background: #202d47;
  border-color: #34466c;
  color: #c0cff3;
}
.empty { color: #a3b0c6; }
.contracttext { background: #151c29; }
canvas { background: #edf0f8; border-color: #647491; }
#toast {
  background: #303e59;
  color: #fff;
  box-shadow: 0 8px 28px #0005;
}
dialog::backdrop { background: #070b14b8; }
:focus-visible {
  outline: 2px solid #a0aeff;
  outline-offset: 3px;
}
/* END PORTCODE DARK MODE */
