:root {
    --sidebar-width: 248px;
    --sidebar-bg: #18202a;
    --page-bg: #f4f6f8;
    --border: #e3e7eb;
    --text: #20262e;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page-bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width) !important; color: #d9e0e7; background: var(--sidebar-bg); z-index: 1040; }
.sidebar .offcanvas-header { height: 72px; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; color: #fff; background: #176bdf; }
.sidebar .nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 6px; color: #aeb9c5; }
.sidebar .nav-link i { width: 20px; text-align: center; }
.sidebar .nav-link:hover { color: #fff; background: #242f3b; }
.sidebar .nav-link.active { color: #fff; background: #176bdf; }
.sidebar .nav-link.disabled { color: #71808e; opacity: 1; }
.nav-section { margin: 24px 12px 8px; color: #71808e; font-size: 12px; }
.sidebar-footer { padding: 14px 12px; border-top: 1px solid #2c3742; color: #8e9aa6; font-size: 13px; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #2fb171; }
.main-content { display: flex; min-height: 100vh; margin-left: var(--sidebar-width); flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; height: 72px; padding: 0 28px; border-bottom: 1px solid var(--border); background: #fff; }
.topbar h1 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 700; }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-color: var(--border); }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: #246fca; font-weight: 600; }
.page-body { flex: 1 0 auto; padding: 28px; }
.app-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; padding: 16px 28px 20px; color: #89939d; font-size: 12px; text-align: center; }
.app-footer a { color: inherit; text-decoration: none; }
.app-footer a:hover { color: #4d5d69; text-decoration: underline; }
.app-footer i, .login-visual-footer i, .login-copyright i { font-style: normal; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.metric-card, .panel { border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgb(21 31 42 / 4%); }
.metric-card { display: flex; align-items: center; gap: 16px; min-height: 112px; padding: 20px; }
.metric-icon { display: grid; flex: 0 0 46px; place-items: center; width: 46px; height: 46px; border-radius: 8px; font-size: 21px; }
.metric-card span { display: block; margin-bottom: 5px; color: #6c7885; font-size: 13px; }
.metric-card strong { display: block; font-size: 25px; line-height: 1.1; }
.content-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; }
.panel { padding: 22px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.panel-header h2, .empty-state h2 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.panel-header span { color: #7b8793; font-size: 12px; }
.chart-select { width: 124px; }
.chart-wrap { position: relative; height: 270px; }
.status-list > div { display: flex; align-items: center; justify-content: space-between; min-height: 58px; border-bottom: 1px solid #edf0f2; font-size: 14px; }
.status-list > div:last-child { border-bottom: 0; }
.empty-state { padding: 48px 24px; text-align: center; }
.empty-state p { margin: 7px auto 0; color: #7b8793; font-size: 14px; }
.empty-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 8px; color: #647383; background: #edf1f4; font-size: 21px; }
.form-panel { margin-bottom: 20px; }
.form-panel .form-label { color: #4c5864; font-size: 13px; font-weight: 600; }
.form-panel .form-control, .form-panel .form-select { min-height: 40px; }
.section-title { margin: 0; font-size: 16px; font-weight: 700; }
.table-panel { padding: 0; overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.table-responsive { min-height: 120px; }
.data-table { margin: 0; vertical-align: middle; }
.data-table th { padding: 12px 14px; border-bottom-color: var(--border); color: #66727e; background: #f8f9fa; font-size: 12px; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom-color: #edf0f2; font-size: 13px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .primary-cell { color: #26313b; font-weight: 600; }
.table-empty { padding: 42px 20px !important; color: #7c8792 !important; text-align: center; }
.action-group { display: flex; gap: 6px; white-space: nowrap; }
.summary-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 92px; margin-bottom: 20px; padding: 20px 24px; border: 1px solid var(--border); border-left: 4px solid #176bdf; border-radius: 8px; background: #fff; }
.summary-strip span { display: block; color: #6d7883; font-size: 13px; }
.summary-strip strong { display: block; margin-top: 3px; font-size: 28px; }
.resource-value { white-space: nowrap; }
.contract-signature { max-width: 190px; overflow: hidden; color: #67737f; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.seal-code-link { color: #9b1c2b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-decoration: none; white-space: nowrap; }
.seal-code-link:hover { text-decoration: underline; }
.search-form { display: flex; gap: 8px; width: min(100%, 360px); }
.search-form .form-control { min-width: 0; }
.computed-box { min-height: 40px; padding: 9px 12px; border: 1px solid #cfe0f6; border-radius: 6px; color: #1558a6; background: #f2f7fd; font-weight: 700; }
.badge { font-weight: 600; }
.dashboard-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-chart { height: 340px; }
.version-compare { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--border); }
.version-compare pre { min-height: 260px; max-height: 520px; margin: 0; padding: 18px; overflow: auto; background: #fff; white-space: pre-wrap; }
.funnel-list { display: grid; gap: 8px; }
.funnel-list > div { display: flex; align-items: center; justify-content: space-between; width: var(--funnel-width); min-height: 48px; margin: auto; padding: 10px 16px; border-radius: 6px; color: #fff; background: #176bdf; }
.user-group { font-size: 11px; }
.notification-menu { width: min(340px,calc(100vw - 24px)); }
.notification-menu .dropdown-item { white-space: normal; }
.notification-menu strong,.notification-menu small { display:block; }
.notification-menu small { margin-top:3px;color:#84909b;font-size:11px; }
.login-page { min-height: 100vh; background: #fff; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(420px, .65fr); min-height: 100vh; }
.login-visual { position: relative; display: flex; min-height: 100vh; overflow: hidden; flex-direction: column; padding: 42px 52px; color: #fff; background: #111718 url('/public/assets/images/login-operations.png') center / cover no-repeat; }
.login-visual-shade { position: absolute; inset: 0; background: rgb(10 15 15 / 54%); }
.login-visual-header, .login-visual-copy, .login-visual-footer { position: relative; z-index: 1; }
.login-visual-header, .login-mobile-brand { display: flex; align-items: center; gap: 12px; }
.login-logo { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border: 1px solid rgb(255 255 255 / 26%); border-radius: 7px; color: #10201a; background: #3bd399; font-size: 20px; }
.login-visual-header strong, .login-visual-header span, .login-mobile-brand strong, .login-mobile-brand span { display: block; }
.login-visual-header strong { font-size: 18px; }
.login-visual-header span { margin-top: 2px; color: #bfcdca; font-size: 12px; }
.login-visual-copy { margin: auto 0; }
.login-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px; color: #80e5c1; font-size: 13px; }
.login-visual-copy h1 { max-width: 640px; margin: 0; font-size: clamp(38px, 4.4vw, 66px); font-weight: 700; line-height: 1.14; letter-spacing: 0; }
.login-visual-footer { display: flex; align-items: center; gap: 7px; color: #aebdb9; font-size: 12px; }
.login-visual-footer a { width: fit-content; color: inherit; text-decoration: none; }
.login-visual-footer a:hover { color: #d6e0dd; text-decoration: underline; }
.login-auth { display: grid; min-height: 100vh; place-items: center; padding: 48px; background: #fff; }
.login-auth-inner { width: min(100%, 390px); }
.login-mobile-brand { display: none; margin-bottom: 42px; }
.login-mobile-brand .login-logo { color: #fff; border-color: #2f3c3a; background: #18201f; }
.login-mobile-brand strong { color: #202a28; font-size: 17px; }
.login-mobile-brand span { color: #7b8784; font-size: 12px; }
.login-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.login-heading-icon { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border-radius: 7px; color: #177b5a; background: #e7f7f1; font-size: 19px; }
.login-heading h2 { margin: 0 0 3px; color: #1e2927; font-size: 25px; font-weight: 700; }
.login-heading p { margin: 0; color: #7a8683; font-size: 13px; }
.login-alert { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-color: #f4c9c2; border-radius: 6px; font-size: 13px; }
.login-form { display: grid; gap: 20px; }
.login-field .form-label { margin-bottom: 7px; color: #46524f; font-size: 13px; font-weight: 600; }
.login-input { position: relative; display: flex; align-items: center; }
.login-input > i { position: absolute; left: 14px; z-index: 2; color: #7d8986; font-size: 16px; pointer-events: none; }
.login-input .form-control { min-height: 48px; padding: 10px 48px 10px 42px; border-color: #d8dfdd; border-radius: 6px; color: #202a28; background: #fbfcfc; font-size: 14px; box-shadow: none; }
.login-input .form-control:focus { border-color: #2a9d75; background: #fff; box-shadow: 0 0 0 3px rgb(42 157 117 / 12%); }
.login-input button { position: absolute; right: 4px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; color: #6f7b78; background: transparent; }
.login-input button:hover { color: #202a28; }
.login-submit { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-top: 4px; padding: 10px 16px; border: 1px solid #18201f; border-radius: 6px; color: #fff; background: #18201f; font-weight: 600; }
.login-submit:hover, .login-submit:focus { color: #fff; border-color: #267e61; background: #267e61; }
.login-submit:disabled { color: #d6dfdc; background: #52605d; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 30px; color: #98a29f; font-size: 12px; }
.login-copyright { display: none; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; color: #9aa4a1; font-size: 11px; text-align: center; }
.login-copyright a { color: inherit; text-decoration: none; }
.login-copyright a:hover { color: #65716d; text-decoration: underline; }
.seal-verify-page { min-height: 100vh; background: #f4f6f8; }
.verify-header { display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 14px max(20px, calc((100% - 920px) / 2)); border-bottom: 1px solid var(--border); background: #fff; }
.verify-brand { display: flex; align-items: center; gap: 11px; color: #20262e; text-decoration: none; }
.verify-brand strong, .verify-brand small { display: block; }
.verify-brand small { margin-top: 2px; color: #75808b; font-size: 12px; }
.verify-main { width: min(100% - 28px, 760px); margin: 48px auto; }
.verify-query { padding-bottom: 28px; border-bottom: 1px solid #dce1e6; }
.verify-query h1 { margin: 0 0 24px; font-size: 25px; }
.verify-form { width: min(100%, 620px); }
.verify-result { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 20px 0; border-bottom: 1px solid #dce1e6; }
.verify-result > i { font-size: 34px; }
.verify-result h2 { margin: 0 0 4px; font-size: 18px; }
.verify-result p { margin: 0; color: #66727e; }
.verify-result-success > i { color: #198754; }
.verify-result-error > i { color: #dc3545; }
.verify-result-warning > i { color: #cc8a00; }
.verify-details { padding-top: 14px; }
.verify-details dl { margin: 0; }
.verify-details dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 13px 0; border-bottom: 1px solid #e4e8ec; }
.verify-details dt { color: #697581; font-size: 13px; font-weight: 600; }
.verify-details dd { margin: 0; color: #222b34; }
.verify-hash { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.6; }

@media (max-width: 991.98px) {
    .sidebar { position: fixed; }
    .main-content { margin-left: 0; }
    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .login-shell { grid-template-columns: minmax(0, 1fr) minmax(390px, .8fr); }
    .login-visual { padding: 34px; }
    .login-auth { padding: 36px; }
}

@media (max-width: 575.98px) {
    .topbar { padding: 0 16px; }
    .page-body { padding: 18px 14px; }
    .summary-grid, .content-grid { grid-template-columns: 1fr; gap: 12px; }
    .version-compare { grid-template-columns: 1fr; }
    .dashboard-summary { grid-template-columns: 1fr; }
    .metric-card { min-height: 92px; padding: 16px; }
    .panel { padding: 18px; }
    .chart-wrap { height: 230px; }
    .table-toolbar { align-items: stretch; flex-direction: column; }
    .search-form { width: 100%; }
    .summary-strip { align-items: flex-start; flex-direction: column; }
    .verify-header { padding: 12px 14px; }
    .verify-brand strong { font-size: 14px; }
    .verify-main { margin: 28px auto; }
    .verify-details dl > div { grid-template-columns: 1fr; gap: 5px; }
}

@media (max-width: 767.98px) {
    .login-shell { display: block; min-height: 100vh; }
    .login-visual { min-height: 210px; max-height: 210px; padding: 24px; background-position: center 38%; }
    .login-visual-header { display: none; }
    .login-visual-copy { margin: auto 0 0; }
    .login-kicker { margin-bottom: 9px; font-size: 12px; }
    .login-visual-copy h1 { max-width: 320px; font-size: 28px; line-height: 1.2; }
    .login-visual-footer { display: none; }
    .login-auth { min-height: calc(100vh - 210px); padding: 30px 22px 36px; place-items: start center; }
    .login-auth-inner { width: min(100%, 430px); }
    .login-mobile-brand { display: flex; margin-bottom: 30px; }
    .login-heading { margin-bottom: 26px; }
    .login-copyright { display: block; }
}
