
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Poppins, Arial, sans-serif;
  background: #0f172a;
  color: #fff;
  padding-bottom: 40px;
}

.admin-header {
  background: #111827;
  padding: 18px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}

.admin-header h2 {
  color: #38bdf8;
}

button {
  background: #0284c7;
  color: white;
  border: none;
  padding: 11px 18px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
}

button:hover {
  background: #0369a1;
}

button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.login-box,
.product-form-box,
.products-table-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 25px;
  margin: 25px auto;
  width: 92%;
  max-width: 1100px;
}

.login-box {
  max-width: 400px;
  margin-top: 80px;
}

h2, h3 {
  margin-bottom: 18px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  margin: 7px 0 17px;
  background: #0f172a;
  color: white;
  border: 1px solid #475569;
  border-radius: 6px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #38bdf8;
}

label {
  font-size: 14px;
  color: #cbd5e1;
}

.dashboard-top {
  width: 92%;
  max-width: 1100px;
  margin: 30px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.dashboard-top h2 {
  margin: 0;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

#imagePreview {
  display: block;
  width: 130px;
  max-height: 130px;
  object-fit: contain;
  margin: 10px 0 18px;
  border-radius: 8px;
}

.active-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 20px;
}

.active-label input {
  width: auto;
  margin: 0;
}

.form-buttons {
  display: flex;
  gap: 10px;
}

#cancelBtn {
  background: #475569;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

th, td {
  border-bottom: 1px solid #334155;
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

th {
  color: #38bdf8;
}

td img {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

.edit-btn {
  background: #0d9488;
  margin: 3px;
}

.delete-btn {
  background: #dc2626;
  margin: 3px;
}

#loginMessage,
#formMessage {
  margin-top: 12px;
  color: #fbbf24;
}

@media(max-width: 600px) {
  .two-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .login-box,
  .product-form-box,
  .products-table-box {
    padding: 16px;
    width: 94%;
  }

  .dashboard-top {
    width: 94%;
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-header {
    padding: 15px;
  }
}
