/* ============================================================
   NewsTRP — Global Design System (Light Mode, Full Responsive)
   India's Social News & Information Platform
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

/* ─── CSS Variables ──────────────────────────────────────── */
:root {
  /* Brand */
  --saffron:       #E85D04;
  --saffron-light: #F48C42;
  --saffron-dark:  #C44B00;
  --saffron-glow:  rgba(232, 93, 4, 0.15);
  --india-green:   #138808;
  --india-green-light: #1aa30e;
  --navy:          #0A0070;

  /* Backgrounds */
  --bg-primary:   #F5F5FA;
  --bg-secondary: #FFFFFF;
  --bg-card:      #FFFFFF;
  --bg-card-hover:#FAFAFA;
  --bg-glass:     rgba(255,255,255,0.95);
  --bg-glass-light:rgba(232,93,4,0.04);
  --bg-sidebar:   #FAFAFA;
  --bg-input:     #EDEDF5;

  /* Text */
  --text-primary:   #18181E;
  --text-secondary: #42424E;
  --text-muted:     #8888A2;
  --text-accent:    #E85D04;

  /* Borders */
  --border:       rgba(0,0,0,0.08);
  --border-accent:rgba(232,93,4,0.30);
  --border-card:  rgba(0,0,0,0.07);

  /* Gradients */
  --grad-saffron: linear-gradient(135deg,#E85D04,#F48C42);
  --grad-tricolor:linear-gradient(90deg,#E85D04 0%,#FFFFFF 50%,#138808 100%);
  --grad-hero:    linear-gradient(135deg,#FFF5EE 0%,#FFF9F5 60%,#F0FFF0 100%);

  /* Shadows */
  --shadow-card: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-nav:  0 1px 0 rgba(0,0,0,0.08);
  --shadow-btn:  0 3px 10px rgba(232,93,4,0.28);
  --shadow-glow: 0 0 20px rgba(232,93,4,0.12);

  /* Layout */
  --nav-height:      60px;
  --sidebar-w:       260px;
  --right-sidebar-w: 300px;

  /* Spacing scale */
  --sp-2:   2px;
  --sp-4:   4px;
  --sp-6:   6px;
  --sp-8:   8px;
  --sp-10:  10px;
  --sp-12:  12px;
  --sp-16:  16px;
  --sp-20:  20px;
  --sp-24:  24px;
  --sp-32:  32px;
  --sp-48:  48px;

  /* keep old names working */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl:48px;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full:9999px;

  /* Transitions */
  --trans-fast:   0.12s ease;
  --trans-normal: 0.22s ease;
  --trans-slow:   0.38s ease;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-hindi:   'Noto Sans Devanagari', sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* prevent horizontal overflow on every viewport */
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, textarea, select { font-family: var(--font-body); outline: none; }
ul { list-style: none; }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar       { width:4px; height:4px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(232,93,4,0.25); border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:var(--saffron); }

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top:0; left:0; right:0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-nav);
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  padding: 0 var(--sp-16);
  z-index: 1000;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
}

.nav-logo .logo-news { color: var(--text-primary); }
.nav-logo .logo-trp  {
  background: var(--grad-saffron);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo .logo-dot {
  width: 7px; height: 7px;
  background: var(--saffron);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%,100%{ transform:scale(1); opacity:1; }
  50%    { transform:scale(1.4); opacity:0.6; }
}

.nav-search {
  flex: 1;
  max-width: 380px;
  min-width: 0;
  position: relative;
}

.nav-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  padding: 8px 16px 8px 38px;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: var(--trans-normal);
}

.nav-search input:focus {
  border-color: var(--saffron);
  background: #fff;
  box-shadow: 0 0 0 3px var(--saffron-glow);
}

.nav-search input::placeholder { color: var(--text-muted); }

.nav-search .search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin-left: auto;
  flex-shrink: 0;
}

.nav-icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--trans-fast);
  position: relative;
  flex-shrink: 0;
}

.nav-icon-btn:hover {
  background: rgba(232,93,4,0.08);
  color: var(--saffron);
}

.nav-icon-btn .badge {
  position: absolute;
  top:2px; right:2px;
  width:16px; height:16px;
  background: var(--saffron);
  border-radius: 50%;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

.nav-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--saffron);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--trans-fast);
}

.nav-avatar:hover { box-shadow: var(--shadow-glow); }
.nav-avatar img   { width:100%; height:100%; object-fit:cover; }

/* ─── Location Bar — HIDDEN ──────────────────────────────── */
.location-bar { display: none !important; }

/* ─── 3-Column App Layout ────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--right-sidebar-w);
  max-width: 1380px;
  margin: 0 auto;
  padding-top: var(--nav-height);
  min-height: 100vh;
  width: 100%;
}

/* ─── Left Sidebar ───────────────────────────────────────── */
.main-sidebar {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-16) var(--sp-12);
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
}

/* ─── Main Content ───────────────────────────────────────── */
.main-content {
  min-height: calc(100vh - var(--nav-height));
  padding: var(--sp-16);
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  /* prevent content overflow */
  min-width: 0;
  overflow: hidden;
}

/* ─── Right Sidebar ──────────────────────────────────────── */
.right-sidebar {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-16) var(--sp-12);
  background: var(--bg-sidebar);
}

/* ─── Sidebar Nav ────────────────────────────────────────── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--sp-20);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-10);
  padding: 10px var(--sp-12);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--trans-fast);
  position: relative;
  white-space: nowrap;
}

.sidebar-nav-item:hover {
  background: rgba(232,93,4,0.06);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: rgba(232,93,4,0.10);
  color: var(--saffron);
  font-weight: 600;
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; height: 60%;
  width: 3px;
  background: var(--saffron);
  border-radius: 0 3px 3px 0;
}

.sidebar-nav-item .nav-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav-item .nav-badge {
  margin-left: auto;
  background: var(--saffron);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
}

/* ─── Section Title ──────────────────────────────────────── */
.section-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-12);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--border);
}

.section-title .icon { font-size: 1rem; }

.sidebar-section { margin-bottom: var(--sp-24); }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--sp-14, 14px);
  transition: var(--trans-normal);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.card:hover {
  border-color: rgba(232,93,4,0.18);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.card-glass {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--trans-normal);
  font-family: var(--font-body);
  white-space: nowrap;
  line-height: 1.2;
}

.btn-primary {
  background: var(--grad-saffron);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232,93,4,0.38);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--saffron);
  color: var(--saffron);
}
.btn-outline:hover { background: rgba(232,93,4,0.08); }

.btn-ghost {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: #fff;
  border-color: var(--saffron);
  color: var(--saffron);
}

.btn-sm  { padding: 5px 12px; font-size: 0.78rem; }
.btn-lg  { padding: 12px 26px; font-size: 0.95rem; }
.btn-xl  { padding: 14px 30px; font-size: 1rem; }
.btn-icon{ width:36px; height:36px; border-radius:50%; padding:0; }
.w-full  { width: 100%; }

/* ─── Chips ──────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans-fast);
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.3;
}

.chip-category {
  background: rgba(232,93,4,0.08);
  color: var(--saffron);
  border-color: rgba(232,93,4,0.15);
}
.chip-category:hover  { background: rgba(232,93,4,0.15); border-color: var(--saffron); }
.chip-category.active { background: var(--saffron); color:#fff; border-color:var(--saffron); }

.chip-hashtag {
  background: rgba(19,136,8,0.07);
  color: #138808;
  border-color: rgba(19,136,8,0.15);
}
.chip-hashtag:hover { background: rgba(19,136,8,0.14); }

/* ─── Avatar ─────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--grad-saffron);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #fff;
}
.avatar img { width:100%; height:100%; object-fit:cover; }

.avatar-sm { width:30px; height:30px; font-size:0.7rem; }
.avatar-md { width:40px; height:40px; font-size:0.95rem; }
.avatar-lg { width:52px; height:52px; font-size:1.1rem; }
.avatar-xl { width:76px; height:76px; font-size:1.7rem; }
.avatar-ring { border:2px solid var(--saffron); padding:2px; }

/* ─── TRP Badge ──────────────────────────────────────────── */
.trp-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: rgba(232,93,4,0.10);
  border: 1px solid rgba(232,93,4,0.20);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--saffron);
  white-space: nowrap;
}

/* ─── Verified Badge ─────────────────────────────────────── */
.verified {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 14px; height: 14px;
  background: var(--saffron);
  border-radius: 50%;
  font-size: 0.5rem;
  color: #fff;
  flex-shrink: 0;
}

/* ─── Live Indicator ─────────────────────────────────────── */
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #E03030;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.live-dot::before {
  content:'';
  width:7px; height:7px;
  background:#E03030;
  border-radius:50%;
  animation: live-pulse 1.2s infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224,48,48,0.6); }
  70%  { box-shadow: 0 0 0 7px rgba(224,48,48,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,48,48,0); }
}

/* ─── Breaking Banner ────────────────────────────────────── */
.breaking-banner {
  background: rgba(224,48,48,0.06);
  border: 1px solid rgba(224,48,48,0.22);
  border-radius: var(--radius-md);
  padding: var(--sp-12) var(--sp-16);
  margin-bottom: var(--sp-12);
  display: flex;
  gap: var(--sp-12);
  align-items: flex-start;
  animation: breaking-pulse 3s ease infinite;
}
@keyframes breaking-pulse {
  0%,100%{ border-color:rgba(224,48,48,0.22); }
  50%    { border-color:rgba(224,48,48,0.50); }
}
.breaking-tag {
  background: #E03030;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ─── Skeleton ───────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #EDEDF5 25%, #E2E2ED 50%, #EDEDF5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%  { background-position: 200% 0; }
  100%{ background-position:-200% 0; }
}

/* ─── Post Actions ───────────────────────────────────────── */
.post-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding-top: var(--sp-8);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--trans-fast);
  border-radius: var(--radius-full);
  padding: 5px 9px;
  white-space: nowrap;
}
.action-btn:hover    { color: var(--saffron); background:rgba(232,93,4,0.07); }
.action-btn.liked    { color: #E03030; }
.action-btn.liked:hover { background:rgba(224,48,48,0.07); }
.action-btn.bookmarked{ color: var(--saffron); }
.action-btn.reposted { color: var(--india-green); }
.action-btn .icon    { font-size: 0.9rem; }

/* ─── Source Tag ─────────────────────────────────────────── */
.source-tag {
  font-size: 0.68rem;
  color: var(--saffron);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ─── News Image ─────────────────────────────────────────── */
.news-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  display: block;
}

/* ─── Stories ────────────────────────────────────────────── */
.stories-bar {
  display: flex;
  gap: var(--sp-12);
  overflow-x: auto;
  padding: var(--sp-4) 0 var(--sp-8);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.stories-bar::-webkit-scrollbar { display:none; }

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
}
.story-ring {
  width: 54px; height: 54px;
  border-radius: 50%;
  padding: 2px;
  background: var(--grad-saffron);
  transition: var(--trans-fast);
}
.story-ring:hover { transform: scale(1.06); box-shadow: var(--shadow-glow); }
.story-ring.viewed { background: var(--border); }
.story-avatar {
  width:100%; height:100%;
  border-radius:50%;
  border:2px solid #fff;
  overflow:hidden;
}
.story-name {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Category Nav ───────────────────────────────────────── */
.category-nav {
  display: flex;
  gap: var(--sp-6);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--sp-8);
  margin-bottom: var(--sp-12);
}
.category-nav::-webkit-scrollbar { display:none; }

/* ─── Trending Sidebar Items ─────────────────────────────── */
.trending-item {
  padding: var(--sp-8) 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--trans-fast);
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { opacity:.8; }
.trending-item:hover .trending-tag { color: var(--saffron); }
.trending-rank { font-size:0.67rem; color:var(--saffron); font-weight:600; margin-bottom:2px; }
.trending-tag  { font-size:0.84rem; font-weight:700; color:var(--text-primary); margin-bottom:2px; }
.trending-meta { font-size:0.7rem; color:var(--text-muted); }

/* ─── Follow Suggestion ──────────────────────────────────── */
.follow-suggestion {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  padding: var(--sp-8) 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.follow-suggestion:last-child { border-bottom:none; }
.follow-info { flex:1; min-width:0; overflow:hidden; }
.follow-name {
  font-size: 0.84rem; font-weight:600;
  color: var(--text-primary);
  display: flex; align-items:center; gap:4px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.follow-handle { font-size:0.72rem; color:var(--text-muted); }

/* ─── Live News Sidebar ──────────────────────────────────── */
.live-news-item {
  padding: var(--sp-8) 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--trans-fast);
}
.live-news-item:last-child { border-bottom:none; }
.live-news-item:hover { opacity:.8; }
.live-news-title { font-size:0.82rem; font-weight:600; color:var(--text-primary); line-height:1.3; margin-bottom:3px; }
.live-news-meta  { font-size:0.68rem; color:var(--text-muted); }

/* ─── Toast ──────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--sp-16);
  right: var(--sp-16);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}
.toast {
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: var(--sp-12) var(--sp-16);
  min-width: 260px;
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
  animation: toast-in 0.28s ease;
  color: var(--text-primary);
}
.toast.success { border-left:3px solid var(--india-green); }
.toast.error   { border-left:3px solid #E03030; }
.toast.info    { border-left:3px solid var(--saffron); }
.toast-icon { font-size:1.1rem; flex-shrink:0; }
.toast-msg  { font-size:0.84rem; flex:1; }
@keyframes toast-in {
  from{ opacity:0; transform:translateX(16px); }
  to  { opacity:1; transform:translateX(0); }
}

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset:0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-16);
  animation: fade-in 0.18s ease;
}
.modal {
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: modal-in 0.26s ease;
}
@keyframes modal-in {
  from{ opacity:0; transform:translateY(18px) scale(0.97); }
  to  { opacity:1; transform:translateY(0) scale(1); }
}
@keyframes fade-in {
  from{ opacity:0; } to{ opacity:1; }
}

/* ─── Form Elements ──────────────────────────────────────── */
.form-group { display:flex; flex-direction:column; gap:5px; }
.form-label { font-size:0.82rem; font-weight:600; color:var(--text-secondary); }
.form-input {
  background: var(--bg-input);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: var(--trans-normal);
  width: 100%;
  font-family: var(--font-body);
}
.form-input:focus {
  border-color: var(--saffron);
  background: #fff;
  box-shadow: 0 0 0 3px var(--saffron-glow);
}
.form-input::placeholder { color:var(--text-muted); }

/* ─── Progress Bar ───────────────────────────────────────── */
.progress-bar  { height:3px; background:var(--border); border-radius:3px; overflow:hidden; }
.progress-fill { height:100%; background:var(--grad-saffron); border-radius:3px; transition:width 0.3s ease; }

/* ─── Divider ────────────────────────────────────────────── */
.divider { height:1px; background:var(--border); margin:var(--sp-12) 0; }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state  { text-align:center; padding:var(--sp-48) var(--sp-24); color:var(--text-muted); }
.empty-state .empty-icon { font-size:2.8rem; margin-bottom:var(--sp-12); opacity:.5; }
.empty-state p { font-size:0.9rem; line-height:1.6; }

/* ─── Dropdown ───────────────────────────────────────────── */
.dropdown {
  position:absolute; top:calc(100% + 6px); right:0;
  background:#fff; border:1px solid var(--border-card);
  border-radius:var(--radius-md); min-width:170px;
  box-shadow:0 8px 28px rgba(0,0,0,0.10);
  z-index:200; overflow:hidden;
  animation:fade-in 0.14s ease;
}
.dropdown-item {
  padding:9px var(--sp-14, 14px);
  font-size:0.84rem; color:var(--text-secondary);
  cursor:pointer; transition:var(--trans-fast);
  display:flex; align-items:center; gap:var(--sp-8);
}
.dropdown-item:hover { background:rgba(232,93,4,0.06); color:var(--saffron); }

/* ─── Utility ────────────────────────────────────────────── */
.flex           { display:flex; }
.flex-col       { display:flex; flex-direction:column; }
.items-center   { align-items:center; }
.justify-between{ justify-content:space-between; }
.justify-center { justify-content:center; }
.gap-xs  { gap:var(--sp-4); }
.gap-sm  { gap:var(--sp-8); }
.gap-md  { gap:var(--sp-16); }
.gap-lg  { gap:var(--sp-24); }
.text-center    { text-align:center; }
.text-sm  { font-size:0.84rem; }
.text-xs  { font-size:0.72rem; }
.text-muted     { color:var(--text-muted); }
.text-secondary { color:var(--text-secondary); }
.text-accent    { color:var(--saffron); }
.text-green     { color:var(--india-green); }
.font-heading   { font-family:var(--font-heading); }
.font-hindi     { font-family:var(--font-hindi); }
.font-bold      { font-weight:700; }
.font-semibold  { font-weight:600; }
.truncate       { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mt-auto        { margin-top:auto; }
.ml-auto        { margin-left:auto; }
.rounded-full   { border-radius:var(--radius-full); }
.overflow-hidden{ overflow:hidden; }
.relative       { position:relative; }
.absolute       { position:absolute; }
.hidden         { display:none; }
.opacity-50     { opacity:.5; }

/* ─── Gradient Text ──────────────────────────────────────── */
.grad-text {
  background: var(--grad-saffron);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.grad-text-tricolor {
  background: var(--grad-tricolor);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

/* ─── BG Orbs ────────────────────────────────────────────── */
.bg-orb {
  position:fixed; border-radius:50%;
  filter:blur(100px); opacity:.06;
  pointer-events:none; z-index:0;
}
.bg-orb-saffron { width:500px;height:500px;background:var(--saffron);top:-150px;right:-150px; }
.bg-orb-green   { width:400px;height:400px;background:var(--india-green);bottom:-120px;left:-120px; }
.content-above-orbs { position:relative; z-index:1; }

/* ─── Page Enter ─────────────────────────────────────────── */
.page-enter { animation:page-slide-in 0.28s ease; }
@keyframes page-slide-in {
  from{ opacity:0; transform:translateY(8px); }
  to  { opacity:1; transform:translateY(0); }
}

/* ─── Sidebar Footer ─────────────────────────────────────── */
.sidebar-footer {
  font-size:0.7rem;
  color:var(--text-muted);
  line-height:1.7;
  padding-top:var(--sp-12);
  border-top:1px solid var(--border);
  margin-top:auto;
}
.sidebar-footer a { color:var(--saffron); }

/* ─── Version Info ───────────────────────────────────────── */
.version-info {
  text-align:center;
  padding:var(--sp-24);
  color:var(--text-muted);
  font-size:0.78rem;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════ */

/* 1280px — shrink sidebars */
@media (max-width: 1280px) {
  :root {
    --sidebar-w: 220px;
    --right-sidebar-w: 260px;
  }
}

/* 1024px — collapse right sidebar, shrink left */
@media (max-width: 1024px) {
  :root { --sidebar-w: 56px; }

  .app-layout {
    grid-template-columns: var(--sidebar-w) 1fr;
  }

  .right-sidebar { display:none; }

  .main-sidebar {
    padding: var(--sp-12) var(--sp-8);
    overflow:visible;
  }

  .sidebar-nav-item span:not(.nav-icon) { display:none; }
  .sidebar-nav-item {
    justify-content: center;
    padding: 10px;
    gap: 0;
  }
  .sidebar-nav-item.active::before { display:none; }
  .sidebar-nav-item .nav-badge     { display:none; }
  .sidebar-nav-item .nav-icon      { font-size:1.2rem; width:auto; }
  .sidebar-footer  { display:none; }
  .section-title   { display:none; }
  .sidebar-section { display:none; }
}

/* 768px — full mobile: no sidebar, bottom nav */
@media (max-width: 768px) {
  html { font-size:15px; }

  .app-layout {
    grid-template-columns: 1fr;
    padding-bottom: 70px;
    min-height: 100vh;
  }

  .main-sidebar { display:none; }
  .main-content { padding: var(--sp-12); }

  .nav-search { display:none; }

  .navbar { padding:0 var(--sp-12); gap:var(--sp-8); }

  /* Mobile Bottom Nav */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom:0; left:0; right:0;
    height: 60px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(0,0,0,0.08);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 var(--sp-8);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: var(--trans-fast);
    flex: 1;
  }
  .mobile-nav-item.active { color:var(--saffron); }
  .mobile-nav-item .icon  { font-size:1.2rem; }
}

@media (min-width: 769px) {
  .mobile-nav { display:none; }
}

/* 480px — very small phones */
@media (max-width: 480px) {
  html { font-size:14px; }
  .navbar { height:54px; padding:0 var(--sp-10); }
  :root  { --nav-height:54px; }
  .btn   { padding:7px 14px; font-size:0.82rem; }
  .btn-sm{ padding:4px 10px; font-size:0.73rem; }
  .toast-container { bottom:var(--sp-8); right:var(--sp-8); left:var(--sp-8); }
  .toast { min-width:0; max-width:100%; }
  .modal-overlay { padding:var(--sp-10); }
}
