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

:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #020617 100%);
    --primary-neon: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    --btn-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --btn-hover-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --card-bg: rgba(30, 41, 59, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #a78bfa;
    --success: #34d399;
    --error: #f87171;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
    position: relative;
}

/* Fundo abstrato decorativo */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--primary-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* Engrenagem Admin */
.admin-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.admin-trigger:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.2);
}

main {
    flex-grow: 1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
}

h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, #ffffff 30%, #cbd5e1 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

/* Passo a passo */
.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.step-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.step-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--primary-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Botões gigantes */
.btn-giant-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-giant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--btn-gradient);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 1.25rem 3rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-giant::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: rotate(30deg);
    transition: transform 0.5s ease;
    pointer-events: none;
}

.btn-giant:hover {
    background: var(--btn-hover-gradient);
    transform: scale(1.04);
    box-shadow: 0 15px 35px -5px rgba(99, 102, 241, 0.7);
}

.btn-giant:hover::after {
    transform: translate(50%, 50%) rotate(30deg);
}

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

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.input-container {
    position: relative;
}

.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #818cf8;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.form-input::placeholder {
    color: var(--text-muted);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--btn-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--btn-hover-gradient);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Mensagens de Alerta */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.2);
    color: var(--error);
}

/* Dashboard e Tabelas */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header-actions {
    display: flex;
    gap: 0.75rem;
}

.filter-bar {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: flex-end;
}

@media (max-width: 768px) {
    .filter-form {
        grid-template-columns: 1fr;
    }
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

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

th, td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
}

td {
    color: var(--text-primary);
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.no-records {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}

footer {
    width: 100%;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    z-index: 10;
}

/* Animações e Transições */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.5); }
    50% { transform: scale(1.02); box-shadow: 0 15px 35px -5px rgba(99, 102, 241, 0.7); }
    100% { transform: scale(1); box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.5); }
}

.btn-pulse {
    animation: pulse 3s infinite ease-in-out;
}

/* Responsividade Geral */
@media (max-width: 768px) {
    .steps-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card {
        padding: 2rem 1.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

/* Prévia do Certificado */
.preview-container {
    width: 100%;
    height: 480px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin: 2rem 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

.preview-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: -1rem 0 2rem 0;
    text-align: center;
}

@media (max-width: 768px) {
    .preview-container {
        height: 320px;
    }
}
