/* =====================
   GLOBAL RESET & FONT
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

body {
  background: #f5f5f5;
  color: #333;
}

/* =====================
   CONTAINER
===================== */
.container {
  max-width: 450px;
  margin: 40px auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  padding-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* =====================
   HEADER
===================== */
.header {
  background: linear-gradient(to bottom, #1565c0, #1e88e5);
  padding: 30px 20px;
  color: white;
  border-bottom-left-radius: 25px;
  border-bottom-right-radius: 25px;
  text-align: center;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.top-bar button {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.tabs {
  display: flex;
  margin-top: 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  overflow: hidden;
}

.tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.tab.active {
  background: white;
  color: #1565c0;
}

/* =====================
   FORM
===================== */
.form {
  padding: 20px;
}

input {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  margin-bottom: 15px;
  font-size: 14px;
}

.password-box {
  position: relative;
}

.password-box span {
  position: absolute;
  right: 12px;
  top: 14px;
  cursor: pointer;
  user-select: none;
}

.row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 15px;
}

.row a {
  color: #1565c0;
  text-decoration: none;
  transition: 0.3s;
}

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

.btn {
  width: 100%;
  background: #1565c0;
  color: white;
  padding: 15px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.btn:hover {
  background: #0d47a1;
}

/* =====================
   QUICK LOGIN
===================== */
.quick-login {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0f0f0;
  padding: 10px;
  border-radius: 10px;
  margin-top: 15px;
}

.user {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  background: #bbdefb;
  padding: 10px;
  border-radius: 50%;
  font-size: 18px;
}

/* =====================
   SOCIAL BUTTONS
===================== */
.social {
  display: flex;
  gap: 10px;
  padding: 20px;
}

.social button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.google { background: white; border: 1px solid #ddd; }
.google:hover { opacity: 0.9; }

.apple { background: black; color: white; }
.apple:hover { opacity: 0.9; }

.facebook { background: #1877f2; color: white; }
.facebook:hover { opacity: 0.9; }

/* =====================
   STATS
===================== */
.stats {
  display: flex;
  justify-content: space-around;
  background: #f0f0f0;
  padding: 15px;
  border-radius: 10px;
  margin: 10px 20px;
}

.stats div {
  text-align: center;
}

.stats small {
  display: block;
  color: gray;
}

/* =====================
   FOOTER
===================== */
.footer {
  text-align: center;
  padding: 15px;
}

.footer a, .footer span {
  color: #1565c0;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
}

.footer a:hover, .footer span:hover {
  text-decoration: underline;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 400px) {
  .container {
    margin: 10px;
    border-radius: 8px;
  }

  .form input, .btn {
    padding: 12px;
    font-size: 14px;
  }

  .header {
    padding: 20px 15px;
  }

  .tabs { margin-top: 15px; }
}

/* =====================
   DASHBOARD
===================== */
.dashboard {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 230px;
  background: #0f172a;
  color: white;
  padding: 20px;
}

.sidebar h2 {
  text-align: center;
  margin-bottom: 30px;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.sidebar li:hover,
.sidebar li.active {
  background: #1565c0;
}

.sidebar .logout {
  background: #ef4444;
}

/* MAIN */
.main {
  flex: 1;
  background: #f5f5f5;
  padding: 20px;
}

.dash-header {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  font-weight: bold;
}

.card p {
  margin-bottom: 10px;
  font-size: 15px;
}

/* =====================
   DARK MODE
===================== */
body.dark {
  background: #020617;
}

body.dark .main {
  background: #020617;
}

body.dark .dash-header,
body.dark .card {
  background: #0f172a;
  color: #e5e7eb;
}

body.dark .sidebar {
  background: #020617;
}

body.dark .sidebar li {
  color: #e5e7eb;
}

body.dark .sidebar li.active,
body.dark .sidebar li:hover {
  background: #2563eb;
}

body.dark .btn {
  background: #2563eb;
}

canvas {
  width: 100%;
  margin-top: 10px;
}