/* ==========================================================================
   Dr. Bhimrao Ambedkar University, Agra - Design System & Core Styles
   Matching exact Emergent UI theme (Crisp Executive Light Slate Theme)
   ========================================================================== */

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

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Soothing Soft Slate & Neutral Canvas */
  --bg-main: #f8fafc;
  --bg-canvas: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --bg-elevated: #ffffff;
  --bg-section: #f8fafc;

  /* Clean Soft Borders */
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #4f46e5;

  /* Comfortable, Balanced Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Soft, Soothing Modern Indigo Primary */
  --brand-primary: #4f46e5;
  --brand-primary-hover: #4338ca;
  --brand-light: #eef2ff;
  --brand-accent: #6366f1;

  /* Status Badges */
  --status-missing-bg: #fef2f2;
  --status-missing-text: #b91c1c;
  --status-missing-dot: #ef4444;
  --status-missing-border: #fecaca;

  --status-pending-bg: #fffbeb;
  --status-pending-text: #b45309;
  --status-pending-dot: #f59e0b;
  --status-pending-border: #fde68a;

  --status-completed-bg: #ecfdf5;
  --status-completed-text: #047857;
  --status-completed-dot: #10b981;
  --status-completed-border: #a7f3d0;

  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-drawer: -10px 0 35px rgba(0, 0, 0, 0.15);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #1e3a5f;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
  box-shadow: 0 2px 8px rgba(15, 41, 66, 0.25);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background-color: #f1f5f9;
  border-color: var(--text-muted);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-medium);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background-color: #f1f5f9;
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 13px 26px;
  font-size: 1rem;
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-status.status-missing {
  background-color: var(--status-missing-bg);
  color: var(--status-missing-text);
  border-color: var(--status-missing-border);
}
.badge-status.status-missing::before {
  background-color: var(--status-missing-dot);
}

.badge-status.status-pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending-text);
  border-color: var(--status-pending-border);
}
.badge-status.status-pending::before {
  background-color: var(--status-pending-dot);
}

.badge-status.status-completed {
  background-color: var(--status-completed-bg);
  color: var(--status-completed-text);
  border-color: var(--status-completed-border);
}
.badge-status.status-completed::before {
  background-color: var(--status-completed-dot);
}

.badge-status.status-rejected {
  background-color: #fef2f2;
  color: #9f1239;
  border-color: #fecdd3;
}
.badge-status.status-rejected::before {
  background-color: #e11d48;
}

/* Meta Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.chip-framework {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  font-weight: 600;
  text-transform: uppercase;
}

.chip-info {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
  font-weight: 600;
}

.chip-success {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #bbf7d0;
  font-weight: 600;
}

.chip-purple {
  background: #faf5ff;
  color: #7c3aed;
  border-color: #e9d5ff;
  font-weight: 600;
}

.chip-primary {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
  font-weight: 600;
}

.chip-warning {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
  font-weight: 600;
}

.chip-slate {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
  font-weight: 500;
}

/* Form Controls */
.field-input, .select-input, .search-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  font-size: 0.88rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field-input:focus, .select-input:focus, .search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(15, 41, 66, 0.12);
}

/* Modal and Drawer Backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 540px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  position: relative;
  color: var(--text-primary);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.25s ease forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-success {
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.toast-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.toast-info {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Vibrant & Colorful Institutional Aesthetics (Teal, Navy, Orange, Red, Emerald)
   ========================================================================== */
:root {
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-light: #ccfbf1;
  --teal-border: #99f6e4;

  --navy-800: #1e3a8a;
  --navy-900: #0f172a;
  --navy-light: #e0e7ff;
  --navy-border: #c7d2fe;

  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-light: #ffedd5;
  --orange-border: #fed7aa;

  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-light: #fee2e2;
  --red-border: #fecaca;

  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-light: #d1fae5;
  --emerald-border: #a7f3d0;
}

/* Colorful Domain Chips */
.chip-domain-teal {
  background: var(--teal-light);
  color: var(--teal-700);
  border: 1px solid var(--teal-border);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.chip-navy {
  background: var(--navy-light);
  color: var(--navy-800);
  border: 1px solid var(--navy-border);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.chip-orange {
  background: var(--orange-light);
  color: var(--orange-600);
  border: 1px solid var(--orange-border);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.chip-red {
  background: var(--red-light);
  color: var(--red-600);
  border: 1px solid var(--red-border);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.chip-emerald {
  background: var(--emerald-light);
  color: var(--emerald-600);
  border: 1px solid var(--emerald-border);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
}

/* View Mode Switcher (Packages vs All Tasks) */
.view-mode-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.view-mode-toggle {
  display: inline-flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}

.view-mode-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-mode-btn.active {
  background: #ffffff;
  color: var(--navy-800);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Package Card Styles */
.package-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.package-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.package-card-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.package-title-group {
  flex: 1;
  min-width: 260px;
}

.package-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.package-name-text {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.35;
}

.package-stats-side {
  display: flex;
  align-items: center;
  gap: 16px;
}

.package-progress-wrap {
  min-width: 140px;
}

.package-progress-bar-bg {
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 4px;
}

.package-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-500) 0%, var(--emerald-500) 100%);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.package-expand-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.package-card.expanded .package-expand-btn {
  transform: rotate(180deg);
  background: var(--navy-light);
  color: var(--navy-800);
}

.package-tasks-list {
  display: none;
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.package-card.expanded .package-tasks-list {
  display: block;
}

.package-task-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  transition: all 0.15s ease;
}

.package-task-row:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.package-task-left {
  flex: 1;
  min-width: 250px;
}

.package-task-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin: 3px 0 4px 0;
}

.package-task-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Verification Portal Styles */
.verify-action-btn-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-verify-approve {
  background: var(--emerald-600);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-verify-approve:hover {
  background: #047857;
}

.btn-verify-reject {
  background: var(--red-600);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-verify-reject:hover {
  background: #b91c1c;
}

