
:root { --sidebar-w: 250px; }

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

body {
  display: flex;
  height: 100vh;
  font-family: "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #222;
  overflow: hidden;
  transition: all 0.3s ease;
}

#app-container {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
  background: #2c3e50; color: #fff;
  width: var(--sidebar-w);
  height: 100vh;
  position: relative;
  flex-shrink: 0;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.08);
  //transition: transform 0.35s ease, opacity 0.25s ease;
  z-index: 3;
}
.sidebar.hidden {
  transform: translateX(-100%);
  opacity: 0;
  position: absolute;
}

.brand {
  padding: 16px; background: #253646;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 700; letter-spacing: .3px;
  white-space: nowrap;
}

.navwrap { overflow-y: auto; flex: 1; }

.sidebar ul { list-style: none; }
.sidebar li {
  padding: 10px 15px; cursor: pointer;
  user-select: none; position: relative; white-space: nowrap;
}
.sidebar li:hover { background: #34495e; }
.sidebar li .caret { float: right; transition: transform 0.2s; }
.sidebar li.open > .caret { transform: rotate(90deg); }
.sidebar ul ul { display: none; background: #34495e; }
.sidebar li.open > ul { display: block; animation: fadeIn 0.25s; }
@keyframes fadeIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }

/* === RIGHT SECTION === */
.right-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100vh;
  width: calc(100% - var(--sidebar-w));
  transition: width 0.3s ease;
}
.sidebar.hidden + .right-section {
  width: 100%;
}

/* === TOPBAR === */
.topbar {
  height: 50px;
  background: #222;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid #111;
  flex-shrink: 0;
}
.menu-left, .menu-right { display: flex; align-items: center; gap: 15px; }
.menu-left i { cursor: pointer; font-size: 1.5em; }

.dropdown { position: relative; cursor: pointer; }
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #333;
  border-radius: 6px;
  overflow: hidden;
  min-width: 180px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 999;
}
.dropdown-content a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
}
.dropdown-content a:hover { background: #444; }
.dropdown.open .dropdown-content { display: block; }

/* === MAIN === */
.main {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f5f5f5;
}

/* === MODAL === */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10000;
  padding-top: 10vh;
}
.modal.show { visibility: visible; opacity: 1; }
.modal-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.modal.large .modal-content {
  width: 90%;
  max-width: 800px;
  height: 60%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.modal.small .modal-content { width: 90%; max-width: 350px; }

/* === AUTH === */
.auth-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-box {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 100%;
  max-width: 350px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.auth-box h2 {
  margin-bottom: 20px;
  text-align: center;
}

.auth-box input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.auth-box button {
  width: 100%;
  padding: 10px;
  background: #2c3e50;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.auth-box button:hover {
  background: #1a252f;
}

.auth-footer {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: #eee;
  color: #555;
}

