:root {
    --primary-color: #D81B60;
    --primary-dark: #ad1457;
    --secondary-color: #8E24AA;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --light-bg: #f8fafc;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-dark: #f8fafc;
    --text-light: #94a3b8;
    --glass: rgba(30, 41, 59, 0.7);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Outfit', 'Segoe UI', serif;
    background-color: var(--dark-bg);
    background-image: radial-gradient(circle at 50% 0%, #2a1b3d 0%, var(--dark-bg) 50%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-dark);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 4px 10px rgba(216, 27, 96, 0.5);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    color: var(--text-light);
}

.nav-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: white;
}

.nav-tab.active {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(216, 27, 96, 0.4);
}

.card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group label .required {
    color: var(--danger-color);
    margin-left: 3px;
}

.form-group label .optional {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: normal;
    margin-left: 3px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    color: white;
}

select.form-control {
    cursor: pointer;
    background-color: #1e293b;
    color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(216, 27, 96, 0.2);
}

.form-control[readonly],
.readonly-field {
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--text-light) !important;
    cursor: not-allowed !important;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-row-4 {
    grid-template-columns: repeat(4, 1fr);
}

.form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(216, 27, 96, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    transform: translateY(-2px);
}

.btn-secondary:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background: #d1fae5;
    border: 2px solid var(--secondary-color);
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border: 2px solid var(--danger-color);
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    border: 2px solid var(--primary-color);
    color: #1e40af;
}

.section-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
}

margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 3px solid var(--primary-color);
}

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

.sidebar {
    width: 260px;
    background: var(--glass);
    backdrop-filter: blur(30px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    padding: 0 10px;
}

.sidebar-header h2 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    border-radius: 12px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(90deg, rgba(216, 27, 96, 0.1), transparent);
    color: white;
    border-left: 3px solid var(--primary-color);
}

.nav-item.logout {
    margin-top: auto;
    color: var(--danger-color);
}

.nav-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger-color);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    /* Largura da sidebar */
    padding: 30px 40px;
    width: calc(100% - 260px);
}

/* Dashboard Metrics */
.header-main {
    margin-bottom: 30px;
}

.header-main h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--glass);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.metric-card h3 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.8rem;
    color: #4ade80;
    /* verde sucesso */
}

/* Layout Grid Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.chart-card {
    min-height: 300px;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

/* Responsividade Sidebar */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }

    .logo-text,
    .nav-item .text {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 15px;
    }

    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
        padding: 20px;
    }

    .modal-content.modal-large {
        width: 90%;
        margin-left: 40px;
        /* offset sidebar */
    }
}

.loader {

    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.table-container {
    max-width: 100%;
    overflow: hidden;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    table-layout: auto;
}

thead {
    background: rgba(216, 27, 96, 0.2);
    color: white;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-light);
}

td {
    color: white;
}

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

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: var(--secondary-color);
    color: white;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 25px;
    }

    .form-row,
    .form-row-3,
    .form-row-4 {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 8px;
    }
}

/* Modal exclusão */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #1f2937;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    max-width: 360px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    color: var(--text-dark);
}

.modal-large {
    max-width: 900px !important;
    width: 95% !important;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left !important;
}

.modal-content h3 {
    margin-bottom: 12px;
    color: var(--text-dark);
}

.modal-content p {
    margin-bottom: 16px;
    color: var(--text-light);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}