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

:root {
  --primary-color: #0b3c61;
  --primary-hover: #072a45;
  --secondary-color: #0077ed;
  --accent-gold: #e5a93c;
  --accent-gold-light: #fff8e6;
  
  --bg-gradient: linear-gradient(135deg, #f4f7fb 0%, #e9eef5 100%);
  --surface-card: #ffffff;
  --surface-subtle: #f8fafc;
  --border-color: #e2e8f0;
  --border-focus: #0077ed;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-white: #ffffff;
  
  --success-color: #10b981;
  --success-bg: #ecfdf5;
  --danger-color: #ef4444;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(11, 60, 97, 0.1), 0 4px 6px -4px rgba(11, 60, 97, 0.05);
  --shadow-xl: 0 20px 35px -5px rgba(11, 60, 97, 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, #072a45 0%, #0b3c61 50%, #115383 100%);
  color: var(--text-white);
  padding: 3rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(7, 42, 69, 0.25);
}

.hero-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: #f4f7fb;
  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: #fce7b2;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 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(0,0,0,0.2);
}

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

.motto-tag {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(0, 0, 0, 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: #edf2f7;
  transform: translateY(-1px);
}

.tab-btn.active {
  background: #eef6fc;
  border-color: var(--secondary-color);
  box-shadow: 0 4px 12px rgba(0, 119, 237, 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: #334155;
}

.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(0, 119, 237, 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(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #065f46;
  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: #10b981;
}

.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(16, 185, 129, 0.25);
}

.autofill-chips-label {
  font-size: 0.8rem;
  color: #047857;
  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 #6ee7b7;
  color: #065f46;
  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(0, 0, 0, 0.04);
}

.autofill-chip-btn:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(16, 185, 129, 0.25);
}

.autofill-chip-btn.active {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 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: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.35);
    background-color: rgba(16, 185, 129, 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 #93c5fd;
  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: #eff6ff;
  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: #94a3b8;
}

/* 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, #0b3c61 0%, #0077ed 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(0, 119, 237, 0.3);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #072a45 0%, #005bb5 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 119, 237, 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 #ecfdf5; } }

.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, #f0f7ff 0%, #e0effe 100%);
  border: 2px dashed #93c5fd;
  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: #0369a1;
  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: #0b3c61;
  letter-spacing: 0.04em;
}

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

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

.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: #e0f2fe;
  color: #0369a1;
  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: #e2e8f0;
}

/* 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: #e2e8f0;
  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: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0077ed, #10b981);
  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: #072a45;
  color: #94a3b8;
  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: #64748b;
  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: #062035;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 1.5rem;
}

.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(0, 0, 0, 0.25));
}

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

.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: #f1f5f9;
}

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

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

.nav-divider {
  color: #475569;
}

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

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

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

.btn-logout:hover {
  background: #ef4444;
  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: #e0f2fe; }
.bg-amber { background: #fef3c7; }
.bg-red { background: #fee2e2; }
.bg-green { background: #dcfce7; }

.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: #e2e8f0;
}

/* 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: #475569;
  white-space: nowrap;
}

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

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

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

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

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

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

/* 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: #e0f2fe; color: #0284c7; }
.badge-purple { background: #f3e8ff; color: #9333ea; }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-red    { background: #fee2e2; color: #dc2626; }
.badge-orange { background: #ffedd5; color: #ea580c; }
.badge-teal   { background: #ccfbf1; color: #0f766e; }
.badge-indigo { background: #e0e7ff; color: #4338ca; }
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-cancel { background: #fef2f2; color: #991b1b; border: 1px dashed #fca5a5; }

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

.badge-rev.rev-warning {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  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: #0077ed;
  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: #005bb5;
  transform: translateY(-1px);
}

.btn-action-drive {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  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: #d1fae5;
  color: #047857;
  border-color: #6ee7b7;
  transform: translateY(-1px);
}

.btn-action-delete {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  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: #fecaca;
  color: #b91c1c;
  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: #0284c7;
  background: #e0f2fe;
  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: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin: 1rem 0;
}

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

.btn-drive-open {
  display: inline-block;
  background: #16a34a;
  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: #15803d;
}

.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: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  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: #f0f7ff;
  border: 1px solid #bae0fd;
  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: #0369a1;
  cursor: pointer;
  user-select: none;
}

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

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

.email-target-info strong {
  color: #0369a1;
}

.btn-send-email-direct {
  background: #0284c7;
  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(2, 132, 199, 0.25);
}

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

.btn-send-email-direct:disabled {
  background: #cbd5e1;
  color: #64748b;
  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: #38bdf8;
  border: 1px solid #1e3a8a;
  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: #334155;
  color: #f1f5f9;
  border: 1px solid #475569;
  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 #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 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: #64748b;
  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: #475569;
  border: 1px solid #e2e8f0;
  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: #1e293b;
  border-color: #cbd5e1;
}

.admin-tab-pill.active {
  background: #0077ed;
  color: #ffffff;
  border-color: #0077ed;
  box-shadow: 0 2px 6px rgba(0, 119, 237, 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 #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 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: #64748b;
  margin: 4px 0 0 0;
}

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

.btn-action-primary {
  background: #0077ed;
  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: #005bb5;
  transform: translateY(-1px);
}

.btn-action-outline {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  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: #94a3b8;
}

/* 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 #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 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: #64748b;
  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: #94a3b8;
}

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

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

.rank-medal.gold { color: #d97706; }
.rank-medal.silver { color: #64748b; }
.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: #1e293b; }
.count-approved { background: #dcfce7; color: #15803d; }
.count-pending { background: #fef3c7; color: #b45309; }
.count-revision { background: #fee2e2; color: #b91c1c; }

.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, #0077ed 0%, #38bdf8 100%);
  border-radius: 9999px;
  transition: width 0.6s ease;
}

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

.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 #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 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: #dcfce7; color: #15803d; }
.load-normal { background: #dbeafe; color: #1d4ed8; }
.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: #64748b;
  margin-bottom: 4px;
}

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

.btn-filter-reviewer {
  width: 100%;
  background: #f8fafc;
  color: #0077ed;
  border: 1px solid #e2e8f0;
  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: #eff6ff;
  border-color: #bfdbfe;
}

/* Audit & Backup */
.audit-info-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  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: #1e40af;
  line-height: 1.5;
}

.audit-action-tag {
  display: inline-block;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  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: #334155;
  border: 1px solid #cbd5e1;
}
.rank-badge.rank-3 {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

/* Monogram đội ngũ kiểm duyệt */
.team-monogram {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #0077ed;
  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(0, 119, 237, 0.2);
}

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

.btn-remove-reviewer {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  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: #fee2e2;
  border-color: #fca5a5;
}

/* 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 #e2e8f0;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 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: #64748b;
}

.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: #cbd5e1;
  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(0, 0, 0, 0.2);
}

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

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

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

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

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

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

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

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

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

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

/* Thông Báo Ghim & Khóa Cổng Cho Trang Chủ */
.portal-notice-banner {
  background: #eff6ff;
  border-left: 4px solid #0077ed;
  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(0, 119, 237, 0.08);
}

.portal-notice-banner svg {
  flex-shrink: 0;
  color: #0077ed;
}

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

.portal-closed-box {
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
  margin: 2rem 0;
}

.portal-closed-box .closed-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  color: #dc2626;
  background: #fee2e2;
  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: #991b1b;
  margin-bottom: 0.75rem;
}

.portal-closed-box p {
  color: #475569;
  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(229, 169, 60, 0.18);
  color: #fef08a;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(229, 169, 60, 0.45);
  cursor: pointer;
  transition: var(--transition);
}

.nav-guidelines-btn:hover {
  background: rgba(229, 169, 60, 0.32);
  border-color: #fef08a;
  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: #0b3c61;
  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(0, 0, 0, 0.12);
  transition: var(--transition);
}

.btn-hero-guide:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 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, #f0f7ff 0%, #f5f3ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(11, 60, 97, 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: #1e3a8a;
  margin: 0;
}

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

.btn-callout-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0077ed;
  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: #005bb5;
  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 #e0e7ff;
  margin-bottom: 0.85rem;
}

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

.summary-check {
  color: #059669;
  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: #475569;
}

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

.btn-insert-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #047857;
  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: #065f46;
  transform: translateY(-1px);
}

.btn-copy-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  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(11, 60, 97, 0.35) !important;
}

.guidelines-modal-header {
  background: linear-gradient(135deg, #072a45 0%, #0b3c61 100%);
  color: #ffffff;
  padding: 1.2rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #e5a93c;
  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(239, 68, 68, 0.85);
  transform: rotate(90deg);
}

.guidelines-tab-nav {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  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: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

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

.guidelines-tab-btn.active {
  color: #0077ed;
  border-bottom-color: #0077ed;
  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: #0b3c61;
  border-bottom: 2px solid #e2e8f0;
  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: #334155;
  line-height: 1.55;
}

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

.guide-alert-ai {
  background: #fff1f2;
  border-left: 4px solid #f43f5e;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #9f1239;
  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 #e2e8f0;
  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: #e0f2fe;
  color: #0369a1;
  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: #475569;
  margin-top: 4px;
  line-height: 1.45;
}

.footer-preview-box {
  background: #0f172a;
  color: #e2e8f0;
  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 #334155;
}

.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: #0077ed;
  border-color: #0077ed;
}

/* Department representative table */
.rep-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid #e2e8f0;
  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: #1e293b;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid #cbd5e1;
}

.rep-table td {
  padding: 8px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

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

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

.pdf-download-card:hover {
  border-color: #0077ed;
  box-shadow: 0 4px 12px rgba(0, 119, 237, 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: #64748b;
}

.btn-pdf-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0077ed;
  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: #005bb5;
}

.guidelines-modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  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 #d97706;
}

.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: #64748b;
}

.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: #94a3b8;
}

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

.revision-search-input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.btn-search-ticket {
  background: #d97706;
  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 #e2e8f0;
  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: #0077ed;
  box-shadow: 0 4px 12px rgba(0, 119, 237, 0.1);
  transform: translateX(4px);
}

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

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

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

.btn-select-result {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  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: #0077ed;
  color: #ffffff;
  border-color: #0077ed;
}

/* 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 #e2e8f0;
  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: #0b3c61;
  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: #475569;
}

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

.ticket-dept-text {
  font-size: 0.85rem;
  color: #64748b;
}

.btn-close-detail {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #64748b;
  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: #fff7ed;
  border: 1.5px solid #ffedd5;
  border-left: 5px solid #ea580c;
  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: #c2410c;
  letter-spacing: 0.02em;
}

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

.feedback-body-content {
  font-size: 0.95rem;
  color: #431407;
  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 #e2e8f0;
  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: #0b3c61;
}

.btn-open-drive-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0077ed;
  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: #005bb5;
}

.folder-tree-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  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 #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 6px;
}

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

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

.tree-branch {
  color: #94a3b8;
  font-family: monospace;
}

.tree-name {
  font-weight: 600;
  color: #1e293b;
}

.tree-desc {
  font-size: 0.8rem;
  color: #64748b;
}

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

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

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

.tree-hint-text {
  font-size: 0.8rem;
  color: #64748b;
  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 #cbd5e1;
}

.drop-zone.revision-drop:hover {
  background: #f1f5f9;
  border-color: #10b981;
}

.btn-revision-submit {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}

.btn-revision-submit:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 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: #0077ed;
  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(238, 242, 255, 0.95) 0%, rgba(224, 231, 255, 0.85) 100%);
  border: 1.5px solid #a5b4fc;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 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(99, 102, 241, 0.15);
}

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

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

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

.event-hint-note {
  margin-top: 8px;
  padding: 10px 14px;
  background: #f8fafc;
  border-left: 3.5px solid #0077ed;
  border-radius: 4px 8px 8px 4px;
  font-size: 0.86rem;
  color: #334155;
  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: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #166534;
  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: #475569;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1.5px solid #e2e8f0;
}

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



