:root {
    --bg-dark: #000000;
    --bg-card: rgba(30, 30, 34, 0.8);
    --bg-card-border: rgba(226, 159, 74, 0.1);
    --text-main: #f8fafc;
    --text-muted: #a1a1aa;
    --primary: #E29F4A;
    --primary-hover: #C58A3E;
    --secondary: #2a2a2e;
    --secondary-hover: #3a3a3e;
    --accent: #E29F4A;
    --danger: #ef4444;
    --font-family: 'Inter', sans-serif;
    --radius-lg: 16px;
    --radius-md: 8px;
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --warning: #f59e0b;
    --accent-rgb: 226, 159, 74;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: radial-gradient(circle at 15% 50%, rgba(226, 159, 74, 0.05), transparent 25%),
        radial-gradient(circle at 85% 50%, rgba(226, 159, 74, 0.05), transparent 25%);
    background-attachment: fixed;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.view-hidden {
    display: none !important;
}

/* Grupos de Ação em Tabelas */
.action-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-group .btn {
    width: auto !important;
}


.view-active {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
}

/* Auth View */
#auth-view {
    justify-content: center;
    align-items: center;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    animation: fadeIn 0.4s ease-out;
}

.logo-area {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-img {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.logo-area h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #E29F4A, #C58A3E);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    gap: 2rem;
}

.half {
    flex: 1;
}

label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

input:not([type="checkbox"]),
select,
textarea {
    background: rgba(30, 30, 34, 0.5);
    border: 1px solid var(--bg-card-border);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

input:not([type="checkbox"]):focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
}

select {
    appearance: auto;
    color: #f8fafc !important;
    background-color: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

option {
    background-color: #000000 !important;
    color: #f8fafc !important;
}

/* Custom Checkbox Group Styling */
.checkbox-group {
    height: 180px;
    overflow-y: auto;
    text-align: left;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: rgba(30, 30, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

/* Custom Global Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
    background-clip: padding-box;
}

/* Custom Checkbox Group Styling */
.checkbox-group {
    height: 180px;
    overflow-y: auto;
    text-align: left;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: rgba(30, 30, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.checkbox-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.checkbox-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.3);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item input[type="checkbox"]:checked {
    background-color: var(--primary);
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-item.group-category {
    font-weight: 600;
    margin-top: 0.5rem;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.6rem;
}

.checkbox-item.group-license {
    margin-left: 1.5rem;
    font-size: 0.9rem;
    color: #a1a1aa;
}

.checkbox-item.group-license input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border: 2px solid #64748b;
}

.checkbox-item.group-license input[type="checkbox"]:checked {
    border-color: var(--primary);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(226, 159, 74, 0.1);
}

.btn-remove-minimal {
    padding: 0.2rem;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-minimal:hover {
    background: rgba(239, 68, 68, 0.1);
}

.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    width: auto;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    margin-left: 5px;
}

.auth-switch a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Sidebar Quota */
.sidebar-quota {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(226, 159, 74, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.quota-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
}

.quota-label strong {
    color: var(--accent);
    font-size: 0.65rem;
}

.quota-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quota-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quota-row-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

.quota-row-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
}

.quota-row-value.accent {
    color: var(--accent);
}

.quota-row-value.danger {
    color: var(--danger);
}

.quota-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.quota-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 2px;
    transition: width 0.5s ease;
}

.quota-bar-fill.danger {
    background: linear-gradient(90deg, var(--danger), #f97316);
}

.quota-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.quota-action-btn {
    flex: 1;
    padding: 0.25rem 0.4rem;
    font-size: 0.6rem;
    font-weight: 700;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s ease;
    background: var(--accent);
    color: #000;
}

.quota-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.quota-action-btn.outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quota-action-btn.outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: none;
}

/* Subscription Panel */
.subscription-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sub-card {
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.sub-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.sub-card h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.sub-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.sub-value.accent {
    color: var(--accent);
}

.sub-value.active-status {
    color: var(--accent);
}

.sub-value.inactive-status {
    color: var(--danger);
}

.sub-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sub-actions-section {
    margin-top: 0.5rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Dashboard Layout */
#dashboard-view {
    padding: 2rem;
    gap: 2rem;
    display: flex;
    flex-direction: row;
}

/* Sidebar */
.sidebar {
    width: 260px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 4rem);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo-img-sidebar {
    height: 35px;
    width: auto;
    object-fit: contain;
}

.sidebar-header h2 {
    font-size: 1.25rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.nav-links li:not(.nav-section-title) {
    padding: 0.55rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.88rem;
}

.nav-links li:not(.nav-section-title):hover,
.nav-links li.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-section-title {
    cursor: default;
    user-select: none;
}

.nav-links li.active {
    border-left: 3px solid var(--primary);
}

.user-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--bg-card-border);
    flex-shrink: 0;
}

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

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info span {
    font-weight: 600;
    font-size: 0.9rem;
}

#logout-btn {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: none;
}

#logout-btn:hover {
    color: var(--danger);
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 4rem);
    overflow-y: auto;
    padding-right: 1rem; /* Respiro para a scrollbar */
}

/* Custom License Editor Refinements */
.btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
    line-height: 1;
}
.btn-close:hover {
    background: var(--danger);
    transform: rotate(90deg);
}

/* Hide Numeric Arrows */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
    appearance: none;
}

.abatement-row-nested {
    margin-left: 2rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: rgba(var(--accent-rgb, 0, 150, 255), 0.05);
    border-left: 2px solid var(--accent);
    border-radius: 0 8px 8px 0;
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 0.85rem;
}
.abatement-row-nested .ab-label {
    color: var(--text-muted);
    font-weight: 500;
    min-width: 120px;
}
.abatement-row-nested .ab-fields {
    display: flex;
    gap: 10px;
    flex: 1;
}
.abatement-row-nested label {
    font-size: 0.7rem;
    display: block;
    margin-bottom: 2px;
}

/* Cross-Hab Dropdown (padrão do dashboard) */
.cross-hab-dropdown-wrap {
    flex: 0 0 110px;      /* largura fixa — não cresce, não encolhe */
    width: 110px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cross-hab-dropdown-wrap > label {
    font-size: 0.7rem;
    display: block;
    margin-bottom: 2px;
}

.cross-hab-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    max-width: 110px;
    padding: 0.45rem 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.75rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
}

.cross-hab-dropdown-btn:hover {
    border-color: rgba(129, 140, 248, 0.5);
}

.cross-hab-dropdown-btn.open {
    border-color: #818cf8;
}

.cross-hab-btn-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;       /* necessário para ellipsis funcionar dentro de flex */
}

.cross-hab-dropdown-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 160px;
    z-index: 200;
    background: rgba(22, 22, 30, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.4rem;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
}

.editor-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.editor-section h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.abatement-card {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.abatement-card .form-group {
    margin-bottom: 0;
    flex: 1;
}
.btn-add-abatement {
    margin-top: 10px;
    background: rgba(var(--accent-rgb, 0, 150, 255), 0.2);
}

.panel {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.3s;
}

.panel-active {
    display: flex;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-weight: 600;
    font-size: 1.5rem;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

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

.dashboard-main-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-aside-col {
    display: flex;
    flex-direction: column;
}

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

/* ANAC Widget Styles */
.anac-widget {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 200px;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-refresh-anac {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: transform 0.2s;
}

.btn-refresh-anac:hover {
    transform: rotate(180deg);
}

.anac-expiry-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.expiry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent);
}

.expiry-item.critical {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.expiry-item.warning {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.expiry-info {
    display: flex;
    flex-direction: column;
}

.expiry-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.expiry-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.expiry-days {
    font-weight: 700;
    font-size: 0.85rem;
}

.profile-actions {
    gap: 1rem;
}

.file-card {
    padding: 1.5rem !important;
}

.profile-card {
    padding: 3rem !important;
}

.profile-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.profile-aside {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-main {
    flex: 1;
}

.profile-photo-edit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.profile-avatar-large {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.btn-remove-photo {
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: 2px solid var(--glass-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    z-index: 10;
}

.btn-remove-photo:hover {
    background: #e11d48;
    transform: scale(1.1);
}

.profile-avatar-large:hover {
    transform: scale(1.02);
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-change-photo {
    font-size: 0.85rem;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-change-photo:hover {
    background: var(--primary);
    color: white;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-actions-centered {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.file-card {
    padding: 1.5rem !important;
}

.file-card h3 {
    margin-bottom: 0.5rem !important;
}

.file-status {
    margin-bottom: 0.5rem !important;
}

.status-icon {
    font-size: 1.5rem !important;
}

.deficit {
    color: #ef4444 !important;
    font-weight: 600;
}

.surplus {
    color: #10b981 !important;
    font-weight: 600;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-done {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-pending {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-icon-svg {
    width: 14px;
    height: 14px;
}

.abatement-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #10b981;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: underline dotted;
    margin-top: 2px;
    white-space: nowrap;
    transition: filter 0.2s;
}

.abatement-info-btn:hover {
    filter: brightness(1.2);
}

.calc-info-btn {
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s ease;
}

.calc-info-btn:hover {
    color: rgba(255, 255, 255, 0.6);
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-bottom: 1rem;
}

.pg-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pg-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.pg-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pg-info {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.quick-actions {
    padding: 1.5rem;
    flex: 1;
}

.checkbox-group {
    height: 250px !important; /* Aumentado conforme solicitado */
}

.file-card h3,
.quick-actions h3,
.section-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.file-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.status-icon {
    font-size: 2rem;
}

.file-details h4 {
    font-size: 1.1rem;
}

.file-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Quick Actions Tabs */
.qa-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.75rem;
}

.qa-tab {
    flex: 1;
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-bottom: 2px solid transparent;
}

.qa-tab:hover {
    color: var(--text-main);
}

.qa-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.qa-tab-content {
    display: none;
}

.qa-tab-content.active {
    display: block;
}

.compare-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    align-items: stretch;
}

.column-group {
    flex-direction: column;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.compare-group select,
.compare-group input:not([type="checkbox"]) {
    flex: 1 1 150px;
    min-width: 150px !important;
    font-size: 0.9rem;
    margin-bottom: 0 !important;
}

.compare-group .btn {
    flex: 1 1 auto;
    padding: 0.6rem 0.5rem; /* Mais fino conforme solicitado */
    font-size: 0.9rem;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.history-table th {
    padding: 1rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--bg-card-border);
    font-size: 0.9rem;
    font-weight: 500;
}

.history-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    font-size: 0.9rem;
    vertical-align: middle;
}

.history-table td small {
    display: block;
    max-width: 400px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    margin-top: 0.3rem;
}

.history-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.results-container {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.results-container h3 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-size: 1.25rem;
}

.res-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0.5rem;
}

.res-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.2rem;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.res-table th:first-child { border-radius: 8px 0 0 0; }
.res-table th:last-child { border-radius: 0 8px 0 0; }

.res-table td {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
    color: var(--text-main);
}

.res-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.deficit {
    color: var(--danger);
    font-weight: 600;
}

.surplus {
    color: var(--accent);
    font-weight: 600;
}

#toast-container {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: toastSlideIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    min-width: 350px;
    text-align: center;
    font-weight: 600;
    pointer-events: auto;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(45, 15, 20, 0.9);
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(15, 45, 30, 0.9);
}

@keyframes toastSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Modern Glass Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    max-width: 400px;
    width: 90%;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.modal-content h3 {
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.modal-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.anac-details-section {
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    clear: both;
}

.anac-grid-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.anac-col {
    background: rgba(255,255,255,0.02);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.anac-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.anac-head h4 {
    font-size: 0.9rem;
    color: var(--accent);
    margin: 0;
}

.anac-col-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.anac-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.anac-list li {
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    color: var(--text-main);
}

.anac-list li .date {
    color: var(--text-muted);
    font-weight: 500;
}

.res-table th:last-child { border-radius: 0 8px 0 0; }

.res-table td {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
    color: var(--text-main);
}

.res-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.deficit {
    color: var(--danger);
    font-weight: 600;
}

.surplus {
    color: var(--accent);
    font-weight: 600;
}

#toast-container {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: toastSlideIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    min-width: 350px;
    text-align: center;
    font-weight: 600;
    pointer-events: auto;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(45, 15, 20, 0.9);
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(15, 45, 30, 0.9);
}

@keyframes toastSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Modern Glass Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    max-width: 400px;
    width: 90%;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.modal-content h3 {
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.modal-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.anac-details-section {
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    clear: both;
}

.anac-grid-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.anac-col {
    background: rgba(255,255,255,0.02);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.anac-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.anac-head h4 {
    font-size: 0.9rem;
    color: var(--accent);
    margin: 0;
}

.anac-col-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.anac-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.anac-list li {
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    color: var(--text-main);
}

.anac-list li .date {
    color: var(--text-muted);
    font-weight: 500;
}

.anac-footer-info {
    font-size: 0.9rem;
    color: var(--text-main);
}

.anac-footer-info strong {
    color: var(--accent);
    margin-right: 0.5rem;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.card-header-flex h3 {
    margin: 0 !important;
}

.form-actions-profile {
    margin-top: 2.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.form-actions-profile .btn,
.card-header-flex .btn {
    width: auto !important;
    min-width: 180px;
}

.anac-grid-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* SaaS Admin Styles */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.admin-tab-content {
    margin-top: 2rem;
}

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

.metric-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
}

.metric-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.35rem;
}

.metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
}

.metric-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.metric-card-sm {
    padding: 1rem;
}

.metric-value-sm {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.view-hidden {
    display: none !important;
}

/* Nav Menu Modifications added today */
.nav-links li:not(.nav-section-title):hover,
.nav-links li.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-section-title {
    cursor: default;
    user-select: none;
}

/* Grupos de Ação em Tabelas */
td .action-group,
.history-table .action-group {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
}

td .action-group .btn,
.history-table .action-group .btn {
    width: auto !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    margin: 0 !important;
}

/* ===== LOADING OVERLAY GLOBAL ===== */
#global-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    animation: overlayFadeIn 0.2s ease-out;
}

#global-loading-overlay.visible {
    display: flex;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.loading-spinner-wrap {
    position: relative;
    width: 80px;
    height: 80px;
}

.loading-spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: spinRing 1.2s linear infinite;
}

.loading-spinner-ring:nth-child(1) {
    border-top-color: var(--primary);
    animation-duration: 1.2s;
}

.loading-spinner-ring:nth-child(2) {
    border-right-color: rgba(226, 159, 74, 0.55);
    animation-duration: 1.7s;
    animation-direction: reverse;
}

.loading-spinner-ring:nth-child(3) {
    inset: 12px;
    border-top-color: rgba(226, 159, 74, 0.3);
    animation-duration: 2s;
}

.loading-spinner-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    animation: iconPulse 1.5s ease-in-out infinite;
}

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

@keyframes iconPulse {
    0%, 100% { opacity: 0.7; transform: scale(0.9); }
    50%       { opacity: 1;   transform: scale(1.1); }
}

.loading-text-block {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.loading-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.3px;
}

.loading-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.loading-dots span {
    display: inline-block;
    animation: dotBounce 1.2s ease-in-out infinite;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 0.5;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.3; }
    40%            { transform: translateY(-6px); opacity: 1; }
}

/* Modal amplo para formulários de criação/edição */
.modal-content.modal-large {
    max-width: 650px !important;
    text-align: left !important;
}

/* ===== UPGRADE POPUP ===== */
.upgrade-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: upgradeOverlayIn 0.3s ease-out;
    padding: 1rem;
}

@keyframes upgradeOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.upgrade-modal {
    background: rgba(20, 20, 24, 0.95);
    border: 1px solid rgba(226, 159, 74, 0.2);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(226, 159, 74, 0.08);
    max-width: 820px;
    width: 100%;
    padding: 2.5rem;
    animation: upgradeModalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes upgradeModalIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.upgrade-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.upgrade-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.upgrade-header {
    text-align: center;
    margin-bottom: 2rem;
}

.upgrade-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.upgrade-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #E29F4A, #f0c987);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.4rem;
}

.upgrade-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.upgrade-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.upgrade-toggle-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.2s;
    cursor: pointer;
}

.upgrade-toggle-label.active {
    color: var(--accent);
}

.upgrade-toggle-switch {
    width: 48px; height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.upgrade-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: var(--accent);
    border-radius: 50%;
    transition: transform 0.3s;
}

.upgrade-toggle-switch.annual::after {
    transform: translateX(22px);
}

.upgrade-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.upgrade-plan-card {
    background: rgba(30, 30, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.upgrade-plan-card:hover {
    border-color: rgba(226, 159, 74, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(226, 159, 74, 0.1);
}

.upgrade-plan-card.featured {
    border-color: rgba(226, 159, 74, 0.4);
    background: rgba(226, 159, 74, 0.05);
}

.upgrade-plan-card.featured::before {
    content: '⭐ Mais Popular';
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #E29F4A, #C58A3E);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 10px;
    white-space: nowrap;
}

.upgrade-plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.upgrade-plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.15rem;
}

.upgrade-plan-price .currency {
    font-size: 1rem;
    font-weight: 600;
    vertical-align: super;
}

.upgrade-plan-price .period {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.upgrade-plan-installment {
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    min-height: 1.2em;
}

.upgrade-plan-credits {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding: 0.3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.upgrade-plan-credits strong {
    color: var(--text-main);
}

.upgrade-plan-cta {
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s;
    background: linear-gradient(135deg, #E29F4A, #C58A3E);
    color: #000;
}

.upgrade-plan-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(226, 159, 74, 0.3);
}

.upgrade-plan-card:not(.featured) .upgrade-plan-cta {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.upgrade-plan-card:not(.featured) .upgrade-plan-cta:hover {
    background: rgba(226, 159, 74, 0.1);
}

.upgrade-skip {
    text-align: center;
}

.upgrade-skip-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font-family);
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.upgrade-skip-btn:hover {
    color: var(--text-main);
}

@media (max-width: 600px) {
    .upgrade-modal {
        padding: 1.5rem;
    }
    .upgrade-plans-grid {
        grid-template-columns: 1fr;
    }
    .upgrade-header h2 {
        font-size: 1.3rem;
    }
}
