:root {
    --bg: #020618;
    --sidebar: #020618;
    --card: #050D22;
    --card-2: #050D22;
    --muted: #62748E;
    --text: #e6eefc;
    --accent: #3366FF;
    --danger: #FD4438;
    --success: #2bd48a;
    --border-color: #1D293D;

    --radius: 14px;
    --font-family: "DM Sans", sans-serif;
    --fs-xs: 12px;
    --fs-sm: 14px;
    --fs-md: 16px;
    --fs-lg: 20px;
}

* { box-sizing: border-box }

html, body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    font-family: var(--font-family);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

small { font-size: var(--fs-sm); }
a { color: inherit; text-decoration: none; }

/* ============================================================
   LAYOUT
============================================================ */
.mtech-dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ============================================================
   ACCORDION
============================================================ */
.accordion { max-width: 100%; margin: auto; }
.accordion-item { overflow: hidden; }
.accordion-header .accordion-item-expand { transition: transform 0.3s ease; cursor: pointer; }
.accordion-item-expand.active { transform: rotate(180deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.accordion-content p { padding: 15px 0; margin: 0; color: #9ca3af; }

/* ============================================================
   SIDEBAR
============================================================ */
.sidebar {
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #071428 0%, #071028 100%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-right: 1px solid var(--border-color);
    transition: width .2s ease;
    justify-content: space-between;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar .material-icons { font-size: 20px; }

.sidebar .middle, .sidebar .bottom { padding: 20px; }

.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .new-scan { padding: 8px; }
.sidebar.collapsed .middle, .sidebar.collapsed .bottom { padding: 17px; }
.sidebar.collapsed .nav-item { display: flex; justify-content: center; }

.sidebar .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid #1D293D;
}

.brand { display: flex; align-items: center; gap: 6px; }
.brand .mark img { width: 25px; height: 20px; object-fit: contain; }
.brand .title { font-weight: 500; font-size: 22px; margin-top: -5px; }

.sidebar.collapsed .title,
.sidebar.collapsed .section-title,
.sidebar.collapsed .new-scan-text,
.sidebar.collapsed .ai-card,
.sidebar.collapsed .footer-links .item p { display: none; }

.sidebar.collapsed .nav-item {
    padding: 8px 4px !important;
    border-radius: 6px;
}
.sidebar.collapsed .new-scan { border-radius: 8px; }

.collapse-toggle {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    transition: .3s;
}
.sidebar.collapsed .collapse-toggle {
    margin-left: -40px;
    background: var(--card);
    transform: rotate(180deg);
}
.collapse-toggle:hover { background: rgba(255,255,255,.02); }

.scan-btn-area { box-shadow: 0 0 40px #3366FF99; }

.new-scan {
    background: linear-gradient(90deg, var(--accent), #3366FF99);
    padding: 14px;
    border-radius: 12px;
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-shadow: inset 0 0 10px #fff;
    text-decoration: none;
}

.inner-sidebar { margin-top: 30px; }

.sidebar .section-title {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: .6px;
    margin: 0 0 10px 0;
}

.nav { display: flex; flex-direction: column; gap: 4px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
}

.nav-item .icon {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item.active {
    background: #0F172B;
    color: var(--accent) !important;
    border: 1px solid var(--border-color);
    width: 100%;
    text-align: left;
}

.sidebar.collapsed .nav-item .label { display: none; }

.bottom { display: flex; flex-direction: column; gap: 16px; }

/* AI card */
.ai-card {
    margin-top: auto;
    background: #0F172B;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ai-card-top { display: flex; gap: 10px; justify-content: start; align-items: center; }
.ai-card h4 { font-size: 15px; font-weight: 500; color: var(--muted); margin: 0; }
.ai-card p { margin: 0; color: var(--muted); font-size: 13px; }
.ai-card a.btn.nav-item {
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
    background: #1d293d;
    color: var(--muted);
    cursor: pointer;
    width: 100%;
    justify-content: center;
    text-decoration: none;
}
.ai-card a.btn.nav-item:hover { color: #fff; }

/* Footer links */
.footer-links { display: flex; flex-direction: column; margin-top: 8px; align-items: flex-start; }
.footer-links .item {
    padding: 8px;
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    justify-content: flex-start;
    gap: 7px;
    text-decoration: none;
}
.footer-links .item p { margin: 0; }
.footer-links .item:hover { background: rgba(255,255,255,.02); color: var(--text); }

/* ============================================================
   MAIN AREA
============================================================ */
.main {
    flex: 1;
    padding: 22px 22px 0;
    overflow: auto;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    z-index: 999;
    position: relative;
}

.header .title h1#pageTitle { font-size: 36px; margin: 0; font-weight: 600; }
.header .title .breadcrumb { color: #45556C; font-size: 15px; display: flex; gap: 4px; }
.header .title .breadcrumb .sep { opacity: .4; }

/* User area */
.inner-user { position: relative; cursor: pointer; }
.user { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info h3 { margin: 0; font-size: 20px; color: #90A1B9; font-weight: 500; }
.user-info span { color: #45556C; font-size: 15px; }

.user-panel {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card);
    padding: 10px;
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    min-width: 180px;
    z-index: 9999;
}
.user-panel ul { padding: 0; margin: 0; list-style: none; }
.user-panel .nav-item { padding: 8px 10px; border-radius: 8px; }
.user-panel .nav-item a { display: flex; gap: 8px; align-items: center; color: var(--muted); text-decoration: none; font-size: 14px; }
.user-panel .nav-item:hover { background: rgba(255,255,255,.04); }
.user-panel .nav-item:hover a { color: #fff; }
.inner-user:hover .user-panel { display: block; }

/* ============================================================
   PANEL (PAGE CONTENT)
============================================================ */
.panel {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    overflow-y: scroll;
}

.panel.active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 200px;
}

.panel.active::-webkit-scrollbar { display: none; }

.page-panel {
    padding-top: 0;
}

/* ============================================================
   FLASH MESSAGES
============================================================ */
.flash-messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.auth-flash { max-width: 500px; margin: 0 auto 16px; }

.flash-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    border: 1px solid transparent;
}
.flash-alert .material-icons { font-size: 18px; flex-shrink: 0; }
.flash-close {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    color: inherit;
    opacity: .6;
    padding: 0;
    display: flex;
}
.flash-close .material-icons { font-size: 16px; }
.flash-close:hover { opacity: 1; }

.flash-success { background: rgba(43,212,138,.1); border-color: rgba(43,212,138,.3); color: #2bd48a; }
.flash-danger, .flash-error { background: rgba(253,68,56,.1); border-color: rgba(253,68,56,.3); color: #FD4438; }
.flash-warning { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); color: #f59e0b; }
.flash-info { background: rgba(51,102,255,.1); border-color: rgba(51,102,255,.3); color: var(--accent); }

/* ============================================================
   AUTH LAYOUT (unauthenticated pages)
============================================================ */
.auth-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 460px;
}

.auth-card h2, .auth-card h4 { margin: 0 0 12px; font-size: 36px; text-align: left; }
.auth-card > p, .auth-card form + p { text-align: left; font-size: 17px; }

.auth-card .form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.auth-card label { font-size: 14px; color: var(--muted); }

.auth-card input[type=text],
.auth-card input[type=email],
.auth-card input[type=password] {
    background: #0F172B;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text);
    padding: 10px 14px;
    font-size: 15px;
    outline: none;
    width: 100%;
    font-family: var(--font-family);
}
.auth-card input:focus { border-color: var(--accent); }

.auth-card .btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    font-family: var(--font-family);
    font-weight: 600;
}
.auth-card .btn-primary:hover { background: #2057fc; }

.auth-card .auth-footer { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-card .auth-footer a { color: var(--accent); }

/* Split layout (login / register) */
.auth-layout:has(.auth-split) {
    padding: 0;
    align-items: stretch;
    justify-content: flex-start;
}

.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
}

.auth-split-left {
    background: linear-gradient(160deg, #071428 0%, #091830 50%, #071028 100%);
    border-right: none;
    border-left: 1px solid var(--border-color);
    order: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
}

.auth-split-left::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(51,102,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.auth-split-left .brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 48px;
}

.auth-split-left .brand img { width: 32px; height: 26px; object-fit: contain; }
.auth-split-left .brand span { font-size: 24px; font-weight: 600; color: var(--text); }

.auth-split-left h1 {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 14px;
    color: var(--text);
}

.auth-split-left .sub {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 36px;
    max-width: 380px;
}

.auth-split-left .feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-self: center;
}

.auth-split-left .feature-list li {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--text);
}

.auth-split-left .feature-list li .icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(51,102,255,0.15);
    border: 1px solid rgba(51,102,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-split-left .feature-list li .icon-wrap .material-icons {
    font-size: 16px;
    color: var(--accent);
}

.auth-split-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    overflow-y: auto;
    order: 1;
}


/* Legacy Bootstrap-class shims (keep inner pages working) */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.col-12 { width: 100%; }
.col-md-6 { width: calc(50% - 8px); }
.mb-4 { margin-bottom: 24px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.me-1 { margin-right: 4px !important; }
.me-2 { margin-right: 8px !important; }
.ms-2 { margin-left: 8px !important; }
.ms-auto { margin-left: auto !important; }
.p-0 { padding: 0 !important; }
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.flex-grow-1 { flex: 1 !important; }
.text-center { text-align: center !important; }
.text-muted { color: var(--muted) !important; }
.text-end { text-align: right !important; }
.fw-bold { font-weight: 700 !important; }
.small { font-size: 13px !important; }
.w-100 { width: 100% !important; }

/* Bootstrap-like card for inner pages */
.card {
    background: var(--card);
    padding: 36px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    min-height: 86px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.card-header h2, .card-header h3, .card-header h4, .card-header h5 { margin: 0; }

.card-body { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.card-title { margin: 0; }

/* Alerts (bootstrap compat) */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}
.alert-info { background: rgba(51,102,255,.1); border-color: rgba(51,102,255,.3); color: var(--accent); }
.alert-success { background: rgba(43,212,138,.1); border-color: rgba(43,212,138,.3); color: #2bd48a; }
.alert-warning { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); color: #f59e0b; }
.alert-danger { background: rgba(253,68,56,.1); border-color: rgba(253,68,56,.3); color: #FD4438; }
.alert-dismissible { position: relative; }
.alert-dismissible .btn-close {
    background: none; border: none; cursor: pointer; color: inherit; opacity: .6;
    position: absolute; right: 12px; top: 12px; font-size: 16px;
}
.alert-heading { margin: 0 0 4px; font-size: 15px; }
.alert-link { color: inherit; font-weight: 600; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--font-family);
    text-decoration: none;
    transition: .2s;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #2057fc; }
.btn-outline-primary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline-primary:hover { background: var(--accent); color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-outline-success { background: transparent; color: var(--success); border-color: var(--success); }
.btn-outline-secondary { background: transparent; color: var(--muted); border-color: var(--border-color); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-outline-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.03); padding: 8px 10px; border-radius: 8px; color: var(--muted); cursor: pointer; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border-color); text-align: left; }
th { color: var(--muted); font-weight: 500; }
thead tr { border-bottom: 2px solid var(--border-color); }
tbody tr:hover { background: rgba(255,255,255,.02); }

/* Forms (bootstrap compat) */
.form-control, .form-select {
    background: #0F172B;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text);
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    width: 100%;
    font-family: var(--font-family);
}
.form-control:focus, .form-select:focus { border-color: var(--accent); }
.form-label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.form-group { margin-bottom: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.form-check-label { font-size: 14px; }
.form-text { font-size: 12px; color: var(--muted); margin-top: 4px; display: block; }
.invalid-feedback { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}
.bg-danger { background: var(--danger); color: #fff; }
.bg-success { background: var(--success); color: #fff; }
.bg-warning { background: #f59e0b; color: #000; }
.bg-info { background: var(--accent); color: #fff; }
.bg-secondary { background: var(--border-color); color: var(--muted); }

/* Spinner */
.spinner-border {
    width: 20px; height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   DASHBOARD — CARDS
============================================================ */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}
.feature-cards { grid-template-columns: repeat(3, 1fr); }

.card-body { display: flex; justify-content: space-between; }

.card h5 { color: #fff; font-size: 15px; font-weight: 500; margin: 0; }
.card .value { font-size: 32px; font-weight: 500; margin-top: 6px; }

.mini-wrapper { width: 92px; height: 44px; }
.mini-wrapper canvas { width: 100% !important; height: 100% !important; display: block; }

.card-footer .icon-box { display: flex; gap: 5px; align-items: center; }
.card-footer .icon-box img { width: 20px; }
.card-footer .icon-box .icon-box-text p { margin: 0; font-size: 15px; font-weight: 400; color: #ffffffb6; }
.card-footer .icon-box .icon-box-text p span { padding: 0 5px 0 0; color: var(--accent); }
.active-threat-card .card-footer .icon-box-text span,
.brand-risks-card .card-footer .icon-box-text span { color: var(--danger) !important; }

.card-img img { width: 48px; height: 48px; object-fit: contain; }

/* ============================================================
   DASHBOARD — TREND + PROMO
============================================================ */
.row.main-chart-area { display: flex; gap: 18px; align-items: stretch; }

.trend {
    flex: 1;
    background: var(--card);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.trend .trend-head { display: flex; justify-content: space-between; align-items: center; }
.trend .trend-head .treand-title,
.recent .recent-head .recent-title { display: flex; gap: 10px; flex-direction: column; }
.trend .trend-head .treand-title h3,
.recent .recent-head .recent-title h3 { display: flex; gap: 10px; align-items: center; margin: 0; font-size: 24px; font-weight: 400; }
.trend .trend-head .button-area button { background: transparent; border: none; cursor: pointer; border-radius: 100px; }

.trend-tab-area, .recent-tab-area { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 26px; }
.trend-tab-area span, .recent-tab-area span { color: var(--muted); font-size: 15px; font-weight: 400; }

.trend .tabs, .recent-tab-area .scan-tabs { display: flex; gap: 8px; background: #020618 !important; border-radius: 100px; }
.trend .tabs button, .recent-tab-area .scan-tabs button {
    border: none; padding: 8px 43px; border-radius: 999px; color: var(--muted); cursor: pointer; font-size: 15px; font-weight: 400;
    background: transparent; font-family: var(--font-family);
}
.trend .tabs button.active, .recent-tab-area .scan-tabs button.active { background: #202434; color: white; }

.vuln-chart-container { height: 270px; position: relative; margin-top: 14px; }
.vuln-chart-container canvas { width: 100% !important; height: 100% !important; display: block; }

.promo {
    width: 387px;
    background: linear-gradient(216deg, #2860EB 0%, #0b1630 70%);
    padding: 18px;
    border-radius: 12px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.inner-promo { display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; height: 100%; }
.promo img { max-width: 81px; width: 100%; }
.promo h3 { font-size: 20px; font-weight: 500; text-align: center; }
.promo .promo-btn {
    margin-top: 12px; background: var(--accent); color: #fff; padding: 14px 16px;
    border-radius: 8px; border: none; cursor: pointer; width: 100%;
    position: absolute; bottom: 0; left: 0;
    font-family: var(--font-family); font-size: 15px;
}

/* ============================================================
   RECENT SCANS
============================================================ */
.recent { margin-top: 18px; background: var(--card); padding: 20px; border-radius: 12px; border: 1px solid var(--border-color); }
.recent .recent-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.scan-tabs { display: flex; gap: 8px; }
.scan-tabs button { background: transparent; border: none; padding: 8px 12px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.scan-tabs button.active { background: var(--accent); color: white; }

.scan-list { display: none; margin-top: 30px; }
.scan-list.active { display: block; }
.scan-tab.active { background: #1f2937; color: #fff; }

.scan-item { display: flex; justify-content: space-between; margin: 5px 0; }
.scan-item .left { display: flex; justify-content: start; align-items: center; gap: 24px; width: 43%; }
.scan-item .left img { max-width: 14px; width: 100%; object-fit: contain; }
.scan-item .left .scan-site-name { font-size: 16px; font-weight: 500; }

.scan-item .left .scan-status {
    border: 1px solid var(--border-color);
    padding: 3px 10px !important;
    font-size: 16px; font-weight: 500;
    background: radial-gradient(#077bff88, #077bff13);
    border-radius: 12px; text-align: center;
}
.scan-item .left .scan-status.scan-hold { background: radial-gradient(#db8400, #ffd20713); }
.scan-item .left .scan-status.scan-completed { background: radial-gradient(#00b371, #07ff301e); }
.scan-item .left .scan-status.scan-risk { background: radial-gradient(#da1e2798, #da1e2713); }
.scan-item .left .scan-date { font-size: 16px; font-weight: 500; color: #EBF6FF; }

.scan-item .middle { display: flex; justify-content: center; align-items: center; gap: 24px; width: 30%; }
.scan-item .middle span { font-size: 14px; font-weight: 500; }
.scan-item .middle span:nth-child(1) { color: var(--danger); }
.scan-item .middle span:nth-child(2) { color: #FFC300; }
.scan-item .middle span:nth-child(3) { color: #15FFAB; }
.scan-item .middle span:nth-child(4) { color: var(--accent); }

.scan-item .right { display: flex; justify-content: end; align-items: center; gap: 16px; width: 27%; }
.scan-item .right button {
    background: transparent; color: var(--muted); font-size: 16px;
    display: flex; justify-content: center; align-items: center;
    border: 1px solid var(--border-color); border-radius: 50px;
    padding: 10px; height: 40px; gap: 7px; cursor: pointer;
    font-family: var(--font-family);
}
.scan-item .right button:last-child { border: none; }

.recent-scan-btn {
    border: none; padding: 10px 24px; border-radius: 100px;
    background: var(--accent); color: white; cursor: pointer;
    display: flex; justify-content: center; align-items: center;
    gap: 7px; font-size: 15px; font-weight: 500;
    font-family: var(--font-family); text-decoration: none;
}

/* ============================================================
   ASSET MANAGEMENT
============================================================ */
.assets {
    margin-top: 18px;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

#assetsPanel .cards { grid-template-columns: repeat(3, 1fr); }

.asset-manage-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 2px solid var(--border-color); }
.asset-manage-tab-btn {
    padding: 20px 20px 16px; background: transparent; color: var(--muted); cursor: pointer;
    border: none; border-bottom: 2px solid transparent; font-size: 18px; font-weight: 500;
    font-family: var(--font-family);
}
.asset-manage-tab-btn.asset-manage-active { color: #fff; border-bottom: 2px solid var(--accent); }

.asset-manage-panel { display: none; }
.asset-manage-panel.asset-manage-active { display: block; }

.inner-asset-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px; }
.inner-asset-head span { color: var(--muted); font-weight: 400; }

.asset-manage-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.asset-manage-filter-btn {
    padding: 6px 12px; border-radius: 20px; border: 1px solid #374151;
    background: #111827; color: #9ca3af; cursor: pointer; font-size: 13px;
}
.asset-manage-filter-btn.asset-manage-active { background: var(--accent); color: #fff; border-color: var(--accent); }

.asset-manage-items { padding: 0; }
.asset-manage-item { border-bottom: 1px solid var(--border-color); padding: 10px 20px; }

#asset-manage-changes .scan-item .left { width: 35%; justify-content: space-between; }
#asset-manage-changes .scan-item .middle { width: 30%; }
#asset-manage-changes .scan-item .right { width: 35%; }
#asset-manage-changes .scan-date { margin-left: 100px; opacity: .6; }
#asset-manage-changes .scan-item .middle .scan-desc { font-size: 15px; color: var(--muted); font-weight: 400; text-align: center; }

/* ============================================================
   SCAN PANEL
============================================================ */
.inner-scan-panel { padding-bottom: 60px; }

.radar-wrap { position: relative; width: 380px; height: 380px; margin-bottom: -80px; }
.radar {
    width: 100%; height: 100%; border-radius: 50%;
    background: url(/static/images/initial\ (2\).png);
    background-size: cover; background-position: center; background-repeat: no-repeat;
    box-shadow: inset 0 0 40px rgba(0,0,0,.9), 0 0 60px rgba(60,120,255,.2);
    overflow: hidden; position: relative;
}

.scan-indicator {
    position: absolute; inset: 23px; border-radius: 50%;
    background: conic-gradient(var(--accent) 0deg, rgba(0,162,255,.651) 40deg, rgba(0,162,255,.37) 80deg, rgba(80,150,255,.15) 120deg, transparent 160deg);
    mask: radial-gradient(circle, #000 0%, #000 55%, transparent 100%);
    animation: spin-radar 3s linear infinite;
    animation-play-state: paused;
}
@keyframes spin-radar { from { transform: rotate(360deg) } to { transform: rotate(0deg) } }

.scan-form-panel {
    width: 100%; padding: 20px; margin: auto; border-radius: 24px;
    background: #050D22; backdrop-filter: blur(14px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 30px 80px rgba(0,0,0,.6);
    display: flex; flex-direction: column; justify-content: center;
    border: 1px solid var(--border-color);
}
.scan-panel-top { display: flex; flex-direction: column; justify-content: center; align-items: center; }

.scan-form-panel .panel-top {
    display: flex; align-items: center; gap: 0;
    background: #0F172B; border-radius: 10px; padding: 6px 14px;
}
.scan-form-panel .panel-top input {
    flex: 1; background: #0F172B; border: none; outline: none;
    color: #fff; font-size: 15px; padding: 8px;
}
.scan-form-panel .panel-top input::placeholder { color: #ffffff4b; }
.scan-form-panel .material-icons { color: #ffffff65; font-size: 22px; }
.scan-form-panel p { font-size: 11px !important; color: #45556C !important; }
.scan-form-panel .tailText { width: 40px; }

.mainScanBtn {
    padding: 10px 16px; background: var(--accent); color: #F8FAFC;
    font-size: 15px; border-radius: 6px; border: none; cursor: pointer;
    font-family: var(--font-family);
}

/* ============================================================
   SCAN RESULT
============================================================ */
.scanResult { max-height: 100vh; overflow: hidden; }

.inner-scan-start {
    background: url(/static/images/Result-Earth.png) no-repeat bottom center / cover;
    display: flex; flex-direction: column; justify-content: flex-start; align-items: center; height: 100vh;
}

.scan-site-info { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; margin-bottom: 50px; width: 100%; }
.scan-site-info .top { display: flex; justify-content: center; align-items: center; gap: 10px; }
.scan-site-info .top span { font-size: 18px; }
.scan-site-info .top .visit-site {
    margin: 3px auto 0; background: var(--border-color); padding: 5px; border-radius: 20px;
    font-size: 13px; display: flex; justify-content: center; align-items: center; text-decoration: none;
}
.scan-site-info .top .status-area {
    display: flex; justify-content: center; align-items: center; gap: 6px;
    background: var(--border-color); padding: 3px 8px; border-radius: 20px; font-size: 13px;
}
.scan-site-info .scan-date { font-size: 13px; color: var(--muted); text-align: center; margin-top: -15px; }

.proofArea { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 20px; margin-top: 30px; }
.proofAreaTop {
    border: 1px solid var(--border-color); padding: 20px; border-radius: 20px;
    background: var(--card-2); max-width: 588px; width: 100%; max-height: 170px;
    overflow-y: scroll; overflow-x: hidden;
}
.proofAreaTop::-webkit-scrollbar { width: 5px; }
.proofAreaTop::-webkit-scrollbar-thumb { background: #888; border-radius: 5px; }
.proofTopHeader { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; }
.proofTopHeader .left { display: flex; align-items: center; gap: 5px; color: #9ca3af; }
.proofAreaTop span.proofCopyBtn { cursor: pointer; color: #9ca3af; }
.innerProofList { padding: 0 20px; }
.innerProofList ol { padding: 0; }
.innerProofList ol li { margin: 5px 0; }
.innerProofList ol li::marker { color: var(--muted); font-weight: bold; }

.proofAreaBottom { display: flex; justify-content: center; align-items: center; gap: 10px; }
.proofAreaBottom button {
    background: transparent; border: 1px solid var(--accent); color: #9ca3af;
    padding: 5px; border-radius: 50px; height: 45px; width: 45px;
    display: flex; justify-content: center; align-items: center; cursor: pointer;
}
.proofAreaBottom button span { font-size: 20px; }
.proofAreaBottom button.deleteProof { border-color: #da1e2765; }
.proofAreaBottom button:hover { color: #fff; }

div#scanStepTwo {
    height: 100vh; background: black; position: relative; z-index: 99999;
    width: 100%; transition: .3s; overflow-y: scroll; padding-bottom: 200px;
}
div#scanStepTwo::-webkit-scrollbar { visibility: hidden; }

.scan-result-form {
    border: none; background: transparent; padding: 0;
    display: flex; flex-direction: row; width: 100%; gap: 10px; margin-bottom: 20px;
}
.scan-result-form .panel-top { width: 80%; }
.scan-result-form .mainScanBtn { width: 20%; }

/* Progress bar */
.scan-progress-container {
    width: 100%; height: 26px; background: var(--card); border-radius: 6px;
    overflow: hidden; position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,.3);
    border: 1px solid var(--border-color); margin-bottom: 20px;
    transition: opacity .6s ease, transform .6s ease;
}
.scanProgressBar {
    height: 100%; background: linear-gradient(90deg, #3365fd, #2057fc, var(--accent));
    width: 0%; border-radius: 6px; position: relative;
    transition: width .4s cubic-bezier(.25,.46,.45,.94);
    box-shadow: inset 0 0 10px #ffffff80; z-index: 1;
}
.scanProgressBar::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
    animation: scanShimmer 2s infinite;
}
@keyframes scanShimmer { 0% { left: -100% } 100% { left: 100% } }
.scanProgress { display: flex; justify-content: space-between; align-items: center; position: absolute; top: 50%; transform: translateY(-50%); left: 20px; z-index: 99; }
.scanProgress p { margin: 0; font-size: 14px; color: #fff; display: flex; align-items: center; gap: 5px; }
.scan-progress-text { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; font-weight: 600; color: #fff; z-index: 2; }
.scan-progress-container.hide { opacity: 0; transform: translateY(-20px); pointer-events: none; margin-bottom: -20px; }

/* Scan preview */
.inner-preview { display: flex; justify-content: space-between; align-items: stretch; gap: 30px; }
.previewImg { width: 20%; border-radius: 20px; overflow: hidden; }
.previewImg img { max-width: 100%; height: 100%; object-fit: cover; }
.previewChart { width: 15%; border-radius: 20px; display: flex; justify-content: center; align-items: center; }
.chart-container { position: relative; width: 200px; height: 200px; }
.previewInfo { width: 40%; }
.previewInfo .top { display: flex; justify-content: flex-start; align-items: center; gap: 10px; }
.previewInfo .top span { font-size: 18px; }
.previewInfo .top .visit-site { margin: 3px 0 0; background: var(--border-color); padding: 5px; border-radius: 20px; font-size: 13px; display: flex; align-items: center; text-decoration: none; }
.previewInfo .top .status-area { display: flex; align-items: center; gap: 6px; background: var(--border-color); padding: 3px 8px; border-radius: 20px; font-size: 13px; }

.statusArea { display: flex; justify-content: flex-start; align-items: center; gap: 7px; flex-wrap: wrap; }
.statusArea .badge { border: 1px solid var(--border-color); border-radius: 20px; font-size: 11px; padding: 3px 10px; color: #fff; cursor: pointer; }
.statusArea .badge.disabled { opacity: .5; }
.statusArea .badge.critical { border-color: #DA1E2866; background: radial-gradient(#da1e27c0, #da1e271e); }
.statusArea .badge.High { border-color: #ff52527c; background: radial-gradient(#ff525294, #ff525231); }
.statusArea .badge.Medium { border-color: #F68A0266; background: radial-gradient(#f68802ad, #f6880227); }
.statusArea .badge.Low { color: #8AFFD8; border-color: #1A9F4166; background: radial-gradient(#1a9f42ce, #1a9f422d); }
.statusArea .badge.Info { border-color: #077BFF66; background: radial-gradient(#077bffd3, #077bff31); }

.scan-guide-id { color: var(--muted); font-size: 16px; margin: 20px 0; }
.inner-preview button { border: 1px solid var(--border-color); padding: 10px; background: transparent; border-radius: 50px; color: var(--muted); display: flex; align-items: center; gap: 4px; cursor: pointer; font-size: 14px; font-family: var(--font-family); }
.inner-preview button span { font-size: 18px; }
.inner-preview button:hover { color: #fff; border-color: #fff; }
.infoAction, .previewAction { display: flex; gap: 10px; }
.previewAction { width: 25%; display: flex; align-items: flex-start; }
button.rescanBtn, button.deleteProof { height: 40px; width: 40px; display: flex; justify-content: center; align-items: center; padding: 0; }
button.rescanBtn { border-color: #1643ca; }
button.rescanBtn:hover { border-color: #2057fc; }
button.deleteProof { border-color: #503309; }
button.deleteProof:hover { border-color: #81140c; }

/* Scan find-items */
.scan-result-bottom { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 20px; gap: 20px; }
.scan-result-left { width: 40%; }
.inner-result-left { display: flex; flex-direction: column; gap: 20px; }

.scan-card {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(180deg, #0b1430, #070c22);
    border-radius: 20px; padding: 22px 28px; color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 20px 60px rgba(0,0,0,.6);
    border: 1px solid var(--border-color);
}
.scan-left { margin-right: 20px; }
.scan-icon { width: 58px; height: 58px; border-radius: 12px; background: linear-gradient(145deg, #6b8cff, #3a57ff); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.scan-icon span { font-size: 24px; color: #fff; }
.scan-middle { flex: 1; }
.scan-title { font-size: 15px; font-weight: 400; }
.scan-sub { margin-top: 6px; font-size: 15px; color: var(--muted); }
.scan-right { display: flex; align-items: center; gap: 22px; }
.ports-badge { padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 15px; }
.bar-wrapper { width: 160px; height: 22px; }
.bar-wrapper canvas { width: 100% !important; height: 100% !important; }

/* Port scan right */
.scan-result-right { display: flex; flex-direction: column; gap: 20px; width: 60%; }
.port-scan-wrapper { color: #fff; }
.port-scan-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.port-scan-header .title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; }
.port-scan-header .count { background: rgba(255,255,255,.1); padding: 6px 14px; border-radius: 999px; font-size: 14px; }
.port-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.port-card { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-radius: 18px; background: linear-gradient(180deg, rgba(15,23,42,.9), rgba(2,6,23,.9)); border: 1px solid rgba(255,255,255,.08); }
.port { font-size: 16px; font-weight: 600; }
.service { font-size: 14px; opacity: .6; margin-top: 4px; }
.status { padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.status.open { color: #34d399; background: rgba(52,211,153,.15); border: 1px solid rgba(52,211,153,.35); }

/* STV cards */
.stv-item-area { display: flex; flex-direction: column; gap: 15px; }
.stv-card { display: flex; justify-content: space-between; align-items: center; background-color: var(--card); border-radius: 12px; padding: 15px 20px; position: relative; border: 1px solid var(--border-color); cursor: pointer; transition: transform .2s; }
.stv-card:hover { transform: translateY(-2px); }
.stv-card::before { content: ''; position: absolute; left: 0; top: 0; width: 5px; height: 100%; border-radius: 8px 0 0 8px; }
.stv-card.red::before { background-color: #ff0040; }
.stv-card.orange::before { background-color: #ff9900; }
.stv-card.green::before { background-color: #00ff88; }
.stv-card .card-title { color: #fff; font-size: 16px; font-weight: bold; }
.stv-card .card-subtitle { color: #888; font-size: 14px; }
.stv-card .card-button { background-color: transparent; color: var(--muted); border: 1px solid var(--border-color); border-radius: 50px; padding: 10px 20px; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 5px; font-family: var(--font-family); }
.stv-card .card-button span { font-size: 18px; }
.stv-card .card-button:hover { border-color: #fff; color: #fff; }

/* Step transitions */
#scanStepOne { transition: transform .6s ease, opacity .6s ease; }
#scanStepOne.move-up { transform: translateY(-100%); opacity: 0; }
#scanStepTwo { transform: translateY(100%); opacity: 0; transition: transform .6s ease, opacity .6s ease; }
#scanStepTwo.move-in { transform: translateY(-100%); opacity: 1; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.scan-result-left, .scan-result-right { opacity: 0; }
.scan-result-left.show, .scan-result-right.show { opacity: 1; }
.fadeInUp { animation: fadeInUp .8s ease forwards; }
.scan-find-items { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.scan-result-left.show .scan-find-items { opacity: 1; transform: translateY(0); }

/* ============================================================
   CUSTOM REPORT PANEL
============================================================ */
.report-panel { position: fixed; inset: 0; background: var(--bg); display: flex; transform: translateX(100%); transition: .35s ease; z-index: 100; }
.report-panel.open { transform: translateX(0); }

.report-sidebar { width: 260px; background: linear-gradient(180deg, #071428, #071028); display: flex; flex-direction: column; justify-content: space-between; transition: width .2s ease; border-left: 1px solid var(--border-color); z-index: 9999; }
.report-sidebar.collapsed { width: 72px; }
.report-sidebar.collapsed .title, .report-sidebar.collapsed .inner-header-top .brand .ai-tag img,
.report-sidebar.collapsed .inner-chat-list, .report-sidebar.collapsed #closeReport span,
.report-sidebar.collapsed .footer-links .item p { display: none; }

.report-header.inner-header-top { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border-color); }
.report-header.inner-header-top .brand .ai-tag img { width: 40px; margin-left: 10px; }
.report-header button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0; }
.report-header button#closeReport { color: #fff; display: flex; align-items: center; gap: 7px; margin: 20px 0 0; padding: 0 20px; }
.report-sidebar.collapsed .report-header button#closeReport { padding: 0 10px; }

.Report-Components { padding: 20px; }
.report-sidebar-bottom { padding: 0 0 12px 12px; }
.report-content-area { flex: 1; display: flex; flex-direction: column; padding: 20px; }
.report-content { width: 100%; margin: 90px auto 0; padding-bottom: 30px; }

.inner-rc-content {
    max-width: 702px; height: 80vh;
    border: 1px solid #FFFFFF1F; margin: 0 auto 40px;
    background-color: #050D22; border-radius: 20px;
    overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none;
    padding: 20px;
}
.inner-rc-content::-webkit-scrollbar { display: none; }

.form-container { display: flex; gap: 10px; border-radius: 8px; margin-bottom: 26px; }
.form-container input, .form-container select {
    padding: 12px 15px; border: 1px solid #1D293D; border-radius: 8px;
    background-color: #0F172B; color: #fff; outline: none; font-size: 14px; width: 100%;
}
.form-container button { background-color: #3366FF; color: #fff; cursor: pointer; transition: background-color .3s; border-radius: 8px; width: 50%; font-family: var(--font-family); font-size: 14px; }
.form-container button:hover { background-color: #2057fc; }

.group { margin-bottom: 12px; }
.group-title { font-size: 15px; opacity: .8; cursor: pointer; display: flex; justify-content: space-between; color: #90A1B9; }
.group-title.active { background: #0F172B; color: #3366FF; border: 1px solid #1D293D; border-radius: 8px; padding: 10px 8px; }
.group-title span:first-child { display: flex; justify-content: flex-start; align-items: center; gap: 5px; }
.inner-rc-sidebar .group-items { max-height: 400px; margin-top: 8px; transition: max-height .3s ease; overflow: hidden; padding-left: 15px; }
.group-items.collapsed { max-height: 0; }
.inner-rc-sidebar button { width: 100%; padding: 8px; margin: 6px 0; background: transparent; border: none; color: #90A1B9; cursor: grab; text-align: left; display: flex; align-items: center; gap: 5px; font-family: var(--font-family); }

.inner-rc-content .section { border: 1px dashed #FFFFFF1F; padding: 14px; margin-bottom: 20px; animation: fadeIn .25s ease; border-radius: 20px; }
.inner-rc-content .section h2 { margin: 0 0 10px; font-size: 15px; font-weight: 500; color: #ffffff59; }
.inner-rc-content .buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.inner-rc-content .sec-btn { background: #0F172B; border: 1px solid #FFFFFF1F; padding: 6px 10px; cursor: pointer; display: flex; align-items: center; gap: 6px; animation: scaleIn .2s ease; border-radius: 8px; color: #90A1B9; font-size: 15px; }
.inner-rc-content .sec-btn span { opacity: .6; cursor: pointer; font-size: 18px; }
.inner-rc-content .block { background: #050D22; border: 1px solid #FFFFFF1F; padding: 12px; margin-top: 12px; animation: fadeIn .2s ease; border-radius: 20px; }
.inner-rc-content .block-header { display: flex; justify-content: space-between; }
.inner-rc-content .block .block-body { width: 100%; margin-top: 0; display: flex; justify-content: space-between; align-items: center; }
.inner-rc-content .block .block-body input { width: 80%; padding: 0; background: transparent; border: none; color: #fff; outline: none; }
.inner-rc-content .block .block-body .block-action { width: 100px; display: flex; gap: 10px; margin-top: -20px; }
.inner-rc-content .block .block-body .block-action button { cursor: pointer; background: transparent; border: 1px solid #FFFFFF1F; padding: 5px; height: 40px; width: 40px; display: flex; justify-content: center; align-items: center; border-radius: 100px; color: #fff; }

.rc-input-popup { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; }
.rc-input-popup .popup-box { background: black; border: 1px solid var(--border-color); max-width: 430px; width: 100%; display: flex; flex-direction: column; animation: scaleIn ease-in-out .3s; border-radius: 20px; overflow: hidden; }
.rc-input-popup .popup_header { padding: 5px 20px; display: flex; justify-content: space-between; align-items: center; background: var(--border-color); gap: 20px; }
.rc-input-popup .popup_body { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.rc-input-popup .popup_body .checkbox-list { display: flex; flex-direction: column; gap: 10px; }
.rc-input-popup .popup_body input[type=text] { width: 100%; border: 1px solid var(--border-color); border-radius: 8px; color: #fff; padding: 10px; background: #0F172B; }
.rc-input-popup .popup_header .popup-title { display: flex; align-items: center; gap: 8px; }
.rc-input-popup .popup-bottom { text-align: right; padding: 5px 20px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.rc-input-popup .popup-bottom button { border: 1px solid var(--border-color); border-radius: 8px; color: #fff; padding: 10px; background: #0F172B; cursor: pointer; }
.rc-input-popup .popup-bottom button.save-popup { background: #3366FF; }

/* ============================================================
   AI PANEL
============================================================ */
.ai-panel { position: fixed; inset: 0; background: var(--bg); display: flex; transform: translateX(100%); transition: .35s ease; z-index: 100; }
.ai-panel.open { transform: translateX(0); }

.ai-sidebar { width: 260px; background: linear-gradient(180deg, #071428, #071028); display: flex; flex-direction: column; justify-content: space-between; transition: width .2s ease; border-left: 1px solid var(--border-color); z-index: 9999; }
.ai-sidebar.collapsed { width: 72px; }
.ai-sidebar.collapsed .title, .ai-sidebar.collapsed .inner-header-top .brand .ai-tag img,
.ai-sidebar.collapsed .inner-chat-list, .ai-sidebar.collapsed #closeAi span,
.ai-sidebar.collapsed .footer-links .item p { display: none; }

.inner-header-top { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border-color); }
.inner-header-top .brand .ai-tag img { width: 40px; margin-left: 10px; }
.ai-header button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0; }
.ai-header button#closeAi { color: #fff; display: flex; align-items: center; gap: 7px; margin: 20px 0 0; padding: 0 20px; }
.ai-sidebar.collapsed .ai-header button#closeAi { padding: 0 10px; }
.inner-chat-list { padding: 20px; }
.inner-chat-list h5 { font-size: 12px; color: var(--muted); }
.new-chat { cursor: pointer; margin-bottom: 24px; font-size: 15px; margin-left: 15px; }
.chat-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 15px; max-height: 400px; margin-left: 15px; }
.chat-item { cursor: pointer; color: var(--muted); font-size: 15px; }
.chat-item.active, .chat-item:hover { color: #ffffffa9; }
.ai-sidebar-bottom { padding: 0 0 12px 12px; }

.ai-chat { flex: 1; display: flex; flex-direction: column; padding: 20px; margin-top: 100px; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; max-width: 920px; margin: auto; width: 100%; scrollbar-width: none; -ms-overflow-style: none; }
.chat-messages::-webkit-scrollbar { display: none; }

.msg { max-width: 70%; padding: 12px 14px; border-radius: 24px; font-size: 14px; position: relative; margin-bottom: 18px; }
.msg.bot:first-child { display: none; }
.msg-time { font-size: 11px; opacity: .6; margin-top: 10px; }
.msg.user .msg-time { position: absolute; bottom: -26px; left: 0; }
.msg.user { align-self: flex-end; background: #0F172B; color: #A8BAD4; border: 1px solid #1D293D; padding: 16px; font-size: 16px; }
.msg.bot { background: var(--bg); }
.typing { font-size: 13px; color: var(--muted); }

.ai-prompts { display: flex; gap: 14px; margin: auto 0 30px; flex-direction: column; justify-content: center; align-items: center; }
.ai-prompts .brand { display: flex; align-items: center; gap: 6px; justify-content: center; margin-bottom: 80px; }
.inner-ai-chat { max-width: 920px; width: 100%; margin: auto; }
.inner-prompt { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; margin: auto 0 30px; }
.inner-prompt .column { display: flex; flex-direction: column; gap: 20px; }
.inner-prompt-header { text-align: center; }
.inner-prompt-header h5 { font-size: 18px; color: var(--muted); margin: 10px 0 0; font-weight: 500; }
.inner-prompt-card { display: grid; grid-template-columns: repeat(1,1fr); gap: 14px; margin: auto 0 -20px; }
.prompt-card { background: #0F172B; border: 1px solid #1D293D; padding: 16px; border-radius: 12px; font-size: 14px; color: var(--muted); cursor: pointer; transition: .25s; }
.prompt-card:hover { color: #fff; border-color: var(--accent); }

.propmtInputAndPopup { position: relative; }
.recent_scan_popup { border: 1px solid var(--border-color); padding: 20px; border-radius: 14px; background: #0f172b; max-width: 400px; position: absolute; bottom: 50px; display: none; }
.recent_scan_popup.open { display: block; }
.recent_scan_popup .ai_recent_scan { margin-top: 0; padding: 0; border-radius: 0; border: none; background: transparent; }
.recent_scan_popup .scan-item { cursor: pointer; }
.recent_scan_popup .scan-item .left { display: flex; align-items: center; gap: 20px; width: 100%; }

.chat-input { display: flex; align-items: center; gap: 10px; margin-top: 14px; background: #0F172B; padding: 14px 10px; border-radius: 10px; border: 1px solid var(--border-color); }
.chat-input input#ai-prompt-input { flex: 1; background: transparent; border: none; color: var(--text); outline: none; font-size: 14px; }
.icon-btn { background: none; border: none; color: #fff; cursor: pointer; display: flex; align-items: center; }
.send-btn { background: transparent; border: none; padding: 0; cursor: pointer; display: contents; }
.send-btn img { width: 20px; }
.inner-ai-prompt-bottom { display: flex; align-items: center; padding: 16px 20px; background: linear-gradient(90deg, #011e77, #5882ff); gap: 7px; border-radius: 12px; margin-bottom: 70px; }
.inner-ai-prompt-bottom img { width: 20px; }
.inner-ai-prompt-bottom span { font-size: 14px; font-weight: 400; }

/* AI selected card */
.scan-item-message { display: flex; align-items: center; gap: 15px; min-width: 400px; }
.scan-item-message img { width: 36px !important; height: 36px !important; background: var(--border-color); border-radius: 8px; padding: 9px; }
.scan-item-info { width: 100%; }
.scan_site_name { font-size: 18px; font-weight: 600; color: #fff; margin: 0 0 -5px; }
.info_top_left span { font-size: 12px; color: #45556C; }
.scan-into-top { display: flex; gap: 20px; justify-content: space-between; align-items: center; }
.scan-into-bottom { display: flex; flex-direction: row; flex-wrap: wrap; }
.message-scan-status { margin-top: 10px; text-transform: capitalize; }
.vulnar-badge { border: 1px solid var(--border-color); padding: 3px 10px; font-size: 12px; font-weight: 500; background: #ECECF233; border-radius: 12px; text-align: center; }

/* ============================================================
   PRICING
============================================================ */
.pricing { max-width: 100%; margin: auto; padding: 40px 20px; }
.pricing-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; margin-bottom: 40px; }
.pricing-row.large { grid-template-columns: 2fr 1fr; }
.pricing-card { background: transparent; border-radius: 12px; padding: 30px; position: relative; }
.pricing-card.featured { background: linear-gradient(180deg, #222, #111); transform: scale(1.03); }
.pricing-card.wide { display: grid; grid-template-columns: 2fr 1fr; background: linear-gradient(180deg, #222, #111); padding: 0; gap: 20px; }
.pricing-card .left { padding: 30px; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; justify-content: center; }
.pricing-card.right { min-height: 100%; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.pricing .badge { display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 8px; border-radius: 50px; margin-bottom: 15px; border: 1px solid #FFFFFF0F; }
.badge.essential { background-image: linear-gradient(45deg, #108D5161 0%, #17171733 100%); }
.badge.popular { background: #3a2c4f; display: flex; justify-content: center; justify-self: center; margin: -42px 0 0; padding: 7px 30px; }
.badge.recommended { background-image: linear-gradient(45deg, #C070D84D 0%, #1717174D 64%); }
.badge.enterprise { justify-self: center; background-image: linear-gradient(45deg, #8261E247 0%, #17171733 64%); }
.badge.best { background-image: linear-gradient(45deg, #5E6AD26E 0%, #17171733 100%); }
.pricing h2 { font-size: 36px; font-weight: 400; margin: 5px 0; }
.pricing h4 { font-size: 18px; }
.pricing small { font-size: 16px; font-weight: 400; }
.pricing .desc { color: #aaa; font-size: 16px; margin-bottom: 20px; }
.pricing .btn { width: 100%; border: none; cursor: pointer; margin-bottom: 20px; }
.pricing .btn.light { background-color: #fff; font-size: 14px; font-weight: 400; color: black; border-radius: 20px; padding: 10px 20px; }
.pricing .btn.dark { background-image: linear-gradient(45deg, #FFFFFF14 0%, #DEDEDE14 100%); border-radius: 20px; padding: 20px; color: #fff; font-size: 14px; }
.pricing ul { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; }
.pricing ul li { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.pricing ul li span.material-symbols-outlined { color: #ffffff4f; font-size: 22px; }
.pricing .two-col { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }

/* ============================================================
   PROFILE / SETTINGS
============================================================ */
.settingPanelArea { padding: 40px !important; }
.settingPanelArea h2 { padding-bottom: 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.profileSetting form { display: flex; flex-direction: column; gap: 25px; }
.profileSetting form .form-row { display: flex; gap: 40px; width: 100%; }
.profileSetting form .form-group { display: flex; flex-direction: column; gap: 5px; width: 50%; }
.address-form-group { width: 100% !important; }
.profileSetting form label { font-size: 14px; color: #ffffffc5; display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.profileSetting form input[type=text], .profileSetting form input[type=email], .profileSetting form input[type=number], .profileSetting form textarea { border: 1px solid var(--border-color); background: #01072a; border-radius: 8px; color: var(--text); padding: 10px 14px; outline: none; width: 100%; font-family: var(--font-family); }
.profileSetting form textarea { min-height: 120px; }
span.importantMark { color: red; }
.helpText { font-size: 12px; color: #ffffff80; font-style: italic; }
.mspi { width: 50%; border: 1px solid var(--border-color); border-radius: 20px; overflow: hidden; }
.mspi .mspi-header, .accountInfo .accountInfo-header, .securitySetting .securitySetting-header { padding: 15px 20px; background: var(--border-color); }
.mspi .mspi-header h3, .accountInfo .accountInfo-header h3, .securitySetting .securitySetting-header h3 { margin: 0; display: flex; align-items: center; gap: 5px; font-size: 16px; }
.mspi-content, .accountInfoContent, .securitySettingContent { padding: 20px; }
.accountInfo { width: 25%; overflow: hidden; border: 1px solid var(--border-color); border-radius: 20px; }
.accountInfo .group { margin-bottom: 15px; display: flex; flex-direction: column; gap: 5px; }
.accountInfo span.label { font-size: 14px; color: #ffffff9d; }
.accountInfo .group p { margin: 0; font-size: 16px; }
.accountInfo p.accountType { padding: 2px 4px; background: var(--accent); border-radius: 4px; font-size: 14px; text-align: center; max-width: 70px; }
.securitySetting { width: 25%; overflow: hidden; border: 1px solid var(--border-color); border-radius: 20px; }
.securitySettingContent { display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; gap: 50px; }
.securitySetting p.securityStatus { padding: 3px 4px; background: rgb(219,161,0); border-radius: 4px; font-size: 14px; text-align: center; max-width: 100px; display: flex; align-items: center; justify-content: center; gap: 5px; }
button.twoStepBtn { display: flex; justify-content: center; align-items: center; padding: 8px 20px; gap: 5px; font-size: 16px; color: var(--accent); background: transparent; border: 1px solid var(--accent); border-radius: 5px; width: 100%; cursor: pointer; font-family: var(--font-family); }
button.twoStepBtn:hover { background: var(--accent); color: white; }
.btnArea { display: flex; justify-content: space-between; }
.profileSetting form button.backToDashboard { border: 1px solid var(--accent); background: transparent; border-radius: 6px; color: var(--accent); padding: 8px 20px; display: flex; align-items: center; gap: 5px; font-size: 16px; cursor: pointer; font-family: var(--font-family); }
.profileSetting form button.saveInfoBtn { border: 1px solid var(--accent); background: var(--accent); border-radius: 6px; color: var(--text); padding: 8px 20px; display: flex; align-items: center; gap: 5px; font-size: 16px; cursor: pointer; font-family: var(--font-family); }
.uploadLogo { display: flex; align-items: center; gap: 10px; }
.uploadLogo img { max-width: 50px; max-height: 50px; object-fit: contain; }

/* ============================================================
   NOTIFICATIONS
============================================================ */
.inner-notice { padding: 0; }
.notice-panel-header { display: flex; justify-content: space-between; align-items: center; margin: 0 0 40px; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; }
.notice-heading { display: flex; align-items: center; gap: 10px; margin: 0; }
.notice-panel-header .notice-badge { display: flex; gap: 5px; }
.notice-panel-header .notice-badge .badge { border-radius: 3px; padding: 3px 8px; background: var(--border-color); font-size: 13px; }
.notice-panel-header .notice-badge .badge.active { background: #00b371; }
.notice-panel-header .notice-badge .badge.Dismissed { background: var(--accent); }
.active-notification { display: none; padding: 0 0 20px; }
.active-notification ul { padding: 0; margin: 0; width: 100%; }
.active-notification ul li.notification-item { padding: 10px 20px; border: 1px solid var(--border-color); border-radius: 8px; color: #fff; width: 100%; list-style: none; margin-bottom: 5px; }
.no-notification { display: flex; justify-content: center; align-items: center; padding: 0 0 20px; }
.no-notification .icon-box { display: flex; flex-direction: column; gap: 10px; justify-content: center; align-items: center; background: var(--card-2); border-radius: 20px; padding: 40px; max-width: 450px; }
.no-notification .icon-box span.material-icons { font-size: 50px; color: var(--accent); }
.no-notification .icon-box h3 { font-size: 24px; color: #fff; margin: 0; }
.no-notification .icon-box p { font-size: 16px; color: var(--muted); text-align: center; margin: 0; }

/* ============================================================
   JIRA SETTINGS
============================================================ */
.jiraSetting-content { display: flex; gap: 20px; }
.configArea, .howToArea { padding: 30px; }
.configArea { width: 70%; }
.howToArea { width: 30%; display: flex; flex-direction: column; gap: 20px; }
.configArea .jireSetting-heading, .howToArea .howToArea-heading { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.config-form form { display: flex; flex-direction: column; gap: 20px; }
.config-form form label { font-size: 14px; color: #ffffffc5; display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.config-form form label span { font-size: 18px; }
.config-form form input, .config-form form select { border: 1px solid var(--border-color); background: #01072a; border-radius: 8px; color: var(--text); padding: 10px 14px; outline: none; width: 100%; font-family: var(--font-family); }
.config-form form .desc { font-size: 13px; font-style: italic; color: var(--muted); }
.config-form .form-group { display: flex; flex-direction: column; gap: 5px; }
.config-form .form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.config-form .form-footer button { border: 1px solid var(--border-color); border-radius: 8px; font-size: 14px; display: flex; align-items: center; gap: 5px; color: var(--muted); background: transparent; padding: 10px 20px; cursor: pointer; font-family: var(--font-family); }
.config-form .form-footer button:hover { color: #fff; border-color: #fff; }
.config-form .form-footer button.submit-btn { color: #fff; background: var(--accent); border-color: transparent; }
.howToArea ul { padding: 0; margin: 0; }
.howToArea ul li { display: flex; align-items: center; list-style: none; gap: 8px; color: var(--muted); }
.howToArea ul li p { font-size: 16px; }
.howToArea ul li span.number { height: 35px; width: 35px; border-radius: 50px; background: var(--accent); color: #fff; font-size: 16px; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.createTokenBtn { display: flex; align-items: center; border: 1px solid var(--accent); color: var(--accent); padding: 6px 12px; font-size: 14px; max-width: 150px; margin-left: 50px; text-decoration: none; gap: 5px; border-radius: 5px; }

/* ============================================================
   API GATEWAY PANEL
============================================================ */
.inner-api-item { display: flex; flex-direction: column; }
.api-gateway-item { display: grid; grid-template-columns: 220px 140px 180px 1fr 160px 120px; align-items: center; background: linear-gradient(180deg, #0a1128, #060c1f); padding: 16px 18px; border: 1px solid #0f172a; }
.api-gateway-item .col { font-size: 13px; color: #cbd5f5; }
.api-gateway-item .hostname { font-weight: 600; }
.api-gateway-item .ip, .api-gateway-item .geo, .api-gateway-item .date { color: #94a3b8; }
.api-gateway-item .tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding-right: 20px; }
.api-gateway-item .tag { font-size: 11px; padding: 4px 10px; border-radius: 14px; white-space: nowrap; }
.api-gateway-item .tag.critical { background: rgba(239,68,68,.15); color: #ef4444; border: 1px solid rgba(239,68,68,.3); }
.api-gateway-item .tag.risk { background: rgba(245,158,11,.15); color: #f59e0b; border: 1px solid rgba(245,158,11,.3); }
.api-gateway-item .tag.blue { background: rgba(56,189,248,.15); color: #38bdf8; border: 1px solid rgba(56,189,248,.3); }
.api-gateway-item .action { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.api-gateway-item .action .btn { background: transparent; border: 1px solid #1e293b; color: #FFFFFF80; padding: 8px 16px; border-radius: 20px; font-size: 12px; cursor: pointer; transition: all .25s ease; display: flex; align-items: center; gap: 5px; }
.api-gateway-item .action .mapBtn { padding: 8px; }
.api-gateway-item .action .btn:hover { background: #0f172a; border-color: var(--accent); color: var(--accent); }

.api-gateway { display: grid; grid-template-columns: 450px 1fr; gap: 24px; }
.api-gateway .left-panel, .api-gateway .right-panel { display: flex; flex-direction: column; gap: 20px; }
.api-gateway .card { background: #0a1128; border-radius: 16px; height: 100%; min-height: unset; }
.api-gateway h3 { margin: 0; display: flex; gap: 5px; font-size: 18px; color: #fff; font-weight: 500; }
.api-gateway ul.info-list { padding: 0; margin: 0 0 -20px; }
.api-gateway .info-list li { list-style: none; margin-bottom: 20px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.api-gateway .info-list span { color: #fff; }
.api-gateway .info-list span.list-title { color: var(--muted); }
.api-gateway .status.active { color: #86f1c9; background: #002a2e; border: 1px solid #003a36; border-radius: 20px; padding: 2px 10px; }
.api-gateway .info-list .critical { padding-bottom: 20px; border-bottom: 2px solid #ffffff15; }
.api-gateway .score-value { color: var(--muted) !important; }
.api-gateway .warning-card .card-title span { color: #ffe574; }
.api-gateway .warning-item { border: 2px solid #503309; background: #241d1b; display: flex; align-items: center; border-radius: 10px; padding: 12px; gap: 10px; color: #ffe574; margin: 0; }
.api-gateway .warning-item .material-symbols-outlined { font-size: 18px; background: #2f2826; border-radius: 5px; padding: 5px; }
.api-gateway .analysis-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); }
.api-gateway .analysis-header h2 { font-size: 18px; font-weight: 400; color: #fff; margin: 0; }
.api-gateway .badges { display: flex; gap: 10px; }
.api-gateway .badges p { background: #0f172a; padding: 5px 15px; border-radius: 20px; font-size: 13px; border: 1px solid var(--border-color); display: flex; align-items: center; gap: 6px; }
.api-gateway .tabs { display: flex; border: 1px solid #1e293b; margin-bottom: 18px; background: #21212170; border-radius: 8px; overflow: hidden; padding: 2px; justify-content: space-between; }
.api-gateway .tab { background: none; border: none; padding: 8px 15px; cursor: pointer; color: #94a3b8; width: 100%; font-family: var(--font-family); }
.api-gateway .tab.active { color: #fff; background: var(--border-color); padding: 4px 8px; border-radius: 6px; }
.api-gateway .tab-content { display: none; }
.api-gateway .tab-content.active { display: block; }
.api-gateway .table-heading { margin: 0 0 15px; color: var(--muted); font-size: 18px; font-weight: 500; }
.api-gateway table { width: 100%; border: 1px solid #ffffff15; border-radius: 12px !important; overflow: hidden; }
.api-gateway th, .api-gateway td { padding: 14px !important; border-bottom: 1px solid #ffffff15; font-size: 14px; }
.api-gateway th { color: var(--muted); text-align: left; }
.api-gateway tr:last-child td { border: 0 !important; }
.api-gateway .pill { background: #022540; padding: 4px 10px; border-radius: 20px; font-size: 12px; border: 1px solid #003457; color: #abe8ff; }

/* ============================================================
   SIDE PANEL (asset detail)
============================================================ */
.side-panel { display: none; }
.side-panel.active { display: block; position: relative; opacity: 1; transform: none; pointer-events: auto; }

/* ============================================================
   FOOTER TEXT
============================================================ */
.footer-text { margin: 50px auto 20px; color: var(--muted); text-align: center; }
.footer-text-area { text-align: center; }

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px) } to { opacity: 1 } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.9) } to { opacity: 1 } }

/* ============================================================
   MOBILE HAMBURGER BUTTON (hidden on desktop)
============================================================ */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text);
    padding: 6px;
    cursor: pointer;
    flex-shrink: 0;
}
/* Mobile overlay backdrop */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.mobile-overlay.active { display: block; }

/* ============================================================
   RESPONSIVE — TABLET (≤1024px)
============================================================ */
@media (max-width: 1024px) {
    .sidebar { width: 220px; }
    .header .title h1#pageTitle { font-size: 28px; }
    .auth-split-left h1 { font-size: 26px; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .card { padding: 20px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤768px)
============================================================ */
@media (max-width: 768px) {

    /* ── Prevent horizontal scroll ── */
    html, body { overflow-x: hidden; }

    /* ── Document-level scroll (fixes iOS 100vh & overflow:hidden) ── */
    .mtech-dashboard { height: auto !important; min-height: 100vh; overflow: visible !important; }
    .main            { height: auto !important; overflow: visible !important; padding: 16px 14px 80px; }
    .panel           { position: static !important; height: auto !important; overflow: visible !important;
                       opacity: 1 !important; transform: none !important; pointer-events: auto !important; }
    .panel.active    { height: auto !important; overflow-y: visible !important; padding-bottom: 60px;
                       -webkit-overflow-scrolling: touch; }

    /* ── Sidebar → off-screen drawer ── */
    .sidebar {
        position: fixed !important;
        left: 0; top: 0;
        height: 100% !important;
        z-index: 1000;
        width: 260px !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,0.55);
    }
    .sidebar.mobile-open { transform: translateX(0) !important; }
    /* Reset collapsed state inside the drawer */
    .sidebar.collapsed,
    .sidebar.collapsed.mobile-open { width: 260px !important; }
    .sidebar.collapsed .title,
    .sidebar.collapsed .section-title,
    .sidebar.collapsed .new-scan-text,
    .sidebar.collapsed .ai-card,
    .sidebar.collapsed .footer-links .item p { display: revert !important; }
    .sidebar.collapsed .nav-item  { justify-content: flex-start !important; padding: 8px 10px !important; }
    .sidebar.collapsed .nav-item .label { display: block !important; }
    .sidebar.collapsed .collapse-toggle { display: none !important; }

    /* ── Hamburger visible, desktop toggle hidden ── */
    .mobile-menu-btn  { display: flex !important; }
    .collapse-toggle  { display: none !important; }

    /* ── Header ── */
    .header { margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
    .header .title h1#pageTitle { font-size: 20px; }
    .header .title .breadcrumb  { font-size: 12px; }
    .user-info { display: none !important; }
    .avatar    { width: 36px; height: 36px; }

    /* ── Flash messages ── */
    .flash-messages { left: 10px; right: 10px; top: 8px; width: auto; }

    /* ── Stat cards: 2 columns, smaller padding ── */
    .cards { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .card  { padding: 14px !important; gap: 8px !important; border-radius: 14px; }
    .card h5          { font-size: 12px; }
    .card .value      { font-size: 22px; margin-top: 2px; }
    .card-img img     { width: 32px; height: 32px; }
    .card .material-icons { font-size: 28px !important; }
    #assetsPanel .cards { grid-template-columns: repeat(2, 1fr) !important; }

    /* ── Chart area → stack, override inline widths ── */
    .row.main-chart-area         { flex-direction: column !important; gap: 12px; }
    .row.main-chart-area > *     { width: 100% !important; flex: none !important; }
    .promo                       { width: 100% !important; }

    /* ── Trend card: stack header, stretch tabs to full width ── */
    .trend .trend-head    { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; }
    .trend .tabs          { width: 100% !important; display: flex !important; }
    .trend .tabs button   { flex: 1 !important; padding: 7px 4px !important; font-size: 12px !important; text-align: center !important; }
    .vuln-chart-container { height: 200px !important; }

    /* ── Recent scans ── */
    .recent           { overflow-x: visible; padding: 14px !important; }
    .recent table     { min-width: 520px; font-size: 12px; }
    th, td            { padding: 8px 10px !important; white-space: nowrap; }

    /* ── Kill oversized min-widths ── */
    .scan-item-message { min-width: 0 !important; width: 100% !important; }

    /* ── Auth pages: single column ── */
    .auth-split       { grid-template-columns: 1fr !important; height: auto !important; min-height: 100vh; }
    .auth-split-left  { display: none !important; }
    .auth-split-right { order: 1; width: 100%; padding: 30px 20px; justify-content: flex-start;
                        align-items: center; min-height: 100vh; overflow-y: auto; }
    .auth-card        { max-width: 100% !important; padding: 24px 16px !important; }
    .auth-card h2,
    .auth-card h4     { font-size: 24px !important; }

    /* ── Scan plan cards: 1 column ── */
    .plan-grid        { grid-template-columns: 1fr !important; }
    .scan-form-panel  { padding: 18px 14px !important; }
    .inner-scan-panel { padding: 0 !important; }

    /* ── Profile: stack form rows ── */
    .settingPanelArea                    { padding: 16px !important; }
    .profileSetting form .form-row       { flex-direction: column !important; gap: 12px; }
    .profileSetting form .form-group     { width: 100% !important; }
    .mspi                                { width: 100% !important; }
    .profile-grid                        { grid-template-columns: 1fr !important; }

    /* ── Report Builder: stack sidebar above canvas ── */
    .rb-layout { grid-template-columns: 1fr !important; }

    /* ── Dashboard: card-stacked layout — avoids horizontal overflow on narrow screens ── */
    .scan-list-wrap { min-width: 0 !important; }
    .scan-item      { flex-direction: column !important; gap: 0 !important; padding: 14px !important;
                      background: rgba(255,255,255,0.03); border-radius: 12px !important;
                      border: 1px solid var(--border-color); margin: 6px 0 !important; }

    /* Row 1: [icon] [domain──────────] [status]
       Row 2:        [date                     ] */
    .scan-item .left { display: grid !important;
                       grid-template-columns: 18px 1fr auto !important;
                       column-gap: 8px !important; row-gap: 4px !important;
                       width: 100% !important; align-items: center !important;
                       padding-bottom: 10px !important; }
    .scan-item .left img              { grid-row: 1 !important; grid-column: 1 !important;
                                        width: 14px !important; height: 14px !important;
                                        border-radius: 3px; flex-shrink: 0; }
    .scan-item .left .scan-site-name  { grid-row: 1 !important; grid-column: 2 !important;
                                        min-width: 0 !important; max-width: 100% !important;
                                        white-space: nowrap !important; overflow: hidden !important;
                                        text-overflow: ellipsis !important; font-size: 14px !important; }
    .scan-item .left .scan-status     { grid-row: 1 !important; grid-column: 3 !important;
                                        font-size: 11px !important; min-width: 0 !important;
                                        padding: 2px 8px !important; white-space: nowrap !important; }
    .scan-item .left .scan-date       { grid-row: 2 !important; grid-column: 2 / 4 !important;
                                        font-size: 12px !important; color: var(--muted) !important;
                                        margin-left: 0 !important; }

    /* Vuln counts as colored chips, separated from left row */
    .scan-item .middle { display: flex !important; flex-wrap: wrap !important; gap: 6px !important;
                         width: 100% !important; justify-content: flex-start !important;
                         border-top: 1px solid var(--border-color) !important;
                         padding: 10px 0 !important; }
    .scan-item .middle span { font-size: 12px !important; font-weight: 500 !important;
                               padding: 3px 10px !important; border-radius: 20px !important;
                               border: 1px solid currentColor !important; }

    /* Action buttons: uniform 36×36 icon squares, separated */
    .scan-item .right  { display: flex !important; flex-wrap: wrap !important; gap: 6px !important;
                         width: 100% !important; justify-content: flex-start !important;
                         border-top: 1px solid var(--border-color) !important;
                         padding-top: 10px !important; flex-shrink: 1 !important; }
    .scan-item .right button { width: 36px !important; height: 36px !important;
                                padding: 0 !important; display: flex !important;
                                align-items: center !important; justify-content: center !important;
                                font-size: 13px !important; }

    /* ── Section heading sizes (consistent 18 px on mobile) ── */
    .trend .treand-title h3,
    .recent .recent-head .recent-title h3 { font-size: 18px !important; }
    .promo h3                             { font-size: 16px !important; }

    /* ── Tables inside rp-card-body: horizontal scroll + compact font ── */
    .rp-card-body                  { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
    .rp-card-body table, .rp-table { min-width: 420px; font-size: 12px !important; }

    /* ── Pricing grids ── */
    .pricing-row, .pricing-row.large { grid-template-columns: 1fr !important; }
    .pricing-card.wide               { grid-template-columns: 1fr !important; }
    .pricing-card.wide .left         { border-right: none; border-bottom: 1px solid var(--border-color); }
    .pricing .two-col                { grid-template-columns: 1fr !important; }

    /* ── Port scan ── */
    .port-grid { grid-template-columns: 1fr !important; }

    /* ── AI prompts ── */
    .inner-prompt { grid-template-columns: 1fr !important; gap: 16px; }

    /* ── AI chat page ── */
    .ai-page-wrap { height: calc(100svh - 120px) !important; }

    /* ── Subscription severity cards ── */
    .severity-mini { flex-wrap: wrap; }
    .sev-card      { min-width: calc(50% - 6px); flex: 1; }

    /* ── Landing page ── */
    .hero-inner              { padding: 24px 16px !important; }
    .hero-inner h1           { font-size: 22px !important; }
    .hero-inner p            { font-size: 14px !important; }
    .hero-inner > div:last-child { flex-direction: column !important; }
    .severity-grid           { grid-template-columns: repeat(3, 1fr) !important; }
    .feature-cards           { grid-template-columns: 1fr !important; }
    .ctem-stats-wrapper      { grid-template-columns: 1fr !important; }
    .ctem-cycle-grid         { grid-template-columns: 1fr !important; }
    .ctem-cycle-grid > div   { border-right: none !important;
                               border-bottom: 1px solid var(--border-color) !important; }
    .ctem-cycle-grid > div:last-child { border-bottom: none !important; }

    /* ── Scan prereq / subscription ── */
    .scan-prereq-header { flex-wrap: wrap; gap: 10px; }
    .scan-select-row    { flex-direction: column; }
    .scan-select-row select { width: 100%; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤480px)
============================================================ */
@media (max-width: 480px) {
    .header .title h1#pageTitle { font-size: 17px; }
    .auth-card h2,
    .auth-card h4  { font-size: 20px !important; }
    .cards         { grid-template-columns: 1fr !important; }
    .card          { padding: 12px !important; }
    .main          { padding: 12px 10px 60px; }
}
