/* Ai fi surprins cum a reusit wreeper.com sa faca astea. */
/* N-am sa mint deloc, am mai folosit AI sa ma ajute la frontend dupa ce l-am verificat eu bine rau de tort */

.sidebar {
width: 250px;
height: 100vh;
background-color: var(--bg-sidebar);
position: fixed;
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
z-index: 100;
}

.sidebar-header {
padding: 20px;
text-align: center;
border-bottom: 1px solid var(--border-color);
margin-bottom: 10px;
}

.sidebar-header h2 {
margin: 0;
font-size: 1rem;
color: #888;
letter-spacing: 1px;
}

.sidebar a, .dropdown-btn {
padding: 12px 20px;
text-decoration: none;
font-size: 15px;
color: var(--text-color);
display: flex;
align-items: center;
justify-content: space-between;
transition: all 0.2s ease;
border: none;
background: none;
width: 100%;
cursor: pointer;
text-align: left;
border-left: 3px solid transparent;
outline: none;
}

.sidebar a:not(.sidebar-header a):hover, 
.dropdown-btn:hover {
background-color: var(--hover-bg);
color: var(--text-hover);
border-left: 3px solid #555;
}

.nav-text { display: flex; align-items: center; gap: 15px; }
.icon-width { width: 20px; text-align: center; }

.dropdown-container {
background-color: var(--sub-menu-bg);
max-height: 0;
overflow: hidden;
opacity: 0;
transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.dropdown-container.show {
max-height: 500px;
opacity: 1;
}

.dropdown-container a { padding-left: 58px; font-size: 14px; color: #999; }
.dropdown-container a:hover { color: #fff; padding-left: 63px; }

.fa-chevron-down { transition: transform 0.3s ease; font-size: 12px; }
.dropdown-btn.active .fa-chevron-down { transform: rotate(180deg); }
.dropdown-btn.active { color: #fff; background-color: var(--hover-bg); }

#mobile-toggle {
display: none;
position: fixed;
top: 15px;
left: 15px;
z-index: 1001;
background: var(--bg-sidebar);
color: white;
border: 1px solid var(--border-color);
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
}

#sidebar-overlay {
display: none;
position: fixed;
top: 0; left: 0;
width: 100%; height: 100%;
background: rgba(0,0,0,0.7);
z-index: 99;
}

#sidebar-overlay.show { display: block; }

@media (max-width: 768px) {
#mobile-toggle { display: block; }

body:has(.sidebar.mobile-open) #mobile-toggle {
display: none;
}

.sidebar {
left: -250px;
transition: 0.3s ease;
z-index: 1000;
}

.sidebar.mobile-open {
left: 0;
}

.main-content {
margin-left: 0 !important;
width: 100% !important;
padding: 20px 15px !important;
padding-top: 80px !important;
}

.table-container {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}

table {
min-width: 500px;
}
}
