/* ================= GLOBAL STYLING ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
}

body {
  background: #0f172a;
  color: #e5e7eb;
  min-height: 100vh;
}

body.dark {
  background: #111827;
}

/* ================= BUTTONS ================= */
button {
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

button:hover {
  opacity: 0.85;
}

/* Dark mode toggle button */
.dark-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  background: #1e293b;
  color: #38bdf8;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: bold;
}

/* ================= LOGIN / SIGNUP PAGE ================= */
.box {
  background: #1e293b;
  padding: 40px 30px;
  border-radius: 16px;
  width: 350px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  margin: auto;
  margin-top: 50px;
}

.box h2 {
  margin-bottom: 25px;
  color: #38bdf8;
  font-size: 24px;
}

input {
  width: 100%;
  padding: 12px 15px;
  margin: 10px 0;
  border: none;
  border-radius: 10px;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 15px;
}

input::placeholder {
  color: #94a3b8;
}

button {
  width: 100%;
  padding: 12px;
  margin: 12px 0;
  background: #38bdf8;
  color: #0f172a;
  font-size: 16px;
}

button:hover {
  background: #22d3ee;
}

/* ================= DASHBOARD LAYOUT ================= */
.dashboard {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 230px;
  background: #020617;
  padding: 25px;
  flex-shrink: 0;
}

.sidebar h2 {
  margin-bottom: 30px;
  color: #38bdf8;
}

.sidebar a {
  display: block;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  color: #cbd5f5;
  text-decoration: none;
  cursor: pointer;
}

.sidebar a:hover,
.sidebar .active {
  background: #1e293b;
  color: #38bdf8;
}

/* Main content */
.main {
  flex: 1;
  padding: 30px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 26px;
}

header span {
  color: #94a3b8;
}

/* Stat cards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: #020617;
  padding: 25px;
  border-radius: 14px;
  text-align: center;
}

.card h3 {
  font-size: 14px;
  color: #94a3b8;
}

.card p {
  font-size: 28px;
  margin-top: 10px;
  color: #38bdf8;
}

/* Panels */
.panel {
  background: #020617;
  padding: 25px;
  border-radius: 14px;
  margin-bottom: 25px;
}

.panel h3 {
  margin-bottom: 15px;
}

/* Lists inside panels */
#users p,
#visits p {
  padding: 10px;
  border-bottom: 1px solid #1e293b;
}

#users button {
  float: right;
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main {
    padding: 20px;
  }
}

@media(max-width: 400px){
  .box {
    width: 90%;
    padding: 30px 20px;
  }

  button, input {
    font-size: 14px;
  }
}
