/* Graduation Payment Verification System - Modern Institutional Styling */

:root {
  --primary: #1e3a8a;          /* Deep Royal Blue */
  --primary-dark: #0f172a;     /* Deep Slate */
  --primary-light: #3b82f6;    /* Bright Blue */
  --accent: #0284c7;           /* Sky Blue */
  --success: #059669;          /* Emerald Green */
  --success-light: #ecfdf5;
  --warning: #d97706;          /* Amber */
  --warning-light: #fffbeb;
  --danger: #dc2626;           /* Crimson */
  --danger-light: #fef2f2;
  --info: #4f46e5;             /* Indigo */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

body[data-page="home"] {
  background: 
    linear-gradient(rgba(10, 25, 47, 0.84), rgba(15, 23, 42, 0.92)),
    url('../img/graduation_bg.jpg') no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
}

/* Header & Navigation */
.app-header {
  background: linear-gradient(135deg, #09122c 0%, #172554 100%);
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-crest {
  width: 48px;
  height: 48px;
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.brand-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-text p {
  font-size: 0.8rem;
  color: #94a3b8;
}

.nav-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 4px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn.active {
  background: var(--primary-light);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary-glass {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.btn-secondary-glass:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Main Container */
.main-wrapper {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
  flex: 1;
}

/* Trainee User Guide */
.trainee-guide-section {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem 2.25rem;
  margin: 1.5rem 0;
}

.trainee-guide-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.guide-eyebrow {
  display: inline-block;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  margin-bottom: 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.trainee-guide-heading h2 {
  color: var(--text-main);
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.trainee-guide-heading p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.guide-heading-action {
  flex-shrink: 0;
  text-decoration: none;
}

.trainee-guide-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.guide-step-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1rem;
}

.guide-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
}

.guide-step-card h3,
.guide-detail-card h3 {
  color: #172554;
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.guide-step-card p,
.guide-detail-card li,
.guide-detail-card p {
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.55;
}

.trainee-guide-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.guide-detail-card {
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.guide-detail-card ul {
  padding-left: 1.1rem;
}

.guide-detail-card li + li {
  margin-top: 0.35rem;
}

.guide-detail-status {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.guide-detail-important {
  background: #fffbeb;
  border-color: #fde68a;
}

.guide-detail-important p + p {
  margin-top: 0.45rem;
}

.guide-help-note {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-left: 4px solid #3b82f6;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #eff6ff;
  color: #1e3a8a;
}

.guide-help-note p {
  font-size: 0.8rem;
}

.guide-help-icon {
  font-size: 1.2rem;
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.tab-panel.active {
  display: block;
}

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

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-content h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.kpi-content .kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.kpi-content .kpi-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.kpi-card.pending .kpi-icon { background: var(--warning-light); color: var(--warning); }
.kpi-card.correction .kpi-icon { background: var(--danger-light); color: var(--danger); }
.kpi-card.verified .kpi-icon { background: #eff6ff; color: var(--primary-light); }
.kpi-card.cleared .kpi-icon { background: var(--success-light); color: var(--success); }
.kpi-card.duplicate-alert .kpi-icon { background: #fee2e2; color: #b91c1c; }

.kpi-card.duplicate-alert {
  border: 1px solid #f87171;
  background: linear-gradient(to right, #ffffff, #fef2f2);
  cursor: pointer;
}

/* Card Shell */
.card-shell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-title h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-title .badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

/* Buttons */
.btn-primary {
  background: var(--primary-light);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-success {
  background: var(--success);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-success:hover:not(:disabled) {
  background: #047857;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.775rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-pending { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-verified { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-correction { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.badge-cleared { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-rejected { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.badge-duplicate {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #ef4444;
  font-weight: 800;
  animation: pulseDuplicate 2s infinite;
}

@keyframes pulseDuplicate {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

@media (min-width: 860px) {
  .form-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label .sub {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-control {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control:disabled, .form-control[readonly] {
  background-color: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
}

.input-addon-group {
  display: flex;
  align-items: center;
  position: relative;
}

.input-addon-group .form-control {
  flex: 1;
}

.input-addon {
  position: absolute;
  right: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Quick Pick Admission Chips */
.quick-chips-wrapper {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.quick-chip-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.quick-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-chip:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

/* Student Verification Banner (Graduand Profile Card) */
.student-profile-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px solid #86efac;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.student-profile-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.student-avatar {
  width: 52px;
  height: 52px;
  background: #059669;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.student-details h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #064e3b;
}

.student-details p {
  font-size: 0.85rem;
  color: #047857;
}

.student-fee-badge {
  text-align: right;
  background: #ffffff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid #bbf7d0;
  box-shadow: var(--shadow-sm);
}

.student-fee-badge .label {
  font-size: 0.75rem;
  color: #047857;
  font-weight: 600;
}

.student-fee-badge .amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: #064e3b;
}

/* Duplicate Live Warning Alert */
.duplicate-alert-banner {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 0.6rem;
  display: none;
  animation: shakeAlert 0.4s ease;
}

.duplicate-alert-banner.active {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.dup-icon {
  font-size: 1.5rem;
  color: #dc2626;
  line-height: 1;
}

.dup-text h4 {
  font-size: 0.925rem;
  font-weight: 800;
  color: #991b1b;
  margin-bottom: 0.25rem;
}

.dup-text p {
  font-size: 0.825rem;
  color: #b91c1c;
  line-height: 1.4;
}

.dup-conflict-list {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #7f1d1d;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
}

/* File Upload Zone */
.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  background-color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary-light);
  background-color: #f0f7ff;
}

.upload-dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-dropzone-content {
  pointer-events: none;
}

.upload-icon {
  font-size: 2.2rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.upload-dropzone-content p {
  font-size: 0.875rem;
  color: var(--text-main);
  font-weight: 600;
}

.upload-dropzone-content span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.receipt-preview-box {
  margin-top: 0.75rem;
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
}

.receipt-preview-box.active {
  display: flex;
}

.receipt-preview-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.receipt-preview-name {
  font-size: 0.8rem;
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Filter Toolbar */
.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  background: #f8fafc;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.filter-group-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box input {
  padding-left: 2.2rem;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
}

/* Table Styles */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
  background: #ffffff;
}

.data-table th {
  background-color: #f1f5f9;
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: #334155;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Duplicate Highlight Row in Table */
.data-table tr.row-duplicate {
  background-color: #fff1f2 !important;
  border-left: 4px solid #ef4444;
}

.data-table tr.row-duplicate:hover {
  background-color: #fee2e2 !important;
}

.student-meta-col {
  display: flex;
  flex-direction: column;
}

.student-name-text {
  font-weight: 700;
  color: var(--text-main);
}

.student-degree-text {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.txn-code-badge {
  font-family: monospace;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
  font-size: 0.825rem;
}

.receipt-btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.775rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.receipt-btn-preview:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUp 0.2s ease;
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--text-main);
  background: #e2e8f0;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: #f8fafc;
}

/* Professional System Confirmation & Alert Dialogs */
.system-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2200;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.system-dialog-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.system-dialog-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.08);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.system-dialog-overlay.active .system-dialog-card {
  transform: scale(1) translateY(0);
}

.system-dialog-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.system-dialog-header .dialog-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.system-dialog-header .dialog-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
}

.system-dialog-header.type-warning .dialog-icon-badge {
  background: #fffbeb;
  border-color: #fde68a;
}

.system-dialog-header.type-danger .dialog-icon-badge {
  background: #fef2f2;
  border-color: #fecaca;
}

.system-dialog-header.type-success .dialog-icon-badge {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.system-dialog-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.system-dialog-body {
  padding: 1.5rem;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.55;
}

.system-dialog-message {
  margin-bottom: 1.15rem;
  font-weight: 500;
  color: #1e293b;
}

.system-dialog-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.system-dialog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.875rem;
}

.system-dialog-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.system-dialog-row:first-child {
  padding-top: 0;
}

.system-dialog-row .row-label {
  color: #64748b;
  font-weight: 600;
}

.system-dialog-row .row-val {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
}

.system-dialog-callout {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.825rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  line-height: 1.45;
}

.system-dialog-callout.warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.system-dialog-callout.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.system-dialog-footer {
  padding: 1.1rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Audit Split View in Modal */
.audit-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .audit-split {
    grid-template-columns: 1fr;
  }
}

.receipt-inspector-viewer {
  background: #0f172a;
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.receipt-inspector-viewer img, .receipt-inspector-viewer object {
  max-width: 100%;
  max-height: 420px;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.audit-meta-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.audit-field-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.85rem;
}

.audit-field-row .label {
  color: var(--text-muted);
  font-weight: 500;
}

.audit-field-row .val {
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
}

/* Duplicate Critical Blocker Banner in Modal */
.duplicate-blocker-banner {
  background: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  display: none;
}

.duplicate-blocker-banner.active {
  display: block;
}

.duplicate-blocker-banner h4 {
  color: #991b1b;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.duplicate-blocker-banner p {
  font-size: 0.825rem;
  color: #b91c1c;
  line-height: 1.4;
}

/* Formal Clearance Notification & Email Simulator */
.clearance-email-frame {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 2rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #1e293b;
  box-shadow: var(--shadow-sm);
}

.email-meta-header {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.825rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.email-letterhead {
  text-align: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.email-letterhead h2 {
  font-size: 1.4rem;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.email-letterhead p {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.clearance-pass-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 2px dashed #059669;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.5rem 0;
  position: relative;
}

.clearance-stamp {
  position: absolute;
  top: 15px;
  right: 15px;
  border: 3px double #059669;
  color: #059669;
  font-weight: 900;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  transform: rotate(12deg);
  border-radius: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clearance-id-highlight {
  font-size: 1.5rem;
  font-weight: 900;
  color: #065f46;
  font-family: monospace;
  margin: 0.5rem 0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideToast 0.3s ease;
  min-width: 280px;
}

.toast.success { background: #065f46; border-left: 4px solid #34d399; }
.toast.error { background: #991b1b; border-left: 4px solid #f87171; }
.toast.warning { background: #92400e; border-left: 4px solid #fbbf24; }

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .trainee-guide-section {
    padding: 1.35rem;
  }

  .trainee-guide-heading {
    display: block;
  }

  .guide-heading-action {
    margin-top: 1rem;
  }

  .trainee-guide-steps,
  .trainee-guide-details {
    grid-template-columns: 1fr;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-tabs {
    width: 100%;
    overflow-x: auto;
  }
}

/* =========================================================
   2026 GRADUATION CEREMONY CLOCK & DEADLINE HERO BANNER
   ========================================================= */
.ceremony-clock-banner {
  background: linear-gradient(105deg, #021735 0%, #072550 50%, #0b346d 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 12px 30px -6px rgba(2, 22, 49, 0.5), 0 4px 12px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 1.25rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.ceremony-clock-banner::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: radial-gradient(circle at 85% 50%, rgba(56, 189, 248, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.clock-main-col {
  display: flex;
  flex-direction: column;
}

.clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(125, 211, 252, 0.45);
  background: rgba(14, 165, 233, 0.12);
  padding: 0.22rem 0.8rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bae6fd;
  width: fit-content;
  margin-bottom: 0.45rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.clock-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.clock-subtitle {
  font-size: 0.825rem;
  color: #cbd5e1;
  margin-bottom: 0.9rem;
}

.clock-subtitle strong {
  color: #ffffff;
}

/* Countdown row */
.countdown-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.clock-digit-box {
  background: rgba(10, 20, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  min-width: 58px;
  padding: 0.45rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 3px 8px rgba(0, 0, 0, 0.25);
}

.cd-number {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #ffffff;
  line-height: 1;
}

.cd-number.cd-yellow {
  color: #fbbf24;
}

.cd-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Deadline Cards (Middle and Right) */
.deadline-card {
  background: rgba(9, 23, 46, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  backdrop-filter: blur(8px);
  min-height: 110px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.deadline-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.deadline-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.payment-card .deadline-icon {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.gown-card .deadline-icon {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.deadline-content {
  flex: 1;
}

.deadline-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.deadline-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.deadline-tag.yellow {
  color: #fbbf24;
}

.deadline-tag.green {
  color: #34d399;
}

.pill-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.pill-yellow {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.pill-green {
  background: rgba(16, 185, 129, 0.22);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.pill-red {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.deadline-date {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.deadline-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
}

@media (max-width: 1080px) {
  .ceremony-clock-banner {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem;
  }
}

/* =========================================================
   GRADUAND AUTHENTICATION GATE & SESSION BAR
   ========================================================= */
.graduand-login-gate {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  max-width: 680px;
  margin: 1.5rem auto;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.login-gate-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.3);
}

.login-gate-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.login-gate-header p {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.login-security-notice {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.775rem;
  color: #475569;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.login-denied-alert {
  background: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1.1rem;
  margin-top: 1.25rem;
  text-align: left;
  display: none;
  animation: shakeAlert 0.4s ease;
}

.login-denied-alert.active {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.login-denied-icon {
  font-size: 1.5rem;
  color: #dc2626;
  line-height: 1;
}

.login-denied-text h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #991b1b;
  margin-bottom: 0.25rem;
}

.login-denied-text p {
  font-size: 0.825rem;
  color: #b91c1c;
  line-height: 1.4;
}

/* Authenticated Session Header Bar */
.graduand-session-bar {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.2);
}

.session-user-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.session-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.session-badge-active::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #34d399;
  box-shadow: 0 0 6px #34d399;
}

/* ======================================================== */
/* ROLE PORTAL SELECTOR & MULTI-USER WORKSPACE STYLES      */
/* ======================================================== */
.portal-selector-section {
  margin: 2rem 0;
}

.portal-selector-header {
  text-align: center;
  margin-bottom: 2rem;
}

.portal-selector-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.portal-selector-header p {
  font-size: 0.95rem;
  color: #64748b;
  max-width: 650px;
  margin: 0 auto;
}

.portal-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 992px) {
  .portal-cards-grid {
    grid-template-columns: 1fr;
  }
}

.portal-entry-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.portal-entry-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: #cbd5e1;
}

.portal-entry-card.trainee-card::before {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.portal-entry-card.finance-card::before {
  background: linear-gradient(90deg, #059669, #10b981);
}

.portal-entry-card.registrar-card::before {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
}

.portal-entry-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: #cbd5e1;
}

.portal-card-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin-bottom: 1.25rem;
}

.trainee-card .portal-card-icon-wrap {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.finance-card .portal-card-icon-wrap {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.registrar-card .portal-card-icon-wrap {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
}

.portal-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.badge-portal-trainee {
  background: #dbeafe;
  color: #1e40af;
}

.badge-portal-finance {
  background: #d1fae5;
  color: #065f46;
}

.badge-portal-registrar {
  background: #ede9fe;
  color: #5b21b6;
}

.portal-entry-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.portal-entry-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.portal-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  font-size: 0.825rem;
  color: #334155;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}

.portal-feature-list li {
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-feature-list li span.bullet {
  color: #059669;
  font-weight: 700;
}

.portal-entry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.trainee-card .portal-entry-btn {
  background: #2563eb;
  color: #ffffff;
}

.trainee-card .portal-entry-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.finance-card .portal-entry-btn {
  background: #059669;
  color: #ffffff;
}

.finance-card .portal-entry-btn:hover {
  background: #047857;
  color: #ffffff;
}

.registrar-card .portal-entry-btn {
  background: #7c3aed;
  color: #ffffff;
}

.registrar-card .portal-entry-btn:hover {
  background: #6d28d9;
  color: #ffffff;
}

/* Dedicated Page Navigation Bar */
.role-nav-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.role-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.2s ease;
}

.role-nav-pill:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.role-nav-pill.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Staff Session Info Bars */
.finance-session-bar {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 4px 12px rgba(6, 95, 70, 0.25);
}

.registrar-session-bar {
  background: linear-gradient(135deg, #5b21b6 0%, #6d28d9 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 4px 12px rgba(91, 33, 182, 0.25);
}

/* =========================================================
   EXECUTIVE DASHBOARD WORKSPACE STYLING (Finance & Registrar)
   ========================================================= */

/* KPI Overview Grid */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 1200px) {
  .stats-overview-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Individual Stat Cards */
.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.2rem 1.25rem;
  box-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.05), 0 2px 6px -2px rgba(15, 23, 42, 0.03);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 135px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.stat-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.icon-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.icon-amber { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.icon-rose { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.icon-indigo { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.icon-emerald { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.icon-gold { background: rgba(255, 255, 255, 0.2); color: #fde047; border: 1px solid rgba(255, 255, 255, 0.3); }

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 0.45rem;
  font-family: var(--font-family);
}

.stat-trend {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.stat-trend.neutral { background: #f1f5f9; color: #475569; }
.stat-trend.warning { background: #fef3c7; color: #92400e; }
.stat-trend.danger { background: #ffe4e6; color: #9f1239; }
.stat-trend.info { background: #e0f2fe; color: #0369a1; }
.stat-trend.success { background: #d1fae5; color: #065f46; }
.stat-trend.revenue-badge { background: rgba(255, 255, 255, 0.22); color: #fef08a; backdrop-filter: blur(4px); }

/* Card Theme Accents */
.stat-card-candidates { border-top: 4px solid #2563eb; }
.stat-card-pending { border-top: 4px solid #f59e0b; background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%); }
.stat-card-correction { border-top: 4px solid #f43f5e; background: linear-gradient(180deg, #fffafb 0%, #ffffff 100%); }
.stat-card-verified { border-top: 4px solid #3b82f6; background: linear-gradient(180deg, #fafcff 0%, #ffffff 100%); }
.stat-card-cleared { border-top: 4px solid #10b981; background: linear-gradient(180deg, #f7fdfa 0%, #ffffff 100%); }
.stat-card-revenue {
  background: linear-gradient(135deg, #064e3b 0%, #047857 55%, #065f46 100%);
  border: 1px solid #047857;
  color: #ffffff;
  box-shadow: 0 8px 22px -4px rgba(6, 78, 59, 0.35);
}
.stat-card-revenue .stat-label { color: #a7f3d0; }
.stat-card-revenue .stat-value { color: #ffffff; }

/* Fraud Duplicate Safeguard Banner */
.duplicate-alert-banner {
  background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
  border: 1.5px solid #fca5a5;
  border-left: 6px solid #dc2626;
  border-radius: 12px;
  padding: 1.15rem 1.5rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.08);
}

.dup-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 450px;
}

.dup-icon-badge {
  width: 44px;
  height: 44px;
  background: #fee2e2;
  border: 1.5px solid #f87171;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.dup-text h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #991b1b;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.dup-text p {
  font-size: 0.825rem;
  color: #b91c1c;
  line-height: 1.4;
  margin: 0;
}

.btn-dup-filter {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.825rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
  white-space: nowrap;
}

.btn-dup-filter:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
}

/* Card Shell Container */
.card-shell {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  margin-bottom: 2rem;
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.card-title h2, .card-title h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Filter Toolbar */
.filter-toolbar {
  padding: 1.25rem 1.75rem;
  background: #fafafa;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1 1 360px;
  position: relative;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: #94a3b8;
  pointer-events: none;
}

.search-input-wrap .form-control {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  font-size: 0.88rem;
  background: #ffffff;
  color: #0f172a;
  transition: all 0.2s ease;
}

.search-input-wrap .form-control:focus {
  border-color: #059669;
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-controls select.form-control {
  padding: 0.72rem 2.25rem 0.72rem 1rem;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat calc(100% - 12px) center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-controls select.form-control:focus {
  border-color: #059669;
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.checkbox-label-dup {
  background: #fee2e2;
  border: 1.5px solid #fca5a5;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.825rem;
  font-weight: 700;
  color: #dc2626;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.checkbox-label-dup:hover {
  background: #fecdd3;
  border-color: #f87171;
}

/* Quick Filter Chips */
.quick-filter-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip-filter-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-filter-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.chip-filter-btn.active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

/* Modern Data Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table thead th {
  background: #f8fafc;
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 1.15rem 1.25rem;
  font-size: 0.88rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.data-table tbody tr.row-duplicate {
  background: #fff8f8 !important;
  border-left: 4px solid #ef4444;
}

.data-table tbody tr.row-duplicate:hover {
  background: #fee2e2 !important;
}

.badge-danger-tag {
  background: #dc2626;
  color: #ffffff;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* Status Badges */
.badge-cleared {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-verified {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-correction {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Audit Button */
.data-table .btn-primary.btn-sm {
  background: #059669;
  color: #ffffff;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  white-space: nowrap;
}

.data-table .btn-primary.btn-sm:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
}

/* Auth & Login Dual Inputs Row Alignment */
.auth-form-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1.25rem !important;
  align-items: flex-start !important;
  margin-bottom: 1.25rem !important;
}

.auth-form-row .form-group {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

.auth-form-row .form-label {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  min-height: 22px !important;
  line-height: 1.35 !important;
  margin-bottom: 0.45rem !important;
  white-space: nowrap !important;
}

.auth-form-row .form-label strong,
.auth-form-row .form-label .label-title {
  font-weight: 700 !important;
  color: #0f172a !important;
  font-size: 0.875rem !important;
  white-space: nowrap !important;
}

.auth-form-row .form-label .sub {
  font-size: 0.75rem !important;
  color: #64748b !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

.auth-form-row .form-control {
  height: 46px !important;
  padding: 0.65rem 0.95rem !important;
  font-size: 0.95rem !important;
  border-radius: 8px !important;
  border: 1.5px solid #cbd5e1 !important;
  box-sizing: border-box !important;
}

@media (max-width: 600px) {
  .auth-form-row {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

/* ========================================================
   REGISTRAR DESK EXECUTIVE DASHBOARD STYLING
   ======================================================== */
.registrar-hero-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-top: 4px solid #7c3aed;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.registrar-hero-left {
  max-width: 650px;
}

.registrar-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #6d28d9;
  font-size: 0.725rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.registrar-hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem 0;
  line-height: 1.25;
}

.registrar-hero-desc {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.registrar-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Smart Filter Card */
.smart-filter-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.smart-filter-grid {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1.3fr 1.2fr auto;
  gap: 0.85rem;
  align-items: center;
}

@media (max-width: 1200px) {
  .smart-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {
  .smart-filter-grid {
    grid-template-columns: 1fr;
  }
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
  font-size: 1.05rem;
}

.search-input-wrap input.form-control {
  padding-left: 2.6rem !important;
  height: 44px !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  width: 100% !important;
  border: 1.5px solid #cbd5e1 !important;
}

.search-input-wrap input.form-control:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
}

.filter-select {
  height: 44px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #1e293b !important;
  background-color: #f8fafc !important;
}

.filter-select:focus {
  border-color: #7c3aed !important;
  background-color: #ffffff !important;
}

/* Quick Filter Pills Row */
.filter-pills-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #e2e8f0;
}

.filter-pills-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.filter-pill:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.filter-pill.active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.filter-pill.pill-cleared.active {
  background: #059669;
  border-color: #059669;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.filter-pill.pill-verified.active {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.filter-pill.pill-pending.active {
  background: #d97706;
  border-color: #d97706;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}

.filter-pill.pill-unpaid.active {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.pill-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
}

.filter-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Excel Export Button */
.btn-excel {
  background: linear-gradient(135deg, #107c41 0%, #0b5a2f 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(16, 124, 65, 0.25) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  height: 44px !important;
  padding: 0 1.25rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
}

.btn-excel:hover {
  background: linear-gradient(135deg, #0e6b37 0%, #084323 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(16, 124, 65, 0.35) !important;
}

/* Department and Course Tags in Table */
.dept-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  line-height: 1.3;
  white-space: normal;
  max-width: 220px;
}

.course-text {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

/* Rich Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-status.cleared {
  background: #ecfdf5;
  color: #047857;
  border: 1.5px solid #a7f3d0;
}

.badge-status.verified {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1.5px solid #bfdbfe;
}

.badge-status.pending {
  background: #fffbeb;
  color: #b45309;
  border: 1.5px solid #fde68a;
}

.badge-status.correction {
  background: #fff7ed;
  color: #c2410c;
  border: 1.5px solid #fed7aa;
}

.badge-status.unpaid {
  background: #fef2f2;
  color: #b91c1c;
  border: 1.5px solid #fecaca;
}

/* Stat card specific for unpaid */
.stat-card-unpaid {
  border-top: 4px solid #ef4444 !important;
  background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%) !important;
}

/* =============================================================
   ACADEMIC STRUCTURE MANAGEMENT MODAL & TABS (DEPARTMENTS / COURSES)
   ============================================================= */
.structure-modal-dialog {
  max-width: 960px !important;
  width: 95% !important;
}

.structure-tabs-bar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

.structure-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.structure-tab-btn:hover {
  color: #1e293b;
  border-bottom-color: #cbd5e1;
}

.structure-tab-btn.active {
  color: #7c3aed;
  border-bottom-color: #7c3aed;
}

.structure-tab-btn .tab-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.structure-tab-btn.active .tab-badge {
  background: #ede9fe;
  color: #6d28d9;
}

.structure-panel {
  display: none;
}

.structure-panel.active {
  display: block;
}

.structure-form-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.structure-form-card.edit-mode {
  background: #fffbeb;
  border-color: #fde68a;
}

.structure-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.structure-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.structure-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
  color: #1e293b;
  vertical-align: middle;
}

.structure-table tr:last-child td {
  border-bottom: none;
}

.structure-table tr:hover td {
  background: #f8fafc;
}

.btn-icon-action {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.btn-icon-action:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-icon-action.btn-delete:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.badge-award {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-award.diploma {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.badge-award.certificate {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-award.higher {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-award.artisan {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* =============================================================
   OFFICIAL ACADEMIC CLEARANCE & GOWN COLLECTION PERMIT
   ============================================================= */
.clearance-modal-dialog {
  max-width: 880px !important;
  width: 95% !important;
  max-height: 94vh !important;
  border-radius: 12px !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35) !important;
}

.clearance-modal-dialog .modal-body {
  padding: 1.25rem 1.5rem !important;
  background: #f1f5f9 !important;
  overflow-y: auto !important;
}

.certificate-paper {
  background: #ffffff;
  border: 3px double #1e3a8a;
  outline: 5px solid #ffffff;
  outline-offset: -7px;
  border-radius: 10px;
  padding: 1.65rem 1.85rem;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
  font-family: var(--font-family);
  color: #0f172a;
}

/* Subtle Institutional Watermark */
.certificate-paper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: url('../img/mtti_logo.jpg') no-repeat center center;
  background-size: contain;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.certificate-paper > * {
  position: relative;
  z-index: 1;
}

/* Header Section */
.cert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1rem;
}

.cert-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cert-crest {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #1e3a8a;
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.16);
  flex-shrink: 0;
  background: #ffffff;
}

.cert-crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cert-inst-text {
  text-align: left;
}

.cert-country-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.15rem;
}

.cert-inst-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0b1f44;
  letter-spacing: 0.015em;
  margin: 0 0 0.2rem 0;
  line-height: 1.2;
}

.cert-office-sub {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.15rem;
}

.cert-contact-sub {
  font-size: 0.7rem;
  color: #64748b;
}

/* Security Verification Widget (Top Right) */
.cert-security-widget {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  text-align: right;
  min-width: 175px;
}

.cert-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.cert-id-tag {
  font-family: monospace;
  font-size: 0.825rem;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.04em;
  display: block;
}

.cert-security-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 1px;
}

/* Title Banner */
.cert-title-banner {
  background: linear-gradient(135deg, #09122c 0%, #172554 100%);
  color: #ffffff;
  padding: 0.75rem 1.15rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1rem;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
  border-left: 5px solid #10b981;
}

.cert-title-banner h4 {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  margin: 0 0 0.2rem 0;
  color: #ffffff;
}

.cert-title-banner p {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin: 0;
}

/* Formal Authorization Notice */
.cert-intro-notice {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 1rem;
  background: #f8fafc;
  border-left: 3px solid #7c3aed;
  padding: 0.55rem 0.85rem;
  border-radius: 4px;
}

/* Credentials Grid */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.cert-grid-cell {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.cert-grid-cell.highlight-cell {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.cert-cell-label {
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.15rem;
}

.cert-cell-value {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.cert-cell-value.text-primary {
  color: #1e3a8a;
  font-family: monospace;
  font-size: 0.95rem;
}

.cert-cell-value.text-success {
  color: #047857;
}

/* Gown Collection Pass Box */
.cert-gown-pass {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.15rem;
}

.gown-pass-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: #065f46;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #bbf7d0;
}

.gown-pass-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

@media (max-width: 768px) {
  .cert-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .cert-security-widget {
    text-align: left;
    width: 100%;
  }
  .cert-grid {
    grid-template-columns: 1fr;
  }
  .gown-pass-grid {
    grid-template-columns: 1fr;
  }
}

.gown-logistics-item {
  font-size: 0.8rem;
  color: #166534;
  line-height: 1.35;
}

.gown-logistics-label {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #047857;
  margin-bottom: 0.12rem;
}

.gown-pass-terms {
  font-size: 0.72rem;
  color: #15803d;
  background: rgba(255,255,255,0.7);
  border: 1px dashed #86efac;
  border-radius: 5px;
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.35;
}

/* Signatures & Seal Section */
.cert-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1.5px solid #e2e8f0;
}

.cert-seal-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px dashed #047857;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-seal-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #065f46;
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1.15;
}

.cert-signatures {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  justify-content: flex-end;
}

.sig-line {
  text-align: center;
  min-width: 160px;
}

.sig-val {
  font-family: 'Brush Script MT', 'Dancing Script', cursive, serif;
  font-size: 1.35rem;
  color: #1e3a8a;
  padding-bottom: 0.15rem;
  border-bottom: 1.5px solid #0f172a;
  min-height: 34px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sig-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #334155;
  margin-top: 0.3rem;
  letter-spacing: 0.025em;
}

.sig-role {
  font-size: 0.65rem;
  color: #64748b;
}

/* =============================================================
   PRINT OPTIMIZATION (Strict Single A4 Sheet Isolation)
   ============================================================= */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 10mm;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
    font-size: 10.5pt !important;
  }

  /* Hide everything except the modal */
  body > *:not(.modal-overlay) {
    display: none !important;
  }

  .modal-overlay:not(#clearanceCertificateModal) {
    display: none !important;
  }

  #clearanceCertificateModal {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
  }

  #clearanceCertificateModal .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    overflow: visible !important;
    animation: none !important;
    transform: none !important;
  }

  #clearanceCertificateModal .modal-header,
  #clearanceCertificateModal .cert-actions,
  #clearanceCertificateModal .modal-close {
    display: none !important;
  }

  #clearanceCertificateModal .modal-body {
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    max-height: none !important;
  }

  .certificate-paper {
    border: 2.5px double #0f172a !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 14mm 14mm !important;
    margin: 0 auto !important;
    page-break-inside: avoid !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    border-radius: 4px !important;
  }

  .certificate-paper::before {
    opacity: 0.05 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cert-header {
    border-bottom: 2px solid #0f172a !important;
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
  }

  .cert-inst-title {
    color: #000000 !important;
    font-size: 14pt !important;
  }

  .cert-security-widget {
    background: #f8fafc !important;
    border: 1.5px solid #64748b !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cert-title-banner {
    background: #09122c !important;
    color: #ffffff !important;
    border-left: 5px solid #059669 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    padding: 8px 12px !important;
    margin-bottom: 10px !important;
  }

  .cert-title-banner h4 {
    color: #ffffff !important;
    font-size: 10.5pt !important;
  }

  .cert-title-banner p {
    color: #e2e8f0 !important;
    font-size: 8pt !important;
  }

  .cert-intro-notice {
    background: #f8fafc !important;
    border-left: 3px solid #1e3a8a !important;
    font-size: 8.5pt !important;
    padding: 6px 10px !important;
    margin-bottom: 9px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cert-grid {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .cert-grid-cell {
    border: 1px solid #cbd5e1 !important;
    padding: 6px 10px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cert-grid-cell.highlight-cell {
    background: #f0fdf4 !important;
    border-color: #86efac !important;
  }

  .cert-cell-label {
    font-size: 6.5pt !important;
    margin-bottom: 2px !important;
  }

  .cert-cell-value {
    font-size: 9.5pt !important;
  }

  .cert-gown-pass {
    background: #f0fdf4 !important;
    border: 1.5px solid #15803d !important;
    padding: 10px 12px !important;
    margin-bottom: 12px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .gown-pass-title {
    color: #065f46 !important;
    font-size: 8.5pt !important;
    margin-bottom: 6px !important;
    padding-bottom: 4px !important;
  }

  .gown-logistics-item {
    font-size: 8pt !important;
  }

  .gown-pass-terms {
    font-size: 7.5pt !important;
    padding: 4px 8px !important;
    border: 1px dashed #15803d !important;
  }

  .cert-footer {
    padding-top: 8px !important;
    border-top: 1.5px solid #94a3b8 !important;
  }

  .cert-seal-wrap {
    width: 72px !important;
    height: 72px !important;
    border: 1.5px dashed #047857 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .sig-line {
    min-width: 140px !important;
  }

  .sig-val {
    font-size: 1.25rem !important;
    min-height: 28px !important;
    border-bottom: 1.5px solid #000000 !important;
    color: #000000 !important;
  }
}
