/* --- 1. GLOBAL CONTAINER AND STRUCTURE --- */

.sidebar {
  /* Use a slightly lighter dark grey for a cleaner look */
  background-color: #2c2c2c;
  position: fixed;
  top: 0;
  left: 0;
  width: 250px; /* Increased width for better content display */
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  /* Use a clear drop-shadow for depth instead of just background-color rgba */
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  transition: width 0.3s ease-in-out;
  z-index: 105;
}

/* --- 2. HEADER AND LOGO SECTION --- */

.sidebarheader {
  display: flex;
  flex-direction: column; /* Stack logo and text */
  align-items: center;
  padding: 40px 0 30px 0; /* More top padding for a spacious feel */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Subtle separator */
}

.tek-logo {
  border-radius: 50%;
  object-fit: cover;
  width: 90px; /* Slightly larger logo */
  height: 90px;
  filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.8));
  margin-bottom: 10px;
}

.tek-terrorelharitas-felirat {
  color: #f7b731; /* Brighter gold for better visibility */
  font-weight: 900;
  font-size: 24px; /* Reduced size to be less overwhelming, but kept bold */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  white-space: normal; /* Allow text to wrap if necessary when sidebar is smaller */
  text-align: center;
  line-height: 1.2;
}

/* --- 3. NAVIGATION (MENU) STYLES --- */

.sidebar ul {
  padding: 0; /* Remove default ul padding */
  margin: 0;
}

.sidebar ul li {
  list-style: none;
  margin: 5px 15px; /* Margin around each list item */
}

.sidebar-row {
  color: #e0e0e0; /* Off-white for softer look */
  
  height: auto; /* Let content determine height */
  font-size: 16px; /* Clearer font size */
  display: flex;
  padding: 12px 15px;
  align-items: center;
  border-radius: 8px; /* Modern, softer corners */
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none; /* If using a link tag */
  cursor: pointer;
}

.sidebar-row:hover {
  background-color: rgba(255, 255, 255, 0.1); /* Subtle hover background */
  color: #f7b731; /* Accent color on hover for visual feedback */
  cursor: pointer;
}

/* Style for the active/selected menu item */
.sidebar-row.active {
  background-color: #f7b731;
  color: #1a1a1a;
  font-weight: 700;
}
.sidebar-row.active .sidebar-icon {
  filter: invert(10%) sepia(0%) saturate(100%) hue-rotate(0deg) brightness(100%) contrast(100%); /* Make icon dark on active row */
}

.sidebar-icon {
  filter: invert(90%); /* Light icon on dark background */
  height: 20px; /* Standard icon size */
  width: 20px;
  object-fit: cover;
  margin-right: 15px; /* Space between icon and text */
  transition: filter 0.2s, transform 0.2s;
}

.sidebar-row:hover .sidebar-icon {
  filter: invert(70%) sepia(30%) saturate(1000%) hue-rotate(0deg) brightness(120%) contrast(100%); /* Gold tint on hover */
}

.sidebar-text {
  flex-grow: 1; /* Allows text to take up available space */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- 4. NAVIGATION TOGGLE BUTTON (NAV-BAR) --- */

.nav-bar {
  /* Positioned to be more accessible, outside the header area */
  position: absolute;
  top: 15px;
  right: -20px; /* Position it outside the sidebar edge */
  width: 40px;
  height: 40px;
  border-radius: 50%; /* Circular button */
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.8;
  transition: right 0.3s, opacity 0.3s;
  /* When sidebar collapses, you'd update the 'right' property */
}

.nav-bar:hover {
  background-color: #f7b731; /* Gold background on hover */
  opacity: 1;
}

.nav-arrow {
  filter: invert(100%); /* White arrow */
  height: 20px;
  transition: transform 0.3s;
  /* You will use JavaScript to rotate the arrow when the sidebar is collapsed */
}

.nav-bar:hover .nav-arrow {
  filter: invert(0); /* Dark arrow on gold background */
}

/* --- 5. USER PROFILE (MINIPROFILE) --- */

.miniprofile-panel {
  padding: 10px 15px 5px 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.miniprofile {
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: #3e3e3e; /* Darker background for the profile box */
  margin-bottom: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.miniprofile:hover {
  background-color: #4a4a4a;
}

.miniavatar {
  height: 45px; /* Slightly smaller, integrated look */
  width: 45px;
  object-fit: cover;
  border-radius: 50%; /* Circle avatar */
  margin-right: 15px;
  border: 2px solid #f7b731; /* Gold border for emphasis */
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
}

.profilinfo {
  color: white;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sidebaralnev {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.sidebarrendfokozat {
  font-weight: 400;
  color: #ccc;
  font-size: 11px;
}

/* --- 6. LOGIN/LOGOUT & COPYRIGHT --- */

.button-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column; /* Stack buttons vertically */
  padding: 0 15px 15px 15px;
}

.login-style { /* Assuming this is for input fields */
  width: 100%; /* Full width within padding */
  font-weight: 500;
  border-radius: 5px;
  border: 1px solid #555;
  margin: 5px 0px;
  padding: 8px 10px;
  height: auto;
  box-shadow: none; /* Simplified shadow */
  background-color: #444;
  color: white;
  font-family: inherit; /* Use main font */
}

/* Shared button base style */
.sidebar-button-base {
  width: 100%;
  border-radius: 5px;
  margin: 5px 0px;
  height: 35px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.login-text {
  /* Primary Action Button (Login) */
  @extend .sidebar-button-base; /* Using a pre-processor concept, in raw CSS you'd copy the properties */
  background-color: #f7b731;
  color: #1a1a1a;
  border: none;
}

.login-text:hover {
  background-color: #ffd270;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.login-text:active {
  background-color: #d8a000;
}

.logout-text {
  /* Secondary Action Button (Logout) */
  @extend .sidebar-button-base;
  color: #f7b731;
  background-color: transparent;
  border: 2px solid #f7b731;
}

.logout-text:hover {
  background-color: rgba(247, 183, 49, 0.1); /* Subtle gold background */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.logout-text:active {
  background-color: rgba(247, 183, 49, 0.2);
}

.copyrightdiv {
  color: #888; /* Softer color for footer text */
  font-size: 10px;
  position: absolute;
  bottom: 10px;
  width: 100%; /* Use 100% of parent width */
  text-align: center;
}