/* SimProj Design System & Styles */

:root {
    /* Dark Theme Variables (Default - Combinado com GestaoIBII) */
    --bg-primary: oklch(0.145 0 0);
    /* Preto-carvão do GestaoIBII */
    --bg-secondary: oklch(0.18 0 0);
    /* Pouco mais claro para inputs */
    --bg-card: rgba(52, 52, 52, 0.45);
    /* Card oklch(0.205 0 0) com transparência */
    --border-color: oklch(0.269 0 0);
    /* Borda escura do GestaoIBII */
    --text-primary: oklch(0.985 0 0);
    /* Off-white */
    --text-secondary: oklch(0.8 0 0);
    --text-muted: oklch(0.6 0 0);
    --accent-color: #89BE30;
    /* Verde Assinatura do INESC Brasil */
    --accent-glow: rgba(137, 190, 48, 0.25);
    --accent-gradient: linear-gradient(135deg, #89BE30, #5b8719);
    --accent-gradient-hover: linear-gradient(135deg, #9ad437, #6c9e1e);
    --success-color: hsl(145, 75%, 45%);
    --success-glow: rgba(16, 185, 129, 0.15);
    --warning-color: hsl(38, 90%, 55%);
    --warning-glow: rgba(245, 158, 11, 0.15);
    --danger-color: hsl(355, 85%, 60%);
    --danger-glow: rgba(239, 68, 68, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.35);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    --font-sans: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition-speed: 0.3s;
}

/* Light Theme Overrides - Combinado com GestaoIBII */
body.light-theme {
    --bg-primary: oklch(0.97 0 0);
    /* Fundo claro e suave */
    --bg-secondary: oklch(0.93 0 0);
    --bg-card: rgba(255, 255, 255, 0.75);
    /* Card oklch(1 0 0) com transparência */
    --border-color: oklch(0.922 0 0);
    /* Borda clara do GestaoIBII */
    --text-primary: oklch(0.145 0 0);
    /* Texto escuro */
    --text-secondary: oklch(0.3 0 0);
    --text-muted: oklch(0.55 0 0);
    --accent-color: #89BE30;
    --accent-glow: rgba(137, 190, 48, 0.2);
    --accent-gradient: linear-gradient(135deg, #89BE30, #699420);
    --accent-gradient-hover: linear-gradient(135deg, #9ad437, #78a826);
    --success-color: hsl(145, 80%, 35%);
    --success-glow: rgba(4, 120, 87, 0.1);
    --warning-color: hsl(38, 85%, 45%);
    --warning-glow: rgba(180, 83, 9, 0.1);
    --danger-color: hsl(355, 80%, 50%);
    --danger-glow: rgba(185, 28, 28, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

/* Base resets & layouts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1920px;
    margin: 0 auto;
    padding: 1.2rem;
    overflow: hidden;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 0.8rem;
    box-shadow: var(--card-shadow);
    gap: 1rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon {
    font-size: 2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px var(--accent-glow));
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.logo-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Status badge */
.api-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.green {
    background-color: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
}

.status-dot.orange {
    background-color: var(--warning-color);
    box-shadow: 0 0 8px var(--warning-color);
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.2s, background-color 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.05);
    background: var(--border-color);
}

/* Dropdowns & Selects */
.load-project-container {
    display: flex;
    gap: 0.6rem;
}

.select-premium {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    min-width: 160px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select-premium:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Main Layout */
.app-main {
    display: grid;
    grid-template-columns: 52fr 48fr;
    gap: 1.2rem;
    flex-grow: 1;
    min-height: 0;
}

.workspace-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding-right: 4px;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

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

.card-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    margin-bottom: 0;
    position: relative;
    padding-left: 0.75rem;
    color: var(--text-primary);
    flex: 1;
}

.card-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.collapse-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    line-height: 1;
    transition: background-color 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.collapse-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-collapsible].collapsed>.card-body,
[data-collapsible].collapsed>.tabs-header,
[data-collapsible].collapsed>.tabs-content {
    display: none;
}

[data-collapsible].collapsed .collapse-toggle {
    transform: rotate(-90deg);
}

[data-collapsible].collapsed {
    flex-grow: 0 !important;
}

[data-collapsible].collapsed .card-header {
    margin-bottom: 0;
}

/* Form Controls */
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.form-grid.col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-grid.col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.col-span-2 {
    grid-column: span 2;
}

.col-span-3 {
    grid-column: span 3;
}

.col-span-4 {
    grid-column: span 4;
}

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

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

.form-group input,
.table-premium input,
.table-premium select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-group input:focus,
.table-premium input:focus,
.table-premium select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background-color: var(--bg-primary);
}

/* Overheads summary */
.overhead-summary-bar {
    margin-top: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.overhead-summary-bar strong {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-left: 0.3rem;
}

/* Tabs */
.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.8rem 1.2rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

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

.tab-btn.active {
    color: var(--accent-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px;
}

.tabs-content {
    flex-grow: 1;
    position: relative;
}

.tab-pane {
    display: none;
    flex-direction: column;
    height: 100%;
}

.tab-pane.active {
    display: flex;
}

.tab-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.tab-pane-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* Table styling */
.table-wrapper {
    overflow-x: auto;
    flex-grow: 1;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-height: 350px;
    background: var(--bg-secondary);
}

.table-premium {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.table-premium th {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.table-premium td:last-child,
.table-premium th:last-child {
    white-space: nowrap;
    text-align: center;
    width: 80px;
}

.table-premium tbody tr:last-child td {
    border-bottom: none;
}

/* Espaçamento mínimo entre colunas para RH, VD, ST, MP, MC e OU */
#table-rh th,
#table-rh td,
#table-vd th,
#table-vd td,
#table-st th,
#table-st td,
#table-mp th,
#table-mp td,
#table-mc th,
#table-mc td,
#table-ou th,
#table-ou td {
    padding: 0.35rem 0.4rem;
}

.table-responsive-viabilidade {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.table-responsive-viabilidade .sticky-col {
    position: sticky;
    left: 0;
    z-index: 11;
    background-color: var(--bg-primary);
    min-width: 100px;
}

.table-responsive-viabilidade thead .sticky-col {
    background-color: var(--bg-secondary);
    z-index: 12;
}

.table-responsive-viabilidade tbody .sticky-col {
    z-index: 1;
}

.table-responsive-viabilidade table {
    margin-top: 0 !important;
}

.table-premium tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.text-right {
    text-align: right;
}

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

/* Premium currency values style */
.val-premium {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
}

/* Custom inputs for tables */
.table-premium input,
.table-premium select,
.table-premium textarea {
    padding: 0.4rem 0.6rem;
    font-size: 0.88rem;
}

.table-premium textarea {
    width: 100%;
    resize: vertical;
    min-height: 2.6em;
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    line-height: 1.4;
}

/* Narrower "Valor Unitário x Qtd." column */
.td-valor-qtd {
    width: 180px;
    white-space: nowrap;
}

.valor-qtd-wrapper {
    display: flex;
    gap: 4px;
    align-items: center;
}

.valor-qtd-wrapper input[type="number"] {
    width: 80px;
}

.valor-qtd-wrapper input[type="number"]:last-of-type {
    width: 50px;
}

.mult-symbol {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background var(--transition-speed), transform 0.1s, box-shadow var(--transition-speed);
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    box-shadow: 0 4px 15px var(--accent-glow);
}

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

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

.btn-accent {
    background: linear-gradient(135deg, var(--success-color), hsl(160, 80%, 40%));
    color: white;
}

.btn-accent:hover {
    box-shadow: 0 4px 15px var(--success-glow);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), hsl(42, 90%, 50%));
    color: white;
}

.btn-warning:hover {
    box-shadow: 0 4px 15px var(--warning-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), hsl(345, 80%, 55%));
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-add {
    background: var(--accent-glow);
    color: var(--accent-color);
    border: 1px dashed var(--accent-color);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-add:hover {
    background: var(--accent-color);
    color: white;
    border-style: solid;
}

.btn-delete-row {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    padding: 0.12rem 0.3rem;
    font-size: 0.68rem;
    border-radius: 4px;
}

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

.btn-info-row {
    background: rgba(137, 190, 48, 0.1);
    color: var(--accent-color);
    padding: 0.12rem 0.3rem;
    font-size: 0.68rem;
    border-radius: 4px;
    margin-right: 4px;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
    font-weight: 600;
}

.btn-info-row:hover {
    background: var(--accent-color);
    color: white;
}

/* Dashboard Summary Cards */
.summary-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.metric-card {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.card-direct {
    background: rgba(168, 85, 247, 0.05);
}

.card-overhead {
    background: rgba(245, 158, 11, 0.05);
}

.card-total {
    grid-column: span 2;
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
    border: none;
}

.metric-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.card-total .metric-label {
    opacity: 0.9;
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 800;
}

.card-total .metric-value {
    font-size: 1.8rem;
}

/* Breakdown items */
.overhead-breakdown-list {
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.breakdown-item strong {
    font-family: var(--font-mono);
    color: var(--text-primary);
}

/* Progress bar */
.budget-progress-track {
    height: 8px;
    width: 100%;
    border-radius: 4px;
    background: var(--bg-secondary);
    overflow: hidden;
    display: flex;
    margin-bottom: 0.5rem;
}

.progress-segment {
    height: 100%;
}

.progress-segment.direct {
    background: var(--accent-color);
}

.progress-segment.overhead {
    background: var(--warning-color);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-labels .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.3rem;
}

.progress-labels .dot.direct {
    background-color: var(--accent-color);
}

.progress-labels .dot.overhead {
    background-color: var(--warning-color);
}

/* Matrix (Flow of Cash) Table */
.matrix-wrapper {
    overflow: auto;
    flex-grow: 1;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.matrix-table {
    border-collapse: separate;
    border-spacing: 0;
}

.matrix-table th,
.matrix-table td {
    padding: 0.6rem 0.8rem;
    font-family: var(--font-mono);
    white-space: nowrap;
    border-right: 1px solid var(--border-color);
}

.matrix-table th:last-child,
.matrix-table td:last-child {
    border-right: none;
}

.matrix-table td:first-child {
    position: sticky;
    left: 0;
    background: var(--bg-secondary);
    font-family: var(--font-sans);
    font-weight: 600;
    z-index: 10;
    border-right: 2px solid var(--border-color);
}

.matrix-table th:first-child {
    position: sticky;
    left: 0;
    top: 0;
    background: var(--bg-secondary);
    font-family: var(--font-sans);
    font-weight: 600;
    z-index: 15;
    border-right: 2px solid var(--border-color);
}

.matrix-table tr.total-row td {
    background-color: rgba(168, 85, 247, 0.08);
    font-weight: 700;
    border-top: 2px solid var(--border-color);
}

.matrix-table tr.total-row td:first-child {
    position: sticky;
    left: 0;
    background-color: var(--bg-secondary);
    background-image: linear-gradient(rgba(168, 85, 247, 0.08), rgba(168, 85, 247, 0.08));
    z-index: 11;
    border-right: 2px solid var(--border-color);
}

/* Action panel */
.action-panel {
    display: flex;
    gap: 0.8rem;
}

/* Gantt Chart Table */
.gantt-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
    min-width: 100%;
}

.gantt-table thead th {
    border-bottom: 2px solid var(--border-color);
}

.gantt-table tbody tr:hover td {
    filter: brightness(1.05);
}

.gantt-table td {
    transition: filter 0.15s;
}

.gantt-table tbody td {
    height: 22px;
    padding: 0 !important;
}

.gantt-table tbody td:first-child {
    padding: 0.2rem 0.4rem !important;
}

.gantt-table tbody td:last-child {
    padding: 0.3rem 0.2rem !important;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.8rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-sans);
    font-weight: 500;
}

.toast.show {
    transform: translateY(0);
}

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

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

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast.info {
    border-left: 4px solid var(--accent-color);
}

/* Helper Utilities */
.hidden {
    display: none !important;
}

.flex-grow {
    flex-grow: 1;
}

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

.flex-row {
    display: flex;
    flex-direction: row;
}

.justify-between {
    justify-content: space-between;
}

.mt-4 {
    margin-top: 1rem;
}

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

/* Specific Multi-select cell styling */
.month-selector-cell {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 1px;
    padding: 2px 0;
    justify-content: start;
}

.month-pill {
    padding: 1px 2px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    cursor: pointer;
    user-select: none;
    transition: background 0.1s, border-color 0.1s;
}

/* Modal months: 12 colunas, 20% maiores */
#item-modal-meses {
    display: grid;
    grid-template-columns: repeat(12, auto);
    gap: 2px;
    padding: 4px 0;
    justify-content: start;
}

#item-modal-meses .month-pill {
    width: 1.68rem;
    height: 1.68rem;
    font-size: 0.55rem;
}

/* Month pills quadrados menores para VD, ST, MP, MC, OU */
.vd-meses .month-pill,
.st-meses .month-pill,
.mp-meses .month-pill,
.mc-meses .month-pill,
.ou-meses .month-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    padding: 0;
    font-size: 0.5rem;
    border-radius: 2px;
}

.month-pill.selected {
    background: var(--accent-glow);
    border-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: 700;
}

.month-pill:hover {
    border-color: var(--text-muted);
}

/* Helper Utilities Extras */
.items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

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

.modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.modal-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-actions-grid .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    height: auto;
    border-radius: 8px;
    gap: 0.5rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.modal-actions-grid .btn .action-icon {
    font-size: 1.8rem;
}

.modal-actions-grid .btn strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.modal-actions-grid .btn span:not(.action-icon) {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* PDF Modal Custom Styles */
.pdf-modal-card {
    max-width: 1000px !important;
    width: 95% !important;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.pdf-modal-body {
    flex-grow: 1;
    padding: 1rem;
    height: calc(100% - 70px);
    background-color: #525659;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* XLSX Modal Custom Styles */
.xlsx-modal-card {
    max-width: 1000px !important;
    width: 95% !important;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.xlsx-modal-body {
    flex-grow: 1;
    padding: 1rem;
    height: calc(100% - 70px);
    background-color: var(--bg-primary);
}

/* Justificação Modal Custom Styles */
.justificativa-modal-card {
    max-width: 500px !important;
    width: 90% !important;
}

.justificativa-modal-body textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    resize: vertical;
    outline: none;
}

.justificativa-modal-body textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Universidades Participantes Tags / Badges */
.univ-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(137, 190, 48, 0.15);
    color: var(--text-primary);
    border: 1px solid #89be30;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.univ-tag-badge:hover {
    background: rgba(137, 190, 48, 0.25);
}
.univ-tag-badge .btn-remove-tag {
    cursor: pointer;
    color: #e74c3c;
    font-weight: bold;
    font-size: 0.95rem;
    line-height: 1;
    margin-left: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}
.univ-tag-badge .btn-remove-tag:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}
.univ-tag-empty {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
    align-self: center;
}

/* Switch Toggle para RH Compartilhado */
.shared-rh-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked+.slider {
    background-color: var(--accent-color);
}

input:checked+.slider:before {
    transform: translateX(18px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

.badge-shared {
    background: var(--accent-glow);
    color: var(--accent-color);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--accent-color);
}

/* Module Navigation */
.module-nav {
    display: flex;
    gap: 0.3rem;
    background: var(--bg-secondary);
    padding: 0.3rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.module-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.module-btn.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.module-icon {
    font-size: 0.9rem;
}

/* Module Content */
.module-content {
    display: none;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.module-content.active {
    display: flex;
}

/* Under Construction */
.under-construction {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    text-align: center;
    padding: 2rem;
}

.under-construction h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.under-construction p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Construction Crane Animation */
.construction-animation {
    width: 160px;
    height: 180px;
    margin-bottom: 2rem;
    position: relative;
}

.construction-crane {
    position: relative;
    width: 100%;
    height: 100%;
}

.crane-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.crane-tower {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 120px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 4px 4px 0 0;
}

.crane-arm {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100px;
    height: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 4px;
    transform-origin: left center;
    animation: craneSwing 4s ease-in-out infinite;
}

.crane-cable {
    position: absolute;
    top: 28px;
    right: 20px;
    width: 3px;
    height: 40px;
    background: #6b7280;
    animation: cableSwing 4s ease-in-out infinite;
}

.crane-hook {
    position: absolute;
    top: 68px;
    right: 14px;
    width: 16px;
    height: 16px;
    border: 3px solid #6b7280;
    border-top: none;
    border-radius: 0 0 8px 8px;
    animation: hookSwing 4s ease-in-out infinite;
}

@keyframes craneSwing {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

@keyframes cableSwing {

    0%,
    100% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

@keyframes hookSwing {

    0%,
    100% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

/* Floating animation for the whole construction */
.construction-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Login Screen */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.login-form .form-group input {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form .form-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.login-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.login-hint strong {
    color: var(--accent-color);
}

/* Splash Animation */
.splash-animation {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 0.5rem auto;
}

.splash-anim {
    position: absolute;
    inset: 0;
    display: none;
}

#splash-animation[data-splash-anim="rings"] .splash-anim-rings {
    display: block;
}

#splash-animation[data-splash-anim="spinner"] .splash-anim-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

#splash-animation[data-splash-anim="balls"] .splash-anim-balls {
    display: flex;
    align-items: center;
    justify-content: center;
}

#splash-animation[data-splash-anim="waves"] .splash-anim-waves {
    display: flex;
    align-items: center;
    justify-content: center;
}

#splash-animation[data-splash-anim="circular"] .splash-anim-circular {
    display: flex;
    align-items: center;
    justify-content: center;
}

#splash-animation[data-splash-anim="pulse"] .splash-anim-pulse {
    display: flex;
    align-items: center;
    justify-content: center;
}

#splash-animation[data-splash-anim="shimmer"] .splash-anim-shimmer {
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    text-align: center;
}

/* User info on header */
.header-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-user-info .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.2s;
}

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

/* User Management */
.user-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-status-badge.active {
    background: var(--success-glow);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.user-status-badge.inactive {
    background: var(--danger-glow);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-user-action {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.15s;
}

.btn-user-action:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-user-action.danger:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* Module Toolbar */
.module-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: splashFadeIn 0.5s ease;
}

.splash-screen.hidden {
    display: none;
}

@keyframes splashFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.splash-content {
    text-align: center;
    max-width: 500px;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: splashSlideUp 0.6s ease;
}

@keyframes splashSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.splash-logo {
    margin-bottom: 1.5rem;
}

.splash-logo-icon {
    font-size: 3.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px var(--accent-glow));
    margin-bottom: 0.5rem;
}

.splash-logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.3rem;
}

.splash-logo span {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.splash-version {
    display: block;
    background: var(--accent-color);
    color: #fff;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.splash-divider {
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    margin: 1.5rem auto;
    border-radius: 2px;
}

.splash-notice {
    margin-bottom: 2rem;
}

.splash-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--warning-color), hsl(38, 90%, 45%));
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.splash-notice p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.splash-notice p:last-child {
    margin-bottom: 0;
}

.splash-notice strong {
    color: var(--accent-color);
}

.splash-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    min-width: 200px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Loading Anims container */
.loading-anims {
    position: relative;
    width: 80px;
    height: 80px;
}

.loading-anim {
    position: absolute;
    inset: 0;
    display: none;
}

#loading-overlay[data-anim="rings"] .loading-anim-rings {
    display: block;
}

#loading-overlay[data-anim="spinner"] .loading-anim-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

#loading-overlay[data-anim="balls"] .loading-anim-balls {
    display: flex;
    align-items: center;
    justify-content: center;
}

#loading-overlay[data-anim="waves"] .loading-anim-waves {
    display: flex;
    align-items: center;
    justify-content: center;
}

#loading-overlay[data-anim="circular"] .loading-anim-circular {
    display: flex;
    align-items: center;
    justify-content: center;
}

#loading-overlay[data-anim="pulse"] .loading-anim-pulse {
    display: flex;
    align-items: center;
    justify-content: center;
}

#loading-overlay[data-anim="shimmer"] .loading-anim-shimmer {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Rings (animação original) ---- */
.loading-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.loading-ring-outer {
    border: 3px solid var(--accent-color);
    opacity: 0.2;
}

.loading-ring-outer-spin {
    border: 3px solid transparent;
    border-top-color: var(--accent-color);
    animation: loadingSpin 1.5s linear infinite;
}

.loading-ring-mid {
    inset: 8px;
    border: 2px solid var(--accent-color);
    opacity: 0.1;
}

.loading-ring-mid-spin {
    inset: 8px;
    border: 2px solid transparent;
    border-bottom-color: var(--accent-color);
    opacity: 0.6;
    animation: loadingSpinReverse 2s linear infinite;
}

.loading-ring-inner {
    inset: 16px;
    border: 2px solid var(--accent-color);
    opacity: 0.3;
    animation: loadingPulse 2s ease-in-out infinite;
}

.loading-ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    animation: loadingCenterPulse 1.5s ease-in-out infinite;
}

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

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

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

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

@keyframes loadingPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.6;
    }
}

@keyframes loadingCenterPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0.7;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

/* ---- Spinner simples ---- */
.spinner-circle {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-secondary);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ---- Bouncing balls ---- */
.balls-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 48px;
}

.ball {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    animation: ballBounce 0.9s ease-in-out infinite;
}

.ball-1 {
    background: var(--accent-color);
    animation-delay: 0s;
}

.ball-2 {
    background: var(--success-color, #22c55e);
    animation-delay: 0.15s;
}

.ball-3 {
    background: var(--warning-color, #f59e0b);
    animation-delay: 0.3s;
}

@keyframes ballBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-24px);
    }
}

/* ---- Waves (equalizador) ---- */
.waves-container {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 48px;
}

.wave-bar {
    width: 8px;
    border-radius: 4px;
    background: var(--accent-color);
    animation: wave 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(1) {
    height: 20px;
    animation-delay: 0s;
}

.wave-bar:nth-child(2) {
    height: 36px;
    animation-delay: 0.1s;
}

.wave-bar:nth-child(3) {
    height: 48px;
    animation-delay: 0.2s;
}

.wave-bar:nth-child(4) {
    height: 28px;
    animation-delay: 0.3s;
}

.wave-bar:nth-child(5) {
    height: 16px;
    animation-delay: 0.4s;
}

@keyframes wave {

    0%,
    100% {
        transform: scaleY(0.5);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* ---- Circular progress (SVG) ---- */
.circular-progress {
    width: 56px;
    height: 56px;
    transform: rotate(-90deg);
}

.circular-track {
    stroke: var(--bg-secondary);
}

.circular-fill {
    stroke: var(--accent-color);
    stroke-linecap: round;
    animation: circularFill 2s ease-in-out infinite;
}

@keyframes circularFill {
    0% {
        stroke-dashoffset: 106.8;
    }

    50% {
        stroke-dashoffset: 26.7;
    }

    100% {
        stroke-dashoffset: 106.8;
    }
}

/* ---- Pulse rings (sonar/radar) ---- */
.pulse-container {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    animation: pulseRing 2.5s ease-out infinite;
}

.pulse-ring:nth-child(2) {
    animation-delay: 0.8s;
}

.pulse-ring:nth-child(3) {
    animation-delay: 1.6s;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.3);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ---- Shimmer bar ---- */
.shimmer-bar {
    width: 64px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--accent-color) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Loading text & dots (compartilhados) */
.loading-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    animation: loadingTextPulse 2s ease-in-out infinite;
    text-align: center;
}

@keyframes loadingTextPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.loading-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.loading-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.6;
    animation: loadingBounce 0.8s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes loadingBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Welcome Notice */
.welcome-notice {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    background: var(--bg-primary);
    animation: splashFadeIn 0.4s ease;
}

.welcome-notice.hidden {
    display: none !important;
}

.welcome-notice-content {
    text-align: center;
    max-width: 480px;
    padding: 2.5rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px var(--accent-glow));
}

.welcome-notice-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.welcome-notice-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.welcome-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* International Module */
.intl-partner-card {
    padding: 1rem;
}

.intl-partner-card .card-header h2 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.intl-warning-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0.3rem 0;
}

#module-nr-internacionais .form-grid select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    outline: none;
    width: 100%;
    cursor: pointer;
}