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

html,
body {
  height: 100%;
  font-family: "Inter", sans-serif;
  color: #333;
}

input,
button {
  font-family: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

body {
  background-color: #f8fafc;
  color: #334155;
  line-height: 1.5;
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background-color: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.sidebar-close-btn {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #6b7280;
  z-index: 1003;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  color: #374151;
  background-color: #f3f4f6;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.logo img {
  max-height: 32px;
  margin-bottom: 16px;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background-color: #f9fafb;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section h3 {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 24px 8px 24px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 8px 24px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.nav-item.active {
  background-color: #3b82f6;
  color: #ffffff;
}

.nav-item svg {
  margin-right: 12px;
  width: 16px;
  height: 16px;
}

.nav-subitems {
  margin-left: 24px;
  border-left: 1px solid #e2e8f0;
}

.nav-subitem {
  display: block;
  padding: 6px 24px;
  color: #6b7280;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease;
}

.nav-subitem:hover {
  color: #374151;
}

.nav-subitem:before {
  content: "•";
  margin-right: 8px;
}

.sidebar-footer {
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
}

.user-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  margin-top: 16px;
}

.profile-info {
  display: flex;
  align-items: center;
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 12px;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-details {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
}

.profile-email {
  font-size: 12px;
  color: #6b7280;
}

.logout-btn {
  padding: 6px;
  color: #6b7280;
  transition: color 0.2s ease;
}

.logout-btn:hover {
  color: #ef4444;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-header {
  padding: 24px 32px 16px 32px;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.hamburger-menu {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #374151;
  position: absolute;
  top: 24px;
  left: 32px;
  z-index: 1001;
}

.hamburger-menu:hover {
  color: #3b82f6;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #6b7280;
}

.breadcrumb span:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: #d1d5db;
}

.breadcrumb .active {
  color: #3b82f6;
}

.page-title {
  font-size: 28px;
  font-weight: 600;
  color: #1e293b;
}

.page-content {
  flex: 1;
  padding: 32px;
}

.messages {
  margin-bottom: 24px;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  border: 1px solid transparent;
}

.alert-success {
  background-color: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.alert-error {
  background-color: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

@media (max-width: 768px) {
  .dashboard-layout {
    position: relative;
  }
  .hamburger-menu {
    display: block;
  }
  .page-header {
    padding-left: 120px;
  }
  .hamburger-menu {
    left: 80px;
    top: 32px;
  }
  .sidebar {
    width: 72px;
    overflow: visible;
    position: relative;
    z-index: 1000;
  }
  .sidebar .search-box,
  .sidebar .nav-section h3,
  .sidebar .nav-item span,
  .sidebar .nav-subitems,
  .sidebar .profile-details {
    display: none;
  }
  .sidebar .logo {
    text-align: center;
  }
  .sidebar .logo img {
    max-height: 28px;
    margin-bottom: 0;
  }
  .sidebar-header {
    padding: 24px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
  }
  .sidebar .nav-item {
    padding: 16px 12px;
    justify-content: center;
    margin-bottom: 4px;
    border-radius: 8px;
    margin-left: 12px;
    margin-right: 12px;
  }
  .sidebar .nav-item svg {
    margin-right: 0;
    width: 20px;
    height: 20px;
  }
  .sidebar .user-profile {
    padding: 16px 12px;
    justify-content: center;
    margin-top: 16px;
  }
  .sidebar .profile-avatar {
    margin-right: 0;
    width: 36px;
    height: 36px;
  }
  .sidebar .logout-btn {
    display: none;
  }
  .sidebar.sidebar-expanded {
    width: 280px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1002;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  .sidebar.sidebar-expanded .logo img,
  .sidebar.sidebar-expanded .search-box,
  .sidebar.sidebar-expanded .nav-section h3,
  .sidebar.sidebar-expanded .nav-item span,
  .sidebar.sidebar-expanded .nav-subitems,
  .sidebar.sidebar-expanded .profile-details {
    display: block;
  }
  .sidebar.sidebar-expanded .logo {
    text-align: left;
  }
  .sidebar.sidebar-expanded .logo img {
    max-height: 32px;
    margin-bottom: 16px;
  }
  .sidebar.sidebar-expanded .profile-details {
    display: flex;
    flex-direction: column;
  }
  .sidebar.sidebar-expanded .sidebar-header {
    padding: 24px;
    display: block;
  }
  .sidebar.sidebar-expanded .nav-item {
    padding: 8px 24px;
    justify-content: flex-start;
    margin-bottom: 0;
  }
  .sidebar.sidebar-expanded .nav-item svg {
    margin-right: 12px;
  }
  .sidebar.sidebar-expanded .user-profile {
    padding: 12px 24px;
    justify-content: space-between;
  }
  .sidebar.sidebar-expanded .profile-avatar {
    margin-right: 12px;
    width: 32px;
    height: 32px;
  }
  .sidebar.sidebar-expanded .sidebar-close-btn,
  .sidebar.sidebar-expanded .logout-btn {
    display: block;
  }
}

@media (max-width: 480px) {
  .dashboard-layout {
    position: relative;
  }
  .hamburger-menu {
    display: block;
    left: 16px;
    top: 16px;
  }
  .sidebar {
    width: 280px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.sidebar-expanded {
    transform: translateX(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  .page-header {
    padding: 16px 16px 12px 56px;
  }
  .page-content {
    padding: 16px;
  }
  .page-title {
    font-size: 24px;
  }
  .sidebar .logo img,
  .sidebar .search-box,
  .sidebar .nav-section h3,
  .sidebar .nav-item span,
  .sidebar .nav-subitems,
  .sidebar .profile-details {
    display: block;
  }
  .sidebar .profile-details {
    display: flex;
    flex-direction: column;
  }
  .sidebar .sidebar-header {
    padding: 24px;
    display: block;
  }
  .sidebar .logo {
    text-align: left;
  }
  .sidebar .logo img {
    max-height: 32px;
    margin-bottom: 16px;
  }
  .sidebar .nav-item {
    padding: 8px 24px;
    justify-content: flex-start;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
  }
  .sidebar .nav-item svg {
    margin-right: 12px;
    width: 16px;
    height: 16px;
  }
  .sidebar .user-profile {
    padding: 12px 24px;
    justify-content: space-between;
    margin-top: 16px;
  }
  .sidebar .profile-avatar {
    margin-right: 12px;
    width: 32px;
    height: 32px;
  }
  .sidebar .logout-btn {
    display: block;
  }
  .dashboard-layout.sidebar-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
  }
  .main-content {
    margin-left: 0;
  }
}
