/* :root {
font-family: "DM Sans", system-ui, sans-serif;

--navy: #101a33;
--navy-light: #172442;

--blue: #3157e1;
--blue-light: #eef2ff;

--green: #12a66a;
--green-light: #eafaf3;

--red: #e44949;
--red-light: #fff0f0;

--orange: #f59e0b;

--text: #172033;
--muted: #758096;

--border: #e4e8f0;
--surface: #ffffff;
--background: #f5f7fb;

--shadow:
    0 12px 40px rgba(20, 32, 60, 0.07);

} */


:root {
    font-family: "DM Sans", system-ui, sans-serif;

    /* =====================================================
       DARK THEME
    ===================================================== */

    /* App / navigation */
    --navy: #e8edf7;
    --navy-light: #cbd5e8;

    /* Primary */
    --blue: #6f8cff;
    --blue-light: #1b2645;

    /* Success */
    --green: #34d399;
    --green-light: #102f27;

    /* Danger */
    --red: #f87171;
    --red-light: #321b20;

    /* Warning */
    --orange: #fbbf24;

    /* Text */
    --text: #e5e7eb;
    --muted: #94a3b8;

    /* Borders */
    --border: #293449;
    --border-strong: #3a475f;

    /* Surfaces */
    --surface: #111827;
    --surface-2: #172033;
    --surface-3: #1c273b;

    /* Main background */
    --background: #0b1120;

    /* Shadows */
    --shadow:
        0 10px 30px rgba(0, 0, 0, 0.28);
}


*{
box-sizing: border-box;
}

html {
scroll-behavior: smooth;
}

body {
margin: 0;
min-width: 320px;

background: var(--background);
color: var(--text);

font-family: "DM Sans", system-ui, sans-serif;

/* Slightly softer rendering */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;

}

button,
input,
select {
font: inherit;
}

button {
cursor: pointer;
}

/* =====================================================
APP
===================================================== */

.app-shell {
min-height: 100vh;
display: flex;
}

/* =====================================================
SIDEBAR
===================================================== */

.sidebar {
width: 260px;
min-height: 100vh;

position: fixed;
left: 0;
top: 0;
bottom: 0;

display: flex;
flex-direction: column;

padding: 28px 18px;

background: #101a33;
color: rgb(255, 255, 255);

}

.brand {
display: flex;
align-items: center;

gap: 12px;

padding: 4px 10px 34px;

}

.brand-icon {
width: 40px;
height: 40px;

border-radius: 11px;

display: flex;
align-items: center;
justify-content: center;

background:
    linear-gradient(
        135deg,
        #4c6fff,
        #7891ff
    );

font-family: "Space Grotesk", sans-serif;

font-size: 14px;
font-weight: 700;

box-shadow:
    0 8px 20px
    rgba(76, 111, 255, 0.28);

}

.brand-title {
font-family: "Space Grotesk", sans-serif;

font-size: 17px;
font-weight: 700;

letter-spacing: -0.3px;

}

.brand-subtitle {
margin-top: 2px;

color: #8290ad;

font-size: 11px;

}

.navigation {
display: flex;
flex-direction: column;

gap: 6px;

}

.nav-item {
width: 100%;

padding: 13px 14px;

border-radius: 10px;

display: flex;
align-items: center;

gap: 13px;

color: #94a1bb;

text-decoration: none;

font-size: 13px;
font-weight: 600;

transition: 0.2s ease;

}

.nav-item span {
width: 20px;

text-align: center;

font-size: 15px;

}

.nav-item:hover {
background: rgba(255, 255, 255, 0.06);

color: white;

}

.nav-item.active {
color: white;

background:
    rgba(76, 111, 255, 0.18);

box-shadow:
    inset 3px 0 0 #5575ff;

}

.sidebar-bottom {
margin-top: auto;
}

.environment-card {
margin-bottom: 14px;

padding: 14px;

border:
    1px solid
    rgba(255, 255, 255, 0.07);

border-radius: 12px;

background:
    rgba(255, 255, 255, 0.055);

}

.environment-label {
margin-bottom: 8px;

color: #697894;

font-size: 9px;
font-weight: 700;

letter-spacing: 1.2px;

}

.environment-value {
display: flex;
align-items: center;

gap: 8px;

color: #c5ccda;

font-size: 12px;

}

.api-mini-status {
display: flex;
align-items: center;

gap: 9px;

padding: 0 8px;

color: #7f8ca6;

font-size: 11px;

}

/* =====================================================
STATUS DOT
===================================================== */

.status-dot {
width: 7px;
height: 7px;

flex-shrink: 0;

display: inline-block;

border-radius: 50%;

}

.status-dot.green {
background: var(--green);

box-shadow:
    0 0 0 3px
    rgba(18, 166, 106, 0.1);

}

.status-dot.red {
background: var(--red);
}

.status-dot.yellow {
background: var(--orange);
}

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

.main-content {
width: calc(100% - 260px);

margin-left: 260px;

padding:
    34px
    42px
    24px;

}

/* =====================================================
TOP BAR
===================================================== */

.topbar {
display: flex;
justify-content: space-between;
align-items: flex-start;

gap: 30px;

margin-bottom: 30px;

}

.breadcrumb {
margin-bottom: 10px;

color: #8b95a8;

font-size: 11px;
font-weight: 600;

}

.topbar h1 {
margin: 0;

color: var(--navy);

font-family: "Space Grotesk", sans-serif;

font-size: 28px;

letter-spacing: -0.8px;

}

.topbar p {
margin: 7px 0 0;

color: var(--muted);

font-size: 13px;

}

.topbar-status {
display: flex;
align-items: center;

gap: 10px;

padding-top: 25px;

}

.live-indicator,
.model-badge {
display: flex;
align-items: center;

gap: 8px;

padding:
    9px 12px;

border:
    1px solid
    var(--border);

border-radius: 9px;

background: white;

color: #5e687b;

font-size: 11px;

white-space: nowrap;

}

.model-badge strong {
margin-left: 2px;

color: var(--navy);

}

.model-dot {
width: 7px;
height: 7px;

border-radius: 50%;

background: #5575ff;

}

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

.dashboard-grid {
display: grid;

grid-template-columns:
    minmax(500px, 1.4fr)
    minmax(340px, 0.8fr);

gap: 22px;

align-items: start;

}

.card {
background: var(--surface);

border:
    1px solid
    var(--border);

border-radius: 16px;

box-shadow: var(--shadow);

}

/* =====================================================
FORM CARD
===================================================== */

.form-card {
padding: 28px;
}

.card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;

margin-bottom: 27px;

}

.eyebrow {
display: block;

margin-bottom: 7px;

color: #8290a7;

font-size: 9px;
font-weight: 700;

letter-spacing: 1.4px;

}

.card-header h2 {
margin: 0;

color: var(--navy);

font-family: "Space Grotesk", sans-serif;

font-size: 18px;

letter-spacing: -0.3px;

}

.card-header p {
margin: 6px 0 0;

color: var(--muted);

font-size: 11px;

}

.step-number {
color: #aab3c2;

font-family: "Space Grotesk", sans-serif;

font-size: 22px;
font-weight: 600;

}

/* =====================================================
SECTION
===================================================== */

.section-title {
display: flex;
align-items: center;

gap: 9px;

margin-bottom: 14px;

color: #465168;

font-size: 11px;
font-weight: 700;

}

.second-section {
margin-top: 26px;
}

.section-icon {
width: 24px;
height: 24px;

display: flex;
align-items: center;
justify-content: center;

border-radius: 7px;

background: var(--blue-light);

color: var(--blue);

font-size: 9px;
font-weight: 800;

}

/* =====================================================
FORM
===================================================== */

.form-grid {
display: grid;

grid-template-columns:
    repeat(2, 1fr);

gap: 16px;

}

.field {
min-width: 0;
}

.field label {
display: block;

margin-bottom: 7px;

color: #566176;

font-size: 11px;
font-weight: 600;

}

.field input,
.field select {
width: 100%;
height: 42px;

padding: 0 12px;

border:
    1px solid
    #dfe4ed;

border-radius: 9px;

outline: none;

background: #fbfcfe;

color: #1d273c;

font-size: 12px;

transition: 0.2s ease;

}

.field input:focus,
.field select:focus {
border-color: #6d86ee;

box-shadow:
    0 0 0 3px
    rgba(49, 87, 225, 0.08);

background: white;

}

.field small {
display: block;

margin-top: 5px;

color: #9aa3b2;

font-size: 9px;

}

/* =====================================================
AMOUNT
===================================================== */

.input-with-prefix {
position: relative;
}

.input-with-prefix span {
position: absolute;

left: 12px;
top: 50%;

transform:
    translateY(-50%);

z-index: 1;

color: #7c8799;

font-size: 12px;

}

.input-with-prefix input {
padding-left: 29px;
}

/* =====================================================
RISK INPUT
===================================================== */

.risk-input-grid {
display: grid;

grid-template-columns:
    repeat(2, 1fr);

gap: 14px;

}

.risk-input-card {
padding: 14px;

border:
    1px solid
    #e5e9f0;

border-radius: 11px;

background: #fafbfe;

}

.risk-input-heading {
display: flex;
justify-content: space-between;

margin-bottom: 13px;

color: #556176;

font-size: 11px;
font-weight: 600;

}

.risk-input-heading strong {
color: var(--blue);

font-family:
    "Space Grotesk",
    sans-serif;

}

/* =====================================================
RANGE
===================================================== */

.range-input {
appearance: none;

width: 100%;
height: 4px;

border-radius: 20px;

outline: none;

background:
    linear-gradient(
        90deg,
        #5575ed,
        #9caefb
    );

}

.range-input::-webkit-slider-thumb {
appearance: none;

width: 15px;
height: 15px;

border:
    4px solid
    var(--blue);

border-radius: 50%;

background: white;

cursor: pointer;

box-shadow:
    0 2px 7px
    rgba(49, 87, 225, 0.2);

}

.range-input::-moz-range-thumb {
width: 15px;
height: 15px;

border:
    4px solid
    var(--blue);

border-radius: 50%;

background: white;

cursor: pointer;

}

.range-labels {
display: flex;
justify-content: space-between;

margin-top: 8px;

color: #9aa3b2;

font-size: 9px;

}

/* =====================================================
BUTTONS
===================================================== */

.form-actions {
display: flex;
justify-content: flex-end;

gap: 10px;

margin-top: 28px;
padding-top: 21px;

border-top:
    1px solid
    #edf0f4;

}

.primary-button,
.secondary-button {
height: 42px;

padding: 0 17px;

border-radius: 9px;

font-size: 11px;
font-weight: 700;

transition: 0.2s ease;

}

.primary-button {
display: flex;
align-items: center;

gap: 12px;

border:
    1px solid
    var(--blue);

background: var(--blue);

color: white;

box-shadow:
    0 7px 16px
    rgba(49, 87, 225, 0.2);

}

.primary-button:hover {
background: #264bd3;

transform:
    translateY(-1px);

}

.secondary-button {
border:
1px solid
#dfe4ec;

background: white;

color: #697488;

}

.secondary-button:hover {
background: #f7f8fa;
}

/* =====================================================
RIGHT COLUMN
===================================================== */

.right-column {
display: flex;

flex-direction: column;

gap: 18px;

}

/* =====================================================
RESULT
===================================================== */

.result-card {
min-height: 390px;

padding: 25px;

}

.result-header {
margin-bottom: 18px;
}

.model-status {
display: flex;
align-items: center;

gap: 7px;

color: #718097;

font-size: 10px;
font-weight: 600;

}

.result-content {
width: 100%;
}

/* =====================================================
RISK STATUS
===================================================== */

.risk-status {
display: flex;
align-items: center;

gap: 12px;

padding: 14px;

margin-bottom: 24px;

border-radius: 12px;

}

.risk-status.safe {
background: var(--green-light);

border:
    1px solid
    #d5f2e4;

}

.risk-status.fraud {
background: var(--red-light);

border:
    1px solid
    #f6d3d3;

}

.risk-status-icon {
width: 36px;
height: 36px;

display: flex;
align-items: center;
justify-content: center;

border-radius: 9px;

font-size: 15px;
font-weight: 800;

}

.risk-status.safe
.risk-status-icon {
background: #d2f4e3;

color: var(--green);

}

.risk-status span {
display: block;

margin-bottom: 3px;

color: #7d8a9c;

font-size: 8px;
font-weight: 700;

letter-spacing: 1px;

}

.risk-status h3 {
margin: 0;

font-family:
    "Space Grotesk",
    sans-serif;

font-size: 14px;

}

.risk-status.safe h3 {
color: #087b4c;
}

.risk-status.fraud h3 {
color: #bf3030;
}

/* =====================================================
PROBABILITY
===================================================== */
.probability-section {
margin-bottom: 17px;
}

.probability-heading {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}

.probability-heading span {
color: #657085;
font-size: 11px;
font-weight: 600;
}

.probability-heading strong {
color: var(--navy);
font-family:
    "Space Grotesk",
    sans-serif;
font-size: 21px;
}

.probability-bar {
width: 100%;
height: 9px;
overflow: hidden;
border-radius: 20px;
background: #e9edf3;
}

.probability-fill {
height: 100%;
border-radius: 20px;
background:
    linear-gradient(
        90deg,
        #19ad72,
        #52c996
    );

}

.probability-fill.danger {
background:
linear-gradient(
90deg,
#f3a334,
#e44949
);
}

.probability-scale {
display: flex;
justify-content: space-between;
margin-top: 6px;
color: #a2aab8;
font-size: 8px;
}

/* =====================================================
RISK LEVEL
===================================================== */
.risk-level {
display: flex;
justify-content: space-between;
align-items: center;
padding: 11px 12px;
border-radius: 8px;
background: #f7f8fb;
color: #7a8598;
font-size: 10px;
}

.risk-level strong {
color: var(--navy);
font-size: 10px;
}

.result-divider {
height: 1px;
margin: 18px 0;
background: #edf0f4;
}

/* =====================================================
RESULT DETAILS
===================================================== */
.result-details {
display: grid;
grid-template-columns:
    repeat(2, 1fr);
gap: 15px;
}

.result-details span {
display: block;
margin-bottom: 4px;
color: #98a1b1;
font-size: 9px;
}

.result-details strong {
display: block;
overflow: hidden;
color: #3e495e;
font-size: 10px;
text-overflow: ellipsis;
white-space: nowrap;
}

/* =====================================================
SYSTEM CARD
===================================================== */
.system-card {
padding: 21px 24px;
}

.system-card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 16px;
}

.system-card-header h2 {
margin: 0;
color: var(--navy);
font-family:
    "Space Grotesk",
    sans-serif;
font-size: 15px;
}

.refresh-button {
width: 30px;
height: 30px;
border: 0;
border-radius: 8px;
background: #f1f4fa;
color: #637087;
font-size: 17px;
}

.refresh-button:hover {
background: #e9edf5;
}

.health-list {
border-top:
1px solid
#edf0f4;
}

.health-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
border-bottom:
    1px solid
    #edf0f4;

color: #677287;
font-size: 10px;
}

.health-row div {
display: flex;
align-items: center;
gap: 8px;
}

.health-row strong {
font-size: 9px;
}

.health-row strong.online {
color: var(--green);
}

.health-row strong.offline {
color: var(--red);
}

/* =====================================================
INFO CARD
===================================================== */
.info-card {
display: flex;
gap: 11px;
padding: 14px;
border:
    1px solid
    #dbe4ff;

border-radius: 13px;
background: #edf2ff;
}

.info-icon {
width: 24px;
height: 24px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: #d9e2ff;
color: var(--blue);
font-size: 11px;
font-weight: 700;
}

.info-card strong {
display: block;
margin-bottom: 3px;
color: #344c9b;
font-size: 10px;
}

.info-card p {
margin: 0;
color: #7180a4;
font-size: 9px;
line-height: 1.5;
}

/* =====================================================
FOOTER
===================================================== */

.footer {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 8px;
padding: 16px 2px 0;
margin-top: 8px;
border-top: 1px solid var(--border);
color: #9aa3b2;
font-size: 10px;
}

.footer-left, .footer-right {
display: flex;
align-items: center;
gap: 8px;
}

.footer-divider {
color: #d3d8e2;
}

.footer a {
color: #6b7488;
text-decoration: none;
font-weight: 600;
}

.footer a:hover {
color: var(--blue);
}

.footer-env-badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 3px 10px;
border-radius: 20px;
background: #f4f5f8;
font-weight: 700;
color: #566176;
}

.footer-stack {
color: #b3bac8;
}

@media (max-width: 800px) {
.footer {
    flex-direction: column;
    align-items: flex-start;
}
}

/* =====================================================
RESPONSIVE
===================================================== */
@media (max-width: 1100px) {
.sidebar {
    width: 220px;
}

.main-content {
    width: calc(100% - 220px);
    margin-left: 220px;
    padding: 28px;
}

.dashboard-grid {
    grid-template-columns: 1fr;
}

.right-column {
    display: grid;
    grid-template-columns:
        1fr 1fr;
}

.result-card {
    grid-row: span 2;
}
}

@media (max-width: 800px) {
.app-shell {
    display: block;
}

.sidebar {
    position: static;
    width: 100%;
    min-height: auto;
    padding: 16px;
}

.navigation {
    display: none;
}

.sidebar-bottom {
    display: none;
}

.brand {
    padding: 0;
}

.main-content {
    width: 100%;
    margin-left: 0;
    padding:
        24px 18px;
}

.topbar {
    flex-direction: column;
}

.topbar-status {
    width: 100%;
    padding-top: 0;
    flex-wrap: wrap;
}

.dashboard-grid {
    grid-template-columns: 1fr;
}

.right-column {
    display: flex;
}
}

@media (max-width: 600px) {
.form-card {
    padding: 20px;
}

.form-grid,
.risk-input-grid {
    grid-template-columns: 1fr;
}

.topbar h1 {
    font-size: 23px;
}

.topbar-status {
    display: grid;
    grid-template-columns: 1fr;
}

.live-indicator,
.model-badge {
    width: 100%;
}

.footer {
    flex-direction: column;
    gap: 7px;
}

}


/* =====================================================
JAVASCRIPT UI STATES
===================================================== */

.primary-button:disabled {
cursor: not-allowed;

opacity: 0.75;

transform: none;

}

.loading-spinner {
width: 14px;
height: 14px;

display: inline-block;

border:
    2px solid
    rgba(255, 255, 255, 0.35);

border-top-color: white;

border-radius: 50%;

animation:
    riskguard-spin 0.7s linear infinite;

}

@keyframes riskguard-spin {

from {
    transform: rotate(0deg);
}

to {
    transform: rotate(360deg);
}

}

/* Fraud result */

.risk-status.fraud {
background: #fff0f0;

border-color: #f4d1d1;

}

.risk-status.fraud
.risk-status-icon {
background: #ffe0e0;

color: #d83b3b;

}

/* Safe result */

.risk-status.safe
.risk-status-icon {
background: #d2f4e3;

color: #0a9b61;

}

/* =====================================================
PAGE HEADER (Transactions / Model Monitor / Settings)
===================================================== */

.page-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 24px;
margin-bottom: 24px;
}

.page-header h1 {
margin: 0;
color: #f1f5f9;
font-family: "Space Grotesk", sans-serif;
font-size: 26px;
letter-spacing: -0.7px;
}

.page-header p {
margin: 7px 0 0;
color: #8f9bb0;
font-size: 13px;
max-width: 60ch;
}


/* =====================================================
   DARK CARD SYSTEM
===================================================== */

.stat-card,
.monitor-card,
.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.20),
        0 1px 2px rgba(0, 0, 0, 0.25);

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* Subtle separation when hovering */
.stat-card:hover,
.monitor-card:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.28);
}


/* =====================================================
STAT STRIP (Transactions summary)
===================================================== */

.stat-strip {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 18px;
margin-bottom: 24px;
}

.stat-card {
padding: 16px 18px;
border: 1px solid var(--border);
border-radius: 13px;
background: var(--surface);
box-shadow: var(--shadow);
}

.stat-card strong {
display: block;
margin-top: 8px;
color: var(--navy);
font-family: "Space Grotesk", sans-serif;
font-size: 22px;
letter-spacing: -0.4px;
}

.stat-card strong.danger-text {
color: var(--red);
}

/* =====================================================
TABLE TOOLBAR
===================================================== */

.table-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
margin-bottom: 18px;
}

.search-field {
position: relative;
flex: 1 1 240px;
min-width: 200px;
}

.search-icon {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
color: #9aa3b2;
font-size: 13px;
}

.search-field input {
width: 100%;
height: 38px;
padding: 0 12px 0 32px;
border: 1px solid #334155;
border-radius: 9px;

background: #111827;
color: #e5e7eb;

font-size: 12px;
outline: none;

transition: 0.2s ease;
}

.search-field input::placeholder {
    color: #64748b;
}

.search-field input:focus {
border-color: #6f8cff;
box-shadow: 0 0 0 3px rgba(111, 140, 255, 0.12);
background: #141e31;
}

.filter-select {
height: 38px;
padding: 0 12px;

border: 1px solid #334155;
border-radius: 9px;

background: #111827;
color: #cbd5e1;

font-size: 12px;
outline: none;
}


.toolbar-actions {
display: flex;
gap: 8px;
margin-left: auto;
}

.toolbar-button {
    display: flex;
    align-items: center;
    gap: 7px;

    height: 38px;
    padding: 0 14px;

    border: 1px solid #334155;
    border-radius: 9px;

    background: #172033;
    color: #cbd5e1;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;

    transition: 0.15s ease;
}

.toolbar-button:hover {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

.toolbar-button.danger {
    border-color: #5a2930;
    color: #f87171;
}

.toolbar-button.danger:hover {
    background: #321b20;
}


/* =====================================================
TRANSACTION TABLE
===================================================== */

.transaction-table-wrapper {
overflow-x: auto;

border: 1px solid #293449;
border-radius: 14px;

background: #111827;

box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.22);
}


.transaction-table {
width: 100%;
min-width: 640px;
border-collapse: collapse;
font-size: 12px;
}

.transaction-table thead th {
padding: 13px 16px;

background: #172033;
color: #8f9bb0;

font-size: 10px;
font-weight: 700;
letter-spacing: 0.5px;
text-align: left;

border-bottom: 1px solid #334155;
}


.transaction-table th.sortable {
cursor: pointer;
user-select: none;
}

.transaction-table th.sortable::after {
content: "↕";
margin-left: 5px;
color: #c2c8d4;
font-size: 9px;
}

.transaction-table th.sortable.sort-asc::after {
content: "↑";
color: var(--blue);
}

.transaction-table th.sortable.sort-desc::after {
content: "↓";
color: var(--blue);
}

.transaction-table tbody td {
    padding: 14px 16px;

    color: #cbd5e1;

    border-bottom: 1px solid #222d40;
}

.transaction-table tbody tr:hover {
    background: #172033;
}

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


.table-timestamp {
color: #97a1b3;
font-size: 11px;
}

.table-status {
display: inline-flex;
align-items: center;
padding: 4px 10px;
border-radius: 20px;
font-size: 10px;
font-weight: 700;
}

.table-status.safe {
    background: #102f27;
    color: #4ade80;
}

.table-status.moderate {
    background: #302713;
    color: #fbbf24;
}

.table-status.fraud {
    background: #321b20;
    color: #f87171;
}


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

.empty-state {
padding: 60px 20px;
text-align: center;
}

.empty-state-icon {
width: 48px;
height: 48px;

margin: 0 auto 16px;

display: flex;
align-items: center;
justify-content: center;

border-radius: 12px;

background: #1b2645;
color: #7c94ff;

font-size: 20px;
}

.empty-state h3 {
margin: 0 0 6px;

color: #f1f5f9;

font-family: "Space Grotesk", sans-serif;
font-size: 15px;
}

.empty-state p {
margin: 0;

color: #8f9bb0;
font-size: 12px;
}


/* =====================================================
PAGINATION
===================================================== */

.pagination {
display: flex;
justify-content: center;
gap: 6px;
margin-top: 18px;
}

.page-button {
min-width: 30px;
height: 30px;
padding: 0 8px;

border: 1px solid #334155;
border-radius: 7px;

background: #172033;
color: #94a3b8;

font-size: 11px;
font-weight: 600;
}

.page-button:hover:not(:disabled) {
background: #1e293b;
color: #e5e7eb;
}

.page-button.active {
border-color: #6f8cff;
background: #4f6ee8;
color: white;
}


.page-button:disabled {
opacity: 0.4;
cursor: not-allowed;
}

/* =====================================================
MODEL MONITOR — grid, live stats, sparkline
===================================================== */

.monitor-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 18px;
margin-bottom: 24px;
}

.monitor-card {
padding: 20px;
}

.monitor-card h2 {
    margin: 8px 0 4px;
    color: #f1f5f9;
    font-family: "Space Grotesk", sans-serif;
    font-size: 19px;
    letter-spacing: -0.3px;
}

.monitor-card h2.online {
    color: var(--green);
}

.monitor-card p {
    margin: 0;
    color: #8f9bb0;
    font-size: 11px;
}

.monitor-card strong {
    color: var(--blue);
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
}

.live-stats-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 18px;
margin-bottom: 24px;
}

.live-stat {
    padding: 14px 16px;
    border-radius: 11px;

    background: #141e31;
    border: 1px solid #293449;
}

.live-stat span {
    display: block;
    margin-bottom: 7px;
    color: #8f9bb0;
    font-size: 11px;
}

.live-stat strong {
    color: #f1f5f9;
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
}

.sparkline-wrapper {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #293449;
}

.sparkline-label {
display: block;
margin-bottom: 12px;
color: #8f9bb0;
font-size: 11px;
font-weight: 600;
}

.sparkline {
display: flex;
align-items: flex-end;
gap: 5px;
height: 70px;
padding: 8px 4px 0;

border-radius: 8px;
background: #0d1526;
}

.sparkline-bar {
flex: 1;
min-width: 4px;
border-radius: 3px 3px 0 0;
background: #344158;

transition:
    height 0.2s ease,
    opacity 0.2s ease;
}

.sparkline-bar.safe {
background: linear-gradient(180deg, #4ade80, #16a36b);
}

.sparkline-bar.moderate {
    background: linear-gradient(
        180deg,
        #facc15,
        #d89b12
    );
}

.sparkline-bar.fraud {
background: linear-gradient(180deg, #fb923c, #ef4444);
}

.sparkline-empty {
color: #a2aab8;
font-size: 11px;
}

.metrics-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 18px;
}

.metrics-grid > div {
padding: 16px;

border: 1px solid #293449;
border-radius: 11px;

background: #141e31;

box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025);

transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.metrics-grid > div:hover {
background: #19253a;
border-color: #3a475f;
}

.metrics-grid span {
display: block;
margin-bottom: 7px;
color: #8f9bb0;
font-size: 11px;
}

.metrics-grid strong {
color: #f1f5f9;
font-family: "Space Grotesk", sans-serif;
font-size: 18px;
}


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

.settings-card {
    padding: 24px;
    margin-bottom: 18px;

    background: #111827;
    border: 1px solid #293449;
    border-radius: 14px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.22);
}

.settings-form {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
margin-bottom: 4px;
}

.settings-form .field input[readonly] {
color: #64748b;
background: #0d1526;
border-color: #293449;
}

.storage-info-row {
display: flex;
gap: 32px;
margin-bottom: 14px;
}

.storage-info-row span {
display: block;
margin-bottom: 6px;
color: #7a8598;
font-size: 11px;
}

.storage-info-row strong {
color: var(--navy);
font-family: "Space Grotesk", sans-serif;
font-size: 16px;
}

.settings-note {
margin: 0;
padding: 13px 15px;

border-radius: 9px;

background: #141e31;
border: 1px solid #293449;

color: #8f9bb0;

font-size: 11px;
line-height: 1.6;
}

.danger-zone {
border-color: #5a2930;
background: #15121b;
}

.danger-zone .eyebrow {
color: #d9736f;
}

/* =====================================================
TOASTS
===================================================== */

.toast-root {
position: fixed;
right: 24px;
bottom: 24px;
z-index: 1000;

display: flex;
flex-direction: column;
gap: 10px;
}

.toast {
padding: 12px 18px;
border-radius: 10px;
box-shadow: 0 12px 30px rgba(20, 32, 60, 0.16);
color: white;
font-size: 12px;
font-weight: 600;

opacity: 0;
transform: translateY(8px);
transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-visible {
opacity: 1;
transform: translateY(0);
}

.toast-success {
background: #0f9d63;
}

.toast-error {
background: #d9453f;
}

/* =====================================================
ACCESSIBILITY — visible keyboard focus
===================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
outline: 2px solid var(--blue);
outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
* {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
}
}

/* =====================================================
RESPONSIVE — new sections
===================================================== */

@media (max-width: 1100px) {
.stat-strip {
    grid-template-columns: repeat(2, 1fr);
}

.monitor-grid {
    grid-template-columns: 1fr;
}

.live-stats-grid,
.metrics-grid {
    grid-template-columns: repeat(2, 1fr);
}
}

@media (max-width: 800px) {
.page-header {
    flex-direction: column;
}
}

@media (max-width: 600px) {
.stat-strip {
    grid-template-columns: 1fr;
}

.settings-form {
    grid-template-columns: 1fr;
}

.table-toolbar {
    flex-direction: column;
    align-items: stretch;
}

.toolbar-actions {
    margin-left: 0;
}

.live-stats-grid,
.metrics-grid {
    grid-template-columns: 1fr;
}

.storage-info-row {
    flex-direction: column;
    gap: 12px;
}
}

/* =====================================================
   FINAL DARK THEME OVERRIDES
===================================================== */

/* Generic cards */
.card {
    background: #111827;
    border-color: #293449;
    color: #e5e7eb;
}

/* Main headings */
h1,
h2,
h3,
h4 {
    color: #f1f5f9;
}

/* Secondary text */
p,
label {
    color: #94a3b8;
}

/* Generic horizontal separators */
hr {
    border-color: #293449;
}

/* Inputs */
input,
select,
textarea {
    background: #111827;
    color: #e5e7eb;
    border-color: #334155;
}

input::placeholder,
textarea::placeholder {
    color: #64748b;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #6f8cff;
}

/* Disabled/read-only */
input:disabled,
select:disabled,
textarea:disabled,
input[readonly] {
    background: #0d1526;
    color: #64748b;
}

/* Strong text */
.stat-card strong,
.live-stat strong,
.metrics-grid strong {
    color: #f1f5f9;
}

/* Icons / muted elements */
.search-icon {
    color: #64748b;
}

/* Avoid pure white anywhere */
button {
    background: #172033;
    color: #cbd5e1;
    border-color: #334155;
}

button:hover {
    background: #1e293b;
}

/* Links */
a {
    color: #7c94ff;
}

a:hover {
    color: #9badff;
}

/* Selection */
::selection {
    background: rgba(111, 140, 255, 0.28);
    color: #ffffff;
}

/* Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #334155 #0b1120;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: #0b1120;
}

*::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #475569;
}
