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

body {
  font-family: Arial, sans-serif;
  background: #FFFFFF;
  color: #3D2817;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #D4C7B5; border-radius: 2px; }
::selection { background: #C2754C; color: white; }

/* ─── Layout ─── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 220px;
  background: #FFFFFF;
  border-right: 1px solid #E5DCC9;
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  z-index: 50;
}

.sidebar-logo {
  font-size: 24px;
  font-weight: 900;
  color: #C2754C;
  padding: 6px 10px;
  margin-bottom: 28px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  color: #8A6F4A;
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  transition: all 0.15s;
  margin-bottom: 4px;
}
.nav-item:hover { color: #C2754C; background: rgba(194,117,76,0.07); }
.nav-item.active { color: #C2754C; background: rgba(194,117,76,0.1); font-weight: 800; }

.sidebar-footer {
  margin-top: auto;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #FAF6EF;
  border: 1px solid #E5DCC9;
  border-radius: 14px;
  margin-top: 14px;
}

.main-content {
  margin-left: 220px;
  padding: 28px 24px 80px;
  flex: 1;
  max-width: 100%;
}

/* ─── Bottom nav mobile ─── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #FFFFFF;
  border-top: 1px solid #E5DCC9;
  z-index: 50;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 0;
  color: #6B5234;
  text-decoration: none;
  font-size: 10px;
  font-weight: 400;
}
.bottom-nav a.active { color: #C2754C; font-weight: 800; }
.bottom-nav .nav-icon { font-size: 22px; }

/* ─── Cards ─── */
.card {
  background: #FAF6EF;
  border: 1px solid #E5DCC9;
  border-radius: 22px;
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: rgba(194,117,76,0.3); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-decoration: none;
  font-family: Arial, sans-serif;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #C2754C; color: white; box-shadow: 0 8px 24px rgba(194,117,76,0.3); }
.btn-primary:hover:not(:disabled) { background: #A35C36; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: #C2754C; border: 2px solid #C2754C; }
.btn-secondary:hover { background: rgba(194,117,76,0.08); }
.btn-ghost { background: transparent; color: #8A6F4A; border: 1px solid #E5DCC9; }
.btn-ghost:hover { border-color: #C2754C; color: #C2754C; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ─── Inputs ─── */
.input {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #D4C7B5;
  border-radius: 12px;
  padding: 14px 16px;
  color: #3D2817;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: Arial, sans-serif;
}
.input:focus { border-color: #C2754C; box-shadow: 0 0 0 3px rgba(194,117,76,0.12); }
.input::placeholder { color: #8A6F4A; }
.input-label { font-size: 13px; color: #8A6F4A; display: block; margin-bottom: 6px; }

/* ─── Avatar ─── */
.avatar {
  border-radius: 50%;
  background: #C2754C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Badge ─── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-pink { background: rgba(194,117,76,0.15); color: #D88A66; border: 1px solid rgba(194,117,76,0.4); }
.badge-green { background: rgba(74,122,82,0.15); color: #4A7A52; border: 1px solid rgba(74,122,82,0.4); }
.badge-orange { background: rgba(201,148,62,0.15); color: #C9943E; border: 1px solid rgba(201,148,62,0.4); }

/* ─── Alert ─── */
.alert {
  display: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error { background: rgba(181,72,47,0.1); border: 1px solid rgba(181,72,47,0.3); color: #B5482F; }
.alert-success { background: rgba(74,122,82,0.1); border: 1px solid rgba(74,122,82,0.3); color: #4A7A52; }

/* ─── Auth pages ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, rgba(194,117,76,0.2), transparent 50%), #FFFFFF;
}
.auth-box { width: 100%; max-width: 400px; }
.auth-logo { font-size: 40px; font-weight: 900; color: #C2754C; text-align: center; margin-bottom: 8px; }
.auth-sub { color: #8A6F4A; font-size: 15px; text-align: center; margin-bottom: 32px; }

/* ─── Divider ─── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #8A6F4A;
  font-size: 13px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5DCC9;
}

/* ─── Spinner ─── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid #C2754C;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease forwards; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding-bottom: 90px; }
  .bottom-nav { display: flex; }
}
