/* Tocly integration for the existing Super Control forms and server views. */
@font-face { font-family: Inter; src: url('./tocly/fonts/inter-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url('./tocly/fonts/inter-medium.woff2') format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: Inter; src: url('./tocly/fonts/inter-bold.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }
:root { --bg: #f5f6f8; --bg-2: #f5f6f8; --panel: #fff; --ink: #303440; --muted: #727887; --accent: #3b6fc9; --warning: #a16609; --danger: #c54343; --border: #e4e7ed; --shadow: 0 2px 4px #20283804; --sc-sidebar-width: 224px; --bs-body-font-family: Inter, sans-serif; --bs-primary: #3b6fc9; }
*, *::before, *::after { letter-spacing: 0 !important; }
body { background: var(--bg); font-family: Inter, sans-serif; font-size: 13px; line-height: 1.5; color: var(--ink); }
a { color: var(--accent); }
button, input, select, textarea { font-family: inherit; }
button, .btn-link { border-radius: 5px; min-height: 34px; padding: 8px 12px; gap: 6px; font-size: 12px; font-weight: 500; line-height: 1.35; transition: background-color .15s; white-space: normal; }
button:hover, .btn-link:hover { transform: none; opacity: 1; filter: brightness(.97); }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #9bbcf0; outline-offset: 2px; }
input, select, textarea { padding: 7px 10px; border-radius: 5px; border-color: #d9dee7; font-size: 13px; line-height: 1.5; min-width: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select { min-height: 36px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: #7097dd; box-shadow: 0 0 0 3px #3b6fc914; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
input[readonly] { background: #f6f7f9; color: var(--muted); }
textarea { min-height: 76px; }
label { display: inline-block; font-size: 12px; font-weight: 500; color: #454c5b; margin-bottom: 5px; }
form { gap: 12px; }
.row { margin: 0; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row > * { padding: 0; margin: 0; width: auto; min-width: 0; }
.primary { background: var(--accent); }
.secondary { background: #edf0f5; color: #515c70; }
.ghost { background: #fff; border: 1px solid var(--border); }
.soft-ssh { background: #ebedf8; color: #5964a1; }
.wrap { max-width: none; margin: 0; padding: 22px 24px 40px; }
.app-shell > .wrap { margin-left: var(--sc-sidebar-width); padding-top: 82px; }
.hero { align-items: center; gap: 12px; margin-bottom: 20px; }
.hero h1 { font-size: 20px; font-weight: 600; line-height: 1.4; }
.hero > .account-menu, .hero > .hero-actions { display: none; }
.hero p, .filter-copy p, .modal-header p { display: none; }
.card-title { font-size: 16px; font-weight: 600; }
.panel { background: #fff; border: 0; border-radius: 0; padding: 16px 0; box-shadow: none; backdrop-filter: none; }
.sc-sidebar.vertical-menu { width: var(--sc-sidebar-width); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--border); box-shadow: none; padding: 0; z-index: 1020; }
.sc-brand { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 12px 20px; color: #313743; font-size: 17px; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--border); }
.sc-brand img { object-fit: contain; flex: 0 0 28px; }
.sc-brand span { overflow-wrap: anywhere; }
.sc-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 10px; scrollbar-width: thin; }
.sc-nav-group + .sc-nav-group { margin-top: 16px; }
.sc-nav-label { color: #8c92a0; font-size: 10px; font-weight: 600; text-transform: uppercase; padding: 8px 12px; }
.sc-nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; min-height: 38px; border-radius: 5px; color: #5b6271; text-decoration: none; font-size: 12px; margin: 1px 0; line-height: 1.5; }
.sc-nav-link i { font-size: 18px; flex: 0 0 20px; text-align: center; line-height: 1; }
.sc-nav-link:hover { color: var(--accent); background: #f5f7fb; }
.sc-nav-link.is-active { color: #3668bf; background: #edf3fc; font-weight: 600; }
.sc-sidebar-footer { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 16px; }
.sc-sidebar-footer > div { min-width: 0; }
.sc-sidebar-footer strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 500; }
.sc-sidebar-footer small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.sc-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; color: #3d7d6a; background: #e6f2ed; font-weight: 600; }
#page-topbar.sc-topbar { position: fixed; top: 0; right: 0; left: var(--sc-sidebar-width); height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--border); background: #fff; z-index: 1010; }
.sc-topbar-left, .sc-topbar-actions { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sc-breadcrumb { display: flex; align-items: center; gap: 10px; color: #8c93a1; font-size: 12px; }
.sc-breadcrumb strong { font-weight: 500; color: #4d5565; }
.sc-icon-button, .sc-account > summary { display: inline-flex; justify-content: center; align-items: center; width: 34px; height: 34px; min-height: 34px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #616978; font-size: 20px; cursor: pointer; }
.sc-icon-button:hover { background: #f1f4f8; }
.sc-account > summary::-webkit-details-marker { display: none; }
.sc-topbar .account-dropdown { top: calc(100% + 14px); width: 248px; border: 1px solid var(--border); padding: 6px; border-radius: 6px; box-shadow: 0 8px 24px #30344014; gap: 2px; background: #fff; }
.sc-account-name { padding: 10px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.account-dropdown .dropdown-item, .account-dropdown a.dropdown-item, .account-dropdown button.dropdown-item { display: flex; align-items: center; gap: 9px; background: transparent; font: inherit; font-size: 12px; font-weight: 400; padding: 10px; min-height: 36px; border-radius: 4px; }
.account-dropdown .dropdown-item:hover { background: #f3f6fa; }
.account-dropdown .sc-signout { color: var(--danger); }
.sc-sidebar-backdrop { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; background: #20263266; z-index: 1015; }
.sidebar-compact { --sc-sidebar-width: 64px; }
.sidebar-compact .sc-brand { padding: 16px 18px; }
.sidebar-compact .sc-brand span, .sidebar-compact .sc-nav-link span, .sidebar-compact .sc-nav-label, .sidebar-compact .sc-sidebar-footer { display: none; }
.sidebar-compact .sc-nav { padding: 12px 8px; }
.sidebar-compact .sc-nav-link { justify-content: center; padding: 10px 4px; }
.sidebar-compact .sc-nav-group + .sc-nav-group { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi-card { border-radius: 6px; border: 1px solid var(--border); background: #fff; padding: 14px 16px; box-shadow: var(--shadow); }
.kpi-card::after { display: none; }
.kpi-head { align-items: center; gap: 6px; }
.kpi-label { font-size: 12px; font-weight: 500; text-transform: none; color: #707887; }
.kpi-icon { background: #edf3fc; color: #3b6fc9; width: 30px; height: 30px; border-radius: 5px; box-shadow: none; }
.kpi-card:nth-child(4n+2) .kpi-icon { background: #e9f5ee; color: #47916c; }
.kpi-card:nth-child(4n+3) .kpi-icon { background: #fff3df; color: #b28b33; }
.kpi-card:nth-child(4n+4) .kpi-icon { background: #fceeed; color: #ca706b; }
.kpi-card strong { margin-top: 4px; font-size: 25px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.kpi-meta { margin-top: 6px; color: #9197a3; font-size: 11px; }
.filter-card { background: transparent; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.filter-main { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.filter-copy { min-width: 150px; }
.filter-copy .card-title { font-size: 13px; }
.filter-form { flex: 1; max-width: 760px; display: grid; grid-template-columns: minmax(140px, 1.5fr) minmax(120px, 1fr) minmax(120px, 1fr) auto; align-items: center; gap: 8px; }
.filter-form .search, .toolbar .search { min-width: 0; width: 100%; }
.filter-search, .filter-select { min-width: 0; }
.filter-form input, .filter-form select { font-size: 12px; }
.filter-search input, .filter-form select { height: 36px; border-radius: 5px; border: 1px solid #d9dee7; background: #fff; padding: 7px 10px; box-shadow: none; }
.filter-form .btn-link { height: 36px; min-height: 36px; padding: 7px 12px; }
.toolbar form.filter-form { display: grid; gap: 8px; }
.filter-card .toolbar { display: block; margin: 0; }
.filter-card .toolbar-actions { border-color: var(--border); margin-top: 12px; padding-top: 12px; }
.filter-active-pills { margin-top: 8px; }
.server-list, .user-admin-list { gap: 14px; margin-top: 14px; }
.server-card { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.server-card-top { gap: 16px; margin-bottom: 16px; align-items: center; }
.server-card-top > div { min-width: 0; }
.server-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.server-host { font-size: 12px; color: #7c8492; overflow-wrap: anywhere; }
.server-status { gap: 6px; }
.pill, .service-pill { font-size: 10px; padding: 4px 7px; border-radius: 4px; font-weight: 500; text-transform: none; line-height: 1.4; overflow-wrap: anywhere; }
.server-body { grid-template-columns: 1.05fr 1fr 1fr; gap: 18px; }
.server-section { background: transparent; border: 0; border-radius: 0; padding: 0; min-width: 0; }
.server-section + .server-section { padding-left: 18px; border-left: 1px solid var(--border); }
.server-section h4, .permission-group h4 { font-size: 11px; font-weight: 600; color: #8b92a0; margin-bottom: 12px; }
.detail-list { gap: 7px; }
.detail-row { padding-bottom: 6px; gap: 10px; border-bottom: 1px solid #f0f2f6; align-items: baseline; }
.detail-label { font-size: 11px; text-transform: none; flex-shrink: 0; max-width: 50%; }
.detail-value { font-size: 12px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.detail-actions { min-width: 0; gap: 4px; }
.copy-btn { font-size: 10px; padding: 3px 6px; min-height: 24px; border: 1px solid var(--border); border-radius: 4px; }
.resource-grid { gap: 8px; }
.metric-tile { padding: 8px 0; min-height: 68px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; gap: 5px; }
.metric-head { gap: 7px; }
.metric-icon { width: 24px; height: 24px; border-radius: 4px; background: #f0f4fa; }
.metric-icon svg { width: 15px; height: 15px; }
.metric-label { font-size: 10px; text-transform: none; }
.metric-value { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.metric-tile.metric-alert { background: #fff2f2; padding: 8px; }
.summary-grid { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.summary-item { background: transparent; border-radius: 0; padding: 8px 0; border-bottom: 1px solid var(--border); }
.summary-item span { font-size: 10px; text-transform: none; }
.summary-item strong { font-size: 22px; font-weight: 600; margin-top: 3px; }
.summary-mini div { background: #f5f7fa; border-radius: 4px; }
.copy-btn:hover { background: #edf3fc; }
.summary-status { min-height: 18px; margin: 10px 0 0; }
.server-actions { gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.server-card.is-collapsed .server-card-content { max-height: 270px; }
.server-card.is-collapsed .server-card-content::after { background: linear-gradient(180deg, #ffffff00, #fff); height: 52px; }
.server-card-toggle-wrap { margin-top: 10px; }
.server-card-toggle { background: #f5f7fa; font-size: 11px; min-height: 30px; }
.modal { z-index: 1100; padding: 24px; background: #252e4266; backdrop-filter: none; }
.modal-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 20px; width: min(780px, 100%); max-height: calc(100dvh - 48px); box-shadow: 0 12px 48px #1d253533; overscroll-behavior: contain; scrollbar-width: thin; }
.modal-header { position: sticky; top: -20px; background: #fff; z-index: 5; margin: -20px -20px 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); border-radius: 0; }
.modal-header .card-title { font-size: 16px; }
.modal-header .card-title:focus { outline: none; }
.modal-header > div { min-width: 0; }
.close-btn { width: 30px; height: 30px; min-height: 30px; flex: 0 0 30px; padding: 0; border: 0; border-radius: 4px; font-size: 23px; background: #f3f5f8; color: #6b7380; }
.modal-feedback { top: 44px; }
.modal-card > form > .btns:last-child, .sc-modal-footer { position: sticky; bottom: -20px; z-index: 3; margin: 6px -20px -20px; padding: 14px 20px; background: #fff; border-top: 1px solid var(--border); justify-content: flex-end; }
.modal .permission-group, .modal .security-mfa-card { padding: 12px 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.modal .user-admin-card { padding: 12px 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.user-admin-top h4 { font-size: 14px; }
.checkbox-list { gap: 4px; }
.permission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.checkbox-row { padding: 6px 0; border-color: var(--border); }
.checkbox-row label { font-size: 12px; }
.security-mfa-check span { font-size: 13px; }
.confirm-modal-card { width: min(440px, 100%); }
.confirm-copy { font-size: 13px; line-height: 1.6; }
.confirm-actions { gap: 8px; }
.sc-form-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 2px; }
.sc-form-tabs button { background: transparent; color: #777e8c; border-radius: 4px; min-width: 0; }
.sc-form-tabs button[aria-selected=true] { color: var(--accent); background: #edf3fc; font-weight: 600; }
.sc-form-panel { display: grid; gap: 12px; }
[hidden] { display: none !important; }
.modal-open { overflow: hidden; }
.flash { border-radius: 5px; font-size: 12px; }
.flash-toast { border-radius: 6px; box-shadow: 0 6px 20px #2736491a; backdrop-filter: none; padding: 12px 14px; }
.toast-stack { top: 74px; right: 20px; }
.flash-dismiss { min-height: 24px; width: 24px; height: 24px; }
.empty-state { padding: 28px; border: 1px dashed var(--border); border-radius: 6px; color: var(--muted); background: #fff; }
.auth-page { background: #f4f6f9; }
.auth-page .login-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 28px; max-width: 400px; box-shadow: 0 6px 24px #2a38520a; }
.login-card .card-title { font-size: 22px; margin-bottom: 8px; }
.login-card form { margin-top: 24px; gap: 16px; }
.login-card .primary { min-height: 40px; }
.login-card .sc-auth-brand { display: block; width: 36px; height: 36px; margin-bottom: 20px; }
.sc-password-field { position: relative; }
.sc-password-field input { padding-right: 40px; }
.sc-password-toggle { position: absolute; right: 2px; top: 2px; width: 32px; height: 32px; min-height: 32px; padding: 0; background: transparent; color: #7a8190; font-size: 17px; }
@media (min-width: 1700px) { .kpi-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
    .filter-main { align-items: stretch; flex-direction: column; gap: 10px; }
    .filter-form { max-width: none; }
    .server-body { grid-template-columns: 1fr 1fr; }
    .server-section:last-child { grid-column: 1 / -1; padding-left: 0; border-left: 0; padding-top: 14px; border-top: 1px solid var(--border); }
}
@media (max-width: 991px) {
    :root, .sidebar-compact { --sc-sidebar-width: 224px; }
    .sc-sidebar.vertical-menu { display: flex; transform: translateX(-100%); transition: transform .18s; }
    .sidebar-open .sc-sidebar.vertical-menu { transform: translateX(0); }
    .app-shell > .wrap { margin-left: 0; }
    #page-topbar.sc-topbar { left: 0; }
    .sidebar-compact .sc-brand span, .sidebar-compact .sc-nav-link span, .sidebar-compact .sc-nav-label { display: block; }
    .sidebar-compact .sc-sidebar-footer { display: flex; }
    .sidebar-compact .sc-nav-link { justify-content: flex-start; padding: 9px 12px; }
    .sidebar-compact .sc-nav-group + .sc-nav-group { border: 0; margin-top: 16px; padding-top: 0; }
    .sidebar-compact .sc-nav { padding: 12px 10px; }
}
@media (max-width: 640px) {
    .app-shell > .wrap { padding: 76px 14px 28px; }
    #page-topbar.sc-topbar { padding: 0 12px; }
    .sc-topbar-left, .sc-topbar-actions { gap: 8px; }
    .sc-breadcrumb { display: none; }
    .hero { margin-bottom: 14px; flex-direction: row; }
    .hero h1 { font-size: 18px; }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .kpi-card { padding: 12px; }
    .kpi-card strong { font-size: 22px; }
    .kpi-meta { font-size: 10px; }
    .filter-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
    .filter-search { grid-column: 1 / -1; }
    .filter-form > .btn-link { justify-self: start; }
    .server-card { padding: 14px; }
    .server-card-top { align-items: flex-start; flex-direction: column; gap: 8px; }
    .server-body { grid-template-columns: minmax(0, 1fr) !important; }
    .server-section + .server-section { padding-left: 0; border-left: 0; padding-top: 14px; border-top: 1px solid var(--border); }
    .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-row { flex-direction: row; }
    .detail-value { text-align: right; }
    .server-actions { gap: 6px; }
    .server-actions button, .server-actions .btn-link { font-size: 11px; padding: 7px 9px; }
    .modal { padding: 10px; }
    .modal-card { max-height: calc(100dvh - 20px); padding: 16px; }
    .modal-header { top: -16px; margin: -16px -16px 14px; padding: 13px 16px; }
    .modal-card > form > .btns:last-child, .sc-modal-footer { bottom: -16px; margin: 6px -16px -16px; padding: 12px 16px; }
    .row { grid-template-columns: minmax(0, 1fr) !important; }
    .security-mfa-row { grid-template-columns: minmax(0, 1fr); }
    .permission-grid { grid-template-columns: minmax(0, 1fr); }
    .sc-form-tabs { gap: 0; }
    .sc-form-tabs button { flex: 1; padding: 8px 6px; font-size: 11px; }
    .sc-topbar .account-dropdown { position: absolute; top: calc(100% + 12px); right: 0; margin: 0; }
    .toast-stack { top: 70px; right: 12px; left: 12px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.server-name-with-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.server-name-with-status .pill { flex: 0 0 auto; font-size: 11px; line-height: 1.5; }
