@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #ffffff;
    --primary-hover: #e2e8f0;
    --bg-color: #09090b;
    --card-bg: rgba(20, 20, 22, 0.6);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(255, 255, 255, 0.3);
    --success: #10B981;
    --danger: #ef4444;
    --nav-bg: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at top center, rgba(34, 197, 94, 0.15) 0%, transparent 40%),
        radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background Huge Text Effect */
body::before {
    content: 'CONSOLIDAÇÃO';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15vw;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.02);
    z-index: -1;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: -2px;
}

/* Glassmorphism Classes */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    border-radius: 16px;
}

/* Form container similar to reference */
.auth-container,
.form-page-container {
    max-width: 600px;
    margin: 4rem auto;
    padding: 2.5rem;
    width: 90%;
    animation: fadeIn 0.5s ease-out;
    background: transparent;
}

.logo {
    display: block;
    margin: 0 auto 1.5rem auto;
    max-width: 150px;
    height: auto;
    border-radius: 12px;
}

h1,
h2,
h3 {
    text-align: left;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 600;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

p.subtitle {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 1.25rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

/* Autocomplete dark overrides */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1a1a1c inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: background 0.2s;
}

.radio-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.radio-item input[type="radio"] {
    cursor: pointer;
    accent-color: #ffffff;
}

button {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary);
    color: #000000;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
    margin-top: 1rem;
}

button:hover {
    background: var(--primary-hover);
}

button:active {
    transform: scale(0.98);
}

.error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    text-align: center;
}

.success {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    text-align: center;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Modern floating header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--nav-bg);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    width: 90%;
    max-width: 800px;
    margin: 2rem auto 0 auto;
    border-radius: 100px;
    z-index: 10;
}

header .logo {
    max-width: 80px;
    margin: 0;
}

header nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text-main);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    transition: background 0.2s;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.15);
}

main.dashboard-main {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    padding: 2rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card h3 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-main);
}

.stat-card p {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
    padding-bottom: 0.5rem;
}

/* Custom transparent scrollbar for the table */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
}

th,
td {
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    white-space: nowrap;
}

th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td .btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

td>div {
    display: flex;
    flex-wrap: wrap;
    /* allow wrapping if cramped */
    gap: 0.5rem;
}

tr {
    transition: background 0.2s;
}

tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.disclaimer {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: left;
    padding: 0;
    margin-bottom: 2.5rem;
    background: none;
    border: none;
}

.required {
    color: var(--danger);
    font-weight: bold;
}

/* Custom Select Dropdown dark theme */
select option {
    background: var(--bg-color);
    color: var(--text-main);
}

/* Media Queries for Responsiveness */
@media screen and (max-width: 768px) {
    body::before {
        font-size: 20vw;
    }

    header {
        flex-direction: column;
        border-radius: 16px;
        width: 95%;
        padding: 1rem;
        gap: 1rem;
    }

    header nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .auth-container,
    .form-page-container {
        padding: 1.5rem;
        margin: 2rem auto;
    }

    main.dashboard-main {
        padding: 1.5rem 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .btn-sm {
        white-space: nowrap;
    }
}