/* === DASHBOARD SHELL === */

.db-page {
    min-height: 100vh;
    background: var(--st);
    display: flex;
    flex-direction: column;
}

/* === TOPBAR === */

.db-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    height: 52px;
    background: var(--ob2);
    border-bottom: 0.5px solid var(--ob4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--cpad-m);
    gap: var(--sp4);
}

@media (min-width: 768px) {
    .db-topbar {
        padding: 0 var(--cpad-d);
    }
}

.db-logo {
    font-family: var(--fs);
    font-size: 18px;
    letter-spacing: -0.4px;
    color: #F0EDE6;
    text-decoration: none;
    flex-shrink: 0;
}

.db-logo em {
    font-style: italic;
    color: var(--v);
}

.db-topbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.db-topbar-search {
    display: none;
    align-items: center;
    gap: var(--sp2);
    background: var(--ob3);
    border: 0.5px solid var(--ob4);
    border-radius: var(--r-md);
    padding: 0 var(--sp3);
    width: 100%;
    max-width: 360px;
    height: 34px;
    transition: border-color var(--ease);
}

.db-topbar-search:focus-within {
    border-color: var(--v);
}

@media (min-width: 640px) {
    .db-topbar-search {
        display: flex;
    }
}

.db-search-inp {
    flex: 1;
    background: none;
    border: none;
    font-family: var(--fn);
    font-size: var(--t-sm);
    color: #C8C4BC;
    outline: none;
}

.db-search-inp::placeholder {
    color: #3A3830;
}

.db-topbar-right {
    display: flex;
    align-items: center;
    gap: var(--sp3);
    flex-shrink: 0;
}

.db-topbar-notif {
    position: relative;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    color: #6A6660;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--r-md);
    transition: background var(--ease), color var(--ease);
}

.db-topbar-notif:hover {
    background: var(--ob3);
    color: #C8C4BC;
}

.db-notif-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--v-d);
    border: 1.5px solid var(--ob2);
}

.db-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ob4);
    border: 0.5px solid var(--ob5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fs);
    font-size: 12px;
    color: #C8C4BC;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color var(--ease);
}

.db-avatar:hover {
    border-color: var(--v);
}

.db-role-pill {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.db-role-admin {
    background: var(--fr-p);
    color: var(--fr-i);
}

.db-role-issuer {
    background: #EAF0F7;
    color: #1B3A5C;
}

.db-role-holder {
    background: var(--ac-p);
    color: var(--ac-i);
}

.db-role-verifier {
    background: var(--v-p);
    color: var(--v);
}


/* === LAYOUT === */

.db-layout {
    display: flex;
    flex: 1;
    padding-top: 52px;
    min-height: 100vh;
}


/* === SIDEBAR === */

.db-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--wh);
    border-right: var(--border);
    position: fixed;
    top: 52px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform var(--ease-s);
}

.db-sidebar.open {
    transform: translateX(0);
}

@media (min-width: 900px) {
    .db-sidebar {
        transform: none;
        position: fixed;
    }

    .db-main {
        margin-left: 220px;
    }
}

.db-sidebar-section {
    padding: var(--sp3) 0 var(--sp1);
}

.db-sidebar-label {
    padding: var(--sp2) var(--sp4);
    font-size: 12px;
    color: var(--mu-l);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.db-nav-item {
    display: flex;
    align-items: center;
    gap: var(--sp3);
    padding: 9px var(--sp4);
    font-size: var(--t-sm);
    color: var(--mu);
    text-decoration: none;
    cursor: pointer;
    border-right: 2px solid transparent;
    transition: color var(--ease), background var(--ease), border-color var(--ease);
    position: relative;
    background: none;
    border-top: none;
    border-bottom: none;
    border-left: none;
    width: 100%;
    text-align: left;
    font-family: var(--fn);
    min-height: var(--touch-sm);
}

.db-nav-item:hover {
    color: var(--ob);
    background: var(--st);
}

.db-nav-item.active {
    color: var(--v);
    background: var(--v-p);
    border-right-color: var(--v);
    font-weight: 500;
}

.db-nav-icon {
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-nav-badge {
    margin-left: auto;
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 20px;
    background: var(--rv-p);
    color: var(--rv-i);
    font-weight: 600;
}

.db-sidebar-footer {
    padding: var(--sp4);
    border-top: var(--border);
    margin-top: auto;
}

.db-sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--sp3);
    margin-bottom: var(--sp3);
}

.db-sidebar-user-name {
    font-size: var(--t-sm);
    font-weight: 500;
    color: var(--ob);
}

.db-sidebar-user-role {
    font-size: 12px;
    color: var(--mu);
}

.db-sidebar-signout {
    display: flex;
    align-items: center;
    gap: var(--sp2);
    font-size: var(--t-sm);
    color: var(--mu);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--fn);
    padding: 0;
    transition: color var(--ease);
}

.db-sidebar-signout:hover {
    color: var(--rv-i);
}


/* === MOBILE SIDEBAR TOGGLE === */

.db-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    color: #8A8680;
    cursor: pointer;
    border-radius: var(--r-md);
    flex-shrink: 0;
    transition: background var(--ease);
}

.db-sidebar-toggle:hover {
    background: var(--ob3);
}

@media (min-width: 900px) {
    .db-sidebar-toggle {
        display: none;
    }
}

.db-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(14, 14, 12, 0.5);
    z-index: 40;
}

.db-sidebar-overlay.open {
    display: block;
}


/* === MAIN CONTENT === */

.db-main {
    flex: 1;
    min-width: 0;
    padding: var(--sp6) var(--cpad-m);
}

@media (min-width: 768px) {
    .db-main {
        padding: var(--sp8) var(--cpad-d);
    }
}


/* === PAGE HEADER === */

.db-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp4);
    margin-bottom: var(--sp6);
    flex-wrap: wrap;
}

.db-page-title {
    font-family: var(--fs);
    font-size: var(--t-h2);
    color: var(--ob);
    letter-spacing: var(--ls-h);
    line-height: 1.2;
}

.db-page-sub {
    font-size: var(--t-sm);
    color: var(--mu);
    margin-top: var(--sp1);
}

.db-page-actions {
    display: flex;
    gap: var(--sp2);
    flex-wrap: wrap;
    flex-shrink: 0;
}


/* === STAT GRID === */

.db-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp3);
    margin-bottom: var(--sp6);
}

@media (min-width: 640px) {
    .db-stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1000px) {
    .db-stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.db-stat-card {
    background: var(--wh);
    border: var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp4);
}

.db-stat-n {
    font-family: var(--fs);
    font-size: clamp(20px, 2.5vw, 28px);
    color: var(--ob);
    line-height: 1;
}

.db-stat-d {
    font-size: var(--t-xs);
    color: var(--v);
    margin-top: 4px;
}

.db-stat-l {
    font-size: var(--t-xs);
    color: var(--mu);
    margin-top: 2px;
}


/* === CARD === */

.db-card {
    background: var(--wh);
    border: var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: var(--sp4);
}

.db-card-header {
    padding: 10px var(--sp4);
    border-bottom: var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    gap: var(--sp3);
}

.db-card-title {
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--ob);
}

.db-card-actions {
    display: flex;
    gap: var(--sp2);
    align-items: center;
    flex-shrink: 0;
}

.db-card-body {
    padding: var(--sp4);
}


/* === FILTER BAR === */

.db-filter-bar {
    display: flex;
    align-items: center;
    gap: var(--sp2);
    flex-wrap: wrap;
    margin-bottom: var(--sp4);
}

.db-filter-inp {
    flex: 1;
    min-width: 180px;
    min-height: 36px;
    padding: 0 var(--sp3);
    background: var(--wh);
    border: var(--border-s);
    border-radius: var(--r-md);
    font-family: var(--fn);
    font-size: var(--t-sm);
    color: var(--ob);
    outline: none;
    transition: border-color var(--ease);
    appearance: none;
    -webkit-appearance: none;
}

.db-filter-inp:focus {
    border-color: var(--v);
}

.db-filter-inp::placeholder {
    color: var(--mu-l);
}

.db-filter-select {
    min-height: 36px;
    padding: 0 var(--sp5) 0 var(--sp3);
    background: var(--wh);
    border: var(--border-s);
    border-radius: var(--r-md);
    font-family: var(--fn);
    font-size: var(--t-sm);
    color: var(--ob);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9' fill='none' stroke='%237A7870' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    transition: border-color var(--ease);
}

.db-filter-select:focus {
    border-color: var(--v);
}


/* === TABLE === */

.db-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.db-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}

.db-table th {
    font-size: 12px;
    padding: 8px 14px;
    text-align: left;
    font-size: 12px;
    color: var(--mu);
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: var(--st);
    border-bottom: var(--border);
}

.db-table td {
    padding: 10px 14px;
    border-bottom: var(--border-m);
    color: var(--ob);
    vertical-align: middle;
}

.db-table tr:last-child td {
    border-bottom: none;
}

.db-table tr:hover td {
    background: var(--st);
}

.db-table-mono {
    font-family: var(--fm);
    font-size: 12px;
    color: var(--mu);
}

.db-table-action {
    display: flex;
    gap: var(--sp1);
    align-items: center;
}


/* === FORM === */

.db-form {
    display: flex;
    flex-direction: column;
    gap: var(--sp4);
}

.db-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp3);
}

@media (max-width: 520px) {
    .db-form-row {
        grid-template-columns: 1fr;
    }
}

.db-field {
    display: flex;
    flex-direction: column;
    gap: var(--sp1);
}

.db-field-wide {
    grid-column: 1 / -1;
}

.db-label {
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--mu);
    letter-spacing: 0.3px;
}

.db-input {
    width: 100%;
    min-height: var(--touch);
    padding: 0 var(--sp3);
    background: var(--st);
    border: var(--border-s);
    border-radius: var(--r-md);
    font-family: var(--fn);
    font-size: var(--t-sm);
    color: var(--ob);
    outline: none;
    transition: border-color var(--ease);
    appearance: none;
    -webkit-appearance: none;
}

.db-input:focus {
    border-color: var(--v);
}

.db-input::placeholder {
    color: var(--mu-l);
}

.db-select {
    width: 100%;
    min-height: var(--touch);
    padding: 0 var(--sp8) 0 var(--sp3);
    background: var(--st);
    border: var(--border-s);
    border-radius: var(--r-md);
    font-family: var(--fn);
    font-size: var(--t-sm);
    color: var(--ob);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9' fill='none' stroke='%237A7870' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    transition: border-color var(--ease);
}

.db-select:focus {
    border-color: var(--v);
}

.db-textarea {
    width: 100%;
    padding: var(--sp3);
    background: var(--st);
    border: var(--border-s);
    border-radius: var(--r-md);
    font-family: var(--fn);
    font-size: var(--t-sm);
    color: var(--ob);
    outline: none;
    resize: vertical;
    min-height: 88px;
    transition: border-color var(--ease);
    line-height: 1.6;
}

.db-textarea:focus {
    border-color: var(--v);
}

.db-field-hint {
    font-size: var(--t-xs);
    color: var(--mu-l);
    line-height: 1.5;
}

.db-blockchain-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--sp3);
    background: var(--v-p);
    border: 0.5px solid var(--v-b);
    border-radius: var(--r-md);
    padding: var(--sp3) var(--sp4);
    font-size: var(--t-sm);
    color: var(--v);
    line-height: 1.6;
}


/* === AUDIT LOG === */

.db-audit-list {
    display: flex;
    flex-direction: column;
}

.db-audit-row {
    display: flex;
    align-items: flex-start;
    gap: var(--sp3);
    padding: var(--sp3) var(--sp4);
    border-bottom: var(--border-m);
    font-size: var(--t-sm);
}

.db-audit-row:last-child {
    border-bottom: none;
}

.db-audit-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.db-dot-green {
    background: var(--ac-i);
}

.db-dot-amber {
    background: var(--fr-i);
}

.db-dot-red {
    background: var(--rv-i);
}

.db-dot-muted {
    background: var(--st4);
}

.db-audit-event {
    font-weight: 500;
    color: var(--ob);
}

.db-audit-actor {
    font-size: 12px;
    color: var(--tx-2, #6A6660);
    margin-top: 2px;
}

.db-audit-time {
    margin-left: auto;
    font-size: 12px;
    color: var(--mu);
    white-space: nowrap;
    flex-shrink: 0;
}


/* === CRED WALLET CARD === */

.db-cred-card {
    background: var(--wh);
    border: var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp4);
    margin-bottom: var(--sp3);
    transition: border-color var(--ease-s), box-shadow var(--ease-s);
}

.db-cred-card:hover {
    border-color: var(--st4);
    box-shadow: var(--shadow-card);
}

.db-cred-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--sp3);
    gap: var(--sp3);
}

.db-cred-info {
    display: flex;
    align-items: flex-start;
    gap: var(--sp3);
    flex: 1;
    min-width: 0;
}

.db-cred-icon {
    width: 36px;
    height: 36px;
    background: var(--st2);
    border: var(--border);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-cred-name {
    font-family: var(--fs);
    font-size: 14px;
    color: var(--ob);
    line-height: 1.3;
}

.db-cred-issuer {
    font-size: 12px;
    color: var(--mu);
    margin-top: 3px;
}

.db-cred-foot {
    padding-top: var(--sp3);
    border-top: var(--border-m);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp3);
    flex-wrap: wrap;
}

.db-cred-id {
    font-family: var(--fm);
    font-size: 12px;
    color: var(--mu);
}

.db-cred-actions {
    display: flex;
    gap: var(--sp2);
}


/* === VERIFY RESULT (verifier dashboard) === */

.db-verify-result {
    border-radius: var(--r-lg);
    border: 1px solid var(--ac-b);
    background: var(--ac-p);
    padding: var(--sp4);
    margin-top: var(--sp3);
}

.db-verify-result-head {
    display: flex;
    align-items: center;
    gap: var(--sp2);
    margin-bottom: var(--sp3);
}

.db-verify-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--ac-p);
    border: 1px solid var(--ac-b);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-verify-title {
    font-family: var(--fs);
    font-size: 15px;
    color: var(--ac-i);
}

.db-verify-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 0.5px solid var(--ac-b);
    font-size: var(--t-sm);
    gap: var(--sp3);
}

.db-verify-row:last-of-type {
    border-bottom: none;
}

.db-verify-key {
    color: var(--ac-i);
    opacity: 0.7;
    flex-shrink: 0;
}

.db-verify-val {
    font-weight: 500;
    color: var(--ob);
    text-align: right;
}

.db-verify-hash {
    margin-top: var(--sp2);
    background: rgba(14, 14, 12, 0.06);
    border-radius: 3px;
    padding: 5px 8px;
    font-family: var(--fm);
    font-size: 12px;
    color: var(--ac-i);
    opacity: 0.7;
    word-break: break-all;
    line-height: 1.5;
}


/* === API KEY CARD === */

.db-api-key-row {
    display: flex;
    align-items: center;
    gap: var(--sp3);
    padding: var(--sp3) var(--sp4);
    border-bottom: var(--border-m);
    flex-wrap: wrap;
}

.db-api-key-row:last-child {
    border-bottom: none;
}

.db-api-key-name {
    font-size: var(--t-sm);
    font-weight: 500;
    color: var(--ob);
    flex: 1;
}

.db-api-key-val {
    font-family: var(--fm);
    font-size: 13px;
    color: var(--mu);
    background: var(--st2);
    padding: 3px 8px;
    border-radius: 3px;
}

.db-api-key-meta {
    font-size: var(--t-xs);
    color: var(--mu-l);
}


/* === EMPTY STATE === */

.db-empty {
    padding: var(--sp12) var(--sp4);
    text-align: center;
}

.db-empty-icon {
    width: 44px;
    height: 44px;
    background: var(--st2);
    border: var(--border);
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--sp4);
}

.db-empty-title {
    font-family: var(--fs);
    font-size: 16px;
    color: var(--ob);
    margin-bottom: var(--sp2);
}

.db-empty-body {
    font-size: var(--t-sm);
    color: var(--mu);
    line-height: 1.7;
    max-width: 280px;
    margin: 0 auto var(--sp5);
}


/* === MINI CHART BAR === */

.db-sparkbar {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 36px;
}

.db-sparkbar-col {
    flex: 1;
    border-radius: 2px 2px 0 0;
    background: var(--st3);
    transition: background var(--ease);
}

.db-sparkbar-col.accent {
    background: var(--v);
}

.db-sparkbar-col:hover {
    background: var(--v-d);
}


/* === RESPONSIVE UTILITY === */

.db-hide-mobile {
    display: none;
}

@media (min-width: 640px) {
    .db-hide-mobile {
        display: table-cell;
    }
}


/* === MODAL === */

.db-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(14, 14, 12, 0.7);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--sp4);
}

.db-modal-backdrop.open {
    display: flex;
}

.db-modal {
    background: var(--wh);
    border-radius: var(--r-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
}

.db-modal-header {
    padding: var(--sp4) var(--sp5);
    border-bottom: var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: var(--wh);
    z-index: 1;
}

.db-modal-title {
    font-family: var(--fs);
    font-size: 18px;
    color: var(--ob);
    letter-spacing: -0.3px;
}

.db-modal-close {
    width: var(--touch-sm);
    height: var(--touch-sm);
    background: none;
    border: none;
    color: var(--mu);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: background var(--ease), color var(--ease);
    flex-shrink: 0;
}

.db-modal-close:hover {
    background: var(--st2);
    color: var(--ob);
}

.db-modal-body {
    padding: var(--sp5);
    flex: 1;
    overflow-y: auto;
}

.db-modal-footer {
    padding: var(--sp4) var(--sp5);
    border-top: var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sp2);
    flex-shrink: 0;
    background: var(--st);
}


/* === NOTIFICATION PANEL === */

.db-notif-panel {
    position: fixed;
    top: 52px;
    right: var(--cpad-m);
    width: 360px;
    max-height: calc(100vh - 72px);
    background: var(--wh);
    border: var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-modal);
    z-index: calc(var(--z-nav) + 1);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.db-notif-panel.open {
    display: flex;
}

.db-notif-header {
    padding: var(--sp3) var(--sp4);
    border-bottom: var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.db-notif-title {
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--ob);
}

.db-notif-mark-all {
    font-size: var(--t-xs);
    color: var(--v);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--fn);
    padding: 0;
}

.db-notif-list {
    overflow-y: auto;
    flex: 1;
}

.db-notif-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp3);
    padding: var(--sp3) var(--sp4);
    border-bottom: var(--border-m);
    cursor: pointer;
    transition: background var(--ease);
}

.db-notif-item:hover {
    background: var(--st);
}

.db-notif-item:last-child {
    border-bottom: none;
}

.db-notif-item.unread {
    background: var(--v-p);
}

.db-notif-item.unread:hover {
    background: #F2E4DC;
}

.db-notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.db-notif-icon-green {
    background: var(--ac-p);
}

.db-notif-icon-amber {
    background: var(--fr-p);
}

.db-notif-icon-red {
    background: var(--rv-p);
}

.db-notif-icon-muted {
    background: var(--st2);
}

.db-notif-body {
    flex: 1;
    min-width: 0;
}

.db-notif-text {
    font-size: var(--t-sm);
    color: var(--ob);
    line-height: 1.5;
}

.db-notif-time {
    font-size: var(--t-xs);
    color: var(--mu-l);
    margin-top: 3px;
}

.db-notif-unread-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--v);
    flex-shrink: 0;
    margin-top: 6px;
}


/* === DETAIL VIEW === */

.db-detail-header {
    display: flex;
    align-items: flex-start;
    gap: var(--sp4);
    padding: var(--sp5);
    border-bottom: var(--border);
}

.db-detail-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r-lg);
    background: var(--st2);
    border: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-detail-title {
    font-family: var(--fs);
    font-size: 18px;
    color: var(--ob);
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.db-detail-sub {
    font-size: var(--t-sm);
    color: var(--mu);
    margin-top: 3px;
}

.db-detail-body {
    padding: var(--sp5);
}

.db-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp4) var(--sp6);
    margin-bottom: var(--sp5);
}

@media (max-width: 480px) {
    .db-detail-grid {
        grid-template-columns: 1fr;
    }
}

.db-detail-field-label {
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--mu);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.db-detail-field-value {
    font-size: 13px;
    color: var(--ob);
    font-weight: 500;
    line-height: 1.4;
}

.db-detail-field-mono {
    font-family: var(--fm);
    font-size: var(--t-xs);
    color: var(--mu);
    word-break: break-all;
    line-height: 1.6;
}


/* === QR DISPLAY === */

.db-qr-display {
    background: var(--wh);
    border: var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp4);
}

.db-qr-code {
    width: 160px;
    height: 160px;
    background: var(--ob);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp3);
}

.db-qr-code svg {
    width: 100%;
    height: 100%;
}

.db-qr-label {
    font-size: var(--t-xs);
    color: var(--mu);
    text-align: center;
    line-height: 1.6;
}


/* === PROGRESS BAR === */

.db-progress-wrap {
    margin-bottom: var(--sp3);
}

.db-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--sp2);
}

.db-progress-label {
    font-size: var(--t-sm);
    color: var(--ob);
}

.db-progress-value {
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--ob);
}

.db-progress-track {
    height: 8px;
    background: var(--st2);
    border-radius: 4px;
    overflow: hidden;
}

.db-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--v);
    transition: width 0.4s ease;
}

.db-progress-fill.green {
    background: var(--ac-i);
}

.db-progress-fill.amber {
    background: var(--fr-i);
}

.db-progress-fill.red {
    background: var(--rv-i);
}

.db-progress-sub {
    font-size: var(--t-xs);
    color: var(--mu);
    margin-top: var(--sp1);
}


/* === CHART AREA (CSS-only bars) === */

.db-chart-area {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 80px;
    padding: var(--sp2) 0 0;
}

.db-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.db-chart-bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    background: var(--st3);
    transition: background var(--ease);
    cursor: pointer;
    position: relative;
}

.db-chart-bar:hover {
    background: var(--v);
}

.db-chart-bar.accent {
    background: var(--v);
}

.db-chart-bar.green {
    background: var(--ac-i);
}

.db-chart-bar-label {
    font-size: 12px;
    color: var(--mu-l);
    white-space: nowrap;
}

.db-chart-legend {
    display: flex;
    gap: var(--sp4);
    flex-wrap: wrap;
    margin-top: var(--sp3);
}

.db-chart-legend-item {
    display: flex;
    align-items: center;
    gap: var(--sp2);
    font-size: var(--t-xs);
    color: var(--mu);
}

.db-chart-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}


/* === SETTINGS SECTIONS === */

.db-settings-section {
    margin-bottom: var(--sp8);
}

.db-settings-heading {
    font-family: var(--fs);
    font-size: 16px;
    color: var(--ob);
    margin-bottom: var(--sp1);
    letter-spacing: -0.2px;
}

.db-settings-sub {
    font-size: var(--t-sm);
    color: var(--mu);
    margin-bottom: var(--sp5);
    line-height: 1.6;
}

.db-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp5);
    padding: var(--sp4) 0;
    border-bottom: var(--border-m);
}

.db-settings-row:last-child {
    border-bottom: none;
}

.db-settings-row-label {
    font-size: var(--t-sm);
    font-weight: 500;
    color: var(--ob);
}

.db-settings-row-sub {
    font-size: var(--t-xs);
    color: var(--mu);
    margin-top: 2px;
}

.db-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.db-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.db-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--st3);
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--ease);
}

.db-toggle input:checked+.db-toggle-track {
    background: var(--v);
}

.db-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--wh);
    transition: transform var(--ease);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.db-toggle input:checked+.db-toggle-track::after {
    transform: translateX(16px);
}


/* === PLAN / BILLING CARD === */

.db-plan-card {
    background: var(--ob2);
    border: 0.5px solid var(--ob4);
    border-radius: var(--r-xl);
    padding: var(--sp6);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp4);
    flex-wrap: wrap;
    margin-bottom: var(--sp4);
}

.db-plan-name {
    font-family: var(--fs);
    font-size: 18px;
    color: #F0EDE6;
    margin-bottom: var(--sp1);
}

.db-plan-desc {
    font-size: var(--t-sm);
    color: #6A6660;
    line-height: 1.6;
}

.db-plan-price {
    font-family: var(--fs);
    font-size: 28px;
    color: #F0EDE6;
    line-height: 1;
    text-align: right;
}

.db-plan-price-period {
    font-size: var(--t-sm);
    color: #5A5650;
}


/* === TEAM MEMBER ROW === */

.db-member-row {
    display: flex;
    align-items: center;
    gap: var(--sp3);
    padding: var(--sp3) var(--sp4);
    border-bottom: var(--border-m);
}

.db-member-row:last-child {
    border-bottom: none;
}

.db-member-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--st2);
    border: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fs);
    font-size: 12px;
    color: var(--mu);
    flex-shrink: 0;
}

.db-member-name {
    font-size: var(--t-sm);
    font-weight: 500;
    color: var(--ob);
}

.db-member-email {
    font-size: var(--t-xs);
    color: var(--mu);
    margin-top: 2px;
}

.db-member-role {
    margin-left: auto;
    font-size: var(--t-xs);
    color: var(--mu);
    background: var(--st2);
    border: var(--border);
    border-radius: var(--r-sm);
    padding: 2px 8px;
}


/* === TRUST GRAPH CARD === */

.db-trust-metric {
    background: var(--wh);
    border: var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp5);
}

.db-trust-metric-n {
    font-family: var(--fs);
    font-size: clamp(24px, 3vw, 32px);
    color: var(--ob);
    line-height: 1;
    margin-bottom: var(--sp1);
}

.db-trust-metric-label {
    font-size: var(--t-xs);
    color: var(--mu);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.db-trust-metric-trend {
    font-size: var(--t-xs);
    color: var(--v);
    margin-top: 4px;
}


/* === GEO ROW === */

.db-geo-row {
    display: flex;
    align-items: center;
    gap: var(--sp3);
    padding: var(--sp2) 0;
    border-bottom: var(--border-m);
}

.db-geo-row:last-child {
    border-bottom: none;
}

.db-geo-country {
    font-size: var(--t-sm);
    color: var(--ob);
    flex: 1;
}

.db-geo-count {
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--ob);
}

.db-geo-bar-wrap {
    width: 120px;
    height: 4px;
    background: var(--st2);
    border-radius: 2px;
    overflow: hidden;
}

.db-geo-bar-fill {
    height: 100%;
    background: var(--v);
    border-radius: 2px;
}


/* === WEBHOOK ROW === */

.db-webhook-row {
    display: flex;
    align-items: center;
    gap: var(--sp3);
    padding: var(--sp3) var(--sp4);
    border-bottom: var(--border-m);
    flex-wrap: wrap;
}

.db-webhook-row:last-child {
    border-bottom: none;
}

.db-webhook-url {
    font-family: var(--fm);
    font-size: var(--t-xs);
    color: var(--mu);
    flex: 1;
    word-break: break-all;
}

.db-webhook-name {
    font-size: var(--t-sm);
    font-weight: 500;
    color: var(--ob);
}

.db-webhook-status {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.db-webhook-status.active {
    background: var(--ac-i);
}

.db-webhook-status.failed {
    background: var(--rv-i);
}


/* === PANEL TABS (sub-navigation within a panel) === */

.db-panel-tabs {
    display: flex;
    gap: 0;
    border-bottom: var(--border);
    margin-bottom: var(--sp5);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.db-panel-tab {
    padding: var(--sp2) var(--sp4);
    font-size: var(--t-sm);
    color: var(--mu);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: var(--fn);
    white-space: nowrap;
    transition: color var(--ease), border-color var(--ease);
    min-height: var(--touch-sm);
}

.db-panel-tab:hover {
    color: var(--ob);
}

.db-panel-tab.active {
    color: var(--v);
    border-bottom-color: var(--v);
    font-weight: 500;
}


/* === CREDENTIAL DETAIL MODAL SPECIFIC === */

.db-cred-detail-hash {
    background: var(--ob2);
    border-radius: var(--r-md);
    padding: var(--sp3) var(--sp4);
    font-family: var(--fm);
    font-size: 12px;
    color: #8A8480;
    word-break: break-all;
    line-height: 1.7;
}

.db-cred-detail-hash span {
    color: #5A5650;
    margin-right: var(--sp2);
}


/* === ALERT BANNER === */

.db-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--sp3);
    padding: var(--sp3) var(--sp4);
    border-radius: var(--r-md);
    font-size: var(--t-sm);
    line-height: 1.6;
    margin-bottom: var(--sp4);
}

.db-alert-warn {
    background: var(--fr-p);
    border: 0.5px solid var(--fr-b);
    color: var(--fr-i);
}

.db-alert-err {
    background: var(--rv-p);
    border: 0.5px solid var(--rv-b);
    color: var(--rv-i);
}

.db-alert-info {
    background: var(--ac-p);
    border: 0.5px solid var(--ac-b);
    color: var(--ac-i);
}


/* === SKELETON LOADER === */

.db-skeleton-row {
    display: flex;
    gap: var(--sp3);
    align-items: center;
    padding: var(--sp3) var(--sp4);
    border-bottom: var(--border-m);
}

.db-skeleton-row:last-child {
    border-bottom: none;
}

.db-skel {
    background: var(--st2);
    border-radius: var(--r-sm);
    position: relative;
    overflow: hidden;
}

.db-skel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .5) 50%, transparent 100%);
    animation: db-shimmer 1.4s ease infinite;
}

@keyframes db-shimmer {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

.db-skel-circle {
    border-radius: 50%;
}

.db-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--ob1, #1a1a18);
    border: 0.5px solid var(--st3, #3a3830);
    border-radius: var(--r-md, 6px);
    z-index: 60;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.db-search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 0.5px solid var(--st2, #2e2c28);
}

.db-search-result-item:last-child {
    border-bottom: none;
}

.db-search-result-item:hover {
    background: var(--ob2, #222220);
}

.db-search-result-empty {
    padding: 12px 14px;
    font-size: 13px;
    color: var(--mu, #6b6860);
}

/* ── Notif badge dot on bell ───────────────────────────── */
.db-notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e74c3c;
    border: 2px solid var(--ob1, #1a1a18);
}

.db-notif-badge.hidden {
    display: none;
}

/* ── Panel visibility — works alongside hidden attr ────── */
.db-panel[hidden] {
    display: none !important;
}

/* ── Freeze alert colour (warn) ────────────────────────── */
.db-alert-warn {
    background: var(--fr-p, rgba(251, 191, 36, .08));
    color: var(--fr-i, #f59e0b);
    border: 0.5px solid var(--fr-b, rgba(251, 191, 36, .2));
}