/* ================= GLOBAL ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f1f5f9;
  color: #0f172a;
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

/* ================= TOPBAR ================= */
.topbar {
  height: 60px;
  background: #0f172a;
  color: white;

  display: flex;
  align-items: center;

  padding: 0 20px;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  z-index: 1000;
}

.logo {
  font-size: 30px;
  margin-left: 15px;
  font-weight: bold;
}

/* ================= BURGER ================= */
.burger {
  background: none;
  border: none;
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;
}

/* ================= SIDEBAR ================= */
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;

  width: 230px;
  height: calc(100vh - 60px);

  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(8px);

  padding: 20px;

  transition: transform 0.3s ease;

  z-index: 999;
}

.sidebar.closed {
  transform: translateX(-230px);
}

/* ================= SIDEBAR ITEMS ================= */
.sidebar a,
.sidebar button {
  width: 100%;

  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 12px;
  padding: 12px;

  border: none;
  border-radius: 10px;

  background: rgba(30, 41, 59, 0.95);
  color: white;

  transition: all 0.25s ease;
}

.sidebar a:hover,
.sidebar button:hover {
  background: #2563eb;
  transform: translateX(4px);
}

.sidebar a.active {
  background: #2563eb;
}

.sidebar i {
  width: 20px;
  height: 20px;
}

/* ================= MAIN CONTENT ================= */
.container {
  margin-left: 230px;
  margin-top: 60px;

  padding: 25px;

  min-height: calc(100vh - 60px);

  transition: margin-left 0.3s ease;
}

.container.full {
  margin-left: 0;
}

/* ================= PAGE TITLE ================= */
.page-title {
  margin-bottom: 20px;
}

/* ================= CARDS ================= */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 20px;

  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.card h3 {
  margin-bottom: 10px;
}

/* ================= FORMS ================= */
.form-group {
  margin-bottom: 12px;
}

input,
select {
  width: 100%;
  max-width: 350px;

  padding: 12px;

  border-radius: 8px;
  border: 1px solid #cbd5e1;

  font-size: 15px;
}

.primary-btn {
  background: #2563eb;
  color: white;

  border: none;
  border-radius: 8px;

  padding: 12px 18px;

  margin-top: 10px;
}

.primary-btn:hover {
  background: #1d4ed8;
}

/* ================= TABLE ================= */
.table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;

  background: white;
  border-radius: 12px;

  overflow: hidden;
}

th {
  background: #e2e8f0;
}

th,
td {
  padding: 14px;
  text-align: left;
}

tr:nth-child(even) {
  background: #f8fafc;
}

/* ================= LOW STOCK ================= */
.low-stock {
  background: #fee2e2 !important;
  color: #b91c1c;
  font-weight: bold;
}
/* ================= EDITING ================= */
.editing {
  background: #f59e0b !important;
}

/* ================= LOGIN ================= */
.auth-page {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 350px;

  background: white;

  padding: 30px;

  border-radius: 14px;

  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.login-container h2 {
  margin-bottom: 20px;
}

.login-container input {
  margin-bottom: 12px;
}

/* ================= DARK MODE ================= */
.dark {
  background: #020617;
  color: white;
}

.dark .card,
.dark table,
.dark .login-container {
  background: #1e293b;
  color: white;
}

.dark th {
  background: #334155;
}

.dark input,
.dark select {
  background: #0f172a;
  color: white;
  border: 1px solid #475569;
}

.dark tr:nth-child(even) {
  background: #273449;
}

/* ================= LANDING PAGE ================= */

.landing-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 20px 40px;

  background: #0f172a;
  color: white;
}

.landing-logo {
  font-size: 28px;
  font-weight: bold;
}

/* HERO */

.hero {
  min-height: 90vh;

  display: flex;
  justify-content: center;
  align-items: center;

  text-align: center;

  padding: 40px;

  background:
    linear-gradient(
      rgba(15,23,42,0.8),
      rgba(15,23,42,0.9)
    ),
    url('https://images.unsplash.com/photo-1553413077-190dd305871c?q=80&w=2070');

  background-size: cover;
  background-position: center;

  color: white;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: 64px;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero p {
  font-size: 20px;
  color: #cbd5e1;
  margin-bottom: 35px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* BUTTONS */

.primary-btn {
  background: #2563eb;
  color: white;
  border: none;

  padding: 14px 24px;

  border-radius: 10px;

  cursor: pointer;

  font-size: 16px;
  font-weight: 600;

  transition: 0.25s;
}

.primary-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.secondary-btn {
  background: transparent;
  color: white;

  border: 2px solid white;

  padding: 14px 24px;

  border-radius: 10px;

  cursor: pointer;

  font-size: 16px;
  font-weight: 600;

  transition: 0.25s;
}

.secondary-btn:hover {
  background: white;
  color: #0f172a;
}

/* FEATURES */

.features-section {
  padding: 80px 40px;
}

.section-title {
  text-align: center;
  font-size: 40px;
  margin-bottom: 50px;
}

.features-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(250px, 1fr));

  gap: 25px;
}

.feature-card {
  background: white;

  padding: 30px;

  border-radius: 18px;

  box-shadow:
    0 4px 15px rgba(0,0,0,0.08);

  transition: 0.25s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card h3 {
  margin-bottom: 12px;
}

/* CTA */

.cta-section {
  background: #0f172a;
  color: white;

  text-align: center;

  padding: 80px 30px;
}

.cta-section h2 {
  font-size: 42px;
  margin-bottom: 20px;
}

.cta-section p {
  color: #cbd5e1;
  margin-bottom: 30px;
}

/* FOOTER */

.footer {
  background: #020617;
  color: #94a3b8;

  text-align: center;

  padding: 20px;
}

/* MOBILE */

@media (max-width: 768px) {

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 18px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .landing-navbar {
    padding: 20px;
  }

}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

  .sidebar {
    transform: translateX(-230px);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .container {
    margin-left: 0;
  }
}
