:root {
    --bg: #08111d;
    --bg-2: #0d1727;
    --panel: rgba(15, 23, 38, 0.92);
    --panel-2: rgba(20, 31, 50, 0.96);
    --line: rgba(255, 255, 255, 0.08);
    --line-soft: rgba(255, 255, 255, 0.05);
    --text: #f5f7fb;
    --muted: #9fb0c8;
    --uol: #ffd200;
    --ventu: #32d3ff;
    --success: #22c55e;
    --danger: #ef4444;
    --edit: #60a5fa;
    --shadow: 0 22px 54px rgba(0, 0, 0, 0.38);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 210, 0, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(50, 211, 255, 0.12), transparent 28%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    color: var(--text);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.06));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 30px;
    background: rgba(6, 12, 22, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-logo {
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.28));
}

.uol-logo {
    height: 42px;
    max-width: 110px;
}

.ventu-logo {
    height: 38px;
    max-width: 180px;
}

.brand-divider {
    width: 1px;
    height: 34px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.28), transparent);
}

.topbar-subtitle {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px;
}

.hero-card,
.panel,
.page-header {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-card-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 34px;
    background:
        linear-gradient(135deg, rgba(255, 210, 0, 0.08), transparent 36%),
        linear-gradient(225deg, rgba(50, 211, 255, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(18, 28, 46, 0.98), rgba(12, 20, 35, 0.98));
}

.hero-left {
    max-width: 820px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-card h1,
.page-header h1,
.panel h2 {
    margin: 0 0 10px 0;
}

.hero-card h1 {
    font-size: 42px;
    line-height: 1;
}

.hero-card p,
.page-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.hero-badge {
    white-space: nowrap;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #fb7185);
    color: white;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.08);
}

.program-grid-wrap {
    margin-top: 24px;
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.program-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    padding: 24px;
    border-radius: 20px;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(255,255,255,0.09);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.program-card::after {
    content: "";
    position: absolute;
    inset: auto -30px -30px auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    filter: blur(10px);
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 34px rgba(0,0,0,0.28);
    border-color: rgba(255,255,255,0.16);
}

.program-card.palmeiras {
    background: linear-gradient(135deg, #0b472a, #11834d);
}

.program-card.financas {
    background: linear-gradient(135deg, #7a5500, #d39f00);
    color: #0f172a;
}

.program-card.fimdepapo {
    background: linear-gradient(135deg, #084c61, #00a6c7);
}

.cadastro-master {
    background: linear-gradient(135deg, #3b0764, #7c3aed);
}

.program-number {
    font-size: 13px;
    opacity: 0.85;
    font-weight: 700;
}

.program-name {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.05;
}

.program-action {
    margin-top: auto;
    font-weight: 800;
}

.page-header {
    margin-bottom: 22px;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.02), transparent 40%),
        linear-gradient(180deg, rgba(20, 30, 49, 0.96), rgba(14, 22, 38, 0.96));
}

.palmeiras-header {
    border-left: 6px solid #16a34a;
}

.financas-header {
    border-left: 6px solid #ffd200;
}

.fimdepapo-header {
    border-left: 6px solid #38bdf8;
}

.cadastro-header {
    border-left: 6px solid #a855f7;
}

.back-link {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--ventu);
    text-decoration: none;
    font-weight: 800;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.18fr 1fr;
    gap: 22px;
}

.cadastro-grid {
    align-items: start;
}

.panel {
    padding: 24px;
    background: linear-gradient(180deg, rgba(18, 27, 45, 0.96), rgba(13, 22, 37, 0.96));
}

.panel-luxo {
    position: relative;
}

.panel-luxo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,210,0,0.18), rgba(50,211,255,0.15), transparent 45%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.section-tag {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.credito-card {
    background: linear-gradient(180deg, rgba(24, 37, 60, 0.98), rgba(18, 29, 48, 0.98));
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
}

.credito-card h3 {
    margin-top: 0;
}

.credito-card.destaque {
    box-shadow: inset 0 0 0 1px rgba(255, 210, 0, 0.22);
    background:
        linear-gradient(135deg, rgba(255, 210, 0, 0.06), transparent 25%),
        linear-gradient(180deg, rgba(24, 37, 60, 0.98), rgba(18, 29, 48, 0.98));
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field.grow {
    flex: 1;
}

label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 800;
}

input,
select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: #0c1525;
    color: white;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

input:focus,
select:focus {
    border-color: rgba(50, 211, 255, 0.85);
    box-shadow: 0 0 0 4px rgba(50, 211, 255, 0.12);
    transform: translateY(-1px);
}

.primary-btn,
.apply-btn,
.edit-btn,
.remove-btn {
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.primary-btn:hover,
.apply-btn:hover,
.edit-btn:hover,
.remove-btn:hover {
    transform: translateY(-1px);
}

.primary-btn {
    background: linear-gradient(135deg, var(--uol), #ffea77);
    color: #111827;
    box-shadow: 0 10px 24px rgba(255, 210, 0, 0.16);
}

.apply-btn {
    background: linear-gradient(135deg, #22c55e, #86efac);
    color: #052e16;
}

.edit-btn {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    color: #0c2340;
}

.remove-btn {
    background: linear-gradient(135deg, #ef4444, #fca5a5);
    color: #450a0a;
}

.tarja-panel {
    min-height: 100%;
}

.tarja-add-box {
    display: flex;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.tarja-aplicada-box {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(34, 197, 94, 0.22);
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.10), transparent 40%),
        rgba(34, 197, 94, 0.06);
}

.tarja-aplicada-label {
    display: block;
    margin-bottom: 4px;
    color: #bbf7d0;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tarja-list,
.cadastro-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tarja-item,
.cadastro-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(23, 35, 58, 0.98), rgba(17, 28, 46, 0.98));
}

.tarja-text {
    font-weight: 800;
    line-height: 1.4;
}

.tarja-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tarja-empty {
    padding: 18px;
    border-radius: 16px;
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--muted);
    text-align: center;
    background: rgba(255,255,255,0.02);
}

.cadastro-nome {
    font-size: 18px;
    font-weight: 900;
}

.cadastro-funcao {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.status-box {
    margin-top: 16px;
    min-height: 24px;
    font-size: 14px;
    color: var(--muted);
    font-weight: 700;
}

.status-box.ok {
    color: #86efac;
}

.status-box.erro {
    color: #fca5a5;
}

@media (max-width: 1040px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 840px) {
    .topbar,
    .hero-card-premium,
    .panel-header,
    .tarja-add-box,
    .tarja-item,
    .cadastro-item {
        flex-direction: column;
        align-items: stretch;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .main-container {
        padding: 18px;
    }

    .hero-card h1 {
        font-size: 34px;
    }

    .uol-logo {
        height: 34px;
    }

    .ventu-logo {
        height: 30px;
    }
}