/* styles.css — chicana.codes_xx
   Wide sidebar (C) + profile + high-contrast dark mode
   Palette: cream, rose, deep red, soft purple
*/

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html,body { height: 100%; }

/* Variables */
:root{
  --cream: #fff5e4;
  --rose: #ff69b4;
  --deep: #e63946;
  --soft-purple: #d4a5ff;
  --card-radius: 1.25rem;
  --sidebar-width: 360px;
  --text-dark: #1f1f1f;
  --muted: #6b6b6b;
}

/* Base */
body{
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing:antialiased;
  transition: background .35s ease, color .35s ease;
  min-height: 100vh;
  display: flex;
  gap: 24px;
}

/* SIDEBAR */
#sidebar{
  width: var(--sidebar-width);
  min-width: 260px;
  background: linear-gradient(180deg, #fffafa, #fff5f0);
  border-radius: 20px;
  padding: 22px;
  margin: 18px;
  box-shadow: 0 18px 50px rgba(31,31,31,0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  overflow: auto;
}

/* Sidebar collapse */
#sidebar.collapsed{
  width: 76px;
  min-width: 76px;
  padding: 14px 10px;
}
.collapse-toggle{
  align-self: flex-end;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--muted);
}

/* Profile */
.profile{
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile img{
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  border: 3px solid rgba(255,105,180,0.12);
}
#sidebar.collapsed .profile img { width: 44px; height: 44px; border-radius: 10px; }
.profile .meta { display: flex; flex-direction: column; gap: 4px; }
.profile .name { font-weight: 700; color: var(--deep); font-size: 1.05rem; }
.profile .email { font-size: 0.85rem; color: var(--muted); }

/* Sign-in / profile buttons */
.auth-actions{ display:flex; gap:8px; margin-top:6px; }
.small-btn{
  padding: 8px 10px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(90deg,var(--rose),var(--deep));
  color: white;
  font-size: 0.85rem;
}
.small-btn.ghost{
  background: transparent;
  color: var(--deep);
  border: 1px solid rgba(31,31,31,0.06);
}

/* Nav */
.sidebar-nav{ margin-top: 6px; display:flex; flex-direction: column; gap:8px; }
.sidebar-nav a{
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-dark);
  font-weight: 600;
  display:flex; align-items:center; gap:12px;
  transition: background .16s ease, transform .12s ease;
}
.sidebar-nav a:hover{ background: rgba(226,57,70,0.06); transform: translateX(2px); color: var(--deep); }
.sidebar-nav a.active{ background: linear-gradient(90deg,var(--soft-purple),var(--rose)); color: white; box-shadow: 0 10px 30px rgba(226,57,70,0.12); }

/* Sidebar footer */
.sidebar-footer{ margin-top: auto; font-size: 0.85rem; color: var(--muted); }

/* MAIN content */
.main-wrap{
  flex: 1;
  margin: 18px;
  min-width: 0;
}
.header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.header .title{
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  color: var(--deep);
}
.header .sub { color:var(--muted); font-size: .95rem; }

/* content card */
.card{
  background: white;
  border-radius: var(--card-radius);
  padding: 22px;
  box-shadow: 0 12px 40px rgba(31,31,31,0.06);
  margin-bottom: 18px;
}

/* Buttons & links */
.btn{
  display:inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg,var(--rose),var(--deep));
  color: white;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn.outline{ background: transparent; color: var(--deep); border: 2px solid rgba(31,31,31,0.06); }

/* grid utilities */
.grid-3{ display:grid; grid-template-columns: repeat(3,1fr); gap:18px; }
.grid-2{ display:grid; grid-template-columns: repeat(2,1fr); gap:18px; }

/* Mobile top menu fallback (when sidebar collapses or mobile) */
.mobile-top{
  display: none;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.mobile-top .menu-left{ display:flex; gap:8px; align-items:center; }

/* Toggle + menu buttons (floating) */
#toggle-mode{
  position: fixed;
  left: calc(var(--sidebar-width) + 28px);
  top: 20px;
  z-index: 1200;
  border: none;
  background: linear-gradient(90deg,var(--rose),var(--deep));
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight:700;
  box-shadow: 0 12px 30px rgba(226,57,70,0.12);
  cursor: pointer;
}
#toggle-mode.compact{ left: 98px; } /* when sidebar collapsed */

/* SIGN IN modal */
.modal-backdrop{
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display:none; align-items:center; justify-content:center; z-index:1300;
}
.modal-backdrop.open{ display:flex; }
.modal{
  width: min(520px, 94%);
  background: white; border-radius: 16px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.modal h3{ margin-bottom: 8px; color: var(--deep); font-size: 1.2rem; }

/* Inputs */
.input, input[type="text"], input[type="email"], input[type="url"]{
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #eee; font-size: 1rem; margin-bottom: 10px;
}

/* Back link shown on inner pages */
.back-link{
  display: inline-flex; gap:8px; align-items:center; text-decoration:none; color:var(--muted); font-weight:700;
  background: transparent; border-radius: 999px; padding:8px 12px;
}
.back-link:hover{ color: var(--deep); }

/* FOOTER small */
.footer-small{ color:var(--muted); font-size:0.9rem; margin-top: 10px; }

/* DARK MODE */
body.dark-mode{
  background: linear-gradient(180deg,#070707,#0f0f0f);
  color: #f6efe8;
}
body.dark-mode #sidebar{
  background: linear-gradient(180deg,#111214,#151516);
  box-shadow: 0 18px 70px rgba(0,0,0,0.6);
}
body.dark-mode .profile .name{ color: #ffdfe8; }
body.dark-mode .profile .email{ color: #d6cfc7; }
body.dark-mode .card{ background: #151515; box-shadow: 0 12px 44px rgba(0,0,0,0.6); color: #f6efe8; }
body.dark-mode .sidebar-nav a{ color: #f6efe8; }
body.dark-mode .sidebar-nav a:hover{ background: rgba(255,105,180,0.06); color: #ffdfe8; }
body.dark-mode .sidebar-nav a.active{ background: linear-gradient(90deg,#6b3b6c,#ff69b4); color: white; }
body.dark-mode #toggle-mode{ background: linear-gradient(90deg,#8b6ecf,#444); color: white; }

/* Responsiveness */
@media (max-width: 980px){
  #sidebar{ position: relative; width: 100%; height: auto; margin: 12px; border-radius: 14px; display:flex; flex-direction:row; gap:12px; align-items:center; padding:12px; overflow: visible; }
  #sidebar.collapsed{ width: 100%; }
  .profile{ gap: 10px; }
  .profile img{ width: 56px; height:56px; }
  .main-wrap{ margin: 12px; }
  #toggle-mode{ left: 18px; top: 86px; position: fixed; }
  .mobile-top{ display:flex; }
}

/* Small devices */
@media (max-width: 640px){
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  #sidebar{ padding: 10px; gap: 10px; }
  .header .title{ font-size: 1.6rem; }
  #toggle-mode{ top: 74px; left: 12px; }
}



  
