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

:root {
    --primary-color: #00ff88;
    --secondary-color: #ff0066;
    --background-dark: #0a0a0a;
    --background-light: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #333;
    --success-color: #00ff88;
    --danger-color: #ff4444;
    --warning-color: #ffaa00;
    --info-color: #0088ff;
    --portal-header-height: 61px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--background-light) 0%, var(--background-dark) 100%);
    border-bottom: 2px solid var(--border-color);
}

.header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.debt-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.debt-counter {
    background: linear-gradient(135deg, var(--background-light), #252525);
    padding: 1rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.debt-counter::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.1); opacity: 0.2; }
}

.debt-counter h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.debt-amount {
    font-family: 'Orbitron', monospace;
    font-size: 3.1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    margin-bottom: 1rem;

}
.debt-amount1 {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.309);
    margin-bottom: 1rem;
}
.debt-rate {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.rate-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.rate-value {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
}

.economic-indicators {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.indicator {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.indicator:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.indicator-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.indicator-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
}

.controls-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.control-group {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.control-group h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.slider-group {
    margin-bottom: 1.5rem;
}

.slider-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.slider-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--background-dark);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.value-display {
    float: right;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--primary-color);
}

.emergency-section {
    background: linear-gradient(135deg, #330000, #220000);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--danger-color);
    margin-bottom: 3rem;
}

.emergency-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--danger-color);
}

.emergency-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.emergency-btn {
    background: linear-gradient(135deg, var(--danger-color), #cc0000);
    border: none;
    padding: 1.5rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Base minima do portal TRT */
.wrapper {
    min-height: 100vh;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 60;
}

.sidebar-toggle-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sidebar-toggle-btn:hover,
.sidebar-toggle-btn:focus {
    background: rgba(0, 255, 136, 0.12);
    border-color: rgba(0, 255, 136, 0.3);
    color: #ffffff;
    outline: none;
}

.sidebar-toggle-btn:active {
    transform: translateY(1px);
}

.logo {
    display: inline-flex;
    align-items: center;
    color: #f8fafc;
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.logo:hover,
.logo:focus {
    color: #00ff88;
    text-decoration: none;
}

.navbar-static-top {
    margin-left: auto;
}

.navbar-branding {
    color: #cbd5e1;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.main-sidebar {
    width: 280px;
    position: fixed;
    top: var(--portal-header-height);
    left: 0;
    bottom: 0;
    height: calc(100vh - var(--portal-header-height));
    overflow-y: auto;
    padding: 36px 18px 24px;
    background: rgba(15, 23, 42, 0.92);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transition: width 0.25s ease, transform 0.25s ease, padding 0.25s ease;
    z-index: 35;
}

.content-wrapper {
    margin-left: 280px;
    padding: 24px;
    transition: margin-left 0.25s ease;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.user-panel .image img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 2px solid rgba(0, 255, 136, 0.25);
}

.user-panel .info p {
    margin: 0 0 4px;
    color: #f8fafc;
    font-weight: 600;
}

.user-panel .info a {
    color: #94a3b8;
    text-decoration: none;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu .header {
    color: #64748b;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 12px;
}

.sidebar-menu li + li {
    margin-top: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #e2e8f0;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-menu a:hover,
.sidebar-menu a:focus {
    background: rgba(0, 255, 136, 0.12);
    color: #ffffff;
    text-decoration: none;
}

.sidebar-overlay {
    display: none;
}

body.sidebar-collapsed .main-sidebar {
    width: 86px;
    padding-left: 12px;
    padding-right: 12px;
}

body.sidebar-collapsed .content-wrapper,
body.sidebar-collapsed footer {
    margin-left: 86px;
}

body.sidebar-collapsed .user-panel {
    justify-content: center;
}

body.sidebar-collapsed .user-panel .info,
body.sidebar-collapsed .sidebar-menu .header,
body.sidebar-collapsed .sidebar-menu a span,
body.sidebar-collapsed .navbar-branding {
    display: none;
}

body.sidebar-collapsed .sidebar-menu a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .logo {
    font-size: 1.15rem;
}

.content-header {
    margin-bottom: 24px;
}

.content-header h1,
.content-header h5 {
    margin: 0 0 12px;
    color: #f8fafc;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    padding: 10px 16px;
}

.breadcrumb > li,
.breadcrumb > li a,
.breadcrumb > .active {
    color: #cbd5e1;
}

.small-box {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.32);
}

.small-box h3 {
    margin: 0 0 8px;
    font-size: 2.4rem;
    font-weight: 700;
}

.small-box p {
    margin: 0;
    opacity: 0.92;
}

.small-box .icon {
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 3.2rem;
    opacity: 0.18;
}

.bg-aqua {
    background: linear-gradient(135deg, #0891b2, #0f766e);
}

.bg-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.bg-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.bg-green {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

.bg-yellow {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #111827;
}

.bg-blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.callout {
    padding: 16px 18px;
    border-radius: 14px;
    border-left: 4px solid #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    color: #e0f2fe;
}

.alert {
    border-radius: 14px;
}

.panel.box {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #fff;
}

.box-header {
    padding: 14px 16px;
    background: #eff6ff;
    border-bottom: 1px solid #dbeafe;
}

.box-title {
    margin: 0;
    font-size: 1.5rem;
}

.box-title a {
    color: #1e3a8a;
    text-decoration: none;
}

.box-body {
    padding: 16px;
    color: #111827;
}

.modal-content {
    border-radius: 16px;
    overflow: hidden;
}

.modal-header.bg-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}

footer {
    margin-left: 280px;
    padding: 16px 24px 32px;
    color: #94a3b8;
    transition: margin-left 0.25s ease;
}

@media (max-width: 991px) {
    .main-header {
        padding: 10px 14px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .navbar-branding {
        font-size: 0.72rem;
    }

    .main-sidebar {
        width: 280px;
        transform: translateX(-100%);
        z-index: 50;
        border-right: 1px solid rgba(255, 255, 255, 0.06);
        border-bottom: 0;
    }

    .content-wrapper,
    footer {
        margin-left: 0;
    }

    body.sidebar-collapsed .main-sidebar {
        width: 280px;
        padding-left: 18px;
        padding-right: 18px;
    }

    body.sidebar-collapsed .content-wrapper,
    body.sidebar-collapsed footer {
        margin-left: 0;
    }

    body.sidebar-collapsed .user-panel .info,
    body.sidebar-collapsed .sidebar-menu .header,
    body.sidebar-collapsed .sidebar-menu a span,
    body.sidebar-collapsed .navbar-branding {
        display: block;
    }

    body.sidebar-collapsed .sidebar-menu a {
        justify-content: flex-start;
        padding-left: 14px;
        padding-right: 14px;
    }

    body.sidebar-open {
        overflow: hidden;
    }

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

    .sidebar-overlay {
        position: fixed;
        inset: var(--portal-header-height) 0 0 0;
        background: rgba(2, 6, 23, 0.55);
        z-index: 45;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        display: block;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

.emergency-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 68, 68, 0.3);
}

.emergency-btn:active {
    transform: translateY(-1px);
}

.btn-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.emergency-btn small {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.future-controls {
    background: linear-gradient(135deg, #001133, #000022);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--info-color);
    margin-bottom: 3rem;
}

.future-controls h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--info-color);
}

.future-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.future-slot {
    background: rgba(0, 136, 255, 0.1);
    border: 2px dashed var(--info-color);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    color: var(--info-color);
    font-style: italic;
}

.country-section {
    background: var(--background-light);
    padding: 1rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.country-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

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

.country-card {
    background: var(--background-dark);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.country-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.country-name {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.country-debt {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.country-rate {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer {
    background: var(--background-light);
    padding: 2rem;
    text-align: center;
    border-top: 2px solid var(--border-color);
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.game-stats span {
    color: var(--text-secondary);
}

.game-stats span span {
    color: var(--primary-color);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .debt-section {
        grid-template-columns: 1fr;
    }
    
    .economic-indicators {
        grid-template-columns: 1fr;
    }
    
    .controls-section {
        grid-template-columns: 1fr;
    }
    
    .emergency-controls {
        grid-template-columns: 1fr;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

