/* Estilos gerais */
:root {
    /* Cores principais */
    --primary: #6c5ce7;     /* Roxo suave */
    --primary-light: #a29bfe;
    --primary-dark: #5649c0;
    
    /* Cores secundárias */
    --secondary: #74b9ff;   /* Azul claro */
    --success: #00b894;     /* Verde claro */
    --info: #0984e3;        /* Azul mais forte */
    --warning: #fdcb6e;     /* Amarelo suave */
    --danger: #ff7675;      /* Vermelho suave */
    
    /* Tons de cinza */
    --light: #f8f9fc;
    --dark: #2d3436;
    --gray-100: #f8f9fc;
    --gray-200: #dfe6e9;
    --gray-300: #b2bec3;
    --gray-400: #95a5a6;
    --gray-500: #7f8c8d;
    --gray-600: #636e72;
    --gray-700: #4a4a4a;
    --gray-800: #2d3436;
    --gray-900: #1e272e;
    
    /* Bordas arredondadas */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
    background-color: var(--light);
    color: var(--gray-800);
    color: var(--gray-800);
    background-color: #f5f6fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout Principal */
.wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    transition: all 0.3s ease;
}

/* Sidebar Collapsed State */
.wrapper.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

.wrapper.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    .top-bar {
        padding: 0.75rem 1rem;
    }
    
    .content {
        padding: 1rem !important;
    }
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--primary);
    color: white;
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
}

.sidebar-header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand i {
    font-size: 1.75rem;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    margin: 0.25rem 0.75rem;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.sidebar-menu .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Conteúdo Principal */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--gray-100);
    margin-left: 250px;
    transition: margin 0.3s ease;
    width: calc(100% - 250px);
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    z-index: 90;
    position: sticky;
    top: 0;
    min-height: 70px;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.5rem;
}

/* Botões */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn i {
    font-size: 1.1em;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

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

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

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

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

/* Formulários */
.form-control {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.15);
}

/* Tabelas */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--gray-700);
    border-collapse: collapse;
}

.table th {
    background-color: var(--gray-100);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(108, 92, 231, 0.05);
}

/* Alertas */
.alert {
    border-radius: var(--border-radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: none;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.alert-success {
    background-color: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(255, 118, 117, 0.1);
    color: var(--danger);
}

/* Badges */
.badge {
    padding: 0.4em 0.75em;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.badge-danger {
    background-color: rgba(255, 118, 117, 0.15);
    color: var(--danger);
}

/* Navbar */
.navbar {
    padding: 0.5rem 2rem;
    background: white;
    box-shadow: var(--shadow-sm);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1.25rem;
    color: var(--gray-700);
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 1.25rem;
}

/* Botões */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.35rem;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.5;
    transition: all 0.15s ease-in-out;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Tabelas */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--gray-700);
    background-color: transparent;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #e3e6f0;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #e3e6f0;
}

/* Formulários */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6e707e;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #6e707e;
    background-color: #fff;
    border-color: #bac8f3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Alertas */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.35rem;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

/* Utilidades */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}
