:root {
    --primary-color: #6a11cb;
    --primary-dark: #4a0c8f;
    --primary-light: #8a2be2;
    --primary-lightest: #f0e6ff;
    --gray-dark: #333333;
    --gray-medium: #666666;
    --gray-light: #f5f5f5;
    --gray-border: #e0e0e0;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --sidebar-width: 250px;
    --sidebar-collapsed: 70px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: var(--gray-dark);
    overflow-x: hidden;
}

/* Layout Principal */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logo .titas {
    color: var(--white);
}

.logo .com {
    color: #d4b2ff;
}

.logo-icon {
    font-size: 1.5rem;
}

.user-info {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.5rem;
}

.user-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.user-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

/* Navegação */
.sidebar-nav {
    padding: 20px 0;
}

.nav-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    margin-top: 10px;
}

.nav-item {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--white);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-left-color: var(--white);
}

.nav-icon {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1rem;
}

.nav-text {
    flex-grow: 1;
}

.sidebar-collapsed .nav-text,
.sidebar-collapsed .nav-title,
.sidebar-collapsed .user-info,
.sidebar-collapsed .logo-text {
    display: none;
}

.sidebar-collapsed .logo {
    justify-content: center;
}

/* Conteúdo Principal */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
}

.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Topbar */
.topbar {
    background-color: var(--white);
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray-medium);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.toggle-sidebar:hover {
    background-color: var(--gray-light);
    color: var(--primary-color);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-badge {
    position: relative;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout {
    background-color: var(--gray-light);
    color: var(--gray-dark);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

/* Conteúdo */
.content-wrapper {
    padding: 20px;
    min-height: calc(100vh - 60px);
}

.content-header {
    margin-bottom: 30px;
}

.content-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.content-subtitle {
    color: var(--gray-medium);
    font-size: 1rem;
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: none;
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-border);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* Tabelas */
.table-responsive {
    overflow-x: auto;
}

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

.table thead {
    background-color: var(--gray-light);
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-dark);
    border-bottom: 2px solid var(--gray-border);
}

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

.table tbody tr:hover {
    background-color: rgba(106, 17, 203, 0.03);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: var(--success);
}

.badge-danger {
    background-color: rgba(220, 53, 69, 0.15);
    color: var(--danger);
}

.badge-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #b38700;
}

.badge-info {
    background-color: rgba(23, 162, 184, 0.15);
    color: var(--info);
}

.badge-primary {
    background-color: rgba(106, 17, 203, 0.15);
    color: var(--primary-color);
}

/* Botões */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(106, 17, 203, 0.2);
}

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

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

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

.btn-warning {
    background-color: var(--warning);
    color: var(--gray-dark);
}

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

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

/* Formulários */
.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-medium);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--gray-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Dashboard Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.stat-icon.primary {
    background-color: rgba(106, 17, 203, 0.15);
    color: var(--primary-color);
}

.stat-icon.success {
    background-color: rgba(40, 167, 69, 0.15);
    color: var(--success);
}

.stat-icon.warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #b38700;
}

.stat-icon.info {
    background-color: rgba(23, 162, 184, 0.15);
    color: var(--info);
}

.stat-content {
    flex-grow: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--gray-medium);
    font-size: 0.9rem;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-border);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.activity-icon.success {
    background-color: rgba(40, 167, 69, 0.15);
    color: var(--success);
}

.activity-icon.warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: var(--warning);
}

.activity-icon.info {
    background-color: rgba(23, 162, 184, 0.15);
    color: var(--info);
}

.activity-content {
    flex-grow: 1;
}

.activity-text {
    margin-bottom: 5px;
}

.activity-time {
    font-size: 0.9rem;
    color: var(--gray-medium);
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}