/* ====== Layout geral do painel ====== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.painel-body {
    min-height: 100vh;
    width: 100%;
    background: radial-gradient(ellipse at top, #0f172a 0%, #020617 50%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Efeito de partículas/estrelas no fundo */
.painel-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(120, 180, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(147, 197, 253, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 200%;
    animation: stars 20s linear infinite;
    pointer-events: none;
}

@keyframes stars {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 100%;
    }
}

.painel-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.painel-main-wrapper {
    width: 100%;
    background: linear-gradient(135deg,
            rgba(15, 23, 42, 0.95) 0%,
            rgba(6, 10, 32, 0.98) 100%);
    border-radius: 32px;
    padding: 48px 40px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(120, 180, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Efeito neon na borda */
.painel-main-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg,
            rgba(86, 150, 255, 0.6),
            rgba(76, 230, 180, 0.7),
            rgba(110, 100, 255, 0.5));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.8;
    pointer-events: none;
    z-index: -1;
}

/* ====== Header ====== */

.painel-main-header {
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.painel-header-content {
    position: relative;
}

.painel-title {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #9fb8ff 50%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: shimmer 3s ease-in-out infinite;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.painel-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
}

/* ====== Grid de Cards ====== */

.painel-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    align-items: stretch;
}

/* ====== Cards de Módulos ====== */

.painel-card-module {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 24px;
    border-radius: 20px;
    text-decoration: none;
    color: #ffffff;
    background: linear-gradient(135deg,
            rgba(30, 42, 82, 0.4) 0%,
            rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(120, 180, 255, 0.2);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 140px;
    box-sizing: border-box;
    min-height: 140px;
    max-height: 140px;
}

.painel-card-module::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: left 0.5s ease;
}

.painel-card-module:hover::before {
    left: 100%;
}

.painel-card-module:hover {
    transform: translateY(-4px);
    border-color: rgba(120, 180, 255, 0.5);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(86, 150, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg,
            rgba(40, 52, 92, 0.5) 0%,
            rgba(20, 30, 52, 0.7) 100%);
}

.painel-card-primary {
    background: linear-gradient(135deg,
            rgba(86, 150, 255, 0.15) 0%,
            rgba(76, 230, 180, 0.1) 100%);
    border-color: rgba(86, 150, 255, 0.4);
}

.painel-card-primary:hover {
    background: linear-gradient(135deg,
            rgba(86, 150, 255, 0.25) 0%,
            rgba(76, 230, 180, 0.2) 100%);
    border-color: rgba(86, 150, 255, 0.6);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(86, 150, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.card-icon {
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
}

.card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.card-description {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-arrow {
    font-size: 24px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.painel-card-module:hover .card-arrow {
    transform: translateX(6px);
    color: rgba(120, 180, 255, 1);
}

/* ====== Footer ====== */

.painel-main-footer {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    letter-spacing: 0.05em;
}

/* ====== Responsividade ====== */

@media (max-width: 768px) {
    .painel-main-wrapper {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .painel-title {
        font-size: 36px;
    }

    .painel-subtitle {
        font-size: 14px;
    }

    .painel-main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .painel-card-module {
        padding: 24px 20px;
        height: 140px;
        min-height: 140px;
        max-height: 140px;
        box-sizing: border-box;
    }

    .card-icon {
        font-size: 40px;
    }

    .card-title {
        font-size: 18px;
    }

    .card-description {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .painel-body {
        padding: 20px 16px;
    }

    .painel-main-wrapper {
        padding: 24px 20px;
    }

    .painel-title {
        font-size: 32px;
    }

    .painel-card-module {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        height: 140px;
        min-height: 140px;
        max-height: 140px;
        box-sizing: border-box;
    }

    .card-arrow {
        display: none;
    }
}

/* ====== Estilos antigos mantidos para compatibilidade (login) ====== */

.painel-card {
    width: 100%;
    border-radius: 24px;
    background: rgba(6, 10, 32, 0.96);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    padding: 28px 32px 26px;
}

.painel-group {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.painel-label {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.85;
}

.painel-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 13, 35, 0.95);
    padding: 10px 14px;
    color: #ffffff;
    font-size: 13px;
    outline: none;
    transition:
        border 0.14s ease,
        box-shadow 0.14s ease,
        background 0.14s ease;
}

.painel-input:focus {
    border-color: rgba(147, 197, 253, 0.95);
    box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.7);
    background: rgba(10, 16, 45, 0.98);
}

.painel-input::placeholder {
    opacity: 0.55;
}

.connection-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
}

.connection-column {
    flex: 1 1 220px;
}

.painel-actions {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.painel-button {
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        background 0.14s ease,
        border 0.14s ease,
        color 0.14s ease,
        transform 0.08s ease,
        box-shadow 0.14s ease;
}

.painel-button.primary {
    background: linear-gradient(135deg, #3b82f6, #22c55e);
    color: #020617;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.painel-button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.65);
}

.painel-button.secondary {
    background: transparent;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.7);
}

.painel-button.secondary:hover {
    background: rgba(15, 23, 42, 0.8);
}

.painel-link-voltar {
    font-size: 13px;
    text-decoration: none;
    color: #e5e7eb;
    opacity: 0.7;
    transition: opacity 0.12s ease;
}

.painel-link-voltar:hover {
    opacity: 1;
}