/* =====================================================
   INDICE STARTUP — Global Design System
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  /* Blues */
  --blue:    #0F2D6B;
  --blue2:   #2563EB;
  --blue3:   #EFF6FF;
  --blue4:   #1A4DB8;
  /* Purple */
  --purple:  #7C3AED;
  --purple2: #EDE9FE;
  /* Status */
  --green:   #10B981;
  --red:     #EF4444;
  --amber:   #F59E0B;
  --accent:  #F59E0B;
  /* Neutrals */
  --text:    #0F172A;
  --muted:   #64748B;
  --light:   #F8FAFC;
  --border:  #E2E8F0;
  --white:   #FFFFFF;
  /* Typography */
  --font:    'Bricolage Grotesque', sans-serif;
  --font2:   'DM Sans', sans-serif;
  /* Layout */
  --radius:  12px;
  --shadow:  0 2px 12px rgba(15,45,107,0.08);
  --shadow-md: 0 4px 24px rgba(15,45,107,0.12);
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font2); color: var(--text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img, svg { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40% { transform: translateY(-5px); opacity: 1; }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Logo ── */
.logo {
  font-family: var(--font);
  font-weight: 800;
  color: var(--blue);
  font-size: 1rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem;
  flex-shrink: 0;
}

/* ── Buttons ── */
.btn-sm {
  padding: 6px 14px; border-radius: 8px;
  font-size: 0.78rem; font-weight: 600;
  font-family: var(--font2); cursor: pointer;
  text-decoration: none; transition: all 0.2s;
  border: none; display: inline-flex; align-items: center; gap: 4px;
}
.btn-primary   { background: var(--blue);   color: #fff; }
.btn-primary:hover { background: var(--blue2); }
.btn-purple    { background: var(--purple); color: #fff; }
.btn-purple:hover  { opacity: 0.88; }
.btn-outline   { background: var(--white); border: 1.5px solid var(--border); color: var(--muted); }
.btn-outline:hover { border-color: var(--blue2); color: var(--blue2); }
.btn-danger    { background: #FEF2F2; border: 1px solid #FECACA; color: var(--red); }
.btn-success   { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.btn-amber     { background: var(--amber); color: #fff; }
.lang-btn, .lang-switch {
  font-size: 0.75rem; color: var(--muted); cursor: pointer;
  border: 1px solid var(--border); padding: 4px 10px;
  border-radius: 20px; background: none; font-family: var(--font2);
}

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.card-title {
  font-family: var(--font); font-size: 0.88rem;
  font-weight: 700; margin-bottom: 14px;
}

/* ── Badges ── */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-blue   { background: var(--blue3);  color: var(--blue2); }
.badge-green  { background: #D1FAE5;       color: var(--green); }
.badge-red    { background: #FEE2E2;       color: var(--red); }
.badge-amber  { background: #FEF3C7;       color: var(--amber); }
.badge-purple { background: var(--purple2); color: var(--purple); }

/* ── Spinner ── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--blue2);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
/* pulse variant used by some pages */
.skeleton-pulse { animation: pulse 1.5s infinite; }

/* ── Alert / Error ── */
.alert {
  padding: 10px 14px; border-radius: 8px;
  font-size: 0.78rem; margin-bottom: 10px; display: none;
}
.alert-ok  { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.alert-err { background: #FEF2F2; border: 1px solid #FECACA; color: var(--red); }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px; color: var(--muted); font-size: 0.85rem; }
.empty-icon  { font-size: 2.5rem; margin-bottom: 12px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: 20px;
  padding: 24px; width: 100%; max-width: 700px;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-close {
  float: right; background: none; border: none;
  font-size: 1.2rem; cursor: pointer; color: var(--muted);
}

/* ── Typing dots ── */
.dots { display: flex; gap: 4px; padding: 4px 0; }
.dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
  animation: bounce 1.2s infinite;
}
.dots span:nth-child(2) { animation-delay: .15s; }
.dots span:nth-child(3) { animation-delay: .3s; }

/* ── Hamburger button ── */
.hamburger {
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--light);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
}

/* ── Mobile drawer overlay ── */
.drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 400;
  backdrop-filter: blur(2px);
}
.drawer-overlay.open { display: block; }

/* ── Slide-in nav drawer ── */
.nav-drawer {
  position: fixed;
  top: 0; left: -300px;
  width: 272px; height: 100%;
  background: var(--white);
  z-index: 401;
  box-shadow: 4px 0 32px rgba(0,0,0,.15);
  transition: left .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.nav-drawer.open { left: 0; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-logo {
  font-family: var(--font);
  font-weight: 800;
  font-size: 1rem;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--light);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 1rem;
  color: var(--muted);
  font-family: var(--font2);
}
.drawer-nav {
  padding: 10px;
  flex: 1;
}
.drawer-nav a,
.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background .15s;
  margin-bottom: 2px;
  text-decoration: none;
  font-family: var(--font2);
}
.drawer-nav a:hover,
.drawer-item:hover {
  background: var(--blue3);
  color: var(--blue2);
}
.drawer-nav a.active,
.drawer-item.active {
  background: var(--blue3);
  color: var(--blue2);
}
.drawer-nav a.idea-link.active,
.drawer-item.idea-link.active {
  background: var(--purple2);
  color: var(--purple);
}
.drawer-section {
  font-size: .625rem;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 12px 14px 4px;
}
.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 14px;
}

/* ── Utility classes ── */
.hide-mobile { }   /* populated below */
.show-mobile { display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hamburger  { display: flex; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: block !important; }
}

@media (max-width: 480px) {
  .stack-sm  { flex-direction: column !important; }
  .full-sm   { width: 100% !important; }
  .hide-xs   { display: none !important; }
}
