/* Faculty ERP dashboard - light professional (not purple/cream AI defaults) */
:root {
  --fd-ink: #1e293b;
  --fd-muted: #64748b;
  --fd-line: #e2e8f0;
  --fd-surface: #ffffff;
  --fd-canvas: #f1f5f9;
  --fd-accent: #0f766e;
  --fd-accent-2: #1d4ed8;
  --fd-warn: #b45309;
  --fd-danger: #b91c1c;
  --fd-ok: #15803d;
  --fd-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  --fd-radius: 14px;
}

.faculty-dash {
  color: var(--fd-ink);
  margin-bottom: 2rem;
}

.fd-hero {
  background:
    radial-gradient(900px 220px at 10% 0%, rgba(15, 118, 110, 0.14), transparent 55%),
    linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #0f766e 140%);
  color: #f8fafc;
  border-radius: var(--fd-radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--fd-shadow);
  margin-bottom: 1.25rem;
}

.fd-hero h1 {
  margin: 0 0 0.25rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.fd-hero p {
  margin: 0;
  opacity: 0.88;
  font-size: 0.95rem;
}

.fd-hero .fd-meta {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fd-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 12px;
}

.fd-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

@media (max-width: 991px) {
  .fd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .fd-kpis { grid-template-columns: 1fr; }
}

.fd-kpi {
  background: var(--fd-surface);
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--fd-shadow);
  min-height: 96px;
}

.fd-kpi .label {
  color: var(--fd-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.fd-kpi .value {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.fd-kpi .hint {
  margin-top: 0.25rem;
  font-size: 12px;
  color: var(--fd-muted);
}

.fd-kpi.warn .value { color: var(--fd-warn); }
.fd-kpi.ok .value { color: var(--fd-ok); }
.fd-kpi.accent .value { color: var(--fd-accent); }
.fd-kpi.blue .value { color: var(--fd-accent-2); }

.fd-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}

@media (max-width: 991px) {
  .fd-grid { grid-template-columns: 1fr; }
}

.fd-card {
  background: var(--fd-surface);
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  box-shadow: var(--fd-shadow);
  overflow: hidden;
  margin-bottom: 1rem;
}

.fd-card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--fd-line);
  background: linear-gradient(180deg, #f8fafc, #fff);
}

.fd-card-h h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fd-ink);
}

.fd-tt-session {
  margin-top: 0.3rem;
  font-size: 12px;
  color: var(--fd-accent);
  font-weight: 600;
}

.fd-tt-session strong {
  color: var(--fd-ink);
}

.fd-card-b { padding: 1rem 1.1rem; }

.fd-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 520px) {
  .fd-actions { grid-template-columns: 1fr; }
}

.fd-action {
  display: block;
  text-decoration: none !important;
  color: var(--fd-ink) !important;
  border: 1px solid var(--fd-line);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.fd-action:hover {
  border-color: #99f6e4;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.08);
  transform: translateY(-1px);
}

.fd-action i {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #ecfdf5;
  color: var(--fd-accent);
  margin-right: 0.35rem;
}

.fd-action .t {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-top: 0.35rem;
}

.fd-action .s {
  display: block;
  color: var(--fd-muted);
  font-size: 12px;
  margin-top: 0.15rem;
}

.fd-table {
  width: 100%;
  margin: 0;
}

.fd-table th {
  background: #f8fafc;
  color: var(--fd-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--fd-line) !important;
}

.fd-table td {
  vertical-align: middle !important;
  border-color: var(--fd-line) !important;
  font-size: 13px;
}

.fd-today {
  color: var(--fd-accent) !important;
  font-weight: 700;
}

.fd-btn {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none !important;
  margin-right: 0.25rem;
}

.fd-btn-a { background: #ecfdf5; color: #0f766e !important; }
.fd-btn-b { background: #eff6ff; color: #1d4ed8 !important; }
.fd-btn-link {
  color: var(--fd-accent-2) !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
}

.fd-header-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.fd-empty {
  color: var(--fd-muted);
  font-size: 13px;
  margin: 0.25rem 0 0;
}

.fd-alert {
  border-radius: 12px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #78350f;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 13px;
}

.fd-alert strong { color: #92400e; }

/* -- Side alert panels (probation / dropout / notices) -- */
.fd-alert-panel {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: var(--fd-shadow);
  border: 1px solid transparent;
  animation: fdPanelIn 0.45s ease both;
}

.fd-alert-panel + .fd-alert-panel { animation-delay: 0.06s; }
.fd-alert-panel + .fd-alert-panel + .fd-alert-panel { animation-delay: 0.12s; }

@keyframes fdPanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fd-alert-panel--warn {
  border-color: #fde68a;
  background:
    radial-gradient(420px 120px at 100% 0%, rgba(245, 158, 11, 0.16), transparent 60%),
    linear-gradient(180deg, #fffbeb 0%, #ffffff 42%);
}

.fd-alert-panel--danger {
  border-color: #fecaca;
  background:
    radial-gradient(420px 120px at 100% 0%, rgba(239, 68, 68, 0.14), transparent 60%),
    linear-gradient(180deg, #fef2f2 0%, #ffffff 42%);
}

.fd-alert-panel--info {
  border-color: #bae6fd;
  background:
    radial-gradient(420px 120px at 100% 0%, rgba(14, 165, 233, 0.14), transparent 60%),
    linear-gradient(180deg, #f0f9ff 0%, #ffffff 42%);
}

.fd-alert-panel__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem 0.75rem;
}

.fd-alert-panel__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}

.fd-alert-panel--warn .fd-alert-panel__icon {
  background: linear-gradient(145deg, #fbbf24, #d97706);
  color: #fff;
}

.fd-alert-panel--danger .fd-alert-panel__icon {
  background: linear-gradient(145deg, #f87171, #b91c1c);
  color: #fff;
  animation: fdPulseSoft 2.2s ease-in-out infinite;
}

.fd-alert-panel--info .fd-alert-panel__icon {
  background: linear-gradient(145deg, #38bdf8, #0284c7);
  color: #fff;
}

@keyframes fdPulseSoft {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.35); }
  50% { transform: scale(1.03); box-shadow: 0 0 0 8px rgba(185, 28, 28, 0); }
}

.fd-alert-panel__titles { flex: 1; min-width: 0; }
.fd-alert-panel__titles h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fd-ink);
}
.fd-alert-panel__titles h2 a {
  color: inherit;
  text-decoration: none;
}
.fd-alert-panel__titles h2 a:hover { text-decoration: underline; }
.fd-alert-panel__titles p {
  margin: 0.12rem 0 0;
  font-size: 12px;
  color: var(--fd-muted);
}

.fd-alert-panel__count {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  text-decoration: none !important;
}
a.fd-alert-panel__count:hover { filter: brightness(0.97); }

.fd-alert-panel--warn .fd-alert-panel__count {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}
.fd-alert-panel--danger .fd-alert-panel__count {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fda4af;
}

.fd-alert-panel__link {
  font-size: 12px;
  font-weight: 700;
  color: #0369a1 !important;
  text-decoration: none !important;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.fd-alert-panel__body { padding: 0 0.75rem 0.85rem; }

.fd-alert-list {
  max-height: 36rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-right: 0.15rem;
}

.fd-program-summary {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.7rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
}
.fd-program-summary__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.fd-program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.45rem;
}
.fd-program-tile {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}
.fd-program-tile .t {
  display: block;
  font-size: 0.72rem;
  color: #78716c;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}
.fd-program-tile strong {
  font-size: 1.2rem;
  color: #b45309;
}
.fd-program-tile--danger {
  background: #fef2f2;
  border-color: #fecaca;
}
.fd-program-tile--danger strong { color: #b91c1c; }

.fd-alert-list::-webkit-scrollbar { width: 6px; }
.fd-alert-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.fd-alert-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: center;
  text-decoration: none !important;
  color: inherit;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.fd-alert-row__link {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  text-decoration: none !important;
  color: inherit;
}

.fd-alert-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.fd-alert-row--warn:hover { border-color: #f59e0b; }
.fd-alert-row--danger:hover { border-color: #ef4444; }
.fd-alert-row--info:hover { border-color: #0ea5e9; }

.fd-alert-row--warn.is-high {
  border-left: 3px solid #f59e0b;
}
.fd-alert-row--warn.is-critical {
  border-left: 3px solid #ea580c;
  background: linear-gradient(90deg, rgba(251, 146, 60, 0.12), rgba(255,255,255,0.92) 40%);
}
.fd-alert-row--danger {
  border-left: 3px solid #ef4444;
}

.fd-alert-row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(145deg, #64748b, #334155);
  flex-shrink: 0;
}

.fd-alert-row--warn .fd-alert-row__avatar {
  background: linear-gradient(145deg, #fbbf24, #b45309);
}
.fd-alert-row--danger .fd-alert-row__avatar {
  background: linear-gradient(145deg, #fb7185, #be123c);
}
.fd-alert-row__avatar--soft {
  background: linear-gradient(145deg, #7dd3fc, #0284c7);
  font-size: 14px;
}

.fd-alert-row__main { min-width: 0; }
.fd-alert-row__name {
  font-weight: 700;
  font-size: 13px;
  color: var(--fd-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fd-alert-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.18rem;
}
.fd-alert-row__meta span {
  font-size: 10px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-weight: 600;
}

.fd-alert-row__side {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.18rem;
  min-width: 4.5rem;
}

.fd-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.fd-alert-row--warn .fd-status-badge {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}
.fd-alert-row--warn.is-critical .fd-status-badge {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fb923c;
}
.fd-alert-row--danger .fd-status-badge {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fda4af;
}

.fd-alert-row__date {
  font-size: 10px;
  color: var(--fd-muted);
  font-weight: 600;
}

.fd-alert-row__cta {
  font-size: 11px;
  font-weight: 700;
  color: var(--fd-accent-2);
  opacity: 0.85;
}
.fd-alert-row__cta i { margin-left: 2px; }
.fd-alert-row:hover .fd-alert-row__cta { opacity: 1; }

.fd-alert-empty {
  text-align: center;
  padding: 1.1rem 0.75rem 0.85rem;
  color: var(--fd-muted);
}
.fd-alert-empty i {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  color: var(--fd-ok);
}
.fd-alert-panel--danger .fd-alert-empty i { color: #94a3b8; }
.fd-alert-panel--info .fd-alert-empty i { color: #38bdf8; }
.fd-alert-empty p {
  margin: 0;
  font-size: 12px;
}

/* Students by gender (department-scoped) */
.fd-gender-card { margin-bottom: 1rem; }
.fd-gender-bars { display: flex; flex-direction: column; gap: 0.65rem; }
.fd-gender-row {
  display: grid;
  grid-template-columns: 5.2rem 1fr 3.4rem;
  gap: 0.55rem;
  align-items: center;
  text-decoration: none !important;
  color: inherit;
  border-radius: 8px;
  padding: 0.2rem 0.15rem;
  transition: background 0.15s ease;
}
.fd-gender-row:hover {
  background: #f1f5f9;
  color: inherit;
}
.fd-gender-row:hover .fd-gender-n {
  color: var(--fd-accent-2);
  text-decoration: underline;
}
.fd-gender-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fd-muted);
}
.fd-gender-track {
  height: 10px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.fd-gender-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 0;
}
.fd-gender-fill--m { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.fd-gender-fill--f { background: linear-gradient(90deg, #be185d, #ec4899); }
.fd-gender-fill--u { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.fd-gender-n {
  text-align: right;
  font-size: 0.95rem;
  color: var(--fd-ink);
}
.fd-gender-note {
  margin: 0.85rem 0 0;
  font-size: 12px;
  color: var(--fd-muted);
}

.fd-toppers-card .fd-muted { color: var(--fd-muted); font-size: 0.88rem; }
.fd-toppers-scroll {
  max-height: 420px;
  overflow: auto;
  padding-right: 0.15rem;
}
.fd-topper-block {
  border: 1px solid var(--fd-line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.7rem;
  background: #f8fafc;
}
.fd-topper-block:last-child { margin-bottom: 0; }
.fd-topper-class {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f766e;
  margin-bottom: 0.5rem;
}
.fd-topper-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.fd-topper-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.fd-topper-item.is-gold { border-color: #fbbf24; background: #fffbeb; }
.fd-topper-item.is-silver { border-color: #cbd5e1; background: #f8fafc; }
.fd-topper-item.is-bronze { border-color: #fdba74; background: #fff7ed; }
.fd-topper-rank {
  min-width: 2.2rem;
  text-align: center;
  font-weight: 900;
  color: #92400e;
  background: #fef3c7;
  border-radius: 8px;
  padding: 0.2rem 0.35rem;
  font-size: 0.82rem;
}
.fd-topper-who { flex: 1; min-width: 120px; }
.fd-topper-who strong { display: block; color: var(--fd-ink); font-size: 0.92rem; }
.fd-topper-who small { color: var(--fd-muted); font-size: 0.75rem; }
.fd-topper-cgpa {
  font-weight: 800;
  color: #0f766e;
  font-size: 0.86rem;
}
.fd-topper-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #92400e;
  background: #fde68a;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}
