@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   DESIGN TOKENS & SYSTEM VARIABLES
   ========================================== */
:root {
    /* Theme: DEEP PURPLE DARK MODE (Default) */
    --bg-app: #11012C;
    --bg-card: #19053e;
    --bg-card-hover: #220852;
    --bg-input: #0c0022;

    --border-color: rgba(196, 169, 234, 0.12);
    --border-color-hover: rgba(196, 169, 234, 0.25);

    --text-primary: #FFFFFF;
    --text-secondary: #C4A9EA;
    --text-muted: #8263ad;

    /* Accents (Pink-Magenta to Golden Orange Gradient) */
    --accent: #E53888;
    --accent-hover: #c92f74;
    --accent-glow: rgba(229, 56, 136, 0.2);
    --accent-gradient: linear-gradient(135deg, #E53888, #FFB347);

    /* Circle Icon Colors */
    --icon-purple: #7C28F2;
    --icon-pink: #B556E5;

    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);

    --error: #ef4444;
    --error-glow: rgba(239, 68, 68, 0.25);

    /* General Tokens */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-title: 'Outfit', sans-serif;
    --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    --glass-bg: rgba(25, 5, 62, 0.7);
    --glass-blur: blur(12px);

    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
}

body.light-theme {
    --bg-app: #F5F0FC;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FAF7FF;
    --bg-input: #EFE9FA;

    --border-color: rgba(124, 40, 242, 0.08);
    --border-color-hover: rgba(124, 40, 242, 0.18);

    --text-primary: #1e0047;
    --text-secondary: #5b4a70;
    --text-muted: #9282a8;

    --accent: #E53888;
    --accent-hover: #c92f74;
    --accent-glow: rgba(229, 56, 136, 0.12);
    --accent-gradient: linear-gradient(135deg, #E53888, #FFB347);

    --shadow-sm: 0 4px 12px rgba(124, 40, 242, 0.04);
    --shadow-md: 0 12px 36px rgba(124, 40, 242, 0.08);
    --shadow-lg: 0 24px 60px rgba(124, 40, 242, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.82);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
}


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

::-webkit-scrollbar-track {
    background: var(--bg-app);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

h1,
h2,
h3,
h4,
.logo-title {
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.gradient-title {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.app-container {
    display: flex;
    min-height: 100vh;
    padding: 1.5rem;
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
        padding: 1rem;
    }
}

#login-gate {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 85vh;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: var(--transition);
}

.login-card:hover {
    border-color: var(--border-color-hover);
}

.login-logo {
    display: inline-flex;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--accent-glow);
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.login-card h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-panel {
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 1.5rem;
    height: calc(100vh - 3rem);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

@media (max-width: 1024px) {
    .sidebar-panel {
        width: 100%;
        height: auto;
        position: static;
        padding: 1.25rem;
    }
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0 0.75rem;
    margin-bottom: 2.5rem;
}

.logo-container {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.logo-title {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.nav-link:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--accent-glow);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 1024px) {
    .sidebar-footer {
        margin-top: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: none;
        padding-top: 0;
    }
}

.main-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.top-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.page-title {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-color-hover);
    background: var(--bg-card-hover);
}

.dashboard-view {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.panorama-header {
    text-align: center;
    padding: 2rem 1rem 3rem 1rem;
}

.panorama-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.panorama-header p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto;
    font-weight: 400;
}

@media (max-width: 640px) {
    .panorama-header h1 {
        font-size: 2.25rem;
    }

    .panorama-header p {
        font-size: 1rem;
    }
}

.explanation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

@media (max-width: 900px) {
    .explanation-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.explanation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}


.explanation-card.highlighted-card {
    border-color: transparent !important;
}

.explanation-card.highlighted-card::before {
    content: '';
    position: absolute;
    top: -1.5px;
    left: -1.5px;
    right: -1.5px;
    bottom: -1.5px;
    background: var(--accent-gradient);
    border-radius: var(--radius-xl);
    z-index: -1;
    transition: var(--transition);
}

.explanation-card.highlighted-card::after {
    content: '';
    position: absolute;
    inset: -4px;
    background: var(--accent-gradient);
    filter: blur(15px);
    opacity: 0.3;
    z-index: -2;
    border-radius: var(--radius-xl);
    transition: var(--transition);
}

.explanation-card.highlighted-card:hover::after {
    opacity: 0.55;
    inset: -6px;
}

.card-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 40, 242, 0.15);
    color: var(--icon-pink);
    box-shadow: 0 0 15px rgba(124, 40, 242, 0.1);
    transition: var(--transition);
}

body.light-theme .card-icon-wrapper {
    background: rgba(124, 40, 242, 0.08);
}

.explanation-card.highlighted-card .card-icon-wrapper {
    background: rgba(229, 56, 136, 0.15);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(229, 56, 136, 0.15);
}

.explanation-card:hover .card-icon-wrapper {
    transform: scale(1.08);
}

.explanation-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.explanation-card p {
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.stat-horizontal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-horizontal-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(181, 86, 229, 0.15);
    color: var(--icon-pink);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info-block {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-family: var(--font-title);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
}

.stat-lbl {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.15rem;
}

.generator-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
    .form-card {
        padding: 2rem 1.5rem;
    }
}

.form-card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-card-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.form-card-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .form-group.full-width {
        grid-column: span 1;
    }
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23C4A9EA'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

body.light-theme select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%235b4a70'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
}

select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(229, 56, 136, 0.4);
    filter: brightness(1.15);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-secondary {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
}

.btn-icon-only {
    width: 44px;
    height: 44px;
    padding: 0;
    flex-shrink: 0;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.archive-container {
    width: 100%;
}

.archive-header-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .archive-header-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.25rem;
    }
}

.archive-header-panel h2 {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.archive-filters select {
    min-width: 180px;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-size: 0.85rem;
    background-position: right 0.875rem center;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

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

.history-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.history-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.history-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-id {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-success {
    background: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-error {
    background: var(--error-glow);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.history-details-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.detail-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.history-snippet {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-color);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 4.8em;
}

.history-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.history-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.625rem 1rem;
}

.history-actions .btn-download {
    flex: 0 0 44px;
    width: 44px;
    padding: 0;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    padding: 2rem;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

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

.modal-header-section {
    padding: 1.75rem 2.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-section h3 {
    font-size: 1.25rem;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body-section {
    padding: 2.25rem;
    overflow-y: auto;
}

.modal-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-meta-badge {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.modal-text-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.modal-footer-section {
    padding: 1.5rem 2.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-footer-section .btn {
    width: auto;
}

.incident-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.incident-table th {
    padding: 1rem 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.incident-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.incident-table tbody tr {
    transition: var(--transition);
    cursor: pointer;
}

.incident-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.danger-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
}

.danger-critico {
    background: rgba(239, 68, 68, 0.15);
    color: #ff4a4a;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.danger-alto {
    background: rgba(249, 115, 22, 0.15);
    color: #ff8533;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.danger-medio {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.danger-basso {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.consultant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .consultant-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes blink-red {
    0% {
        background-color: rgba(239, 68, 68, 0.04);
    }

    50% {
        background-color: rgba(239, 68, 68, 0.18);
        box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.1);
    }

    100% {
        background-color: rgba(239, 68, 68, 0.04);
    }
}

.row-critico td {
    animation: blink-red 2s infinite ease-in-out;
    border-top: 2px solid #ef4444 !important;
    border-bottom: 2px solid #ef4444 !important;
}

.row-critico td:first-child {
    border-left: 2px solid #ef4444 !important;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.row-critico td:last-child {
    border-right: 2px solid #ef4444 !important;
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}