* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  color: #333;
}

/* Navbar */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5f5;
  padding: 10px 20px;
  border-bottom: 1px solid #ddd;
}

header .left {
  display: flex;
  align-items: center;
  gap: 10px;
}

header .title {
  font-size: 18px;
  font-weight: bold;
}

header a {
  text-decoration: none;
  color: #333;
}

#toggle-sidebar {
  font-size: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
}

#toggle-sidebar:hover {
  background: #eaeaea;
  border-radius: 4px;
}

/* Main Layout */
main {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* Sidebar */
aside {
  width: 200px;
  background: #fafafa;
  border-right: 1px solid #ddd;
  padding: 20px 0;
  transition: all 0.3s ease;
}

aside ul {
  list-style: none;
}

aside li {
  padding: 10px 20px;
}

aside li:hover {
  background: #eee;
  cursor: pointer;
}

/* Hide sidebar (desktop toggle) */
aside.hidden {
  width: 0;
  opacity: 0;
  overflow: hidden;
  border: none;
}

/* Content Area */
section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: all 0.3s ease;
}

section.fullwidth {
  width: 100%;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.content-header h2 {
  font-size: 20px;
}

.content-header button {
  padding: 6px 12px;
  border: 1px solid #333;
  background: #fff;
  cursor: pointer;
}

.content-header button:hover {
  background: #f0f0f0;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5f5;
  padding: 10px 20px;
  border-top: 1px solid #ddd;
  font-size: 14px;
}

/* ===== Responsive Mode (below 768px) ===== */
@media (max-width: 768px) {
  main {
    position: relative;
  }

  aside {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    opacity: 0;
    overflow: hidden;
    border-right: none;
    background: #fafafa;
    z-index: 10;
  }

  aside.show {
    width: 100%;
    opacity: 1;
    border-right: 1px solid #ddd;
  }

  section {
    width: 100%;
  }

  section.hide {
    display: none;
  }
}
