@import url("design-tokens.css");

/* ==========================================================================
   HỆ THỐNG TRUYỀN THÔNG NỘI BỘ - THPT MẠC ĐĨNH CHI
   Design System & Styling
   ========================================================================== */

:root {
  /* BẢNG MÀU NHẬN DIỆN CHÍNH THỨC THPT MẠC ĐĨNH CHI */
  --dusty-blue: var(--mdc-muted-blue, #6366F1);
  --dusty-blue-light: #CBD5E1;
  --rose: #818CF8;
  --ivory: #F8FAFC;
  --navy-900: var(--mdc-navy-dark, #312E81);
  --navy-800: var(--mdc-deep-blue, #312E81);
  --navy-700: #312E81;
  --navy-600: #312E81;
  --navy-100: #F1F5F9;
  --navy-50: #F8FAFC;
  --pink-600: var(--mdc-neon-pink, #818CF8);
  --pink-500: var(--mdc-light-magenta, #818CF8);
  --pink-200: #E2E8F0;
  --pink-50: #F8FAFC;

  --primary-color: var(--mdc-deep-blue, #312E81);
  --primary-hover: var(--mdc-navy-dark, #312E81);
  --secondary-color: var(--mdc-neon-pink, #818CF8);
  --accent-gold: var(--mdc-neon-pink, #818CF8);
  --accent-gold-light: rgba(99, 102, 241, 0.12);

  --bg-gradient: linear-gradient(135deg, #FFFFFF 0%, var(--navy-50) 55%, var(--pink-50) 100%);
  --surface-card: #FFFFFF;
  --surface-subtle: var(--navy-50);
  --border-color: #E2E8F0;
  --border-focus: var(--mdc-neon-pink, #818CF8);

  --text-main: var(--mdc-navy-dark, #312E81);
  --text-muted: var(--mdc-muted-blue, #6366F1);
  --text-white: #FFFFFF;

  --success-color: #2E8B63;
  --success-bg: #F1F5F9;
  --danger-color: #E06B7A;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header / Hero Banner
   ========================================================================== */
.hero-header {
  background: linear-gradient(135deg, #4F46E5 0%, #4F46E5 52%, #4F46E5 100%);
  color: var(--text-white);
  padding: 2.8rem 1.5rem 3.8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(79, 70, 229, 0.18);
}

.hero-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: #F8FAFC;
  border-radius: 24px 24px 0 0;
}

.header-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #FEF3C7;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #2E8B63;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(46, 139, 99, 0.7);
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 139, 99, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(46, 139, 99, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 139, 99, 0); }
}

.school-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 4px rgba(15, 23, 42,0.2);
}

.portal-subtitle {
  font-size: 1.15rem;
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 0.8rem;
  color: #F1F5F9;
}

.motto-tag {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(15, 23, 42, 0.2);
  padding: 4px 14px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Main Form Container
   ========================================================================== */
.main-content {
  flex: 1;
  max-width: 840px;
  width: 100%;
  margin: -1.5rem auto 3rem;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

.form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Role Selector (Segmented control) */
.role-selector-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.25rem;
  background: var(--surface-subtle);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.tab-btn:hover {
  background: #F1F5F9;
  transform: translateY(-1px);
}

.tab-btn.active {
  background: #F1F5F9;
  border-color: var(--secondary-color);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.tab-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.tab-info {
  display: flex;
  flex-direction: column;
}

.tab-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-color);
}

.tab-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Main Form Elements */
.submission-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-section {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.legend-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  width: 100%;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.step-num {
  width: 28px;
  height: 28px;
  background: var(--secondary-color);
  color: var(--text-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.input-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #312E81;
}

.input-label.required::after {
  content: " *";
  color: var(--danger-color);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.help-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.custom-input,
.custom-select,
.custom-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  color: var(--text-main);
  transition: var(--transition);
}

.custom-input:focus,
.custom-select:focus,
.custom-textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.custom-textarea {
  resize: vertical;
  min-height: 110px;
}

/* ==========================================================================
   Tự Động Điền Thông Tin Giáo Viên Phụ Trách Tổ
   ========================================================================== */
.autofill-notice {
  margin-top: 1.15rem;
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-sm);
  background: rgba(46, 139, 99, 0.08);
  border: 1px solid rgba(46, 139, 99, 0.28);
  color: #1F5E43;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: fadeInNotice 0.3s ease-out;
}

.autofill-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  line-height: 1.4;
}

.autofill-icon {
  flex-shrink: 0;
  display: inline-flex;
  color: #2E8B63;
}

.autofill-chips-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(46, 139, 99, 0.25);
}

.autofill-chips-label {
  font-size: 0.8rem;
  color: #1F5E43;
  font-weight: 600;
}

.autofill-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid #6CC39A;
  color: #1F5E43;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.autofill-chip-btn:hover {
  background: #2E8B63;
  color: #FFFFFF;
  border-color: #2E8B63;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(46, 139, 99, 0.25);
}

.autofill-chip-btn.active {
  background: #1F5E43;
  color: #FFFFFF;
  border-color: #1F5E43;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(31, 94, 67, 0.3);
}

.autofill-chip-badge {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: normal;
}

.autofill-highlight {
  animation: pulseFieldGlow 1.25s ease-out;
}

@keyframes fadeInNotice {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseFieldGlow {
  0% {
    border-color: #2E8B63;
    box-shadow: 0 0 0 4px rgba(46, 139, 99, 0.35);
    background-color: rgba(46, 139, 99, 0.05);
  }
  100% {
    border-color: var(--border-color);
    box-shadow: none;
    background-color: var(--surface-card);
  }
}

/* ==========================================================================
   Upload Area (Drag & Drop)
   ========================================================================== */
.drop-zone {
  border: 2px dashed #818CF8;
  background: #F8FAFC;
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--secondary-color);
  background: #F8FAFC;
  transform: scale(1.005);
}

.drop-icon {
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
}

.drop-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.drop-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.highlight-browse {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: underline;
}

.drop-note {
  font-size: 0.8rem;
  color: #4F46E5;
}

/* File Previews */
.file-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 1.25rem;
}

.file-preview-card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.file-thumbnail {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  background: #F1F5F9;
}

.file-icon-placeholder {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  border-radius: 4px;
  font-size: 1.8rem;
}

.file-name-truncate {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 6px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.btn-remove-file {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-remove-file:hover {
  transform: scale(1.15);
}

/* ==========================================================================
   Submit Button & Action
   ========================================================================== */
.submit-wrapper {
  text-align: center;
  margin-top: 0.5rem;
}

.btn-primary {
  width: 100%;
  padding: 1.1rem 2rem;
  background: linear-gradient(135deg, #0F172A 0%, #4F46E5 100%);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0F172A 0%, #312E81 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.submit-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ==========================================================================
   Modals (Success & Progress)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.modal-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Checkmark Animation */
.success-icon-wrap {
  width: 68px;
  height: 68px;
  margin: 0 auto 1.25rem;
}

.checkmark {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--success-color);
  stroke-miterlimit: 10;
  box-shadow: inset 0 0 0 var(--success-color);
  animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: var(--success-color);
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0 0 0 30px #F1F5F9; } }

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Ticket Card in Modal */
.ticket-badge-card {
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border: 2px dashed #818CF8;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.ticket-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #312E81;
  margin-bottom: 6px;
}

.ticket-code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ticket-code {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: 0.04em;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-card);
  border: 1px solid #818CF8;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #312E81;
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy:hover {
  background: #F1F5F9;
}

.ticket-instruction {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Summary Details */
.summary-details {
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid #F1F5F9;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-key {
  color: var(--text-muted);
}

.detail-val {
  font-weight: 600;
  color: var(--text-main);
}

.badge-status {
  background: #F1F5F9;
  color: #312E81;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.link-drive {
  color: var(--secondary-color);
  text-decoration: none;
}

.link-drive:hover {
  text-decoration: underline;
}

.btn-secondary {
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: var(--surface-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

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

/* Progress Modal */
.progress-card {
  max-width: 440px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner.large {
  width: 50px;
  height: 50px;
  border-width: 4px;
  border-color: #F1F5F9;
  border-top-color: var(--secondary-color);
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.4rem;
}

.progress-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #F1F5F9;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4F46E5, #2E8B63);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-percent {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0F172A;
  color: #4F46E5;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  margin-top: auto;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer strong {
  color: #F1F5F9;
}

.copyright {
  font-size: 0.75rem;
  color: #4F46E5;
  margin-top: 6px;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 640px) {
  .hero-header {
    padding: 2.2rem 1rem 3rem;
  }
  
  .school-title {
    font-size: 1.6rem;
  }
  
  .portal-subtitle {
    font-size: 0.98rem;
  }
  
  .segmented-control {
    grid-template-columns: 1fr;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .form-section {
    padding: 1.25rem;
  }
  
  .drop-zone {
    padding: 1.8rem 1rem;
  }
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.top-nav-bar {
  background: linear-gradient(90deg, #312E81 0%, #4F46E5 55%, #4F46E5 100%);
  color: #F8FAFC;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.65rem 1.5rem;
  box-shadow: 0 2px 10px rgba(49, 46, 129, 0.12);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.25));
}

.nav-school {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: #818CF8;
}

.nav-admin-btn, .nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.nav-admin-btn:hover, .nav-link-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* ==========================================================================
   Admin Dashboard Layout
   ========================================================================== */
.admin-body {
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 50%, #F8FAFC 100%);
}

.admin-nav-container {
  max-width: 1300px;
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-divider {
  color: #312E81;
}

.nav-app-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #F1F5F9;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-logout {
  background: transparent;
  border: 1px solid #E06B7A;
  color: #E06B7A;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: #E06B7A;
  color: white;
}

.admin-main {
  max-width: 1300px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.25rem;
  width: 100%;
}

/* PIN Screen */
.pin-screen {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.pin-card {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
}

.pin-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.pin-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.3rem;
}

.pin-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.pin-input {
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
}

.pin-error {
  color: var(--danger-color);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

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

.metric-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

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

.bg-blue { background: #F1F5F9; }
.bg-amber { background: #FEF3C7; }
.bg-red { background: #F1F5F9; }
.bg-green { background: #F1F5F9; }

.metric-data {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Toolbar & Filters */
.admin-toolbar {
  background: white;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  flex: 1;
  min-width: 260px;
}

.search-box svg {
  color: var(--text-muted);
}

.search-input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: white;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-main);
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 1rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-refresh:hover {
  background: #F1F5F9;
}

/* Admin Table */
.table-container {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.admin-table thead {
  background: #F8FAFC;
  border-bottom: 2px solid var(--border-color);
}

.admin-table th {
  padding: 0.85rem 1rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: #312E81;
  white-space: nowrap;
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

/* ĐX-13: Sticky Cột đầu tiên (Mã bài viết) trong bảng quản trị */
.admin-table th:first-child,
.admin-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--color-bg-surface, #FFFFFF);
  box-shadow: 2px 0 6px rgba(49, 46, 129, 0.08);
}

.admin-table thead th:first-child {
  background: var(--color-bg-subtle, #F8FAFC);
  z-index: 4;
}

.admin-table tbody tr:hover td:first-child {
  background: var(--color-bg-subtle, #F8FAFC);
}

[data-theme="dark"] .admin-table th:first-child,
[data-theme="dark"] .admin-table td:first-child {
  background: var(--color-bg-surface, #0F172A);
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.5);
}

[data-theme="dark"] .admin-table thead th:first-child {
  background: var(--color-bg-subtle, #0F172A);
}

[data-theme="dark"] .admin-table tbody tr:hover td:first-child {
  background: var(--color-bg-subtle, #0F172A);
}

.admin-table tbody tr:hover {
  background: #F8FAFC;
}

.table-ticket-code {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--primary-color);
  background: #F8FAFC;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #CBD5E1;
  white-space: nowrap;
}

.dept-cell {
  display: flex;
  flex-direction: column;
}

.event-title-cell {
  font-weight: 600;
  color: #0F172A;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.handler-tag {
  font-size: 0.82rem;
  color: #312E81;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-blue   { background: #F1F5F9; color: #312E81; }
.badge-purple { background: #F1F5F9; color: #4F46E5; }
.badge-yellow { background: #FEF9C3; color: #92400E; }
.badge-red    { background: #F1F5F9; color: #B03A48; }
.badge-orange { background: #FDF2F8; color: #B45309; }
.badge-teal   { background: #EAF7F0; color: #312E81; }
.badge-indigo { background: #F1F5F9; color: #4F46E5; }
.badge-green  { background: #F1F5F9; color: #1F5E43; }
.badge-gray   { background: #F1F5F9; color: #312E81; }
.badge-cancel { background: #F8FAFC; color: #B03A48; border: 1px dashed #F6C3CA; }

.badge-rev {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: #F1F5F9;
  color: #312E81;
}

.badge-rev.rev-warning {
  background: #F1F5F9;
  color: #B03A48;
  border: 1px solid #F6C3CA;
  animation: pulseWarning 1.5s infinite;
}

@keyframes pulseWarning {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action-review {
  background: #4F46E5;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-action-review:hover {
  background: #312E81;
  transform: translateY(-1px);
}

.btn-action-drive {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F1F5F9;
  color: #1F5E43;
  border: 1px solid #BFE8D3;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-action-drive:hover {
  background: #EAF7F0;
  color: #1F5E43;
  border-color: #6CC39A;
  transform: translateY(-1px);
}

.btn-action-delete {
  background: #F1F5F9;
  color: #B03A48;
  border: 1px solid #F6C3CA;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-action-delete:hover {
  background: #FCECEE;
  color: #B03A48;
  transform: translateY(-1px);
}

.btn-upgrade-super {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-upgrade-super:hover {
  background: #FDE68A;
  color: #92400E;
  transform: translateY(-1px);
}

/* Empty & Loading States */
.loading-state, .empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* Review Modal Card */
.review-modal-card {
  max-width: 900px;
  text-align: left;
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
}

.modal-ticket-badge {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: #312E81;
  background: #F1F5F9;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.modal-review-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.review-modal-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.75rem;
}

.col-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
}

.info-item {
  display: flex;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
}

.info-label {
  width: 100px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.info-value {
  font-weight: 600;
  color: var(--text-main);
}

.drive-access-card {
  background: #F8FAFC;
  border: 1px solid #BFE8D3;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin: 1rem 0;
}

.drive-card-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1F5E43;
  margin-bottom: 6px;
}

.btn-drive-open {
  display: inline-block;
  background: #2E8B63;
  color: white;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-drive-open:hover {
  background: #1F5E43;
}

.caption-view-box {
  margin-top: 1rem;
}

.caption-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.caption-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.btn-copy-sm {
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.75rem;
  padding: 2px 8px;
  cursor: pointer;
}

.caption-display {
  width: 100%;
  height: 120px;
  padding: 8px;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  resize: vertical;
  font-family: inherit;
}

.revision-alert {
  background: #F8FAFC;
  border: 1px solid #FCECEE;
  color: #B03A48;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.modal-footer-btns {
  display: flex;
  gap: 10px;
  margin-top: 1.5rem;
}

/* Hộp tùy chọn gửi email tự động trong Modal Admin */
.email-action-box {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1.2rem;
}

.email-toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.email-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #312E81;
  cursor: pointer;
  user-select: none;
}

.email-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #312E81;
  cursor: pointer;
}

.email-target-info {
  font-size: 0.78rem;
  color: #312E81;
  margin-top: 5px;
  padding-left: 25px;
}

.email-target-info strong {
  color: #312E81;
}

.btn-send-email-direct {
  background: #312E81;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(49, 46, 129, 0.25);
}

.btn-send-email-direct:hover {
  background: #312E81;
  transform: translateY(-1px);
}

.btn-send-email-direct:disabled {
  background: #E2E8F0;
  color: #4F46E5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 820px) {
  .review-modal-body {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SUPER ADMIN & SUB-MODULE STYLES
   ========================================================================== */

/* Navbar Role Badges */
.nav-role-badge {
  display: inline-flex;
  align-items: center;
}

.badge-role-admin,
.badge-role-super {
  background: #0F172A;
  color: #4F46E5;
  border: 1px solid #312E81;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.badge-role-editor {
  background: #312E81;
  color: #F1F5F9;
  border: 1px solid #312E81;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Header Bar & Tab Navigation */
.admin-header-bar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  background: #FFFFFF;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.admin-welcome-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-welcome-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
}

.admin-welcome-desc {
  display: block;
  font-size: 0.85rem;
  color: #4F46E5;
  margin-top: 2px;
}

.admin-tab-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid #F1F5F9;
  padding-top: 1rem;
}

.admin-tab-pill {
  background: #F8FAFC;
  color: #312E81;
  border: 1px solid #F1F5F9;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.admin-tab-pill:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #E2E8F0;
}

.admin-tab-pill.active {
  background: #4F46E5;
  color: #FFFFFF;
  border-color: #4F46E5;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

/* View Header Bars */
.view-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: #FFFFFF;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.view-heading {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}

.view-subheading {
  font-size: 0.85rem;
  color: #4F46E5;
  margin: 4px 0 0 0;
}

.view-actions-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-action-primary {
  background: #4F46E5;
  color: #FFFFFF;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-action-primary:hover {
  background: #312E81;
  transform: translateY(-1px);
}

.btn-action-outline {
  background: #FFFFFF;
  color: #312E81;
  border: 1px solid #E2E8F0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-action-outline:hover {
  background: #F8FAFC;
  border-color: #4F46E5;
}

/* Analytics KPI Grid */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background: #FFFFFF;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.kpi-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.kpi-body {
  display: flex;
  flex-direction: column;
}

.kpi-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #4F46E5;
  letter-spacing: 0.03em;
}

.kpi-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #0F172A;
  margin: 2px 0;
}

.kpi-sub {
  font-size: 0.78rem;
  color: #4F46E5;
}

/* Ranking Table Elements */
.rank-num {
  font-weight: 700;
  color: #4F46E5;
  font-size: 0.9rem;
}

.rank-medal {
  font-size: 1.1rem;
  font-weight: 800;
}

.rank-medal.gold { color: #B45309; }
.rank-medal.silver { color: #4F46E5; }
.rank-medal.bronze { color: #B45309; }

.count-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.count-total { background: #F1F5F9; color: #0F172A; }
.count-approved { background: #F1F5F9; color: #1F5E43; }
.count-pending { background: #FEF3C7; color: #B45309; }
.count-revision { background: #F1F5F9; color: #B03A48; }

.progress-bar-wrap {
  position: relative;
  width: 100%;
  height: 20px;
  background: #F1F5F9;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.progress-bar-bar {
  height: 100%;
  background: linear-gradient(90deg, #4F46E5 0%, #4F46E5 100%);
  border-radius: 9999px;
  transition: width 0.6s ease;
}

.progress-bar-text {
  position: absolute;
  right: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #312E81;
}

.badge-eval {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Team Workload Cards */
.team-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.team-card {
  background: #FFFFFF;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.team-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.team-avatar {
  font-size: 1.8rem;
  background: #F1F5F9;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-meta {
  display: flex;
  flex-direction: column;
}

.team-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.3;
}

.team-load-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
  width: fit-content;
}

.load-free { background: #F1F5F9; color: #1F5E43; }
.load-normal { background: #F1F5F9; color: #4F46E5; }
.load-heavy { background: #FEF3C7; color: #B45309; }

.team-card-body {
  border-top: 1px solid #F1F5F9;
  border-bottom: 1px solid #F1F5F9;
  padding: 0.75rem 0;
  margin-bottom: 0.75rem;
}

.team-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #4F46E5;
  margin-bottom: 4px;
}

.team-stat-row strong {
  color: #0F172A;
}

.btn-filter-reviewer {
  width: 100%;
  background: #F8FAFC;
  color: #4F46E5;
  border: 1px solid #F1F5F9;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-filter-reviewer:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

/* Audit & Backup */
.audit-info-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.banner-icon {
  font-size: 1.5rem;
}

.banner-text {
  font-size: 0.85rem;
  color: #312E81;
  line-height: 1.5;
}

.audit-action-tag {
  display: inline-block;
  background: #F1F5F9;
  color: #312E81;
  border: 1px solid #F1F5F9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Rank badges (Trang trọng thay thế icon huân chương) */
.rank-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.rank-badge.rank-1 {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}
.rank-badge.rank-2 {
  background: #F1F5F9;
  color: #312E81;
  border: 1px solid #E2E8F0;
}
.rank-badge.rank-3 {
  background: #FDF2F8;
  color: #92400E;
  border: 1px solid #FEF3C7;
}

/* Monogram đội ngũ kiểm duyệt */
.team-monogram {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #4F46E5;
  color: #FFFFFF;
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.2);
}

.team-card-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 0.5rem;
}

.btn-remove-reviewer {
  background: #F8FAFC;
  color: #B03A48;
  border: 1px solid #FCECEE;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-remove-reviewer:hover {
  background: #F1F5F9;
  border-color: #F6C3CA;
}

/* Cấu Hình Vận Hành Hệ Thống */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.config-card {
  background: #FFFFFF;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
}

.config-card-header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid #F1F5F9;
}

.config-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px;
}

.config-card-desc {
  font-size: 0.8rem;
  color: #4F46E5;
}

.config-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
}

.config-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.config-toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: #E2E8F0;
  border-radius: 9999px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background-color: #FFFFFF;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.config-toggle-label input:checked + .toggle-slider {
  background-color: #1F5E43;
}

.config-toggle-label input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #4F46E5;
}

.toggle-text.status-open {
  color: #1F5E43;
}

.toggle-text.status-closed {
  color: #B03A48;
}

.inline-add-group {
  display: flex;
  gap: 8px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dept-tag-item {
  background: #F1F5F9;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.82rem;
  color: #312E81;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-remove-tag {
  background: transparent;
  border: none;
  color: #4F46E5;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.btn-remove-tag:hover {
  color: #E06B7A;
}

/* Thông Báo Ghim & Khóa Cổng Cho Trang Chủ */
.portal-notice-banner {
  background: #F8FAFC;
  border-left: 4px solid #4F46E5;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.08);
}

.portal-notice-banner svg {
  flex-shrink: 0;
  color: #4F46E5;
}

.portal-notice-banner-text {
  font-size: 0.88rem;
  color: #312E81;
  line-height: 1.5;
}

.portal-closed-box {
  background: #FFFFFF;
  border: 1px solid #FCECEE;
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(224, 107, 122, 0.08);
  margin: 2rem 0;
}

.portal-closed-box .closed-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  color: #B03A48;
  background: #F1F5F9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-closed-box h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: #B03A48;
  margin-bottom: 0.75rem;
}

.portal-closed-box p {
  color: #312E81;
  font-size: 0.95rem;
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   Guidelines & Regulation Modal & Callout Styling (Kế hoạch BTT & Yêu cầu nội dung)
   ========================================================================== */
.nav-actions-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-guidelines-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(227, 146, 112, 0.18);
  color: #FDE68A;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(227, 146, 112, 0.45);
  cursor: pointer;
  transition: var(--transition);
}

.nav-guidelines-btn:hover {
  background: rgba(227, 146, 112, 0.32);
  border-color: #FDE68A;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.hero-quick-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.btn-hero-guide {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  transition: var(--transition);
}

.btn-hero-guide:hover {
  background: #F8FAFC;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
}

.btn-hero-guide.outline {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
}

.btn-hero-guide.outline:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: #FFFFFF;
}

/* Callout Card above Caption */
.guidelines-callout-card {
  background: linear-gradient(135deg, #F8FAFC 0%, #F8FAFC 100%);
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.callout-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.callout-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.callout-badge-icon {
  font-size: 1.5rem;
  display: inline-block;
}

.callout-heading {
  font-size: 0.98rem;
  font-weight: 700;
  color: #312E81;
  margin: 0;
}

.callout-sub {
  font-size: 0.78rem;
  color: #312E81;
  margin: 2px 0 0;
}

.btn-callout-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4F46E5;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-callout-view:hover {
  background: #312E81;
  transform: translateY(-1px);
}

.callout-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #F1F5F9;
  margin-bottom: 0.85rem;
}

.callout-summary-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: #312E81;
  line-height: 1.45;
}

.summary-check {
  color: #1F5E43;
  font-weight: 700;
  font-size: 0.85rem;
}

.callout-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.callout-hint {
  font-size: 0.8rem;
  color: #312E81;
}

.callout-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-insert-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1F5E43;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-insert-footer:hover {
  background: #1F5E43;
  transform: translateY(-1px);
}

.btn-copy-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy-footer:hover {
  background: #F1F5F9;
}

/* Modal Guidelines Specifics */
.guidelines-modal-card {
  max-width: 900px !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  text-align: left !important;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35) !important;
}

.guidelines-modal-header {
  background: linear-gradient(135deg, #0F172A 0%, #0F172A 100%);
  color: #FFFFFF;
  padding: 1.2rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #F59E0B;
  flex-shrink: 0;
}

.guidelines-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guidelines-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.guidelines-modal-close:hover {
  background: rgba(224, 107, 122, 0.85);
  transform: rotate(90deg);
}

.guidelines-tab-nav {
  display: flex;
  background: #F1F5F9;
  border-bottom: 1px solid #E2E8F0;
  padding: 0 1.5rem;
  overflow-x: auto;
  flex-shrink: 0;
}

.guidelines-tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #4F46E5;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.guidelines-tab-btn:hover {
  color: #0F172A;
}

.guidelines-tab-btn.active {
  color: #4F46E5;
  border-bottom-color: #4F46E5;
  background: #FFFFFF;
}

.guidelines-modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
  background: #FFFFFF;
}

.guidelines-tab-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

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

/* Guideline typography & cards */
.guide-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  border-bottom: 2px solid #F1F5F9;
  padding-bottom: 6px;
  margin: 1.25rem 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-section-title:first-child {
  margin-top: 0;
}

.guide-rule-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.guide-rule-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: #312E81;
  line-height: 1.55;
}

.guide-rule-list li::before {
  content: "•";
  position: absolute;
  left: 8px;
  top: -1px;
  color: #4F46E5;
  font-size: 1.2rem;
  font-weight: bold;
}

.guide-alert-ai {
  background: #F8FAFC;
  border-left: 4px solid #E06B7A;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #4F46E5;
  margin-bottom: 1.25rem;
}

.five-w-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 1rem 0 1.25rem;
}

.five-w-card {
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.five-w-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #F1F5F9;
  color: #312E81;
  margin-bottom: 6px;
}

.five-w-tag.why {
  background: #FEF3C7;
  color: #92400E;
}

.five-w-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0F172A;
}

.five-w-desc {
  font-size: 0.82rem;
  color: #312E81;
  margin-top: 4px;
  line-height: 1.45;
}

.footer-preview-box {
  background: #0F172A;
  color: #F1F5F9;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  position: relative;
  margin: 0.75rem 0 1.25rem;
  border: 1px solid #312E81;
}

.footer-preview-box .btn-copy-in-box {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  font-size: 0.75rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: var(--transition);
}

.footer-preview-box .btn-copy-in-box:hover {
  background: #4F46E5;
  border-color: #4F46E5;
}

/* Department representative table */
.rep-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-sm);
}

.rep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.rep-table th {
  background: #F1F5F9;
  color: #0F172A;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid #E2E8F0;
}

.rep-table td {
  padding: 8px 14px;
  border-bottom: 1px solid #F1F5F9;
  color: #312E81;
}

.rep-table tr:hover td {
  background: #F8FAFC;
}

.pdf-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.pdf-download-card:hover {
  border-color: #4F46E5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

.pdf-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pdf-icon {
  font-size: 2rem;
}

.pdf-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
}

.pdf-meta {
  font-size: 0.8rem;
  color: #4F46E5;
}

.btn-pdf-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4F46E5;
  color: #FFFFFF;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-pdf-download:hover {
  background: #312E81;
}

.guidelines-modal-footer {
  background: #F8FAFC;
  border-top: 1px solid #F1F5F9;
  padding: 1rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

/* ==========================================================================
   PORTAL MODE SWITCHER & REVISION SYSTEM STYLES
   ========================================================================== */
.portal-mode-card {
  border-left: 4px solid var(--primary-color);
}

.revision-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 1. Revision Search Card */
.revision-search-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  border-top: 4px solid #B45309;
}

.search-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.search-icon-badge {
  font-size: 1.5rem;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.search-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 2px;
}

.search-sub {
  font-size: 0.85rem;
  color: #4F46E5;
}

.search-input-group {
  display: flex;
  gap: 10px;
}

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

.search-input-wrap svg {
  position: absolute;
  left: 14px;
  color: #4F46E5;
}

.revision-search-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.revision-search-input:focus {
  border-color: #B45309;
  box-shadow: 0 0 0 3px rgba(181, 98, 58, 0.15);
}

.btn-search-ticket {
  background: #B45309;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-search-ticket:hover {
  background: #B45309;
  transform: translateY(-1px);
}

.search-notice-wrap {
  margin-top: 1rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 2. Search Results List */
.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-item-card {
  background: #FFFFFF;
  border: 1.5px solid #F1F5F9;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.result-item-card:hover {
  border-color: #4F46E5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
  transform: translateX(4px);
}

.result-item-card.needs-revision {
  border-left: 4px solid #B45309;
  background: #F8FAFC;
}

.result-item-info h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 4px;
}

.result-item-meta {
  font-size: 0.82rem;
  color: #4F46E5;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-select-result {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #312E81;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.result-item-card:hover .btn-select-result {
  background: #4F46E5;
  color: #FFFFFF;
  border-color: #4F46E5;
}

/* 3. Revision Detail Card */
.revision-detail-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  animation: fadeIn 0.3s ease;
}

.detail-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 1.25rem;
}

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

.ticket-id-tag {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.95rem;
  background: #0F172A;
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.badge-status-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.rev-count-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: #F1F5F9;
  color: #312E81;
}

.ticket-title-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 4px;
}

.ticket-dept-text {
  font-size: 0.85rem;
  color: #4F46E5;
}

.btn-close-detail {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #4F46E5;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-close-detail:hover {
  background: #F1F5F9;
  color: #0F172A;
}

/* 4. Feedback Callout */
.btt-feedback-callout {
  background: #F1F5F9;
  border: 1.5px solid #FDF2F8;
  border-left: 5px solid #B45309;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.feedback-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.feedback-badge-tag {
  font-size: 0.82rem;
  font-weight: 800;
  color: #B45309;
  letter-spacing: 0.02em;
}

.reviewer-name-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: #92400E;
  background: #FDF2F8;
  padding: 2px 8px;
  border-radius: 4px;
}

.feedback-body-content {
  font-size: 0.95rem;
  color: #92400E;
  line-height: 1.55;
  font-style: italic;
  font-weight: 500;
}

/* 5. Google Drive Tree View Card */
.drive-tree-view-card {
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.tree-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1rem;
}

.tree-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0F172A;
}

.btn-open-drive-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4F46E5;
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-open-drive-tab:hover {
  background: #312E81;
}

.folder-tree-container {
  background: #FFFFFF;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}

.tree-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.88rem;
}

.tree-node.root {
  font-weight: 700;
  color: #0F172A;
  border-bottom: 1px dashed #F1F5F9;
  padding-bottom: 8px;
  margin-bottom: 6px;
}

.tree-tag-cloud {
  margin-left: auto;
  font-size: 0.75rem;
  background: #F1F5F9;
  color: #312E81;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.tree-children {
  padding-left: 10px;
}

.tree-branch {
  color: #4F46E5;
  font-family: monospace;
}

.tree-name {
  font-weight: 600;
  color: #0F172A;
}

.tree-desc {
  font-size: 0.8rem;
  color: #4F46E5;
}

.tree-node.highlight-new {
  background: #F1F5F9;
  border-radius: 4px;
  padding: 6px 8px;
  margin-top: 4px;
}

.tree-node.highlight-new .tree-name {
  color: #1F5E43;
}

.tree-badge-new {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1F5E43;
}

.tree-hint-text {
  font-size: 0.8rem;
  color: #4F46E5;
  margin-top: 10px;
  line-height: 1.45;
}

/* 6. Form actions and Dropzone for Revision */
.drop-zone.revision-drop {
  padding: 1.25rem 1rem;
  background: #F8FAFC;
  border: 1.5px dashed #E2E8F0;
}

.drop-zone.revision-drop:hover {
  background: #F1F5F9;
  border-color: #2E8B63;
}

.btn-revision-submit {
  background: linear-gradient(135deg, #1F5E43 0%, #2E8B63 100%) !important;
  box-shadow: 0 4px 14px rgba(46, 139, 99, 0.3) !important;
}

.btn-revision-submit:hover {
  background: linear-gradient(135deg, #1F5E43 0%, #1F5E43 100%) !important;
  box-shadow: 0 6px 20px rgba(46, 139, 99, 0.4) !important;
}

.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.btn-text-action {
  background: none;
  border: none;
  color: #4F46E5;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.btn-text-action:hover {
  text-decoration: underline;
}

/* ==========================================================================
   7. CHẾ ĐỘ THU THẬP ẢNH TUYÊN DƯƠNG HỌC SINH (KHI CHỌN "KHÁC")
   ========================================================================== */
.student-photo-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(255, 250, 245, 0.95) 0%, rgba(247, 238, 236, 0.85) 100%);
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
  animation: fadeInBanner 0.3s ease-out;
}

@keyframes fadeInBanner {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.student-photo-banner-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  padding: 8px;
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.student-photo-banner-content {
  flex: 1;
}

.student-photo-banner-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #312E81;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.student-photo-banner-desc {
  font-size: 0.88rem;
  color: #4F46E5;
  line-height: 1.5;
  margin: 0;
}

.event-hint-note {
  margin-top: 8px;
  padding: 10px 14px;
  background: #F8FAFC;
  border-left: 3.5px solid #4F46E5;
  border-radius: 4px 8px 8px 4px;
  font-size: 0.86rem;
  color: #312E81;
  line-height: 1.5;
}

/* Badge đổi tên file theo cú pháp [Tên_Học_Sinh]_[STT].[ext] */
.file-rename-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #F8FAFC;
  border: 1px solid #BFE8D3;
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #1F5E43;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-rename-badge .rename-icon {
  font-size: 0.8rem;
}

.file-rename-badge .rename-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Quản lý sự kiện trong Super Admin */
.student-events-table-wrap {
  overflow-x: auto;
}

.student-events-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.student-events-table-wrap th {
  background: #F8FAFC;
  color: #312E81;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1.5px solid #F1F5F9;
}

.student-events-table-wrap td {
  padding: 12px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}





/* ==========================================================================
 * BỘ LỌC TRẠNG THÁI & CHẾ ĐỘ XEM THẺ (CARD VIEW) - BAN TRUYỀN THÔNG MDC
 * ========================================================================== */

/* Metric Cards Clickable */
.metric-card.interactive-metric {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
}
.metric-card.interactive-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border-color: #4F46E5;
}

/* View Mode Toggle Button Group */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  border: 1px solid #F1F5F9;
}
.btn-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #4F46E5;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-view-toggle:hover {
  color: #0F172A;
}
.btn-view-toggle.active {
  background: white;
  color: #4F46E5;
  box-shadow: 0 1px 3px rgba(15, 23, 42,0.1);
}

/* Status Chips Quick Filter Bar */
.status-chips-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 14px 0;
  margin-bottom: 6px;
  scrollbar-width: thin;
}
.status-chips-bar::-webkit-scrollbar {
  height: 4px;
}
.status-chips-bar::-webkit-scrollbar-thumb {
  background: #E2E8F0;
  border-radius: 4px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 20px;
  border: 1px solid #F1F5F9;
  background: white;
  color: #312E81;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.status-chip:hover {
  border-color: #4F46E5;
  background: #F8FAFC;
  color: #0F172A;
}
.status-chip.active {
  background: #4F46E5;
  color: white;
  border-color: #4F46E5;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}
.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #F1F5F9;
  color: #312E81;
}
.status-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}
.chip-count.chip-alert {
  background: #F1F5F9;
  color: #B03A48;
}
.status-chip.active .chip-count.chip-alert {
  background: #E06B7A;
  color: white;
}

/* Cards Grid View */
.tickets-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
  padding: 16px;
  background: #F8FAFC;
}
.ticket-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #F1F5F9;
  box-shadow: 0 1px 3px rgba(15, 23, 42,0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ticket-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42,0.07);
  border-color: #E2E8F0;
}
.ticket-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.ticket-code-tag {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: #4F46E5;
  background: #F8FAFC;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
}
.ticket-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.45;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.ticket-card-meta {
  font-size: 0.82rem;
  color: #312E81;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ticket-card-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.category-pill {
  background: #F1F5F9;
  color: #312E81;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}
.ticket-card-revision-box {
  margin: 10px 0;
}
.rev-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
}
.rev-status-pill.rev-zero {
  background: #F8FAFC;
  color: #4F46E5;
  border: 1px solid #F1F5F9;
}
.rev-status-pill.rev-has {
  background: #F1F5F9;
  color: #B45309;
  border: 1px solid #FDE68A;
}
.rev-status-pill.rev-alert {
  background: #F8FAFC;
  color: #B03A48;
  border: 1px solid #F6C3CA;
  animation: pulseWarning 1.5s infinite;
}
.ticket-card-details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px dashed #F1F5F9;
  margin-top: 6px;
  font-size: 0.78rem;
  color: #4F46E5;
  gap: 8px;
}
.ticket-card-details-row .detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
}
.ticket-card-footer .btn-action-review {
  flex: 1;
  text-align: center;
  padding: 7px 10px;
}
.ticket-card-footer .btn-action-drive {
  padding: 6px 10px;
}

/* Badge Revision Enhancements in Table View */
.badge-rev.rev-zero {
  background: #F1F5F9;
  color: #4F46E5;
}
.badge-rev.rev-active {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #F59E0B;
  font-weight: 700;
}


/* ==========================================================================
   BẢNG KANBAN 4 CỘT LUỒNG CÔNG VIỆC (GIỮ TÔNG XANH CHỦ ĐẠO GỐC #0F172A)
   ========================================================================== */
.kanban-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(310px, 1fr));
  gap: 16px;
  align-items: start;
  padding: 16px;
  background: #F8FAFC;
  overflow-x: auto;
}

@media (max-width: 1280px) {
  .kanban-board-grid {
    grid-template-columns: repeat(2, minmax(290px, 1fr));
  }
}

@media (max-width: 720px) {
  .kanban-board-grid {
    grid-template-columns: 1fr;
  }
}

.kanban-column {
  background: #F1F5F9;
  border: 1.5px solid #F1F5F9;
  border-radius: 14px;
  padding: 12px;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.kanban-column.drag-over {
  background: #F1F5F9;
  border-color: #312E81;
  box-shadow: 0 0 0 3px rgba(49, 46, 129, 0.15);
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #FFFFFF;
  border-radius: 10px;
  border: 1px solid #F1F5F9;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.kanban-col-received .kanban-col-header { border-top: 3.5px solid #312E81; }
.kanban-col-processing .kanban-col-header { border-top: 3.5px solid #B45309; }
.kanban-col-approved .kanban-col-header { border-top: 3.5px solid #4F46E5; }
.kanban-col-published .kanban-col-header { border-top: 3.5px solid #1F5E43; }

.kanban-col-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-col-count {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kanban-col-received .kanban-col-count { background: #F1F5F9; color: #312E81; }
.kanban-col-processing .kanban-col-count { background: #FEF3C7; color: #B45309; }
.kanban-col-approved .kanban-col-count { background: #F1F5F9; color: #4F46E5; }
.kanban-col-published .kanban-col-count { background: #EAF7F0; color: #1F5E43; }

.kanban-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.kanban-empty-col {
  padding: 32px 14px;
  text-align: center;
  font-size: 0.78rem;
  color: #4F46E5;
  border: 1.5px dashed #E2E8F0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}

.kanban-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 13px 14px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: grab;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09);
  border-color: #4F46E5;
}

.kanban-card.needs-rev-border {
  border-left: 4px solid #E06B7A;
}

.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.kanban-channel-pill {
  background: #F1F5F9;
  color: #312E81;
  border: 1px solid #CBD5E1;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanban-date-code {
  font-size: 0.72rem;
  color: #4F46E5;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.kanban-code-chip {
  background: #F1F5F9;
  color: #0F172A;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid #E2E8F0;
}

.kanban-card-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.38;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-title:hover {
  color: #312E81;
}

.kanban-meta-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.76rem;
  color: #312E81;
}

.kanban-note-box {
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.75rem;
  color: #312E81;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-note-box.is-feedback {
  background: #F1F5F9;
  border-color: #FEF3C7;
  color: #92400E;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid #F1F5F9;
  flex-wrap: wrap;
}

.kanban-footer-left {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.kanban-btn-step {
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
  text-decoration: none;
}

.kanban-btn-step:hover {
  background: #312E81;
}

.kanban-btn-step.step-publish {
  background: #4F46E5;
}

.kanban-btn-step.step-done {
  background: #1F5E43;
}

.kanban-mini-link {
  background: #F8FAFC;
  color: #312E81;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.71rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.kanban-mini-link:hover {
  background: #F1F5F9;
}


/* ==========================================================================
   TOOLBAR 2 HÀNG & BỘ LỌC KHOẢNG THỜI GIAN (TỪ NGÀY A -> ĐẾN NGÀY B)
   ========================================================================== */
.tab-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  margin-left: 5px;
  background: #F1F5F9;
  color: #0F172A;
  transition: all 0.2s ease;
}

.tab-count-badge.badge-emerald {
  background: #EAF7F0;
  color: #1F5E43;
}

.admin-tab-pill.active .tab-count-badge {
  background: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
}

.admin-toolbar.admin-toolbar-v2 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 14px 16px;
}

.toolbar-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-row-main .search-box {
  min-width: 240px;
  flex: 1 1 260px;
}

.toolbar-row-main .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-select-highlight {
  border-color: #818CF8 !important;
  background: #F8FAFC !important;
  font-weight: 700 !important;
  color: #0F172A !important;
}

.toolbar-row-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed #F1F5F9;
}

.date-filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.date-field-select {
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0F172A;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 7px;
  cursor: pointer;
  outline: none;
}

.date-input-pair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 4px 10px;
  flex-wrap: wrap;
}

.date-range-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #312E81;
  white-space: nowrap;
}

.date-range-input {
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-family: inherit;
  color: #0F172A;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.date-range-input:focus {
  border-color: #4F46E5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.date-range-sep {
  color: #4F46E5;
  font-weight: 700;
  font-size: 0.82rem;
}

.date-quick-presets {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.btn-date-preset {
  background: #F1F5F9;
  color: #312E81;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-date-preset:hover,
.btn-date-preset.active {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
}

.btn-date-clear {
  background: #F8FAFC;
  color: #4F46E5;
  border: 1px solid #FCECEE;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-date-clear:hover {
  background: #F1F5F9;
  border-color: #F6C3CA;
}

.filtered-result-counter {
  font-size: 0.8rem;
  font-weight: 700;
  color: #312E81;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}


/* ==========================================================================
   GIAO DIỆN DỊU NHẸ (SOFT PASTEL BLUE & WARM ROSE-IVORY) & TOOLBAR 3 TẦNG
   ========================================================================== */
.nav-school {
  color: #F1F5F9 !important;
}

.admin-tab-pill.active,
.status-chip.active {
  background: linear-gradient(135deg, #4F46E5 0%, #4F46E5 100%) !important;
  border-color: #4F46E5 !important;
  color: #FFFFFF !important;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25) !important;
}

.btn-primary,
.btn-action-primary,
.btn-action-review {
  background: linear-gradient(135deg, #4F46E5 0%, #4F46E5 100%) !important;
  border-color: #4F46E5 !important;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover,
.btn-action-primary:hover,
.btn-action-review:hover {
  background: linear-gradient(135deg, #4F46E5 0%, #312E81 100%) !important;
}

.kanban-btn-step {
  background: #4F46E5 !important;
}
.kanban-btn-step:hover {
  background: #312E81 !important;
}
.kanban-btn-step.step-publish {
  background: #4F46E5 !important;
}
.kanban-btn-step.step-done {
  background: #2E8B63 !important;
}

.kanban-column {
  background: #F1F5F9 !important;
  border: 1.5px solid #F1F5F9 !important;
  border-radius: 16px !important;
}

.kanban-card,
.ticket-card {
  border-color: #F1F5F9 !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 12px rgba(79, 70, 229, 0.05) !important;
}

.kanban-card:hover,
.ticket-card:hover {
  border-color: #CBD5E1 !important;
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.1) !important;
}

/* 3-Row Toolbar Layout (Không bao giờ tràn hoặc rớt dòng lệch trên Laptop) */
.toolbar-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-row-top .search-box {
  flex: 1 1 320px;
  min-width: 240px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 14px;
}

.toolbar-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-row-selects {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed #F1F5F9;
}

@media (max-width: 1024px) {
  .toolbar-row-selects {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .toolbar-row-selects {
    grid-template-columns: 1fr;
  }
}

.toolbar-row-selects .filter-select {
  width: 100%;
  border-radius: 9px;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  padding: 8px 12px;
  font-size: 0.84rem;
  color: #312E81;
  font-weight: 600;
}

.toolbar-row-selects .filter-select:focus {
  border-color: #4F46E5;
  background: #FFFFFF;
}


/* ==========================================================================
   BẢNG MÀU CHỦ ĐẠO 5 MÀU — TĂNG CƯỜNG TÔNG HỒNG (#6366F1, #6366F1) KẾT HỢP (#312E81, #312E81, #4F46E5)
   ========================================================================== */
:root {
  --swatch-pink: #6366F1;
  --swatch-orchid: #6366F1;
  --swatch-cobalt: #312E81;
  --swatch-navy: #312E81;
  --swatch-slate: #4F46E5;

  /* Navy là màu chủ đạo, nền trắng, hồng làm điểm nhấn */
  --primary-color: #0F172A !important;
  --primary-hover: #0F172A !important;
  --secondary-color: #6366F1 !important;
  --bg-gradient: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 60%, #F8FAFC 100%) !important;
  --surface-subtle: #F1F5F9 !important;
  --border-color: #E2E8F0 !important;
  --border-focus: #6366F1 !important;
}

body,
.admin-body {
  background:
    radial-gradient(circle at 90% 85%, rgba(99, 102, 241, 0.05) 0%, transparent 45%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 60%, #F8FAFC 100%) !important;
  color: #0F172A !important;
}

/* Thanh điều hướng trên cùng: Phối nổi bật #6366F1 & #6366F1 cùng #312E81, #312E81 */
.top-nav-bar {
  background: linear-gradient(90deg, #0F172A 0%, #0F172A 35%, #312E81 70%, #4F46E5 100%) !important;
  border-bottom: 3px solid #818CF8 !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.22) !important;
}

.nav-school {
  color: #F1F5F9 !important;
}

.nav-guidelines-btn,
.nav-link-btn {
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(247, 238, 236, 0.5) !important;
  color: #FFFFFF !important;
}

.nav-guidelines-btn:hover,
.nav-link-btn:hover {
  background: #6366F1 !important;
  border-color: #FFFFFF !important;
}

.nav-admin-btn {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.35) !important;
}

/* Hero Banner (Trang chủ Giáo viên): Tái hiện ánh sáng hồng #6366F1 / #6366F1 rực rỡ làm tâm điểm */
.hero-header {
  background:
    radial-gradient(ellipse 80% 70% at 50% 100%, rgba(99, 102, 241, 0.55) 0%, rgba(99, 102, 241, 0.25) 45%, transparent 80%),
    linear-gradient(160deg, #0F172A 0%, #0F172A 30%, #312E81 58%, #6366F1 80%, #6366F1 100%) !important;
  box-shadow: 0 10px 32px rgba(99, 102, 241, 0.25) !important;
}

.hero-header::after {
  background: #FFFFFF !important;
}

.brand-badge {
  background: rgba(99, 102, 241, 0.28) !important;
  border: 1.5px solid rgba(247, 238, 236, 0.65) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3) !important;
}

.pulse-dot {
  background: #F1F5F9 !important;
  box-shadow: 0 0 0 0 rgba(247, 238, 236, 0.85) !important;
}

.btn-hero-guide {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 100%) !important;
  color: #FFFFFF !important;
  border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.38) !important;
}

.btn-hero-guide.outline {
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1.5px solid rgba(255, 250, 245, 0.7) !important;
  color: #FFFFFF !important;
}

.btn-hero-guide:hover {
  background: linear-gradient(135deg, #6366F1 0%, #312E81 100%) !important;
}

/* Các khối thẻ nội dung: Nền trắng ánh hồng phấn dịu, viền hồng #E2E8F0 */
.admin-header-bar {
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 55%, #F1F5F9 100%) !important;
  border: 1.5px solid #E2E8F0 !important;
  border-left: 5px solid #6366F1 !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.10) !important;
  border-radius: 16px !important;
}

.view-header-bar,
.admin-toolbar,
.metric-card,
.role-selector-card,
.form-section,
.revision-search-card,
.revision-detail-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%) !important;
  border: 1.5px solid #E2E8F0 !important;
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.08) !important;
  border-radius: 16px !important;
}

.form-section {
  border-top: 4px solid #6366F1 !important;
}

.admin-welcome-title,
.view-heading,
.legend-title,
.search-heading {
  background: linear-gradient(90deg, #312E81 0%, #312E81 35%, #6366F1 80%, #6366F1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #312E81 !important;
}

/* 4 Ô Thống Kê (Metric Cards) phủ sắc hồng #6366F1 & #6366F1 chủ đạo */
.metrics-grid .metric-card:nth-child(1) {
  background: linear-gradient(135deg, #FFFFFF 0%, #F1F5F9 100%) !important;
  border-color: #E2E8F0 !important;
  border-top: 4px solid #6366F1 !important;
}
.metrics-grid .metric-card:nth-child(2) {
  background: linear-gradient(135deg, #FFFFFF 0%, #F1F5F9 100%) !important;
  border-color: #E2E8F0 !important;
  border-top: 4px solid #6366F1 !important;
}
.metrics-grid .metric-card:nth-child(3) {
  background: linear-gradient(135deg, #FFFFFF 0%, #F1F5F9 100%) !important;
  border-color: #CBD5E1 !important;
  border-top: 4px solid #4F46E5 !important;
}
.metrics-grid .metric-card:nth-child(4) {
  background: linear-gradient(135deg, #FFFFFF 0%, #F1F5F9 100%) !important;
  border-color: #E2E8F0 !important;
  border-top: 4px solid #312E81 !important;
}

.metric-value {
  color: #6366F1 !important;
}
.metrics-grid .metric-card:nth-child(3) .metric-value,
.metrics-grid .metric-card:nth-child(4) .metric-value {
  color: #312E81 !important;
}

/* Tab & Chip trạng thái: Chưa chọn có nền hồng phấn nhẹ, Đang chọn rực sắc Hồng #6366F1 -> #6366F1 */
.admin-tab-pill,
.status-chip,
.btn-date-preset {
  background: #F1F5F9 !important;
  border: 1.5px solid #E2E8F0 !important;
  color: #312E81 !important;
}

.admin-tab-pill:hover,
.status-chip:hover,
.btn-date-preset:hover {
  background: #F1F5F9 !important;
  border-color: #6366F1 !important;
  color: #6366F1 !important;
}

.admin-tab-pill.active,
.status-chip.active {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 60%, #312E81 100%) !important;
  border-color: #6366F1 !important;
  color: #FFFFFF !important;
  box-shadow: 0 5px 16px rgba(99, 102, 241, 0.34) !important;
}

/* Nút bấm chính (Primary Buttons): Tông Hồng #6366F1 -> #6366F1 chủ đạo phối #312E81 */
.btn-primary,
.btn-action-primary,
.btn-action-review,
.btn-search-ticket {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 58%, #312E81 100%) !important;
  border: none !important;
  color: #FFFFFF !important;
  box-shadow: 0 5px 16px rgba(99, 102, 241, 0.32) !important;
}

.btn-primary:hover,
.btn-action-primary:hover,
.btn-action-review:hover,
.btn-search-ticket:hover {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 45%, #312E81 100%) !important;
  box-shadow: 0 7px 20px rgba(99, 102, 241, 0.42) !important;
}

.step-num {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 100%) !important;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3) !important;
}

/* Thanh lọc ngày & ô nhập liệu */
.date-range-group,
.analytics-date-range-bar {
  background: #F1F5F9 !important;
  border: 1.5px solid #E2E8F0 !important;
}

.date-range-tag,
.analytics-date-label {
  color: #6366F1 !important;
}

.custom-input:focus,
.custom-select:focus,
.filter-select:focus,
.search-input:focus,
.date-range-input:focus {
  border-color: #6366F1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
}

/* 3 Cột Kanban: Tăng độ phủ sắc Hồng #6366F1 & #6366F1 */
.kanban-board-grid,
.tickets-cards-grid {
  background: rgba(255, 250, 245, 0.78) !important;
  border: 1.5px solid #E2E8F0 !important;
}

.kanban-column.kanban-col-received {
  background: linear-gradient(180deg, #F1F5F9 0%, #F8FAFC 100%) !important;
  border: 1.5px solid #E2E8F0 !important;
}
.kanban-column.kanban-col-received .kanban-col-header {
  border-top: 4px solid #6366F1 !important;
}
.kanban-column.kanban-col-received .kanban-col-count {
  background: #F1F5F9 !important;
  color: #4F46E5 !important;
}

.kanban-column.kanban-col-processing {
  background: linear-gradient(180deg, #F1F5F9 0%, #F8FAFC 100%) !important;
  border: 1.5px solid #E2E8F0 !important;
}
.kanban-column.kanban-col-processing .kanban-col-header {
  border-top: 4px solid #6366F1 !important;
}
.kanban-column.kanban-col-processing .kanban-col-count {
  background: #F1F5F9 !important;
  color: #6366F1 !important;
}

.kanban-column.kanban-col-approved {
  background: linear-gradient(180deg, #F1F5F9 0%, #F8FAFC 100%) !important;
  border: 1.5px solid #CBD5E1 !important;
}
.kanban-column.kanban-col-approved .kanban-col-header {
  border-top: 4px solid #312E81 !important;
}
.kanban-column.kanban-col-approved .kanban-col-count {
  background: #F1F5F9 !important;
  color: #312E81 !important;
}

.kanban-card,
.ticket-card {
  border: 1.5px solid #E2E8F0 !important;
}

.kanban-btn-step {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 65%, #4F46E5 100%) !important;
}
.kanban-btn-step:hover {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 50%, #312E81 100%) !important;
}
.kanban-btn-step.step-publish {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 100%) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35) !important;
}

.kanban-channel-pill,
.ticket-code-tag,
.table-ticket-code {
  background: #F1F5F9 !important;
  color: #6366F1 !important;
  border-color: #E2E8F0 !important;
}

.filtered-result-counter {
  background: linear-gradient(135deg, #F1F5F9 0%, #F1F5F9 100%) !important;
  color: #6366F1 !important;
  border-color: #E2E8F0 !important;
}

.tab-btn {
  background: #F1F5F9 !important;
  border: 1.5px solid #E2E8F0 !important;
}

.tab-btn.active {
  background: linear-gradient(135deg, #F1F5F9 0%, #F1F5F9 100%) !important;
  border: 2px solid #6366F1 !important;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.22) !important;
}

.tab-btn.active .tab-title {
  color: #6366F1 !important;
}

.btn-view-toggle.active {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 100%) !important;
  color: #FFFFFF !important;
}

/* ==========================================================================
   HIỆU ỨNG CHUYỂN ĐỘNG & TƯƠNG TÁC MƯỢT MÀ (SPRING MICRO-ANIMATIONS)
   ========================================================================== */
@keyframes cardSpringIn {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes viewSmoothFade {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalSpringPop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseDropZone {
  0%, 100% { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(99, 102, 241, 0.34); }
}

.admin-tab-view,
.submission-form,
.revision-wrapper {
  animation: viewSmoothFade 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.kanban-card,
.ticket-card,
.result-item-card {
  animation: cardSpringIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--card-idx, 0) * 35ms);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.2s ease !important;
}

.admin-table tbody tr {
  animation: viewSmoothFade 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--row-idx, 0) * 22ms);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.kanban-card:hover,
.ticket-card:hover {
  transform: translateY(-4px) scale(1.008) !important;
  box-shadow: 0 12px 26px rgba(99, 102, 241, 0.18) !important;
  border-color: #6366F1 !important;
}

.kanban-card:active,
.ticket-card:active {
  transform: translateY(-1px) scale(0.992) !important;
}

.metric-card.interactive-metric {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.2s ease !important;
}

.metric-card.interactive-metric:hover {
  transform: translateY(-4px) scale(1.015) !important;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.16) !important;
}

.metric-card.interactive-metric:active {
  transform: translateY(0) scale(0.98) !important;
}

button,
.btn-primary,
.btn-secondary,
.btn-action-review,
.btn-action-drive,
.btn-view-toggle,
.status-chip,
.admin-tab-pill,
.kanban-btn-step,
.btn-date-preset,
.btn-date-clear,
.tab-btn {
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.2s ease,
              background 0.2s ease,
              border-color 0.2s ease !important;
}

button:hover:not(:disabled),
.btn-action-drive:hover,
.status-chip:hover,
.admin-tab-pill:hover,
.kanban-btn-step:hover,
.btn-date-preset:hover {
  transform: translateY(-1.5px);
}

button:active:not(:disabled),
.btn-action-drive:active,
.status-chip:active,
.admin-tab-pill:active,
.kanban-btn-step:active,
.btn-date-preset:active,
.tab-btn:active {
  transform: translateY(1px) scale(0.96) !important;
}

.kanban-card.dragging {
  opacity: 0.75 !important;
  transform: rotate(2deg) scale(1.03) !important;
  box-shadow: 0 18px 36px rgba(99, 102, 241, 0.26) !important;
}

.kanban-column.drag-over {
  background: #F1F5F9 !important;
  border-color: #6366F1 !important;
  animation: pulseDropZone 1.2s infinite ease-in-out;
}

.modal-overlay .modal-card {
  animation: modalSpringPop 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.btt-soft-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 55%, #312E81 100%);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.32);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.btt-soft-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==============================================================================
   ĐX-13: MOBILE KANBAN TABS & STICKY COLUMN STYLES
   ============================================================================== */
.table-container {
  overflow-x: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.admin-table th:first-child,
.admin-table td:first-child,
.sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background-color: var(--surface-card, #FFFFFF);
  box-shadow: 2px 0 8px rgba(49, 46, 129, 0.08);
}

[data-theme="dark"] .admin-table th:first-child,
[data-theme="dark"] .admin-table td:first-child,
[data-theme="dark"] .sticky-col {
  background-color: #0F172A;
  box-shadow: 2px 0 8px rgba(15, 23, 42, 0.4);
}

.kanban-mobile-tabs {
  display: none;
  gap: 6px;
  padding: 8px 0;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.kanban-tab-btn,
.kanban-mobile-tab-btn {
  flex: 1 0 auto;
  padding: 8px 14px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-color, #E2E8F0);
  background: var(--surface-card, #FFFFFF);
  color: var(--text-muted, #6366F1);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition, all 0.22s ease);
}

.kanban-tab-btn.active,
.kanban-mobile-tab-btn.active {
  background: var(--mdc-deep-blue, #312E81);
  color: #FFFFFF;
  border-color: var(--mdc-deep-blue, #312E81);
  box-shadow: 0 2px 8px rgba(49, 46, 129, 0.25);
}

@media (max-width: 768px) {
  .kanban-mobile-tabs {
    display: flex !important;
  }
}

@media (min-width: 768px) {
  .kanban-board-grid {
    display: grid;
    /* 3 cột (đã bỏ cột "Đã đăng tải") chia đều toàn bộ chiều ngang */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* ==============================================================================
   ĐX-25: GIAO DIỆN TỐI (DARK MODE) TOÀN DIỆN CHO INDEX.HTML & ADMIN.HTML
   Độ ưu tiên cao hơn khối !important dòng 4499-4823 & đạt tương phản WCAG 2.1 AA (>= 4.5:1)
   ============================================================================== */
:root[data-theme="dark"],
[data-theme="dark"] {
  color-scheme: dark;
  --primary-color: #EC4899 !important;
  --primary-hover: #C7D2FE !important;
  --secondary-color: #EC4899 !important;
  --bg-gradient: linear-gradient(180deg, #0F172A 0%, #0F172A 60%, #0F172A 100%) !important;
  --surface-card: #0F172A !important;
  --surface-subtle: #0F172A !important;
  --border-color: #312E81 !important;
  --border-focus: #EC4899 !important;
  --text-main: #F8FAFC !important;
  --text-muted: #94A3B8 !important;
}

[data-theme="dark"] body,
[data-theme="dark"] .admin-body,
body[data-theme="dark"],
.admin-body[data-theme="dark"] {
  background:
    radial-gradient(circle at 90% 85%, rgba(236, 72, 153, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #0F172A 0%, #0F172A 60%, #0F172A 100%) !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .hero-header::after {
  background: #0F172A !important;
}

[data-theme="dark"] .top-nav-bar {
  background: linear-gradient(90deg, #0F172A 0%, #0F172A 45%, #0F172A 100%) !important;
  border-bottom: 2px solid #6366F1 !important;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.5) !important;
}

/* Khối thẻ, thanh công cụ, form, bảng, thống kê & modal */
[data-theme="dark"] .admin-header-bar {
  background: linear-gradient(135deg, #0F172A 0%, #0F172A 100%) !important;
  border: 1.5px solid #312E81 !important;
  border-left: 5px solid #EC4899 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.45) !important;
}

[data-theme="dark"] .view-header-bar,
[data-theme="dark"] .admin-toolbar,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .metrics-grid .metric-card:nth-child(1),
[data-theme="dark"] .metrics-grid .metric-card:nth-child(2),
[data-theme="dark"] .metrics-grid .metric-card:nth-child(3),
[data-theme="dark"] .metrics-grid .metric-card:nth-child(4),
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .team-card,
[data-theme="dark"] .config-card,
[data-theme="dark"] .role-selector-card,
[data-theme="dark"] #portalModeSelectorCard,
[data-theme="dark"] .form-section,
[data-theme="dark"] .revision-search-card,
[data-theme="dark"] .revision-detail-card,
[data-theme="dark"] .result-item-card,
[data-theme="dark"] .modal-card,
[data-theme="dark"] .guidelines-modal-body,
[data-theme="dark"] .pin-card,
[data-theme="dark"] .portal-closed-box,
[data-theme="dark"] .table-container {
  background: #0F172A !important;
  border-color: #312E81 !important;
  color: #F8FAFC !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.4) !important;
}

[data-theme="dark"] .form-section {
  border-top: 4px solid #EC4899 !important;
}

[data-theme="dark"] .metrics-grid .metric-card:nth-child(1),
[data-theme="dark"] .metrics-grid .metric-card:nth-child(2) {
  border-top: 4px solid #EC4899 !important;
}

[data-theme="dark"] .metrics-grid .metric-card:nth-child(3) {
  border-top: 4px solid #818CF8 !important;
}

[data-theme="dark"] .metrics-grid .metric-card:nth-child(4) {
  border-top: 4px solid #6CC39A !important;
}

/* Tiêu đề, chữ & nhãn đạt chuẩn tương phản WCAG 2.1 AA (>= 4.5:1 trên #0F172A) */
[data-theme="dark"] .admin-welcome-title,
[data-theme="dark"] .view-heading,
[data-theme="dark"] .legend-title,
[data-theme="dark"] .search-heading {
  background: none !important;
  -webkit-background-clip: border-box !important;
  -webkit-text-fill-color: #F8FAFC !important;
  color: #F8FAFC !important;
  border-bottom-color: #312E81 !important;
}

[data-theme="dark"] .metric-value,
[data-theme="dark"] .metrics-grid .metric-card:nth-child(1) .metric-value,
[data-theme="dark"] .metrics-grid .metric-card:nth-child(2) .metric-value {
  color: #EC4899 !important;
}

[data-theme="dark"] .metrics-grid .metric-card:nth-child(3) .metric-value,
[data-theme="dark"] .metrics-grid .metric-card:nth-child(4) .metric-value,
[data-theme="dark"] .kpi-number {
  color: #EC4899 !important;
}

[data-theme="dark"] .admin-welcome-desc,
[data-theme="dark"] .view-subheading,
[data-theme="dark"] .metric-label,
[data-theme="dark"] .kpi-title,
[data-theme="dark"] .kpi-sub,
[data-theme="dark"] .section-label,
[data-theme="dark"] .help-hint,
[data-theme="dark"] .drop-subtitle,
[data-theme="dark"] .drop-note,
[data-theme="dark"] .submit-disclaimer,
[data-theme="dark"] .modal-desc,
[data-theme="dark"] .pin-desc,
[data-theme="dark"] .info-label,
[data-theme="dark"] .detail-key,
[data-theme="dark"] .config-card-desc,
[data-theme="dark"] .search-sub,
[data-theme="dark"] .ticket-dept-text,
[data-theme="dark"] .tree-desc,
[data-theme="dark"] .tree-hint-text,
[data-theme="dark"] .text-muted {
  color: #E2E8F0 !important;
}

[data-theme="dark"] .input-label,
[data-theme="dark"] .col-heading,
[data-theme="dark"] .modal-title,
[data-theme="dark"] .modal-review-title,
[data-theme="dark"] .pin-title,
[data-theme="dark"] .table-card-title,
[data-theme="dark"] .config-card-title,
[data-theme="dark"] .team-name,
[data-theme="dark"] .team-stat-row strong,
[data-theme="dark"] .event-title-cell,
[data-theme="dark"] .handler-tag,
[data-theme="dark"] .info-value,
[data-theme="dark"] .detail-val,
[data-theme="dark"] .drop-title,
[data-theme="dark"] .ticket-title-heading,
[data-theme="dark"] .result-item-info h4,
[data-theme="dark"] .guide-section-title,
[data-theme="dark"] .five-w-title,
[data-theme="dark"] .pdf-title,
[data-theme="dark"] .callout-heading,
[data-theme="dark"] .tree-node.root,
[data-theme="dark"] .tree-name {
  color: #F8FAFC !important;
}

/* Ô nhập liệu, bộ lọc, tìm kiếm & vùng kéo thả */
[data-theme="dark"] .custom-input,
[data-theme="dark"] .custom-select,
[data-theme="dark"] .custom-textarea,
[data-theme="dark"] .filter-select,
[data-theme="dark"] .toolbar-row-selects .filter-select,
[data-theme="dark"] .sort-select-highlight,
[data-theme="dark"] .revision-search-input,
[data-theme="dark"] .date-range-input,
[data-theme="dark"] .date-field-select,
[data-theme="dark"] .caption-display {
  background: #0F172A !important;
  border-color: #4F46E5 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .custom-input::placeholder,
[data-theme="dark"] .custom-textarea::placeholder,
[data-theme="dark"] .search-input::placeholder,
[data-theme="dark"] .revision-search-input::placeholder {
  color: #94A3B8 !important;
}

[data-theme="dark"] .search-box,
[data-theme="dark"] .toolbar-row-top .search-box,
[data-theme="dark"] .date-input-pair,
[data-theme="dark"] .date-range-group,
[data-theme="dark"] .analytics-date-range-bar {
  background: #0F172A !important;
  border-color: #4F46E5 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .search-input {
  background: transparent !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .date-range-label,
[data-theme="dark"] .date-range-sep,
[data-theme="dark"] .date-range-tag,
[data-theme="dark"] .analytics-date-label {
  color: #F1F5F9 !important;
}

[data-theme="dark"] .drop-zone,
[data-theme="dark"] .drop-zone.revision-drop {
  background: #0F172A !important;
  border-color: #4F46E5 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .drop-zone:hover,
[data-theme="dark"] .drop-zone.dragover {
  background: #312E81 !important;
  border-color: #EC4899 !important;
}

/* Tab, Chip trạng thái, Segmented Control & Nút phụ */
[data-theme="dark"] .admin-tab-pill,
[data-theme="dark"] .status-chip,
[data-theme="dark"] .btn-date-preset,
[data-theme="dark"] .tab-btn,
[data-theme="dark"] .kanban-tab-btn,
[data-theme="dark"] .kanban-mobile-tab-btn,
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-action-outline,
[data-theme="dark"] .btn-refresh,
[data-theme="dark"] .btn-copy,
[data-theme="dark"] .btn-copy-sm,
[data-theme="dark"] .btn-copy-footer,
[data-theme="dark"] .btn-close-detail,
[data-theme="dark"] .btn-select-result,
[data-theme="dark"] .btn-filter-reviewer {
  background: #0F172A !important;
  border-color: #4F46E5 !important;
  color: #F1F5F9 !important;
}

[data-theme="dark"] .tab-title {
  color: #F8FAFC !important;
}

[data-theme="dark"] .tab-desc {
  color: #E2E8F0 !important;
}

[data-theme="dark"] .admin-tab-pill:hover,
[data-theme="dark"] .status-chip:hover,
[data-theme="dark"] .btn-date-preset:hover,
[data-theme="dark"] .tab-btn:hover,
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-action-outline:hover,
[data-theme="dark"] .btn-refresh:hover {
  background: #312E81 !important;
  border-color: #EC4899 !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .admin-tab-pill.active,
[data-theme="dark"] .status-chip.active,
[data-theme="dark"] .btn-date-preset.active,
[data-theme="dark"] .kanban-tab-btn.active,
[data-theme="dark"] .kanban-mobile-tab-btn.active,
[data-theme="dark"] .btn-view-toggle.active {
  background: linear-gradient(135deg, #6366F1 0%, #6366F1 100%) !important;
  border-color: #EC4899 !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .tab-btn.active {
  background: #312E81 !important;
  border: 2px solid #EC4899 !important;
}

[data-theme="dark"] .tab-btn.active .tab-title {
  color: #EC4899 !important;
}

[data-theme="dark"] .view-mode-toggle {
  background: #0F172A !important;
  border-color: #4F46E5 !important;
}

[data-theme="dark"] .btn-view-toggle {
  color: #E2E8F0 !important;
}

/* Bảng dữ liệu (Admin Table & Rep Table) */
[data-theme="dark"] .admin-table thead,
[data-theme="dark"] .rep-table th,
[data-theme="dark"] .student-events-table-wrap th {
  background: #0F172A !important;
  border-bottom-color: #4F46E5 !important;
  color: #F1F5F9 !important;
}

[data-theme="dark"] .admin-table th {
  color: #F1F5F9 !important;
}

[data-theme="dark"] .admin-table td,
[data-theme="dark"] .rep-table td,
[data-theme="dark"] .student-events-table-wrap td {
  border-bottom-color: #312E81 !important;
  color: #F1F5F9 !important;
}

[data-theme="dark"] .admin-table tbody tr:hover,
[data-theme="dark"] .rep-table tr:hover td {
  background: #0F172A !important;
}

[data-theme="dark"] .admin-table th:first-child,
[data-theme="dark"] .admin-table td:first-child,
[data-theme="dark"] .sticky-col {
  background-color: #0F172A !important;
  box-shadow: 2px 0 8px rgba(15, 23, 42, 0.55) !important;
}

[data-theme="dark"] .admin-table thead th:first-child,
[data-theme="dark"] .admin-table tbody tr:hover td:first-child {
  background-color: #0F172A !important;
}

/* Bảng Kanban 4 cột & Card View */
[data-theme="dark"] .kanban-board-grid,
[data-theme="dark"] .tickets-cards-grid {
  background: #0F172A !important;
  border-color: #312E81 !important;
}

[data-theme="dark"] .kanban-column,
[data-theme="dark"] .kanban-column.kanban-col-received,
[data-theme="dark"] .kanban-column.kanban-col-processing,
[data-theme="dark"] .kanban-column.kanban-col-approved,
[data-theme="dark"] .kanban-column.kanban-col-published {
  background: #0F172A !important;
  border-color: #312E81 !important;
}

[data-theme="dark"] .kanban-column.drag-over {
  background: #312E81 !important;
  border-color: #EC4899 !important;
}

[data-theme="dark"] .kanban-col-header {
  background: #0F172A !important;
  border-color: #4F46E5 !important;
}

[data-theme="dark"] .kanban-col-title {
  color: #F8FAFC !important;
}

[data-theme="dark"] .kanban-column .kanban-col-count {
  background: #312E81 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .kanban-empty-col {
  background: rgba(15, 23, 42, 0.7) !important;
  border-color: #4F46E5 !important;
  color: #E2E8F0 !important;
}

[data-theme="dark"] .kanban-card,
[data-theme="dark"] .ticket-card {
  background: #0F172A !important;
  border-color: #312E81 !important;
  color: #F8FAFC !important;
}

[data-theme="dark"] .kanban-card:hover,
[data-theme="dark"] .ticket-card:hover {
  border-color: #EC4899 !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.55) !important;
}

[data-theme="dark"] .kanban-card-title,
[data-theme="dark"] .ticket-card-title {
  color: #F8FAFC !important;
}

[data-theme="dark"] .kanban-meta-rows,
[data-theme="dark"] .kanban-meta-rows span,
[data-theme="dark"] .kanban-date-code,
[data-theme="dark"] .ticket-card-meta,
[data-theme="dark"] .ticket-card-details-row {
  color: #E2E8F0 !important;
}

[data-theme="dark"] .kanban-note-box {
  background: #0F172A !important;
  border-color: #4F46E5 !important;
  color: #F1F5F9 !important;
}

[data-theme="dark"] .kanban-note-box.is-feedback,
[data-theme="dark"] .btt-feedback-callout {
  background: #0F172A !important;
  border-color: #92400E !important;
  color: #FEF3C7 !important;
}

[data-theme="dark"] .feedback-badge-tag,
[data-theme="dark"] .feedback-body-content {
  color: #FDF2F8 !important;
}

[data-theme="dark"] .kanban-card-footer,
[data-theme="dark"] .ticket-card-footer,
[data-theme="dark"] .ticket-card-details-row,
[data-theme="dark"] .admin-tab-nav,
[data-theme="dark"] .toolbar-row-date,
[data-theme="dark"] .toolbar-row-selects,
[data-theme="dark"] .config-card-header,
[data-theme="dark"] .team-card-body,
[data-theme="dark"] .detail-top-bar,
[data-theme="dark"] .detail-row,
[data-theme="dark"] .modal-header {
  border-color: #312E81 !important;
}

[data-theme="dark"] .kanban-channel-pill,
[data-theme="dark"] .kanban-code-chip,
[data-theme="dark"] .kanban-mini-link,
[data-theme="dark"] .ticket-code-tag,
[data-theme="dark"] .table-ticket-code,
[data-theme="dark"] .filtered-result-counter,
[data-theme="dark"] .audit-action-tag,
[data-theme="dark"] .dept-tag-item,
[data-theme="dark"] .category-pill,
[data-theme="dark"] .chip-count,
[data-theme="dark"] .tab-count-badge,
[data-theme="dark"] .modal-ticket-badge {
  background: #312E81 !important;
  color: #F1F5F9 !important;
  border-color: #4F46E5 !important;
}

/* Hộp phụ trợ trong Modal, Hướng dẫn & Tra cứu */
[data-theme="dark"] .guidelines-callout-card,
[data-theme="dark"] .callout-summary-grid,
[data-theme="dark"] .drive-tree-view-card,
[data-theme="dark"] .folder-tree-container,
[data-theme="dark"] .five-w-card,
[data-theme="dark"] .pdf-download-card,
[data-theme="dark"] .guidelines-tab-nav,
[data-theme="dark"] .guidelines-modal-footer,
[data-theme="dark"] .summary-details,
[data-theme="dark"] .ticket-badge-card,
[data-theme="dark"] .email-action-box,
[data-theme="dark"] .audit-info-banner,
[data-theme="dark"] .portal-notice-banner,
[data-theme="dark"] .student-photo-banner,
[data-theme="dark"] .event-hint-note,
[data-theme="dark"] .file-preview-card,
[data-theme="dark"] #publishedArchiveBanner {
  background: #0F172A !important;
  border-color: #4F46E5 !important;
  color: #F1F5F9 !important;
}

[data-theme="dark"] .callout-sub,
[data-theme="dark"] .callout-summary-item,
[data-theme="dark"] .callout-hint,
[data-theme="dark"] .guide-rule-list li,
[data-theme="dark"] .five-w-desc,
[data-theme="dark"] .banner-text,
[data-theme="dark"] .portal-notice-banner-text,
[data-theme="dark"] .email-checkbox-label,
[data-theme="dark"] .email-target-info,
[data-theme="dark"] .email-target-info strong,
[data-theme="dark"] .ticket-label,
[data-theme="dark"] .ticket-code {
  color: #F1F5F9 !important;
}

[data-theme="dark"] .guidelines-tab-btn {
  color: #E2E8F0 !important;
}

[data-theme="dark"] .guidelines-tab-btn.active {
  background: #0F172A !important;
  color: #EC4899 !important;
  border-bottom-color: #EC4899 !important;
}

[data-theme="dark"] .drive-access-card,
[data-theme="dark"] .autofill-notice,
[data-theme="dark"] .tree-node.highlight-new {
  background: #0F172A !important;
  border-color: #2E8B63 !important;
  color: #EAF7F0 !important;
}

[data-theme="dark"] .drive-card-title,
[data-theme="dark"] .tree-node.highlight-new .tree-name,
[data-theme="dark"] .tree-badge-new {
  color: #6CC39A !important;
}



