/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: #f4f4f4;
  color: #333;
}

/* ===== Layout ===== */
.dashboard {
  display: flex;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 220px;
  background-color: #111;
  color: #fff;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 2px solid #222;
  position: fixed;
  /* overflow-y: auto; */
  top: 0;
  bottom: 0;
}

/* Logo */
.sidebar .logo {
  text-align: center;
  margin-bottom: 20px;
}
.sidebar .logo img {
  max-width: 100px;
  border-radius: 6px;
}

/* Dropdown container */
.dropdown {
  position: relative;
}

/* Dropdown button */
.dropdown-button {
  background: none;
  border: none;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  font-size: 15px;
  color: #ddd;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.dropdown-button:hover,
.dropdown-button:focus {
  background-color: #222;
  color: #fff;
}

/* Anchor inside button */
.dropdown-button a {
  color: inherit;
  text-decoration: none;
}

/* Dropdown menu (sub-items) */
.dropdown-content {
  display: none;
  position: absolute;   /* position relative to .dropdown */
  top: 0;               /* align top with button */
  left: 50%;           /* sit immediately to the right */
  background-color: #222;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
  min-width: 160px;
  z-index: 10;
}

/* Show on hover */
.dropdown:hover > .dropdown-content {
  display: flex;
}

/* Dropdown links */
.dropdown-content a {
  padding: 10px 20px;
  font-size: 14px;
  color: #ccc;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.dropdown-content a:hover {
  background-color: #333;
  color: #fff;
}

/* ===== Main Panel ===== */
.admin-dash {
  margin-left: 220px;         /* matches sidebar width */
  display: flex;
  flex-direction: column;
  /* padding: 30px; */
  background: #f8f9fa;
  min-height: 100vh;
  width: calc(100% - 220px); /* 👈 ensures full remaining width */
}


/* ===== Header Bar ===== */
.header-overlay {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111111;
  padding: 15px 25px;
  color: #ddd;
  /* border-radius: 8px; */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  /* margin-bottom: 4px; */
}

.page-heading {
  font-size: 24px;
  font-weight: bold;
  /* color: #333; */
}

.header-overlay button {
  background-color: #ff3c00;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.header-overlay button:hover {
  background-color: #e63600;
}

/* ===== Content Frame ===== */
.frameitem {
  background-color: #fff;
  /* border-radius: 8px; */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex: 1;
  width: 100%; /* 👈 full width of admin-dash */
  display: flex;
  flex-direction: column;
  background-image: url("https://images.unsplash.com/photo-1579027989536-b7b1f875659b?q=80&w=870&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
  background-repeat: no-repeat;
  background-size: cover;
}

.frameitem .divfile
{
  margin-top: 5%;
}

/* ===== Utility ===== */
.show {
  display: flex !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
    padding: 10px 0;
  }
  .sidebar .dropdown-button {
    justify-content: center;
    padding: 12px 0;
  }
  .dropdown-button a,
  .dropdown-button i {
    margin: 0 auto;
  }
  .admin-dash {
    margin-left: 60px;
    padding: 20px;
  }
  .header-overlay {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .dropdown-content {
    left: 60px; /* shift dropdown to follow collapsed sidebar */
  }
}
