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

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --accent: #0ea5e9;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.1) 0px, transparent 50%);
    min-height: 100vh;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
aside.sidebar {
    width: 220px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--accent);
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Main Content */
main.content {
    flex-grow: 1;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0;
    width: 100%;
}

header.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.welcome-msg h1 {
    font-size: 1.85rem;
    font-weight: 700;
}

.welcome-msg p {
    color: var(--text-muted);
}

/* Cards & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-info span {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Glass Table */
.data-container {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input, select, textarea {
    width: 100%;
    background: #1e293b;
    border: 1px solid var(--border);
    padding: 0 1.5rem;
    height: 60px; /* Consistência com o Select2 */
    border-radius: 16px;
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

textarea {
    height: auto;
    padding: 1.25rem 1.5rem;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
}

input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    appearance: auto;
    cursor: pointer;
}

option {
    background: #1e293b;
    color: white;
    padding: 10px;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.5s ease forwards;
}

/* Select2 Dark Mode Fix */
.select2-container--default .select2-selection--single {
    background-color: #1e293b !important;
    border: 1px solid var(--border) !important;
    height: 60px !important; /* Aumentado para maior destaque */
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: white !important;
    padding-left: 1.5rem !important;
    font-size: 1.1rem !important; /* Fonte maior */
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 58px !important;
    right: 15px !important;
}

.select2-dropdown {
    background-color: #1e293b !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    color: white !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5) !important;
}

.select2-results__option--selectable {
    padding: 10px 15px !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--primary) !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: #0f172a !important;
    border: 1px solid var(--border) !important;
    color: white !important;
    border-radius: 8px !important;
}
