:root {
    --background: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8f9fd;
    --primary: #5d45e8;
    --primary-dark: #4631c9;
    --primary-soft: #ece9ff;
    --navy: #12152c;
    --navy-soft: #252945;
    --text: #1c2238;
    --text-soft: #697089;
    --border: #e5e8f1;
    --success: #1c9c68;
    --warning: #d98219;
    --danger: #d54d5d;
    --blue: #3979e8;
    --shadow: 0 18px 50px rgba(27, 33, 58, 0.08);
    --shadow-soft: 0 8px 30px rgba(27, 33, 58, 0.06);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.light-eyebrow {
    color: rgba(255, 255, 255, 0.76);
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 750;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

.button-primary {
    background: var(--primary);
    color: #ffffff;
}

.button-primary:hover {
    background: var(--primary-dark);
}

.button-secondary {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
}

.button-secondary:hover {
    border-color: #cfd4e4;
    background: #fafbfe;
}

.button-light {
    background: #ffffff;
    color: var(--primary-dark);
}

.button-ghost {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.button-danger {
    border-color: #f2cbd0;
    background: #fff5f6;
    color: var(--danger);
}

.button-block {
    width: 100%;
}

.icon-button {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 22px;
}

.auth-view {
    min-height: 100vh;
    padding: 28px;
    background:
        radial-gradient(
            circle at top left,
            rgba(108, 82, 255, 0.16),
            transparent 36%
        ),
        var(--background);
}

.auth-shell {
    display: grid;
    max-width: 1180px;
    min-height: calc(100vh - 56px);
    grid-template-columns: 1.08fr 0.92fr;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 30px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px;
    background:
        linear-gradient(
            145deg,
            rgba(16, 19, 45, 0.96),
            rgba(58, 38, 149, 0.95)
        );
    color: #ffffff;
}

.brand-badge {
    display: flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: 34px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.05em;
    backdrop-filter: blur(10px);
}

.auth-brand-panel h1 {
    max-width: 590px;
    margin: 0;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.auth-description {
    max-width: 570px;
    margin: 24px 0 42px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 17px;
    line-height: 1.75;
}

.feature-grid {
    display: grid;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 17px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.feature-icon {
    display: flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 11px;
    font-weight: 900;
}

.feature-item strong,
.feature-item small {
    display: block;
}

.feature-item small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.64);
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
    overflow-y: auto;
}

.auth-card {
    width: min(100%, 420px);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 30px;
    padding: 4px;
    border-radius: 12px;
    background: var(--background);
}

.auth-tab {
    min-height: 42px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-soft);
    font-weight: 750;
    cursor: pointer;
}

.auth-tab.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 3px 12px rgba(31, 35, 65, 0.08);
}

.auth-panel.hidden,
.auth-tabs.hidden {
    display: none;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.label-row label {
    margin-bottom: 8px;
}

.text-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.text-button:hover {
    text-decoration: underline;
}

.auth-back {
    display: block;
    margin: 18px auto 0;
}

.field-hint {
    margin: -12px 0 18px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 2px 0 22px;
    line-height: 1.45;
    cursor: pointer;
}

.checkbox-label input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin: 1px 0 0;
    accent-color: var(--primary);
}

.auth-status-icon {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border-radius: 18px;
    background: rgba(93, 69, 232, 0.1);
    color: var(--primary);
    font-size: 20px;
    font-weight: 900;
}

.auth-status-icon.success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.auth-status-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.auth-card-header.centered {
    text-align: center;
}

.auth-card-header {
    margin-bottom: 32px;
}

.auth-card-header h2 {
    margin: 0 0 10px;
    font-size: 32px;
    letter-spacing: -0.035em;
}

.auth-card-header > p:not(.eyebrow) {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.auth-card-header .email-delivery-note {
    margin-top: 8px;
    font-size: 13px;
}

label {
    display: block;
    margin: 0 0 8px;
    color: #343a50;
    font-size: 13px;
    font-weight: 750;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    background: var(--surface);
    color: var(--text);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

input {
    height: 48px;
    padding: 0 14px;
    margin-bottom: 20px;
}

textarea {
    min-height: 90px;
    padding: 13px 14px;
    margin-bottom: 20px;
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(93, 69, 232, 0.1);
}

.form-message {
    min-height: 22px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 650;
}

.form-message.error {
    color: var(--danger);
}

.form-message.success {
    color: var(--success);
}

.auth-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 12px;
    text-align: center;
}

.dashboard-view {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: 260px;
    flex-direction: column;
    padding: 24px 18px;
    background:
        linear-gradient(
            180deg,
            #11142b 0%,
            #1a1e3b 100%
        );
    color: #ffffff;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 4px 8px 26px;
}

.brand-badge-small {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    margin: 0;
    border-radius: 13px;
    font-size: 16px;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand strong {
    font-size: 17px;
}

.sidebar-brand small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 11px;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
}

.nav-link {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    gap: 13px;
    padding: 0 14px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: rgba(255, 255, 255, 0.68);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-align: left;
}

.nav-link span {
    width: 22px;
    font-size: 17px;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

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

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 16px;
    padding: 14px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    display: flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary);
    font-weight: 850;
}

.sidebar-user strong,
.sidebar-user small {
    display: block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user strong {
    font-size: 13px;
}

.sidebar-user small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 10px;
}

.main-content {
    min-height: 100vh;
    margin-left: 260px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    min-height: 90px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 34px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar h1 {
    margin: 0;
    font-size: 25px;
    letter-spacing: -0.03em;
}

.topbar-actions {
    display: flex;
    gap: 10px;
}

.mobile-menu-button {
    display: none;
}

.content-section {
    padding: 32px 34px 0;
}

.welcome-banner {
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    overflow: hidden;
    padding: 38px 42px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(255, 255, 255, 0.22),
            transparent 25%
        ),
        linear-gradient(
            135deg,
            #5941df,
            #7658ef 58%,
            #4028bd
        );
    color: #ffffff;
    box-shadow: var(--shadow);
}

.welcome-banner h2 {
    max-width: 690px;
    margin: 0 0 12px;
    font-size: clamp(29px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.welcome-banner p:last-child {
    max-width: 660px;
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.7;
}

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

.metric-card {
    display: flex;
    min-height: 116px;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.metric-icon {
    display: flex;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 850;
}

.metric-purple {
    background: #eeeaff;
    color: var(--primary);
}

.metric-blue {
    background: #eaf2ff;
    color: var(--blue);
}

.metric-orange {
    background: #fff2e2;
    color: var(--warning);
}

.metric-green {
    background: #e8f8f1;
    color: var(--success);
}

.metric-card span,
.metric-card strong {
    display: block;
}

.metric-card span {
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.metric-card strong {
    font-size: 29px;
    letter-spacing: -0.035em;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 18px 0 20px;
}

.section-heading h2 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -0.035em;
}

.section-heading p:last-child {
    margin: 0;
    color: var(--text-soft);
}

.project-search {
    width: min(100%, 300px);
}

.project-search input {
    margin: 0;
    background: var(--surface);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 42px;
}

.project-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.project-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 16px;
}

.project-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
}

.framework-icon {
    display: flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.project-name {
    margin: 0;
    overflow: hidden;
    font-size: 17px;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-description {
    min-height: 42px;
    margin: 0;
    padding: 0 22px 17px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.6;
}

.status-badge {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.status-ready {
    background: #e9f8f2;
    color: var(--success);
}

.status-scanning {
    background: #fff3e5;
    color: var(--warning);
}

.status-completed {
    background: #eaf2ff;
    color: var(--blue);
}

.status-failed {
    background: #fff0f2;
    color: var(--danger);
}

.status-uploaded {
    background: var(--primary-soft);
    color: var(--primary);
}

.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface-soft);
}

.project-meta-item {
    padding: 15px 18px;
}

.project-meta-item:nth-child(odd) {
    border-right: 1px solid var(--border);
}

.project-meta-item span,
.project-meta-item strong {
    display: block;
}

.project-meta-item span {
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.project-meta-item strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-actions {
    display: flex;
    gap: 9px;
    padding: 16px 18px 18px;
}

.project-actions .button {
    min-height: 39px;
    flex: 1;
    padding: 0 12px;
    font-size: 12px;
}

.state-card {
    display: flex;
    min-height: 290px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 42px;
    padding: 40px;
    border: 1px dashed #ccd1e0;
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text-soft);
    text-align: center;
}

.state-card h3 {
    margin: 16px 0 8px;
    color: var(--text);
    font-size: 22px;
}

.state-card p {
    max-width: 530px;
    margin: 0 0 22px;
    line-height: 1.7;
}

.empty-icon {
    display: flex;
    width: 66px;
    height: 66px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 28px;
    font-weight: 900;
}

.loader {
    width: 42px;
    height: 42px;
    border: 4px solid #e8e9f2;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 13, 31, 0.66);
    backdrop-filter: blur(5px);
}

.modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: 0 28px 80px rgba(9, 12, 31, 0.34);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0 0 8px;
    font-size: 26px;
    letter-spacing: -0.035em;
}

.modal-header p:last-child {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
}

.modal-body {
    padding: 25px 28px 28px;
}

.drop-zone {
    position: relative;
    min-height: 190px;
    margin-bottom: 14px;
    border: 2px dashed #cfd3e4;
    border-radius: 16px;
    background: var(--surface-soft);
    transition:
        border-color 0.18s ease,
        background 0.18s ease;
}

.drop-zone.dragging {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.drop-zone input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    opacity: 0;
}

.drop-zone-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.drop-zone-content span,
.drop-zone-content small {
    margin-top: 5px;
    color: var(--text-soft);
}

.upload-icon {
    display: flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 25px;
    font-weight: 900;
}

.selected-file {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 12px;
}

.selected-file strong {
    color: var(--text);
}

.upload-progress-container {
    margin: 18px 0;
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 12px;
}

.progress-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eaf2;
}

.progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.2s ease;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 200;
    display: grid;
    width: min(390px, calc(100% - 36px));
    gap: 10px;
}

.scan-monitor-panel {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    width: min(430px, calc(100vw - 32px));
}

.report-viewer-panel {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: grid;
    place-items: center;
    padding: 24px;
}

.report-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 13, 30, 0.72);
    backdrop-filter: blur(5px);
}

.report-viewer-shell {
    position: relative;
    width: min(1380px, 100%);
    height: min(900px, calc(100vh - 48px));
    overflow: hidden;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.35);
}

#reportViewerFrame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.scan-monitor-frame-shell {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(18, 21, 44, 0.22);
}

.scan-monitor-toolbar {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 0 16px;
    border-bottom: 1px solid var(--border);
    background: var(--navy);
    color: #ffffff;
    font-size: 13px;
}

.scan-monitor-toolbar button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 20px;
}

#scanMonitorFrame {
    display: block;
    width: 100%;
    height: min(590px, calc(100vh - 130px));
    border: 0;
    background: #ffffff;
}

.scan-monitor-restore {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border: 0;
    border-radius: 14px;
    background: var(--navy);
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(18, 21, 44, 0.2);
}

.scan-monitor-restore span:nth-child(2) {
    overflow: hidden;
    flex: 1;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scan-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 0 5px rgba(110, 231, 183, 0.14);
}

@media (max-width: 600px) {
    .scan-monitor-panel {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }

    .report-viewer-panel {
        padding: 0;
    }

    .report-viewer-shell {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
}

.toast {
    padding: 15px 17px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    font-size: 13px;
    font-weight: 650;
    animation: toast-in 0.22s ease;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

@keyframes toast-in {
    from {
        transform: translateY(-8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-brand-panel {
        padding: 52px;
    }

    .auth-form-panel {
        padding: 42px;
    }
}

@media (max-width: 820px) {
    .auth-view {
        padding: 0;
    }

    .auth-shell {
        display: block;
        min-height: 100vh;
        border-radius: 0;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        min-height: 100vh;
        padding: 28px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

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

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .topbar {
        padding: 16px 20px;
    }

    .content-section {
        padding: 24px 20px 0;
    }

    .welcome-banner {
        align-items: flex-start;
        flex-direction: column;
        padding: 30px;
    }

    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .project-search {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .topbar {
        align-items: flex-start;
    }

    .topbar-actions .button-secondary {
        display: none;
    }

    .topbar-actions .button-primary {
        min-height: 42px;
        padding: 0 12px;
        font-size: 12px;
    }

    .metric-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .welcome-banner {
        min-height: auto;
    }

    .welcome-banner h2 {
        font-size: 31px;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-dialog {
        width: 100%;
        max-height: 94vh;
        border-radius: 24px 24px 0 0;
    }

    .modal-header,
    .modal-body {
        padding-right: 20px;
        padding-left: 20px;
    }

    .project-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .button {
        width: 100%;
    }
}
