@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

body {
    background: #f4f6fa;
    font-family: 'Montserrat', Arial, sans-serif;
    color: #222;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.dashboard-sidebar {
    width: 250px;
    background: #22223b;
    color: #fff;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
}

.dashboard-main {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    background: #f4f6fa;
    min-height: 100vh;
}

.sidebar-logo {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dashboard-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-menu li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.dashboard-menu li a:hover,
.dashboard-menu li a.active {
    background: rgba(255,255,255,0.1);
    border-left-color: #2563eb;
}

.container-fluid {
    padding: 0 1.5rem;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background: #22223b;
    color: #fff;
    font-weight: 500;
    border: none;
}

.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.bg-danger {
    background: #000000;
}

@media (max-width: 768px) {
    .dashboard-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .dashboard-main {
        margin-left: 0;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
}

.dashboard-content, .card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    padding: 32px 32px;
    margin-bottom: 32px;
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    margin-top: 0;
}

.btn, .btn-primary, .btn-success, .btn-warning, .btn-danger {
    display: inline-block;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    margin-right: 6px;
    margin-bottom: 4px;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}
.btn-primary:hover {
    background: #1746a2;
}
.btn-success {
    background: #22c55e;
    color: #fff;
}
.btn-success:hover {
    background: #15803d;
}
.btn-warning {
    background: #fbbf24;
    color: #fff;
}
.btn-warning:hover {
    background: #b45309;
}
.btn-danger {
    background: #000000;
    color: #fff;
}
.btn-danger:hover {
    background: #ff6d2a;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 24px;
    font-size: 1rem;
}

th, td {
    padding: 14px 12px;
    text-align: left;
}

th {
    background: #22223b;
    color: #fff;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

tr:nth-child(even) {
    background: #f8fafc;
}

tr:hover {
    background: #e0e7ff;
}

.form-label {
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

.form-control, .form-select, textarea {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    padding: 10px 12px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
    background: #f9fafb;
    transition: border 0.2s;
}

.form-control:focus, .form-select:focus, textarea:focus {
    border: 1.5px solid #2563eb;
    outline: none;
    background: #fff;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

@media (max-width: 900px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        flex-direction: row;
        border-bottom: 1px solid #393963;
        box-shadow: none;
    }
    .dashboard-menu {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
    }
    .dashboard-menu li a {
        padding: 12px 16px;
        font-size: 1rem;
        border-left: none;
        border-bottom: 4px solid transparent;
    }
    .dashboard-menu li a.active,
    .dashboard-menu li a:hover {
        border-bottom: 4px solid #fbbf24;
        background: #2563eb;
    }
    .dashboard-main-area {
        padding: 20px 0;
    }
}

@media (max-width: 600px) {
    .dashboard-content, .card {
        padding: 8px 2px;
    }
    .dashboard-menu {
        flex-direction: column;
        gap: 8px;
        padding: 0 2px;
    }
    th, td {
        padding: 8px 4px;
    }
}

/* Estilos para submenu */
.has-submenu {
    position: relative;
}

.has-submenu .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.has-submenu .submenu-toggle::after {
    content: '▼';
    font-size: 0.7em;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.has-submenu.active .submenu-toggle::after {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0,0,0,0.1);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.has-submenu.active .submenu {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.submenu li a {
    padding-left: 3rem !important;
    font-size: 0.9rem !important;
    opacity: 0.9;
}

.submenu li a:hover {
    opacity: 1;
}

/* Ajuste responsivo para submenu */
@media (max-width: 768px) {
    .submenu {
        position: static;
        background: rgba(0,0,0,0.1);
    }
    
    .submenu li a {
        padding-left: 2rem !important;
    }
}