/* ============================================
   PurvSainik.com - Global Design System
   ============================================ */

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

/* ============================================
   CSS VARIABLES / DESIGN TOKENS
   ============================================ */
:root {
  /* Primary Palette */
  --color-navy:        #0f1f3d;
  --color-navy-light:  #162a52;
  --color-navy-mid:    #1a3260;
  --color-accent:      #e8540a;
  --color-accent-dark: #c94308;
  --color-accent-glow: rgba(232, 84, 10, 0.25);

  /* Neutral Palette */
  --color-white:       #ffffff;
  --color-off-white:   #f5f6f8;
  --color-gray-50:     #fafafa;
  --color-gray-100:    #f0f2f5;
  --color-gray-200:    #e4e7ec;
  --color-gray-300:    #d0d5dd;
  --color-gray-400:    #98a2b3;
  --color-gray-500:    #667085;
  --color-gray-600:    #475467;
  --color-gray-700:    #344054;
  --color-gray-800:    #1d2939;
  --color-gray-900:    #101828;

  /* Semantic Colors */
  --color-success:     #12b76a;
  --color-success-bg:  #ecfdf3;
  --color-warning:     #f79009;
  --color-warning-bg:  #fffaeb;
  --color-danger:      #f04438;
  --color-danger-bg:   #fef3f2;
  --color-info:        #0ba5ec;
  --color-info-bg:     #f0f9ff;

  /* Typography */
  --font-primary:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-hindi:     'Noto Sans Devanagari', 'Inter', sans-serif;

  --fs-xs:    0.75rem;    /* 12px */
  --fs-sm:    0.875rem;   /* 14px */
  --fs-base:  1rem;       /* 16px */
  --fs-lg:    1.125rem;   /* 18px */
  --fs-xl:    1.25rem;    /* 20px */
  --fs-2xl:   1.5rem;     /* 24px */
  --fs-3xl:   1.875rem;   /* 30px */
  --fs-4xl:   2.25rem;    /* 36px */
  --fs-5xl:   3rem;       /* 48px */

  --fw-light:   300;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;
  --fw-extrabold: 800;

  --lh-tight:  1.25;
  --lh-snug:   1.375;
  --lh-normal: 1.5;
  --lh-relaxed: 1.625;
  --lh-loose:  2;

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;

  /* Borders */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(16,24,40,0.04);
  --shadow-sm: 0 1px 3px rgba(16,24,40,0.06), 0 1px 2px rgba(16,24,40,0.04);
  --shadow-md: 0 4px 8px -2px rgba(16,24,40,0.08), 0 2px 4px -2px rgba(16,24,40,0.04);
  --shadow-lg: 0 12px 16px -4px rgba(16,24,40,0.08), 0 4px 6px -2px rgba(16,24,40,0.03);
  --shadow-xl: 0 20px 24px -4px rgba(16,24,40,0.10), 0 8px 8px -4px rgba(16,24,40,0.04);
  --shadow-accent: 0 6px 24px rgba(232,84,10,0.35);

  /* Transitions */
  --transition-fast:   200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-max:  1280px;
  --sidebar-width:  240px;
  --navbar-height:  64px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  color: var(--color-gray-800);
  background: var(--color-off-white);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: var(--font-primary); border: none; outline: none; -webkit-tap-highlight-color: transparent; }
input, textarea, select { font-family: var(--font-primary); outline: none; -webkit-appearance: none; }

::selection {
  background: var(--color-accent);
  color: var(--color-white);
}

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */
.text-hindi { font-family: var(--font-hindi); }
.text-xs  { font-size: var(--fs-xs); }
.text-sm  { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); }
.text-lg  { font-size: var(--fs-lg); }
.text-xl  { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }
.text-3xl { font-size: var(--fs-3xl); }
.fw-medium   { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold     { font-weight: var(--fw-bold); }
.text-muted  { color: var(--color-gray-500); }
.text-accent { color: var(--color-accent); }
.text-navy   { color: var(--color-navy); }
.text-white  { color: var(--color-white); }

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

.grid { display: grid; }
.col-span-2 { grid-column: span 2; }

/* ============================================
   BADGE / TAG COMPONENTS
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform var(--transition-fast);
}
.badge:hover { transform: translateY(-1px); }
.badge-accent  { background: var(--color-accent); color: var(--color-white); }
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger  { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-info    { background: var(--color-info-bg); color: var(--color-info); }
.badge-navy    { background: var(--color-navy); color: var(--color-white); }
.badge-gray    { background: var(--color-gray-100); color: var(--color-gray-600); }

/* ============================================
   BUTTON COMPONENTS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232,84,10,0.45);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}
.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border: 1.5px solid var(--color-gray-300);
}
.btn-outline:hover {
  background: var(--color-gray-50);
  border-color: var(--color-navy);
  transform: translateY(-2px);
}
.btn-outline:active {
  transform: translateY(0);
}
.btn-ghost {
  background: transparent;
  color: var(--color-gray-600);
}
.btn-ghost:hover { background: var(--color-gray-100); color: var(--color-navy); }
.btn-navy {
  background: var(--color-navy);
  color: var(--color-white);
}
.btn-navy:hover { background: var(--color-navy-light); transform: translateY(-2px); }
.btn-sm { padding: var(--sp-1) var(--sp-3); font-size: var(--fs-xs); }
.btn-lg { padding: var(--sp-3) var(--sp-8); font-size: var(--fs-base); }

/* ============================================
   CARD COMPONENTS
   ============================================ */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-body { padding: var(--sp-6); }
.card-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-hover:hover { transform: translateY(-3px); }

/* ============================================
   STAT / KPI CARD
   ============================================ */
.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  border: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-value { font-size: var(--fs-3xl); font-weight: var(--fw-bold); color: var(--color-gray-900); line-height: 1; }
.stat-card .stat-label { font-size: var(--fs-sm); color: var(--color-gray-500); margin-top: var(--sp-1); }
.stat-card .stat-change { font-size: var(--fs-xs); color: var(--color-success); margin-top: var(--sp-2); }

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--color-gray-700); }
.form-control {
  width: 100%;
  padding: var(--sp-2) var(--sp-4);
  border: 1.5px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--color-gray-800);
  background: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-glow);
  transform: translateY(-1px);
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}
.avatar:hover { transform: scale(1.05); }
.avatar-sm  { width: 32px; height: 32px; font-size: var(--fs-xs); }
.avatar-md  { width: 40px; height: 40px; font-size: var(--fs-sm); }
.avatar-lg  { width: 48px; height: 48px; font-size: var(--fs-base); }
.avatar-xl  { width: 56px; height: 56px; font-size: var(--fs-lg); }
.avatar-navy    { background: var(--color-navy); color: var(--color-white); }
.avatar-accent  { background: var(--color-accent); color: var(--color-white); }
.avatar-img { object-fit: cover; }

/* ============================================
   DIVIDER
   ============================================ */
.divider { border: none; border-top: 1px solid var(--color-gray-200); margin: var(--sp-4) 0; }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-gray-100); }
::-webkit-scrollbar-thumb { background: var(--color-gray-300); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-gray-400); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.95); }
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes ripple {
  to { transform: scale(2.5); opacity: 0; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideInDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.animate-fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-fade-in    { animation: fadeIn 0.4s ease both; }
.animate-slide-in-right { animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-scale-in   { animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* Stagger delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 1024px) {
  .container { padding-inline: var(--sp-4); }
  :root { --sidebar-width: 200px; }
  .hide-tablet { display: none !important; }
}

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  :root { --navbar-height: 56px; }
  .container { padding-inline: var(--sp-4); }
  html { font-size: 15px; }
}

@media (max-width: 480px) {
  :root { --navbar-height: 52px; }
  html { font-size: 14px; }
  .container { padding-inline: var(--sp-3); }
}
