/* ============================================================
   PKAP Design System — main.css
   Professional + Modern | Bangladesh Government Platform
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand */
  --navy:       #1B3A6B;
  --navy-dark:  #0F2347;
  --navy-light: #2A5298;
  --red:        #C8202E;
  --red-dark:   #A01826;
  --red-light:  #E63946;

  /* Neutrals */
  --white:      #FFFFFF;
  --bg:         #F0F4FA;
  --bg-card:    #FFFFFF;
  --bg-subtle:  #EBF0F9;
  --surface:    #F7F9FD;

  /* Text */
  --text-primary:   #0D1B2A;
  --text-secondary: #4A5568;
  --text-muted:     #8A95A3;
  --text-white:     #FFFFFF;

  /* Borders */
  --border:       rgba(27,58,107,0.12);
  --border-light: rgba(27,58,107,0.07);

  /* Status */
  --success:      #059669;
  --success-bg:   #D1FAE5;
  --warning:      #D97706;
  --warning-bg:   #FEF3C7;
  --danger:       #DC2626;
  --danger-bg:    #FEE2E2;
  --info:         #0284C7;
  --info-bg:      #E0F2FE;

  /* Typography */
  --font-display: 'Sora', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;

  /* Spacing */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  28px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(27,58,107,0.08), 0 1px 2px rgba(27,58,107,0.06);
  --shadow-md:  0 4px 16px rgba(27,58,107,0.10), 0 2px 6px rgba(27,58,107,0.06);
  --shadow-lg:  0 12px 40px rgba(27,58,107,0.14), 0 4px 12px rgba(27,58,107,0.08);
  --shadow-xl:  0 24px 64px rgba(27,58,107,0.18);

  /* Transitions */
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { line-height: 1.7; color: var(--text-secondary); }

.display-lg { font-size: clamp(2.5rem, 6vw, 4.5rem); font-family: var(--font-display); font-weight: 800; line-height: 1.1; }
.display-md { font-size: clamp(2rem, 4vw, 3rem); font-family: var(--font-display); font-weight: 700; }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.text-muted  { color: var(--text-muted); }
.text-white  { color: var(--white) !important; }
.text-navy   { color: var(--navy); }
.text-red    { color: var(--red); }
.font-medium { font-weight: 500; }
.font-semi   { font-weight: 600; }
.font-bold   { font-weight: 700; }

/* ── Layout ─────────────────────────────────────────────────── */
.container   { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm{ max-width: 900px;  margin: 0 auto; padding: 0 24px; }
.section     { padding: 96px 0; }
.section-sm  { padding: 64px 0; }

.flex        { display: flex; }
.flex-col    { display: flex; 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-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.gap-12 { gap: 3rem; }
.text-center { text-align: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(27,58,107,0.3);
}
.btn-primary:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(27,58,107,0.4);
}
.btn-danger {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(200,32,46,0.3);
}
.btn-danger:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}
.btn-white {
  background: var(--white);
  color: var(--navy);
}
.btn-white:hover {
  background: var(--bg-subtle);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.25);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.2);
}
.btn-lg { padding: 15px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-md); justify-content: center; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-body   { padding: 24px; }
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-hover { transition: var(--transition); }
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(27,58,107,0.2);
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);     color: var(--info); }
.badge-navy    { background: var(--bg-subtle);   color: var(--navy); }
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* ── Inputs ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
}
.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,58,107,0.1);
}
.form-control::placeholder { color: var(--text-muted); }
.input-group { position: relative; }
.input-group .form-control { padding-left: 42px; }
.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}
.input-group .input-icon-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
}

/* ── Nav ─────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  height: 70px;
  display: flex;
  align-items: center;
  transition: var(--transition);
  width: 100%;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
/* When announce bar scrolls away navbar moves to top */
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--navy); }
.logo-sub  { font-size: 0.65rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.04em; display: block; margin-top: -2px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.nav-link:hover { color: var(--navy); background: var(--bg-subtle); }
.nav-link.active { color: var(--navy); background: var(--bg-subtle); }

/* ── Section Labels ─────────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-subtle);
  border: 1px solid rgba(27,58,107,0.15);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}
.section-label-red {
  background: rgba(200,32,46,0.07);
  border-color: rgba(200,32,46,0.15);
  color: var(--red);
}

/* ── Stats ──────────────────────────────────────────────────── */
.stat-card {
  padding: 28px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.stat-value { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  margin-top: 8px;
}
.stat-change.up   { background: var(--success-bg); color: var(--success); }
.stat-change.down { background: var(--danger-bg);  color: var(--danger); }

/* ── Table ──────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 13px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface); }

/* ── Misc ────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.avatar {
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--navy);
  flex-shrink: 0;
  overflow: hidden;
}
.icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.icon-box-navy { background: var(--bg-subtle); color: var(--navy); }
.icon-box-red  { background: rgba(200,32,46,0.09); color: var(--red); }
.icon-box-sm { width: 40px; height: 40px; font-size: 1.1rem; border-radius: var(--radius-sm); }

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--text-primary);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  max-width: 320px;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { transform: translateX(100%); opacity: 0; } }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(27,58,107,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(27,58,107,0.35); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 1024px) { .hide-mobile { display: none !important; } }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .nav-links .nav-link { display: none; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
}
