:root {
	color-scheme:light;
	font-family:system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif;
	font-synthesis:none;
	font-size:13px;
	--bg:#f5f4f1;
	--panel:#ffffff;
	--raised:#f0eeea;
	--text:#302d36;
	--muted:#716b78;
	--line:#d7d3cd;
	--line-strong:#bcb6ad;
	--accent:#6e4db0;
	--accent-hover:#5c3b9c;
	--accent-soft:#f0ebf8;
	--accent-text:#6945a8;
	--warm:#bd792d;
	--warm-soft:#fff3df;
	--input:#ffffff;
	--table-head:#eeeae4;
	--row-alt:#faf9f7;
	--row-hover:#f5f0fa;
	--success-bg:#ebf5ee;
	--success-text:#28653d;
	--success-line:#a5c7ad;
	--danger-bg:#fcf0ed;
	--danger-text:#9e3c31;
	--danger-line:#d5a59b;
	--warning-bg:#fff4df;
	--warning-text:#80551c;
	--warning-line:#d4ba89;
	--sidebar:#292b29;
	--sidebar-text:#eeeae3;
	--sidebar-muted:#c1bcb2;
	--sidebar-line:#484b45;
	--sidebar-hover:#373a34;
	--nav-active:#493e2d;
	--nav-active-line:#a38a60;
	--nav-accent:#edb766;
	--shadow:0 2px 5px rgb(54 43 25 / 4%);
	color:var(--text);
	background:var(--bg);
}
:root[data-theme=dark] {
	color-scheme:dark;
	--bg:#202220;
	--panel:#292c28;
	--raised:#333630;
	--text:#eeeae3;
	--muted:#bcb8ae;
	--line:#454940;
	--line-strong:#61675a;
	--accent:#7954ba;
	--accent-hover:#8963ca;
	--accent-soft:#37303f;
	--accent-text:#c6a9ef;
	--warm:#e3ac60;
	--warm-soft:#3c3425;
	--input:#232620;
	--table-head:#343830;
	--row-alt:#2d302b;
	--row-hover:#36323b;
	--success-bg:#293c2b;
	--success-text:#acd8af;
	--success-line:#536e4f;
	--danger-bg:#422e29;
	--danger-text:#efb0a1;
	--danger-line:#8d5d50;
	--warning-bg:#3d3424;
	--warning-text:#e4c48d;
	--warning-line:#87704c;
	--sidebar:#1b1e1b;
	--sidebar-line:#41473c;
	--sidebar-hover:#30362c;
	--nav-active:#3c3427;
	--nav-active-line:#89734e;
	--shadow:none;
}
* { box-sizing:border-box; }
body { margin:0; }
button,input,select,textarea { font:inherit; }
a { color:inherit; text-decoration:none; }
button,summary { cursor:pointer; }
button,a,input,select,textarea,summary { outline-offset:3px; }
:focus-visible { outline:2px solid var(--accent-text); }
h1,h2,h3,p { margin-top:0; }
h1 { font-size:21px; font-weight:650; margin-bottom:0; letter-spacing:-.3px; }
h2 { font-size:17px; font-weight:650; margin-bottom:14px; }
h3 { font-size:15px; margin-bottom:8px; }
p { line-height:1.7; }
small,.small { font-size:12px; }
.muted { color:var(--muted); }
.eyebrow,.nav-section,.modal-caption {
	display:block;
	font-size:10px;
	font-weight:650;
	letter-spacing:.9px;
	color:var(--muted);
	margin-bottom:8px;
}
.ui-icon { width:18px; height:18px; flex:none; }
.app-shell { display:flex; min-height:100vh; }
.sidebar {
	width:224px;
	position:fixed;
	inset-block:0;
	inset-inline-start:0;
	display:flex;
	flex-direction:column;
	padding:21px 12px;
	background:var(--sidebar);
	color:var(--sidebar-text);
	border-inline-end:1px solid var(--sidebar-line);
	z-index:30;
}
.brand { display:flex; align-items:center; gap:10px; padding:0 9px; font-size:21px; font-weight:700; }
.brand small { display:block; font-size:10px; font-weight:400; letter-spacing:.7px; color:var(--sidebar-muted); margin-top:3px; }
.brand-mark {
	width:38px;
	height:38px;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	border-radius:6px;
	font-size:17px;
	font-weight:750;
	letter-spacing:-.7px;
	color:#342716;
	background:#e6b56d;
	border:1px solid #e6b56d;
}
.workspace { display:flex; flex-direction:column; gap:7px; margin:24px 3px; padding:13px 10px; border:1px solid var(--sidebar-line); border-radius:5px; }
.workspace .eyebrow { color:var(--sidebar-muted); margin:0; font-size:9px; }
.workspace strong { overflow-wrap:anywhere; font-weight:600; }
.workspace .small { color:var(--sidebar-muted); font-size:11px; line-height:1.5; }
.sidebar nav { display:flex; flex-direction:column; gap:5px; }
.nav-section { color:var(--sidebar-muted); padding:0 11px 5px; font-size:9px; margin:0; }
.sidebar nav a { display:flex; align-items:center; gap:11px; min-height:40px; padding:9px 11px; border:1px solid transparent; border-inline-start:3px solid transparent; border-radius:4px; font-weight:500; }
.sidebar nav a:hover { background:var(--sidebar-hover); }
.sidebar nav a.active { background:var(--nav-active); border-color:var(--nav-active-line); border-inline-start-color:var(--nav-accent); color:#fff0d8; }
.sidebar nav a.active .ui-icon { color:var(--nav-accent); }
.sidebar-foot { display:flex; align-items:center; gap:8px; margin-top:auto; padding:24px 9px 0; color:var(--sidebar-muted); font-size:10px; }
.connection-dot { width:6px; height:6px; border-radius:50%; background:#92bf83; flex:none; }
.main-shell { margin-inline-start:224px; flex:1; min-width:0; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 24px; background:var(--panel); border-bottom:1px solid var(--line); }
.topbar .eyebrow { margin-bottom:4px; font-size:9px; }
.profile { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; min-width:0; }
.account-link { display:flex; align-items:center; gap:9px; padding:7px 10px; border:1px solid var(--line); border-radius:5px; background:var(--panel); }
.account-link:hover { border-color:var(--accent-text); background:var(--accent-soft); }
.account-link>.ui-icon { color:var(--accent-text); }
.account-link>span:not([aria-hidden]) { min-width:0; }
.account-link strong { display:block; font-size:12px; font-weight:650; }
.account-link bdi { display:block; max-width:185px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; color:var(--muted); margin-top:2px; }
.role-pill { padding:5px 7px; font-size:10px; border:1px solid var(--line); border-radius:4px; background:var(--raised); color:var(--muted); }
.language-switch,.theme-switch { display:flex; align-items:center; gap:5px; position:relative; }
.language-switch label { display:flex; align-items:center; gap:6px; }
.language-label { font-size:10px; color:var(--muted); }
.language-switch select { width:100px; font-size:12px; padding:7px 8px; }
.button.theme-toggle { width:34px; height:34px; padding:7px; gap:0; }
.theme-toggle svg { width:18px; height:18px; flex-shrink:0; }
.theme-toggle .sun-icon { color:var(--warm); }
.theme-toggle .moon-icon { color:var(--accent-text); }
:root[data-theme=light] .theme-toggle .sun-icon,:root[data-theme=dark] .theme-toggle .moon-icon { display:none; }
.language-apply { min-height:31px!important; padding:5px 7px!important; }
.enhanced>.language-apply { display:none; }
.theme-feedback:not(:empty) { position:absolute; inset-block-start:100%; inset-inline-end:0; width:210px; z-index:40; margin-top:6px; padding:10px; border:1px solid var(--danger-line); border-radius:4px; background:var(--danger-bg); color:var(--danger-text); font-size:12px; }
.appearance-controls { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:12px; margin-bottom:24px; }
.page-content { padding:24px; max-width:1680px; margin-inline:auto; }
.overview-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:19px; }
.overview-toolbar h2 { font-size:20px; margin-bottom:6px; }
.overview-toolbar p { margin:0; font-size:12px; }
.stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:22px; }
.stat { padding:17px 19px; border:1px solid var(--line); border-radius:6px; background:var(--panel); box-shadow:var(--shadow); border-block-start:3px solid var(--accent); }
.stat:nth-child(2) { border-block-start-color:#69a976; }
.stat:nth-child(3) { border-block-start-color:var(--warm); }
.stat:nth-child(4) { border-block-start-color:var(--line-strong); }
.stat strong { display:block; font-size:30px; line-height:1.3; margin:7px 0; font-weight:650; color:var(--text); }
.stat .eyebrow { margin-bottom:0; }
.stat .small { font-size:11px; }
strong[data-stat] { unicode-bidi:plaintext; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:20px; align-items:start; }
.card { padding:20px; margin-bottom:20px; background:var(--panel); border:1px solid var(--line); border-radius:6px; box-shadow:var(--shadow); }
.card>h2 { padding-bottom:14px; border-bottom:1px solid var(--line); }
.status-panel,.quick-actions { padding:0; overflow:hidden; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:15px 18px; background:var(--raised); border-bottom:1px solid var(--line); }
.panel-heading h2 { margin:0; font-size:15px; }
.panel-heading .text-link { font-size:11px; }
.panel-note { color:var(--muted); font-size:11px; padding:13px 16px; border-top:1px solid var(--line); }
.empty-state { padding:20px; margin:0; color:var(--muted); }
.action-tile { display:flex; align-items:center; gap:12px; padding:16px; border-bottom:1px solid var(--line); }
.action-tile:last-child { border-bottom:0; }
.action-tile:hover { background:var(--accent-soft); }
.action-tile>.ui-icon { width:33px; height:33px; padding:7px; border-radius:6px; background:var(--accent-soft); color:var(--accent-text); }
.action-tile strong { display:block; font-size:12px; font-weight:650; margin-bottom:4px; }
.action-tile small { display:block; color:var(--muted); font-size:11px; line-height:1.5; }
.action-tile>span:not(.action-arrow) { min-width:0; }
.action-arrow { margin-inline-start:auto; color:var(--muted); flex:none; }
.section-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:15px 18px; margin-bottom:16px; background:var(--panel); border:1px solid var(--line); border-radius:5px; }
.section-heading h2 { margin-bottom:6px; font-size:18px; }
.section-heading p { margin:0; font-size:12px; }
.text-link { color:var(--accent-text); font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.badge { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; font-size:11px; background:var(--raised); color:var(--muted); padding:4px 7px; border:1px solid var(--line-strong); border-radius:4px; }
.badge::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; }
.badge.online { background:var(--success-bg); border-color:var(--success-line); color:var(--success-text); }
.button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:34px; padding:8px 13px; border:1px solid var(--line-strong); border-radius:4px; background:var(--panel); color:var(--text); font-size:12px; font-weight:600; line-height:1.35; white-space:nowrap; }
.button:hover { background:var(--raised); border-color:var(--accent-text); }
.button.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.button.primary:hover { background:var(--accent-hover); border-color:var(--accent-hover); }
.button.secondary { background:var(--panel); border-color:var(--line-strong); }
.button.ghost { background:transparent; border-color:var(--line); font-size:11px; padding:7px 10px; }
.button.danger { background:#a84135; border-color:#a84135; color:#fff; }
.button.danger:hover { background:#92372d; border-color:#92372d; }
.button.danger-outline { background:var(--danger-bg); border-color:var(--danger-line); color:var(--danger-text); white-space:normal; }
.stack { display:flex; flex-direction:column; gap:10px; }
.stack .button { margin-top:7px; }
.stack label,.form-fields label { display:block; font-size:12px; font-weight:600; color:var(--text); }
.stack label input,.stack label select,.stack label textarea { display:block; margin-top:8px; }
.stack input,.stack select,.stack textarea { width:100%; }
.stack p { margin-bottom:0; }
input,select,textarea { border:1px solid var(--line-strong); border-radius:4px; padding:10px 11px; background:var(--input); color:var(--text); font-size:13px; max-width:100%; }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:1; }
input:focus,select:focus,textarea:focus { outline:2px solid var(--accent-text); border-color:var(--accent-text); }
input:disabled,select:disabled,button:disabled { opacity:.6; cursor:wait; }
input[type=checkbox] { display:inline-block!important; width:16px!important; height:16px; margin:0!important; padding:0; flex:none; accent-color:var(--accent); }
.checkbox { display:flex!important; align-items:center; gap:9px; font-size:12px!important; line-height:1.6; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.form-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.form-fields label { display:flex; flex-direction:column; gap:9px; }
.form-fields small { color:var(--muted); font-size:11px; font-weight:400; }
.form-submit { grid-column:1/-1; padding-top:5px; border-top:1px solid var(--line); }
.table-wrap { padding:0; overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:12px; white-space:nowrap; }
th { padding:11px 14px; text-align:start; font-size:11px; font-weight:650; color:var(--text); background:var(--table-head); border-bottom:1px solid var(--line-strong); border-inline-end:1px solid var(--line); }
th:last-child { border-inline-end:0; }
td { padding:12px 14px; border-bottom:1px solid var(--line); border-inline-end:1px solid var(--line); vertical-align:top; }
td:last-child { border-inline-end:0; }
tbody tr:nth-child(even) { background:var(--row-alt); }
tbody tr:hover { background:var(--row-hover); }
tbody tr:last-child td { border-bottom:0; }
.table-sub { display:block; margin-top:5px; color:var(--muted); font-size:10px; }
.resource { max-width:320px; overflow:hidden; text-overflow:ellipsis; }
.search { display:flex; gap:7px; min-width:0; }
.search input { min-width:0; padding:8px 10px; font-size:12px; }
.edit-details[open] { width:300px; max-width:75vw; white-space:normal; overflow-wrap:anywhere; }
.edit-details summary { cursor:pointer; font-size:12px; font-weight:600; color:var(--accent-text); padding:5px 9px; border:1px solid var(--line-strong); border-radius:4px; background:var(--accent-soft); width:fit-content; }
.edit-details label:not(.checkbox)>input { display:block; }
.compact-form { min-width:0; padding:14px 0; }
.credential-action { border-top:1px solid var(--danger-line); padding-top:12px; margin-top:5px; }
.credential-action p { font-size:11px; line-height:1.7; }
.inline-form { display:flex; align-items:center; gap:15px; }
.bulk-bar { padding:16px; background:var(--raised); }
.bulk-form { display:flex; flex-wrap:wrap; align-items:center; gap:12px; font-size:12px; }
.bulk-form input[type=number] { width:100px; }
.bulk-form select { font-size:12px; }
.alert { padding:14px 16px; margin-bottom:20px; border-radius:5px; font-size:12px; border:1px solid; }
.alert.success { background:var(--success-bg); color:var(--success-text); border-color:var(--success-line); }
.alert.error { background:var(--danger-bg); color:var(--danger-text); border-color:var(--danger-line); }
.alert.warning { background:var(--warning-bg); color:var(--warning-text); border-color:var(--warning-line); }
.alert p { margin:8px 0 0; }
.secret-card,.account-card { max-width:880px; }
.secret-output { width:100%; resize:vertical; font-family:ui-monospace,monospace; font-size:12px; line-height:1.7; background:var(--input); }
.secret-output,input[type=email],input[type=password],input[type=number],input[name=host],input[name=expires] { direction:ltr; text-align:left; unicode-bidi:plaintext; }
.actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:18px; }
.section-heading>.actions,.pagination .actions { margin:0; }
.pagination { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:15px; margin:0 0 20px; }
footer { padding:13px 24px 24px; color:var(--muted); font-size:10px; }
.login-shell { min-height:100vh; display:grid; grid-template-columns:1fr 1fr; background:var(--bg); }
.login-intro { display:flex; flex-direction:column; justify-content:center; padding:8vh 8vw; border-inline-end:1px solid var(--sidebar-line); color:var(--sidebar-text); background:var(--sidebar); }
.large { width:56px; height:56px; font-size:25px; margin-bottom:30px; }
.login-intro .eyebrow { color:#e3b679; }
.login-intro h1 { max-width:500px; font-size:36px; line-height:1.25; margin-bottom:24px; }
.login-intro p { max-width:460px; color:var(--sidebar-muted); font-size:15px; }
.intro-points { display:flex; flex-direction:column; gap:16px; border-top:1px solid var(--sidebar-line); padding-top:24px; margin-top:25px; color:var(--sidebar-muted); }
.login-card { align-self:center; width:min(480px,90%); margin:40px auto; padding:30px; border:1px solid var(--line); border-radius:7px; background:var(--panel); box-shadow:var(--shadow); }
.login-card h2 { font-size:23px; line-height:1.4; }
.login-card form.stack { margin-top:24px; }
.login-card input { padding:12px; }
.login-card .primary { margin-top:14px; padding:13px; justify-content:space-between; }
.login-note { margin:22px 0 0; font-size:11px; }
.error-page { max-width:600px; margin:10vh auto; padding:30px; border:1px solid var(--line); background:var(--panel); border-radius:6px; }
.error-page h1 { margin:25px 0 18px; }
.help-trigger { display:inline-flex; align-items:center; justify-content:center; width:19px; height:19px; padding:0; margin-inline-start:7px; border:1px solid var(--line-strong); border-radius:50%; background:var(--raised); color:var(--muted); font-size:11px; font-weight:650; vertical-align:middle; }
.help-trigger:hover { background:var(--accent-soft); border-color:var(--accent-text); color:var(--accent-text); }
.modal { width:min(480px,calc(100vw - 32px)); max-height:85vh; overflow:auto; padding:25px; border:1px solid var(--line-strong); border-top:3px solid var(--accent); border-radius:7px; background:var(--panel); color:var(--text); box-shadow:0 15px 45px rgb(0 0 0 / 22%); }
.modal::backdrop { background:rgb(18 20 17 / 55%); }
.modal h2 { font-size:20px; margin:12px 0; }
.modal p { white-space:normal; line-height:1.85; color:var(--muted); }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; border-top:1px solid var(--line); padding-top:17px; margin-top:22px; }
.warning-text { color:var(--warning-text); }
.confirmation-card { max-width:750px; border-top:3px solid var(--warm); }
.confirmation-target { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:12px; border:1px solid var(--line); background:var(--raised); border-radius:4px; }
.confirmation-target strong { overflow-wrap:anywhere; min-width:0; }
.confirmation-target span { color:var(--muted); }
.confirmation-check { padding:12px; border:1px solid var(--line-strong); border-radius:4px; background:var(--accent-soft); }
[lang=ar] { font-family:system-ui,Tahoma,Arial,sans-serif; }
[dir=rtl] .eyebrow,[dir=rtl] .nav-section,[dir=rtl] .modal-caption { letter-spacing:0; }
[dir=rtl] .account-link { text-align:right; }
@media(max-width:1250px) {
	.topbar { flex-wrap:wrap; }
	.profile { gap:8px; }
	.role-pill { display:none; }
	.language-label { display:none; }
	.form-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
	.dashboard-grid { grid-template-columns:minmax(0,1fr) 280px; }
}
@media(max-width:1050px) {
	.dashboard-grid { grid-template-columns:minmax(0,1fr); }
	.quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
	.quick-actions .panel-heading { grid-column:1/-1; }
	.action-tile { border-bottom:1px solid var(--line); border-inline-end:1px solid var(--line); }
}
@media(max-width:800px) {
	.app-shell { display:block; }
	.sidebar { position:static; width:100%; padding:15px; border-inline-end:0; border-bottom:1px solid var(--sidebar-line); }
	.brand { font-size:19px; }
	.workspace,.sidebar-foot,.nav-section { display:none; }
	.sidebar nav { flex-direction:row; flex-wrap:wrap; gap:5px; margin-top:16px; }
	.sidebar nav a { padding:8px 10px; min-height:38px; font-size:11px; border-color:var(--sidebar-line); background:var(--sidebar); }
	.sidebar .ui-icon { width:16px; height:16px; }
	.main-shell { margin-inline-start:0; }
	.topbar { padding:16px; }
	.topbar h1 { font-size:20px; }
	.profile { width:100%; justify-content:flex-start; }
	.account-link { flex:1 1 150px; min-width:0; }
	.account-link bdi { max-width:160px; }
	.language-switch select { width:95px; }
	.page-content { padding:18px 14px; }
	.overview-toolbar { flex-wrap:wrap; gap:13px; }
	.overview-toolbar h2 { font-size:19px; }
	.stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
	.stat { padding:15px; }
	.stat strong { font-size:27px; }
	.form-grid,.form-fields { grid-template-columns:minmax(0,1fr); }
	.section-heading { align-items:flex-start; flex-direction:column; padding:15px; }
	.section-heading>.actions { width:100%; }
	.search { max-width:100%; }
	.card { padding:18px; }
	.table-wrap,.status-panel,.quick-actions { padding:0; }
	.quick-actions { grid-template-columns:minmax(0,1fr); }
	.bulk-form { align-items:stretch; flex-direction:column; }
	.bulk-form input[type=number] { width:100%; }
	.inline-form { flex-wrap:wrap; }
	.login-shell { grid-template-columns:1fr; }
	.login-intro { padding:28px; border-inline-end:0; border-bottom:1px solid var(--sidebar-line); }
	.login-intro h1 { font-size:27px; margin-bottom:0; }
	.login-intro p,.intro-points { display:none; }
	.large { margin-bottom:20px; width:45px; height:45px; }
	.login-card { margin:24px auto; padding:24px; }
	footer { padding:14px; }
}

.config-editor { min-height: 26rem; font-family: ui-monospace, monospace; tab-size: 4; resize: vertical; line-height: 1.6; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.report-chart svg { width: 100%; min-height: 160px; display: block; }
.report-chart h2 small { color: var(--muted); font-size: .75em; }

.config-editor { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; line-height:1.55; resize:vertical; tab-size:4; }
