/* ===============================
   Admin Dashboard
   =============================== */

:root {
  --blue: #007bff;
  --blue-dark: #0056b3;
  --blue-light: #4da3ff;
  --white: #ffffff;
  --bg: #f4f7fb;
  --text: #222;
  --border: #e0e5ec;
  --shadow: rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === SIDEBAR === */
.sidebar {
  width: 230px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 20px 15px;
  box-shadow: 2px 0 10px var(--shadow);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
}

.sidebar h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.sidebar a {
  color: var(--white);
  text-decoration: none;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar a:hover,
.sidebar a.active {
  background: var(--blue-light);
  transform: translateX(4px);
}

/* === MAIN CONTENT === */
.main-content {
  flex: 1;
  margin-left: 230px;
  padding: 25px 30px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 25px;
}

.topbar h1 {
  font-size: 1.3rem;
  color: var(--blue-dark);
}

.topbar a {
  color: var(--blue-dark);
  text-decoration: none;
  font-weight: 600;
  background: #eef4ff;
  padding: 6px 10px;
  border-radius: 5px;
  transition: background 0.2s ease;
}

.topbar a:hover {
  background: var(--blue-light);
  color: var(--white);
}

/* === TABLES === */
.table-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 3px 8px var(--shadow);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--blue);
  color: var(--white);
}

th, td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tbody tr:hover {
  background: #f0f6ff;
}

.actions a {
  text-decoration: none;
  margin-right: 8px;
  color: var(--blue-dark);
  font-weight: 500;
}

.actions a.delete {
  color: #e74c3c;
}

.actions a:hover {
  text-decoration: underline;
}

/* === FORMS === */
form {
  background: var(--white);
  padding: 25px 20px;
  border-radius: 10px;
  box-shadow: 0 3px 8px var(--shadow);
  border: 1px solid var(--border);
  max-width: 600px;
  margin: 0 auto;
}

form h2 {
  text-align: center;
  color: var(--blue-dark);
  margin-bottom: 20px;
}

form label {
  font-weight: 600;
  display: block;
  margin: 10px 0 6px;
  color: #444;
}

form input[type="text"],
form input[type="number"],
form input[type="file"],
form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: #fafafa;
  transition: border-color 0.2s ease;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--blue);
}

form button {
  margin-top: 15px;
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}

form button:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

/* === LOGIN PAGE === */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  background: linear-gradient(120deg, var(--blue-light), var(--blue-dark));
}

.login-box {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  width: 340px;
  text-align: center;
}

.login-box h1 {
  color: var(--blue-dark);
  margin-bottom: 25px;
  font-size: 1.6rem;
}

.login-box input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 1rem;
}

.login-box button {
  width: 100%;
  padding: 10px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease;
}

.login-box button:hover {
  background: var(--blue-dark);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    height: auto;
    box-shadow: none;
  }

  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}


.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.gallery img {
  width: 180px;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #eee;
  transition: transform 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}
