:root,
[data-bs-theme="dark"] {
    --bs-body-bg: #090357;
    --bs-body-color: #ffffff;
    --bs-secondary-color: #9fd4a8;
    --bs-tertiary-color: #d8ffe1;
    --bs-primary: #05be28;
    --bs-primary-rgb: 5, 190, 40;
    --bs-link-color: #7dff9a;
    --bs-link-hover-color: #ffffff;
    --bs-border-color: rgba(5, 111, 7, 0.75);
    --bs-secondary-bg: rgba(13, 8, 107, 0.88);
    --bs-tertiary-bg: #0d086b;
    --bs-emphasis-color: #ffffff;
    --aurion-violet: #056f07;
    --aurion-panel: rgba(13, 8, 107, 0.82);
    --verde: rgb(5, 111, 7);
    --verde-brilho: rgba(5, 190, 40, 0.75);
}

html,
body {
    min-height: 100%;
    margin: 0;
}

html {
    background-color: #090357;
    background-image:
        linear-gradient(rgba(9, 3, 87, 0.35), rgba(9, 3, 87, 0.35)),
        url("background-hitech.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body {
    font-family: "Share Tech Mono", Consolas, "Courier New", monospace;
    background: transparent;
    color: #ffffff;
    letter-spacing: 0.01em;
    padding-bottom: 44px;
}

.aurion-rodape {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 6px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(9, 3, 87, 0.94);
    border-top: 2px solid rgba(5, 111, 7, 0.75);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
    color: #d8ffe1;
    font-family: "Share Tech Mono", Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.3;
}

.aurion-rodape strong {
    color: #ffffff;
}

.aurion-rodape a {
    color: #7dff9a;
    text-decoration: none;
}

.aurion-rodape a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(5, 190, 40, 0.75);
}

.aurion-rodape p {
    margin: 0;
}

.aurion-rodape-php {
    margin-left: auto;
    flex-shrink: 0;
    color: rgba(159, 212, 168, 0.95);
    white-space: nowrap;
}

.aurion-logo {
    display: block;
    width: min(340px, 38vw);
    height: auto;
    max-height: 88px;
    object-fit: contain;
    mix-blend-mode: screen;
}

.aurion-topo {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "logo frase lateral"
        "menu menu menu";
    align-items: start;
    column-gap: 24px;
    row-gap: 12px;
    width: 100%;
    padding: 18px 32px;
    background: rgba(9, 3, 87, 0.94);
    border-bottom: 2px solid rgba(5, 111, 7, 0.75);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.aurion-topo-logo {
    grid-template-columns: auto;
    grid-template-areas: "logo";
}

.aurion-topo-logo .aurion-logo-frase {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.aurion-logo-link {
    grid-area: logo;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    align-self: center;
    min-width: 0;
    text-decoration: none;
}

.aurion-logo-frase {
    grid-area: frase;
    justify-self: center;
    align-self: center;
    font-family: "Share Tech Mono", Consolas, monospace;
    font-size: clamp(22px, 2.6vw, 40px);
    font-weight: 400;
    letter-spacing: 0.14em;
    line-height: 1;
    color: #2de7ff;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(45, 231, 255, 0.85), 0 0 22px rgba(45, 231, 255, 0.45);
    white-space: nowrap;
}

.aurion-logo-link:hover {
    color: #ffffff;
}

.aurion-menu {
    grid-area: menu;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.aurion-menu-linha {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.aurion-menu-linha > .botao-nav {
    flex: 0 0 auto;
    justify-content: center;
}

.aurion-menu-linha > .topo-contexto {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: auto;
    white-space: nowrap;
}

.topo-contexto .language-combo {
    width: auto;
}

.topo-lateral {
    grid-area: lateral;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    justify-self: end;
    width: max-content;
    position: relative;
    z-index: 2;
}

.topo-lateral .language-selector,
.topo-lateral .topo-relogio,
.topo-lateral .language-combo,
.topo-lateral #digital-clock {
    width: auto;
}

.topo-lateral #digital-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
}

.botao-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(5, 111, 7, 0.9);
    border-radius: 10px;
    padding: 10px 14px;
    background: #0d086b;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 0 12px rgba(5, 111, 7, 0.35);
    cursor: pointer;
}

.botao-nav:hover,
.botao-nav.is-active {
    border-color: rgb(5, 190, 40);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(5, 190, 40, 0.45);
}

.botao-nav:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.topo-contexto {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(5, 111, 7, 0.9);
    border-radius: 10px;
    background: #0d086b;
    color: #d8ffe1;
    font-size: 13px;
}

.topo-relogio {
    display: flex;
    width: 100%;
}

#digital-clock {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(5, 111, 7, 0.9);
    border-radius: 10px;
    background: #0d086b;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 2px;
    line-height: 1.2;
    text-align: center;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 6px #ffffff, 0 0 12px rgb(5, 111, 7);
    white-space: nowrap;
}

.aurion-content {
    padding: 32px;
}

.card {
    background: rgba(13, 8, 107, 0.82);
    border: 2px solid rgba(5, 111, 7, 0.9);
    border-radius: 16px;
    color: #ffffff;
    box-shadow: 0 0 18px rgba(5, 111, 7, 0.45);
}

.card.shadow-sm {
    box-shadow: 0 0 18px rgba(5, 111, 7, 0.45) !important;
}

.card .text-muted,
.text-muted {
    color: #9fd4a8 !important;
}

.dashboard-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.dashboard-card-link:hover,
.dashboard-card-link:focus,
.dashboard-card-link:visited,
.dashboard-card-link:active {
    color: inherit;
    text-decoration: none;
}

.dashboard-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card-link:hover .dashboard-card {
    transform: translateY(-4px);
    border-color: rgba(5, 190, 40, 0.55);
    box-shadow: 0 18px 40px rgba(5, 190, 40, 0.12) !important;
}

.btn-primary {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: #056f07;
    --bs-btn-border-color: rgba(5, 111, 7, 0.9);
    --bs-btn-hover-bg: #05be28;
    --bs-btn-hover-border-color: #05be28;
    --bs-btn-hover-color: #ffffff;
    border-width: 2px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(5, 111, 7, 0.35);
}

.btn-outline-primary,
.btn-outline-light,
.btn-outline-secondary,
.btn-outline-danger {
    border-radius: 12px;
    --bs-btn-color: #d8ffe1;
    --bs-btn-border-color: rgba(5, 190, 40, 0.45);
    --bs-btn-hover-bg: rgba(5, 190, 40, 0.14);
    --bs-btn-hover-border-color: #05be28;
    --bs-btn-hover-color: #ffffff;
}

.btn-outline-danger {
    --bs-btn-color: #ffb4be;
    --bs-btn-border-color: rgba(255, 120, 140, 0.55);
    --bs-btn-hover-bg: rgba(255, 80, 100, 0.16);
    --bs-btn-hover-border-color: #ff8d98;
    --bs-btn-hover-color: #ffffff;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
}

.uml-board {
    position: relative;
    min-height: 70vh;
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(5, 111, 7, 0.16);
    background: rgba(5, 10, 22, 0.35);
}

.uml-canvas {
    position: relative;
}

.uml-lines {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}

.uml-lines path,
.uml-lines polygon {
    fill: none;
    stroke: rgba(5, 190, 40, 0.9);
    stroke-width: 1.5;
}

.uml-lines polygon {
    fill: #081020;
}

.uml-lines .is-implements {
    stroke-dasharray: 5 4;
}

.uml-class {
    position: absolute;
    z-index: 1;
    width: 230px;
    border: 1px solid rgba(5, 190, 40, 0.4);
    border-radius: 12px;
    background: #081020;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.uml-class header {
    position: relative;
    padding: 8px 36px 6px;
    text-align: center;
    cursor: grab;
    background: linear-gradient(90deg, rgba(5, 190, 40, 0.18), rgba(5, 111, 7, 0.12));
}

.uml-class.is-focus {
    border-color: rgba(5, 190, 40, 0.75);
    box-shadow: 0 0 0 1px rgba(5, 190, 40, 0.35), 0 12px 30px rgba(0, 0, 0, 0.28);
}

.uml-filter {
    position: absolute;
    top: 6px;
    right: 6px;
}

.uml-class header small,
.uml-class header em {
    display: block;
    color: #9fd4a8;
    font-style: normal;
    font-size: 0.72rem;
}

.uml-class header strong {
    color: #f4fbff;
}

.uml-class ul {
    list-style: none;
    margin: 0;
    padding: 6px 10px;
    border-top: 1px solid rgba(5, 190, 40, 0.28);
    font-family: "Share Tech Mono", Consolas, monospace;
    font-size: 0.75rem;
}

.uml-class li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-success {
    border-radius: 12px;
}

.form-control,
.form-select {
    background: #06033d;
    border: 1px solid rgba(5, 190, 40, 0.75);
    color: #ffffff;
    border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
    background: #06033d;
    border-color: #05be28;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(5, 190, 40, 0.16);
}

.form-text,
.form-label {
    color: #d8ffe1;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: #d8ffe1;
    --bs-table-border-color: rgba(5, 111, 7, 0.14);
    --bs-table-hover-bg: rgba(5, 190, 40, 0.08);
    --bs-table-hover-color: #ffffff;
}

.table thead th {
    color: #7dff9a;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.alert {
    border-radius: 14px;
    border-color: rgba(5, 111, 7, 0.2);
    background: rgba(12, 22, 42, 0.8);
    color: #d8ffe1;
}

.alert-danger {
    background: rgba(80, 18, 32, 0.72);
    border-color: rgba(255, 120, 140, 0.35);
    color: #ffd5dc;
}

.alert-warning {
    background: rgba(70, 48, 12, 0.72);
    border-color: rgba(255, 196, 90, 0.35);
    color: #ffe7bf;
}

.badge {
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.language-selector {
    margin: 0;
    width: 100%;
}

.language-combo {
    width: 100%;
    min-width: 13.5rem;
    height: 44px;
    padding: 0 2rem 0 14px;
    color: #ffffff;
    background-color: #0d086b;
    border: 2px solid rgba(5, 111, 7, 0.9);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
}

.aurion-card-primary { border-left: 4px solid #05be28; }
.aurion-card-code { border-left: 4px solid #056f07; }
.aurion-card-database { border-left: 4px solid #3dffb0; }
.aurion-card-report { border-left: 4px solid #ffb020; }
.aurion-card-warning { border-left: 4px solid #f5d76e; }
.aurion-card-danger { border-left: 4px solid #ff6b81; }

.aurion-card-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(5, 111, 7, 0.14);
    font-weight: 600;
}

.aurion-highlight-primary { background: rgba(5, 190, 40, 0.08); }
.aurion-highlight-code { background: rgba(5, 111, 7, 0.1); }
.aurion-highlight-database { background: rgba(61, 255, 176, 0.08); }
.aurion-highlight-report { background: rgba(255, 176, 32, 0.08); }

.method-workspace {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.method-explorer {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.method-explorer-method {
    display: block;
    padding: 7px 10px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: #d8ffe1;
    text-decoration: none;
}

.method-explorer-method:hover,
.method-explorer-method.active {
    background: rgba(5, 190, 40, 0.12);
    color: #ffffff;
}

.method-content {
    min-width: 0;
}

h1, h2, h3, .h1, .h2, .h3, .h4, .display-5 {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(5, 190, 40, 0.75);
}

a {
    text-decoration-thickness: 1px;
}

@media (max-width: 1000px) {
    .method-workspace {
        grid-template-columns: 1fr;
    }

    .method-explorer {
        position: static;
        max-height: 350px;
    }
}

@media (max-width: 900px) {
    .aurion-topo {
        grid-template-columns: 1fr;
        grid-template-areas:
            "logo"
            "frase"
            "lateral"
            "menu";
    }

    .aurion-topo-logo {
        grid-template-columns: 1fr;
        grid-template-areas:
            "logo"
            "frase";
        row-gap: 16px;
    }

    .aurion-topo-logo .aurion-logo-frase {
        position: static;
        transform: none;
    }

    .aurion-menu-linha {
        flex-wrap: wrap;
    }

    .topo-lateral {
        justify-self: start;
    }

    .aurion-content {
        padding: 18px;
    }
}

.der-board {
    position: relative;
    min-height: 70vh;
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(5, 111, 7, 0.16);
    background: rgba(5, 10, 22, 0.35);
}

.der-scroll,
.uml-scroll {
    position: fixed;
    z-index: 20;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(5, 190, 40, 0.5);
    border-radius: 50%;
    background: rgba(6, 14, 28, 0.9);
    color: #05be28;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transform: translateY(-50%);
}

.der-scroll:hover,
.uml-scroll:hover {
    background: rgba(5, 190, 40, 0.18);
    color: #f4fbff;
}

.der-scroll:disabled,
.uml-scroll:disabled {
    opacity: 0.35;
    cursor: default;
}

.der-scroll[hidden],
.uml-scroll[hidden] {
    display: none;
}

.der-scroll .bi,
.uml-scroll .bi {
    font-size: 1.25rem;
    line-height: 1;
}

.der-canvas {
    position: relative;
}

.der-isolated-label {
    position: absolute;
    color: #9fd4a8;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.der-lines {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}

.der-lines path {
    fill: none;
    stroke: rgba(5, 190, 40, 0.9);
    stroke-width: 1.6;
}

.der-lines rect {
    fill: rgba(6, 14, 28, 0.92);
    stroke: rgba(5, 190, 40, 0.45);
}

.der-lines text {
    fill: #d8ffe1;
    font-family: "Share Tech Mono", Consolas, monospace;
    font-size: 11px;
}

.der-entity {
    position: absolute;
    z-index: 1;
    width: max-content;
    min-width: 250px;
    border: 1px solid rgba(5, 111, 7, 0.28);
    border-radius: 14px;
    background: #081020;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.der-entity header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(90deg, rgba(5, 190, 40, 0.18), rgba(5, 111, 7, 0.12));
    cursor: grab;
}

.der-entity header a,
.der-entity header small,
.der-entity li,
.der-entity li span,
.der-entity li em {
    white-space: nowrap;
}

.der-entity header a {
    color: #f4fbff;
    font-weight: 650;
    text-decoration: none;
}

.der-entity-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.der-filter,
.uml-filter {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(5, 111, 7, 0.28);
    border-radius: 8px;
    background: rgba(5, 10, 22, 0.45);
    color: #9fd4a8;
    cursor: pointer;
}

.der-filter:hover,
.der-filter.is-active,
.uml-filter:hover,
.uml-filter.is-active {
    color: #f4fbff;
    border-color: rgba(5, 190, 40, 0.7);
    background: rgba(5, 190, 40, 0.22);
}

.der-entity.is-focus {
    border-color: rgba(5, 190, 40, 0.75);
    box-shadow: 0 0 0 1px rgba(5, 190, 40, 0.35), 0 12px 30px rgba(0, 0, 0, 0.28);
}

.der-entity header small {
    color: #9fd4a8;
}

.der-entity ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.der-entity li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 12px;
    font-size: 0.82rem;
}

.der-entity li.is-pk span::before {
    content: "PK ";
    color: #ffd36e;
    font-size: 0.68rem;
}

.der-entity li.is-fk span::after {
    content: " FK";
    color: #05be28;
    font-size: 0.68rem;
}

.der-entity li em {
    color: #9fd4a8;
    font-style: normal;
    font-family: "Share Tech Mono", Consolas, monospace;
    font-size: 0.72rem;
}

.sast-row {
    cursor: pointer;
}

.sast-row.is-selected {
    box-shadow: inset 3px 0 0 #05be28;
}

.sast-critical { color: #ff8d98; }
.sast-high { color: #ffb4a8; }
.sast-medium { color: #ffd36e; }
.sast-low { color: #9fd4ff; }
.sast-info { color: #9fd4a8; }

.sast-detail {
    margin: 0;
    white-space: pre-wrap;
    font-family: "Share Tech Mono", Consolas, monospace;
    font-size: 0.85rem;
    color: #d8ffe1;
}
