/* ============================================================
   vOffice VIOIT — styles.css
   Design: Be Vietnam Pro + JetBrains Mono, Navy/Blue/Red VIOIT
   ============================================================ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── CSS VARIABLES ── */
:root {
  /* Brand */
  --navy:         #0a1628;
  --navy-mid:     #112240;
  --blue:         #0057b8;
  --blue-bright:  #1a8cff;
  --red:          #c0392b;
  --gold:         #f0a500;
  --green:        #0aad7e;

  /* Aliases for legacy code */
  --primary:         var(--blue);
  --primary-hover:   #004fa8;
  --primary-gradient: linear-gradient(135deg, #0057b8, #003d8a);
  --vioit-red:       var(--red);
  --vioit-blue:      var(--blue);
  --secondary:       #db2777;
  --accent:          var(--gold);

  /* Surface */
  --bg-main:       #f4f7fb;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-hover:      #f8fafc;
  --surface:       #f4f7fb;

  /* Text */
  --text-main:  #1a2540;
  --text-color: #1a2540;
  --text-muted: #6b7a99;

  /* Border */
  --border-color: #dde4ef;
  --glass-border: #dde4ef;

  /* Status */
  --success:     #0aad7e;
  --success-bg:  rgba(10, 173, 126, 0.1);
  --warning:     #d97706;
  --warning-bg:  rgba(240, 165, 0, 0.12);
  --danger:      #c0392b;
  --danger-bg:   rgba(192, 57, 43, 0.08);
  --info:        #0057b8;
  --info-bg:     rgba(0, 87, 184, 0.08);

  /* Legacy glassmorphism (now flat) */
  --glass-bg:     #ffffff;
  --glass-shadow: 0 2px 12px rgba(10, 22, 40, 0.07);

  /* Typography */
  --font-body:    'Be Vietnam Pro', sans-serif;
  --font-heading: 'Be Vietnam Pro', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast:   0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
ul { list-style: none; }
a { text-decoration: none; color: var(--blue); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── GLASS PANEL (now flat card) ── */
.glass-panel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(10, 22, 40, 0.06);
}

/* ── CONTAINER ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
}

/* ============================================================
   HEADER
   ============================================================ */
.voffice-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(10, 22, 40, 0.08);
}

/* Top bar */
.header-top {
  display: flex;
  align-items: center;
  padding: 10px 24px;
  background: #ffffff;
  border-bottom: 3px solid var(--blue);
  min-height: 70px;
  gap: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-area img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.branding-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

#inst-name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--red);
  display: block;
}

#dept-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.01em;
  display: block;
}

/* Right tools */
.right-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info-voffice {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-details { text-align: right; }

#userNameHeader {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
}

.user-dept {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

#userPicHeader {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  object-fit: cover;
}

.header-action-btns {
  display: flex;
  gap: 6px;
}

/* Mobile toggle */
.mobile-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 22px;
  color: var(--blue);
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.mobile-toggle-btn:hover {
  background: rgba(0, 87, 184, 0.07);
}

/* Icon buttons in header */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.icon-btn .badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 800;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid white;
  font-family: var(--font-mono);
}

/* ── NAVIGATION BAR ── */
.header-bottom {
  background: var(--navy) !important;
  border-bottom: none !important;
}

.voffice-main-nav {
  display: flex;
  align-items: center;
  width: 100%;
}

.voffice-main-nav ul {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  padding: 0;
  margin: 0 auto;
  max-width: 1200px;
}

.nav-item,
.voffice-main-nav li {
  padding: 11px 18px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  border-bottom: 3px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-item a,
.voffice-main-nav a {
  color: inherit !important;
  display: flex;
  align-items: center;
  gap: 5px;
}

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

.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border-bottom-color: #ffffff;
}

/* ── SYNC INDICATOR (in nav) ── */
.sync-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.5);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  margin-left: auto;
  margin-right: 16px;
  flex-shrink: 0;
  cursor: default;
  user-select: none;
  transition: all 0.3s;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.3s;
}

.sync-indicator.synced .sync-dot   { background: var(--green); }
.sync-indicator.syncing .sync-dot  { background: var(--blue-bright); animation: pulse-dot 1s infinite; }
.sync-indicator.error .sync-dot    { background: var(--red); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ── NAV BADGES ── */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 100px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
}
.nav-badge.hidden { display: none; }

/* ── VIOIT TOP BAR (legacy) ── */
.vioit-top-bar {
  background: #f1f1f1;
  border-bottom: 1px solid #ddd;
  font-size: 13px;
  padding: 3px 0;
}
.top-bar-right {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}
.top-bar-right a {
  color: #333;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

/* Hotline button */
.hotline-btn {
  background: #cc0000;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(204, 0, 0, 0.3);
}

/* Search bar (header) */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-main);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  transition: all var(--transition-fast);
  min-width: 240px;
}
.search-bar:focus-within {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.1);
}
.search-bar i { color: var(--text-muted); font-size: 15px; }
.search-bar input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
}

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-container {
  display: block;
  min-height: calc(100vh - 120px);
  padding-top: 24px;
}

.main-content {
  padding: 0 0 40px;
}

/* ── VIEW SECTIONS ── */
.views-container { position: relative; }

.view-section {
  display: none;
  animation: fadeInUp 0.2s ease-out;
}

.view-section.active { display: block; }

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

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.view-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.view-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.date-display {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 87, 184, 0.3);
}

.btn-secondary {
  background: var(--bg-main);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--border-color); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--red);
  border: 1px solid rgba(192, 57, 43, 0.2);
}
.btn-danger:hover {
  background: var(--red);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition-fast);
  opacity: 0.8;
}
.btn-icon:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  opacity: 1;
}
tr:hover .btn-icon,
.dean-table tr:hover .btn-icon { opacity: 1; }

/* Sync drive button */
#btn-sync-drive {
  border: 1px solid var(--blue);
  color: var(--blue);
  background: white;
}
#btn-sync-drive:hover {
  background: var(--blue);
  color: white;
}
#btn-sync-drive.syncing i {
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--bg-main);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pending    { background: var(--warning-bg); color: #b07800; }
.status-pending::before { background: var(--gold); }
.status-processing { background: var(--info-bg);    color: var(--blue); }
.status-processing::before { background: var(--blue); }
.status-completed  { background: var(--success-bg); color: var(--green); }
.status-completed::before { background: var(--green); }
.status-urgent     { background: var(--danger-bg);  color: var(--red); }
.status-urgent::before { background: var(--red); }

/* Priority tags */
.priority-tag {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 100px;
  font-weight: 700;
  font-family: var(--font-mono);
  border: 1px solid transparent;
}
.prio-high   { background: var(--danger-bg);  color: var(--red);   border-color: rgba(192,57,43,0.2); }
.prio-medium { background: var(--warning-bg); color: #b07800;      border-color: rgba(240,165,0,0.25); }
.prio-low    { background: var(--success-bg); color: var(--green); border-color: rgba(10,173,126,0.2); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.voffice-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.voffice-category-card {
  padding: 22px 24px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 1px 4px rgba(10, 22, 40, 0.05);
}
.voffice-category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 87, 184, 0.1);
  border-color: var(--blue);
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cat-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.cat-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.cat-row span { color: var(--text-muted); }
.cat-row b {
  font-size: 1.4rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--blue);
}

/* Stat content (legacy) */
.stat-content h3 {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 3px;
  font-weight: 600;
}
.stat-value {
  font-size: 1.6rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--navy);
}

/* Dashboard widgets */
.dashboard-widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.widget {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.widget-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 7px;
}

.widget-body {
  padding: 14px 18px;
  flex: 1;
}

/* Activity list */
.activity-list { display: flex; flex-direction: column; gap: 10px; }

.activity-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid #f3f5f9;
}
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }

.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--info-bg);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.activity-details p { font-size: 13px; color: var(--text-main); line-height: 1.4; }
.activity-time { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 2px; }

/* Manager dashboard */
#manager-dashboard-section .widget-header {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a6c 100%);
  border-bottom: none;
  padding: 14px 18px;
  border-radius: 10px 10px 0 0;
}
#manager-dashboard-section .widget-header h3 {
  color: #ffffff !important;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
#manager-dashboard-section .widget-header h3 i {
  color: rgba(255, 255, 255, 0.85) !important;
}

.clickable-name {
  color: var(--blue);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 600;
}
.clickable-name:hover {
  background: var(--info-bg);
  text-decoration: underline;
}

/* ============================================================
   NEWS / TIN TỨC WIDGET
   ============================================================ */
.news-list { display: flex; flex-direction: column; }

.news-item {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.news-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.news-thumb {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg-main);
}

.news-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  transition: color var(--transition-fast);
}
.news-title:hover { color: var(--blue); cursor: pointer; }

.news-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}

/* ============================================================
   DATA TABLES
   ============================================================ */
.table-container {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 4px rgba(10, 22, 40, 0.05);
}

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

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-main);
  font-family: var(--font-mono);
}

.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fafcff; }

/* Generic table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}
.table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-main);
  font-family: var(--font-mono);
}
.table tbody tr:hover { background: #fafcff; }
.table-responsive { overflow-x: auto; }

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

/* ============================================================
   FILTERS BAR
   ============================================================ */
.filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

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

.form-control {
  padding: 8px 12px;
  background: var(--bg-main);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: all var(--transition-fast);
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.1);
  background: white;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-main);
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  transition: all var(--transition-fast);
}
.search-box:focus-within {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.1);
}
.search-box i { color: var(--text-muted); font-size: 16px; }
.search-box input {
  border: none;
  background: none;
  padding: 9px 0;
  color: var(--text-main);
  outline: none;
  font-size: 13px;
  font-family: var(--font-body);
  min-width: 200px;
}

/* ============================================================
   TASK BOARD (KANBAN)
   ============================================================ */
.task-board {
  display: flex;
  gap: 14px;
  height: calc(100vh - 200px);
  overflow-x: auto;
  padding-bottom: 16px;
}

.task-column {
  flex: 1;
  min-width: 290px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.column-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-radius: 12px 12px 0 0;
}
.column-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.column-body {
  padding: 12px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Task cards */
.task-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  cursor: grab;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border-left: 3px solid transparent;
}
.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(10, 22, 40, 0.1);
}
.task-card:active { cursor: grabbing; }
.task-card.dragging {
  opacity: 0.5;
  transform: scale(0.97);
}

.task-card.deadline-overdue {
  border-left-color: var(--red) !important;
  background: #fffafa;
}
.task-card.deadline-soon {
  border-left-color: var(--gold) !important;
  background: #fffdf5;
}

.task-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.task-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 5px;
  line-height: 1.4;
}
.task-title.clickable-title { cursor: pointer; }
.task-title.clickable-title:hover { color: var(--blue); }

.task-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

/* Deadline badges */
.deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.deadline-badge.overdue { background: var(--danger-bg); color: var(--red); }
.deadline-badge.soon    { background: var(--warning-bg); color: #b07800; }
.deadline-badge.ok      { background: var(--success-bg); color: var(--green); }

/* Quick status menu */
.quick-status-menu {
  position: absolute;
  z-index: 9999;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.12);
  padding: 6px;
  min-width: 180px;
  animation: fadeInUp 0.15s ease-out;
}

.quick-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--transition-fast);
}
.quick-status-item:hover { background: var(--bg-main); color: var(--blue); }
.quick-status-item.status-in-progress i { color: var(--blue); }
.quick-status-item.status-done i { color: var(--green); }

/* Task filter bar */
.task-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}
.task-filter-bar select {
  padding: 7px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 7px;
  font-size: 12px;
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast);
}
.task-filter-bar select:focus { border-color: var(--blue); }

/* Priority pill group (form) */
.priority-pill-group { display: flex; gap: 8px; }

.priority-pill-btn {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}
.priority-pill-btn[data-val="low"]  { background: var(--success-bg); color: var(--green); }
.priority-pill-btn[data-val="low"].active,
.priority-pill-btn[data-val="low"]:hover  { background: var(--green); color: white; border-color: var(--green); }
.priority-pill-btn[data-val="medium"] { background: var(--warning-bg); color: #b07800; }
.priority-pill-btn[data-val="medium"].active,
.priority-pill-btn[data-val="medium"]:hover { background: var(--gold); color: white; border-color: var(--gold); }
.priority-pill-btn[data-val="high"] { background: var(--danger-bg); color: var(--red); }
.priority-pill-btn[data-val="high"].active,
.priority-pill-btn[data-val="high"]:hover { background: var(--red); color: white; border-color: var(--red); }

/* Checkbox group for assignees */
.checkbox-group-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  padding: 12px;
  background: var(--bg-main);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
}
.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}
.checkbox-item label { cursor: pointer; margin: 0; }

/* ============================================================
   TRIPS / CÔNG TÁC
   ============================================================ */
.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.trip-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: all var(--transition-normal);
}
.trip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(10, 22, 40, 0.08);
}

.trip-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.trip-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.trip-location { color: var(--text-muted); font-size: 12px; display: flex; align-items: center; gap: 4px; }

.trip-dates {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-main);
  padding: 6px 10px;
  border-radius: 7px;
  margin-bottom: 10px;
  font-size: 12px;
  font-family: var(--font-mono);
}
.trip-dates i { color: var(--blue); }

.trip-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 10px;
}
.trip-budget { font-weight: 700; color: var(--green); font-family: var(--font-mono); }

/* View toggle */
.trips-view-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.view-toggle-btn {
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border-color);
  background: white;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 5px;
}
.view-toggle-btn.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.view-toggle-btn:hover:not(.active) {
  border-color: var(--blue);
  color: var(--blue);
}

/* ── CALENDAR VIEW ── */
.calendar-grid {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
}
.calendar-nav-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.calendar-nav-btn:hover { background: var(--bg-main); color: var(--blue); border-color: var(--blue); }
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
}
.calendar-weekday {
  text-align: center;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.calendar-day {
  min-height: 72px;
  padding: 6px;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  transition: background 0.1s;
}
.calendar-day:nth-child(7n) { border-right: none; }
.calendar-day.other-month { background: var(--bg-main); opacity: 0.4; }
.calendar-day.today { background: rgba(0, 87, 184, 0.04); }
.calendar-day-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-family: var(--font-mono);
}
.calendar-day.today .calendar-day-num {
  background: var(--blue);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.calendar-trip-dot {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 87, 184, 0.1);
  color: var(--blue);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.calendar-trip-dot:hover { background: rgba(0, 87, 184, 0.2); }
.calendar-trip-dot.active-today {
  background: rgba(10, 173, 126, 0.12);
  color: var(--green);
}

/* ============================================================
   ĐỀ ÁN (DEAN)
   ============================================================ */
.dean-stats-bar {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--border-color);
}
.dean-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  gap: 4px;
  border-right: 1px solid var(--border-color);
  text-align: center;
}
.dean-stat-item:last-child { border-right: none; }
.dean-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}
.dean-stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--navy);
  line-height: 1;
}

.dean-section {
  margin-bottom: 10px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.dean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dean-table thead tr {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a6c 100%);
  color: white;
}
.dean-th-roman {
  width: 48px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  padding: 10px;
  vertical-align: middle;
  font-family: var(--font-mono);
}
.dean-th-title {
  text-align: left;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.dean-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.12s;
}
.dean-table tbody tr:last-child { border-bottom: none; }
.dean-table tbody tr:hover { background: #fafcff; }

.dean-td-idx {
  width: 48px;
  text-align: center;
  vertical-align: top;
  padding: 10px 4px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
  font-family: var(--font-mono);
}
.dean-td-name {
  padding: 10px 16px;
  vertical-align: top;
  line-height: 1.55;
  color: var(--text-main);
  font-size: 13px;
}
.dean-td-note {
  width: 240px;
  padding: 10px 12px;
  vertical-align: top;
  font-size: 12px;
}
.dean-note-role { font-weight: 700; color: var(--blue); margin-bottom: 3px; }
.dean-note-dec  { color: var(--text-muted); font-size: 11px; font-family: var(--font-mono); margin-bottom: 4px; }
.dean-note-extra { color: var(--text-muted); font-style: italic; font-size: 11px; margin-top: 4px; }
.dean-td-actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.dean-table tbody tr:hover .dean-td-actions { opacity: 1; }

/* ============================================================
   CONTACTS / DANH BẠ
   ============================================================ */
.contacts-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.contacts-search-input {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  background: white;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 14px;
  gap: 8px;
  transition: all var(--transition-fast);
}
.contacts-search-input:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.1);
}
.contacts-search-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text-main);
}
.contacts-search-input i { color: var(--text-muted); font-size: 16px; }
.contacts-export-btn { display: flex; gap: 8px; }

.contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: white;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#contacts-table-container {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: white;
}
#contacts-table td { padding: 11px 14px; vertical-align: middle; font-size: 13px; }
#contacts-table a { color: var(--blue); }
#contacts-table a:hover { text-decoration: underline; }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.notif-tab {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border-color);
  transition: all var(--transition-fast);
  background: white;
  color: var(--text-muted);
}
.notif-tab.active { background: var(--navy); color: white; border-color: var(--navy); }
.notif-tab:hover:not(.active) { border-color: var(--blue); color: var(--blue); }
.notif-unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  margin-left: 5px;
  vertical-align: middle;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.notification-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  border-left: 4px solid var(--blue);
  transition: transform 0.15s, box-shadow 0.15s;
}
.notification-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10, 22, 40, 0.07); }
.notification-card.unread { border-left-color: var(--blue); }
.notification-card.read   { opacity: 0.72; border-left-color: var(--border-color); }
.notification-card.priority-important { border-left-color: var(--gold); }
.notification-card.priority-urgent    { border-left-color: var(--red); background: rgba(192, 57, 43, 0.02); }

.notify-header {
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.notify-main h4 {
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 4px;
  font-weight: 700;
}
.priority-urgent .notify-main h4 { color: var(--red); }

.notify-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.notify-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
}

.notify-content-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease;
  padding: 0 18px;
  background: rgba(0, 0, 0, 0.01);
}
.notification-card.expanded .notify-content-wrapper {
  max-height: 600px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-color);
}

.toggle-icon { transition: transform 0.3s ease; }
.notification-card.expanded .toggle-icon { transform: rotate(90deg); }

.mark-read-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 15px;
  padding: 3px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}
.mark-read-btn:hover { color: var(--green); }

/* Notification Widget on Dashboard */
.notify-widget {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
}

.notify-widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(10, 22, 40, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  width: 92%;
  max-width: 600px;
  max-height: 94vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(10, 22, 40, 0.2);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--transition-normal);
}
.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  border-radius: 16px 16px 0 0;
}
.modal-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
}

.close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  transition: all var(--transition-fast);
}
.close-btn:hover { background: var(--danger-bg); color: var(--red); }

.modal-body { padding: 24px; }

/* ── FORMS ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.full-width {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}
.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.01em;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* Form section heading */
.form-section-heading {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
}

/* Login form fields */
.form-field-group { margin-bottom: 16px; }
.form-field-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}
.form-field-group select,
.form-field-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
}
.form-field-group select:focus,
.form-field-group input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.1);
}

/* File drop area */
.file-drop-area {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-main);
  font-size: 13px;
  color: var(--text-muted);
}
.file-drop-area:hover,
.file-drop-area.dragover {
  border-color: var(--blue);
  background: rgba(0, 87, 184, 0.03);
  color: var(--blue);
}
.file-drop-area i { font-size: 24px; margin-bottom: 8px; display: block; }

/* Login divider */
.login-divider-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.login-divider-line::before,
.login-divider-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* Google login button */
.btn-google-login {
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}
.btn-google-login:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(0, 87, 184, 0.03);
}

.dept-highlight {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 14px 0;
  font-family: var(--font-mono);
}

/* ============================================================
   LOGIN OVERLAY — SPLIT PANEL
   ============================================================ */
.login-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: stretch;
  transition: opacity var(--transition-normal);
  background: var(--navy);
}
.login-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Legacy login card (fallback) */
.login-card {
  text-align: center;
  padding: 50px 44px;
  max-width: 460px;
  width: 90%;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  background: white;
  border: 1px solid var(--border-color);
}
.login-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 18px;
  object-fit: contain;
}
.login-card h2 {
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}
.login-card > p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 13px;
}
.login-actions { margin-top: 24px; }

.login-divider {
  position: relative;
  text-align: center;
  margin: 20px 0;
}
.login-divider::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 100%; height: 1px;
  background: var(--border-color);
}
.login-divider span {
  position: relative;
  background: white;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Split panel layout */
.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
}

/* Brand panel */
.login-brand-panel {
  background: linear-gradient(145deg, var(--navy) 0%, #0d2447 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px 52px;
  position: relative;
  overflow: hidden;
}
.login-brand-panel::before {
  content: '';
  position: absolute;
  top: -30%; right: -20%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,87,184,0.28) 0%, transparent 70%);
  pointer-events: none;
}
.login-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -20%; left: -10%;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192,57,43,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.login-brand-vioit {
  font-size: 11px;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
  font-weight: 600;
  font-family: var(--font-mono);
  position: relative;
}

.login-brand-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: white;
  line-height: 1.15;
  position: relative;
}
.login-brand-title span { color: var(--blue-bright); }

.login-brand-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.48);
  margin-top: 14px;
  line-height: 1.7;
  max-width: 340px;
  position: relative;
}

.login-brand-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}
.login-brand-tag {
  padding: 5px 13px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
}

/* Form panel */
.login-form-panel {
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 56px;
}
.login-form-inner {
  width: 100%;
  max-width: 380px;
}
.login-form-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.login-form-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 13px 20px;
  background: white;
  border-left: 4px solid var(--blue);
  border-radius: 9px;
  box-shadow: 0 6px 20px rgba(10, 22, 40, 0.14);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  min-width: 260px;
  max-width: 380px;
  animation: slideInRight 0.25s ease-out forwards;
}
.toast.toast-success { border-left-color: var(--green); }
.toast.toast-error   { border-left-color: var(--red); }
.toast i { font-size: 1.1rem; flex-shrink: 0; }

/* ============================================================
   SKELETON LOADER
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #edf0f5 25%, #f7f9fc 50%, #edf0f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 5px;
}
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}
.skeleton-cell { height: 13px; border-radius: 4px; }
.skeleton-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }

/* ============================================================
   ATTACHMENT UI
   ============================================================ */
.current-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0, 87, 184, 0.04);
  border: 1.5px dashed rgba(0, 87, 184, 0.3);
  border-radius: 8px;
  margin-top: 6px;
  animation: fadeIn 0.25s ease-out;
}
.attachment-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.attachment-info i { font-size: 18px; color: var(--blue); }
.attachment-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attachment-link:hover { text-decoration: underline; }
.btn-remove-attachment {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-remove-attachment:hover { background: var(--danger-bg); }
.btn-remove-attachment i { font-size: 15px; }

/* Small attachment link (in tables) */
.attachment-link-small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--blue);
  margin-top: 4px;
  text-decoration: none;
  padding: 2px 7px;
  background: rgba(0, 87, 184, 0.07);
  border-radius: 4px;
  transition: background 0.15s;
}
.attachment-link-small:hover {
  background: rgba(0, 87, 184, 0.14);
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 10px;
}
.empty-img {
  width: 160px;
  margin-bottom: 16px;
  opacity: 0.7;
}
.empty-state i { font-size: 3rem; opacity: 0.5; }
.empty-state p { font-size: 14px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes slideInRight {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d9e8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #adb8cc; }

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --bg-main:       #0f1623;
  --bg-secondary:  #192035;
  --bg-card:       #192035;
  --bg-hover:      #1e2a42;
  --surface:       #0f1623;
  --text-main:     #e2e8f4;
  --text-color:    #e2e8f4;
  --text-muted:    #8899bb;
  --border-color:  #253049;
  --glass-border:  #253049;
  --glass-bg:      #192035;
}
[data-theme="dark"] body                         { background: var(--bg-main); color: var(--text-main); }
[data-theme="dark"] .voffice-header              { background: #111827; }
[data-theme="dark"] .header-top                  { background: #111827; border-bottom-color: var(--blue); }
[data-theme="dark"] .glass-panel                 { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .modal-content               { background: var(--bg-card); }
[data-theme="dark"] .modal-header                { background: var(--bg-card); }
[data-theme="dark"] .data-table th               { background: var(--bg-hover); }
[data-theme="dark"] .task-card                   { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .task-column                 { background: var(--bg-hover); border-color: var(--border-color); }
[data-theme="dark"] .column-header               { background: var(--bg-card); }
[data-theme="dark"] .form-control                { background: var(--bg-hover); color: var(--text-main); border-color: var(--border-color); }
[data-theme="dark"] .voffice-category-card       { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .widget                      { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .notification-card           { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .toast                       { background: var(--bg-card); }
[data-theme="dark"] .notif-tab                   { background: var(--bg-card); }
[data-theme="dark"] .btn-secondary               { background: var(--bg-hover); color: var(--text-main); border-color: var(--border-color); }
[data-theme="dark"] .btn-icon                    { background: var(--bg-hover); border-color: var(--border-color); color: var(--text-muted); }
[data-theme="dark"] .trip-card                   { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .dean-section                { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .calendar-grid               { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .calendar-day.other-month    { background: var(--bg-hover); }
[data-theme="dark"] .contacts-search-input       { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .task-filter-bar             { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .task-filter-bar select      { background: var(--bg-hover); color: var(--text-main); }
[data-theme="dark"] .filters-bar                 { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .search-box                  { background: var(--bg-hover); border-color: var(--border-color); }
[data-theme="dark"] .search-box input            { color: var(--text-main); }
[data-theme="dark"] .trips-view-toggle .view-toggle-btn { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] #contacts-table-container    { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .dean-stats-bar              { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .login-form-panel            { background: var(--bg-card); }
[data-theme="dark"] .form-field-group select,
[data-theme="dark"] .form-field-group input      { background: var(--bg-hover); color: var(--text-main); }
[data-theme="dark"] .checkbox-group-container    { background: var(--bg-hover); border-color: var(--border-color); }
[data-theme="dark"] .table th                    { background: var(--bg-hover); }
[data-theme="dark"] .table tbody tr:hover        { background: var(--bg-hover); }
[data-theme="dark"] .data-table tbody tr:hover   { background: var(--bg-hover); }
[data-theme="dark"] .news-item                   { border-bottom-color: var(--border-color); }
[data-theme="dark"] .filters-bar                 { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .table-container             { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .notify-widget               { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .file-drop-area              { background: var(--bg-hover); }
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #263349 50%, #1e293b 75%);
  background-size: 200% 100%;
}
[data-theme="dark"] .login-card                  { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .login-divider span          { background: var(--bg-card); }
[data-theme="dark"] .activity-item               { border-bottom-color: var(--border-color); }
[data-theme="dark"] .data-table tbody tr:last-child td { border-bottom: none; }
[data-theme="dark"] .icon-btn                    { background: var(--bg-hover); border-color: var(--border-color); }

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  /* Header */
  .header-top {
    padding: 8px 14px;
    min-height: 58px;
  }
  .mobile-toggle-btn { display: flex !important; }
  .logo-area img { height: 36px; }
  #inst-name { font-size: 8px; }
  #dept-name { font-size: 12px; }
  .hide-on-mobile { display: none !important; }
  #userPicHeader { width: 30px; height: 30px; }
  .header-action-btns button { width: 30px; height: 30px; font-size: 14px; }

  /* Nav dropdown */
  .header-bottom { position: relative; }
  .voffice-main-nav {
    position: absolute;
    width: 100%;
    top: 100%;
    left: 0;
    background: var(--navy);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    box-shadow: 0 10px 20px rgba(10, 22, 40, 0.2);
    flex-direction: column;
    z-index: 100;
  }
  .voffice-main-nav.show { max-height: 520px; }
  .voffice-main-nav ul {
    flex-direction: column;
    padding: 8px 0;
  }
  .nav-item,
  .voffice-main-nav li {
    width: 100%;
    padding: 11px 20px !important;
    font-size: 12px !important;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    border-left: none;
  }
  .nav-item.active {
    border-left: 4px solid white !important;
    background: rgba(255,255,255,0.12) !important;
  }
  .sync-indicator { display: none !important; }

  /* Layout */
  .app-container { padding-top: 14px; }
  .container { padding: 0 14px; }

  /* Dashboard */
  .voffice-stats-grid,
  .dashboard-widgets { grid-template-columns: 1fr; gap: 12px; }

  .view-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px;
    margin-bottom: 16px;
  }
  .header-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .header-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 11px !important;
    padding: 8px 6px !important;
  }

  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.3rem !important; }
  .view-title { font-size: 1.3rem !important; }
  .view-subtitle { font-size: 0.82rem !important; }

  /* Task board */
  .task-board {
    flex-direction: column !important;
    height: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
  }
  .task-column {
    min-width: 100% !important;
    width: 100% !important;
    flex: none !important;
  }

  /* Tables */
  .data-table th,
  .data-table td,
  .dean-table th,
  .dean-table td,
  .table th,
  .table td {
    font-size: 11px !important;
    padding: 8px 8px !important;
    white-space: normal !important;
  }
  .table-responsive {
    margin: 0 -14px;
    padding: 0 14px;
    width: calc(100% + 28px);
    overflow-x: auto;
  }

  /* Modal */
  .modal-content {
    width: 96% !important;
    border-radius: 12px;
  }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Login */
  .login-split { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { padding: 36px 28px; }
  /* Mobile: hiện link video thay vì iframe */
  .login-video-mobile-link { display: flex !important; }

  /* Dean stats */
  .dean-stats-bar { flex-wrap: wrap; }
  .dean-stat-item { flex: 1 1 50%; border-right: none; border-bottom: 1px solid var(--border-color); }
  .dean-stat-item:nth-child(odd) { border-right: 1px solid var(--border-color); }

  /* Contacts */
  .contacts-search-bar { flex-direction: column; align-items: stretch; }
  .contacts-export-btn { justify-content: flex-end; }

  /* Misc */
  .right-tools { gap: 8px; }
  .voffice-category-card { padding: 16px !important; }
  .cat-icon { width: 42px !important; height: 42px !important; font-size: 1.3rem !important; }
  .cat-row b { font-size: 1.2rem !important; }
  .show-on-mobile-only { display: flex !important; }
}

/* ── Utilities ── */
.show-on-mobile-only { display: none !important; }
.hidden { display: none !important; }

:root {
  --navy: #0a1628;
  --navy-mid: #112240;
  --blue: #0057b8;
  --blue-bright: #1a8cff;
  --red: #c0392b;
  --gold: #f0a500;
  --green: #0aad7e;
  --surface: #f4f7fb;
  --card: #ffffff;
  --border: #dde4ef;
  --text: #1a2540;
  --muted: #6b7a99;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Be Vietnam Pro', sans-serif;
}

/* ── COVER ── */
.cover {
  background: var(--navy);
  color: white;
  padding: 80px 60px;
  position: relative;
  overflow: hidden;
}
.cover::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 80% 40%, rgba(0,87,184,0.35) 0%, transparent 70%),
              radial-gradient(ellipse 40% 50% at 10% 80%, rgba(192,57,43,0.15) 0%, transparent 60%);
}
.cover-inner { position: relative; max-width: 900px; }
.cover-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px; padding: 6px 16px; font-size: 12px; color: rgba(255,255,255,0.7);
  font-family: var(--mono); letter-spacing: 0.05em; margin-bottom: 28px;
}
.cover-badge span { width: 6px; height: 6px; background: #0aad7e; border-radius: 50%; display: block; }
.cover h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.cover h1 em { color: #1a8cff; font-style: normal; }
.cover p { font-size: 18px; color: rgba(255,255,255,0.65); max-width: 600px; margin-bottom: 40px; }
.cover-meta { display: flex; gap: 48px; }
.cover-meta-item label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); font-family: var(--mono); }
.cover-meta-item p { font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.9); margin-top: 4px; }

/* ── LAYOUT ── */
.page { max-width: 1100px; margin: 0 auto; padding: 60px 40px; }
.section { margin-bottom: 64px; }
.section-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--blue);
  text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.section-label::before { content: ''; display: block; width: 20px; height: 2px; background: var(--blue); }
.section-title { font-size: 28px; font-weight: 800; color: var(--navy); margin-bottom: 8px; line-height: 1.2; }
.section-sub { color: var(--muted); font-size: 15px; max-width: 680px; }

/* ── CARDS ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-top: 28px; }

/* ── PROBLEM CARDS ── */
.problem-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px;
  border-left: 4px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}
.problem-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.07); }
.problem-card.severity-high { border-left-color: var(--red); }
.problem-card.severity-med { border-left-color: var(--gold); }
.problem-card.severity-low { border-left-color: var(--blue); }
.problem-card .tag {
  font-size: 10px; font-family: var(--mono); letter-spacing: 0.08em; font-weight: 600;
  padding: 3px 10px; border-radius: 100px; margin-bottom: 12px; display: inline-block;
}
.severity-high .tag { background: rgba(192,57,43,0.1); color: var(--red); }
.severity-med .tag { background: rgba(240,165,0,0.12); color: #b07800; }
.severity-low .tag { background: rgba(0,87,184,0.08); color: var(--blue); }
.problem-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.problem-card p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.problem-card .fix {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--green); display: flex; align-items: flex-start; gap: 8px;
}
.problem-card .fix::before { content: '→'; flex-shrink: 0; font-weight: 700; }

/* ── TAB COMPARISON ── */
.tab-comparison { margin-top: 28px; }
.tab-row {
  display: grid; grid-template-columns: 180px 1fr 1fr; gap: 0;
  border-bottom: 1px solid var(--border);
}
.tab-row:first-child { border-radius: 12px 12px 0 0; overflow: hidden; }
.tab-row:last-child { border-bottom: none; border-radius: 0 0 12px 12px; overflow: hidden; }
.tab-row.header { background: var(--navy); color: white; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.tab-cell { padding: 14px 18px; font-size: 13.5px; border-right: 1px solid var(--border); }
.tab-row.header .tab-cell { color: rgba(255,255,255,0.8); border-right-color: rgba(255,255,255,0.1); }
.tab-cell:last-child { border-right: none; }
.tab-row:not(.header) { background: white; }
.tab-row:not(.header):hover { background: #fafcff; }
.tab-cell.name { font-weight: 700; color: var(--navy); font-size: 13px; }
.tab-cell.before { color: #c0392b; }
.tab-cell.after { color: #0aad7e; }
.tab-cell.before::before { content: '✗ '; opacity: 0.7; }
.tab-cell.after::before { content: '✓ '; }
.tab-comparison-wrapper { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }

/* ── WORKFLOW DIAGRAM ── */
.workflow { margin-top: 28px; }
.workflow-track { display: flex; align-items: flex-start; gap: 0; position: relative; overflow-x: auto; padding-bottom: 8px; }
.workflow-step { flex: 1; min-width: 140px; position: relative; }
.workflow-step:not(:last-child)::after {
  content: '';
  position: absolute; top: 32px; right: -20px;
  width: 40px; height: 2px;
  background: linear-gradient(to right, var(--blue), #a0c4ff);
  z-index: 1;
}
.step-circle {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 12px;
  font-weight: 800; font-family: var(--mono);
  position: relative; z-index: 2;
}
.step-circle.blue { background: rgba(0,87,184,0.1); color: var(--blue); }
.step-circle.green { background: rgba(10,173,126,0.1); color: var(--green); }
.step-circle.gold { background: rgba(240,165,0,0.12); color: #b07800; }
.step-circle.red { background: rgba(192,57,43,0.1); color: var(--red); }
.step-label { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.step-desc { font-size: 12px; color: var(--muted); line-height: 1.4; max-width: 130px; }
.workflow-label { font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 20px; font-weight: 600; }

/* ── MOCKUP FRAME ── */
.mockup-wrapper { margin-top: 28px; }
.mockup-browser {
  background: #1e2740; border-radius: 12px 12px 0 0;
  padding: 14px 20px; display: flex; align-items: center; gap: 8px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f57; }
.dot.y { background: #febc2e; }
.dot.g { background: #28c840; }
.mockup-url {
  flex: 1; background: rgba(255,255,255,0.08); border-radius: 6px;
  padding: 6px 14px; font-size: 12px; font-family: var(--mono); color: rgba(255,255,255,0.5);
  margin: 0 16px;
}
.mockup-body {
  background: white; border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 12px 12px; overflow: hidden;
}

/* ── MINI APP MOCKUP ── */
.app-header { background: white; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.app-header-top {
  padding: 10px 20px; display: flex; align-items: center;
  gap: 16px; border-bottom: 3px solid var(--blue); width: 100%;
}
.app-logo { width: 36px; height: 36px; background: var(--blue); border-radius: 8px; display:flex; align-items:center; justify-content:center; color:white; font-weight:800; font-size:13px; flex-shrink:0; }
.app-brand { line-height: 1.2; }
.app-brand-main { font-size: 10px; color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.app-brand-dept { font-size: 14px; font-weight: 800; color: var(--blue); }
.app-nav { display: flex; background: var(--navy); padding: 0; width: 100%; }
.app-nav-item {
  padding: 10px 16px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.65);
  cursor: pointer; white-space: nowrap; border-right: 1px solid rgba(255,255,255,0.06);
  transition: all 0.15s;
}
.app-nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.app-nav-item.active { background: var(--blue); color: white; }
.app-user { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.app-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--blue-bright)); display:flex; align-items:center; justify-content:center; color:white; font-size:11px; font-weight:700; }

/* ── DASHBOARD CONTENT ── */
.app-body { padding: 24px; background: #f4f7fb; min-height: 380px; }
.dash-welcome { margin-bottom: 20px; }
.dash-welcome h3 { font-size: 16px; font-weight: 800; color: var(--navy); }
.dash-welcome p { font-size: 12px; color: var(--muted); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card {
  background: white; border-radius: 10px; padding: 14px 16px;
  border: 1px solid var(--border); display: flex; align-items: center; gap: 12px;
}
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display:flex; align-items:center; justify-content:center; font-size: 18px; flex-shrink:0; }
.stat-icon.blue { background: rgba(0,87,184,0.1); }
.stat-icon.green { background: rgba(10,173,126,0.1); }
.stat-icon.gold { background: rgba(240,165,0,0.12); }
.stat-icon.red { background: rgba(192,57,43,0.08); }
.stat-num { font-size: 22px; font-weight: 800; font-family: var(--mono); color: var(--navy); line-height: 1; }
.stat-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }
.dash-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.widget-card { background: white; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.widget-hd { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 6px; }
.widget-hd-dot { width: 8px; height: 8px; border-radius: 50%; }
.widget-body-inner { padding: 12px 16px; }
.activity-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid #f3f5f9; }
.activity-item:last-child { border-bottom: none; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-top: 4px; flex-shrink: 0; }
.act-text { font-size: 11.5px; color: var(--text); line-height: 1.4; }
.act-time { font-size: 10px; color: var(--muted); font-family: var(--mono); }

/* Kanban preview */
.kanban-mini { display: flex; gap: 8px; padding: 12px 16px; }
.kanban-col { flex: 1; background: #f8fafc; border-radius: 8px; padding: 10px; }
.k-hd { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.k-card { background: white; border: 1px solid var(--border); border-radius: 6px; padding: 8px; margin-bottom: 6px; font-size: 11px; line-height: 1.4; color: var(--text); }
.k-card .prio { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; }
.prio.high { background: #e74c3c; }
.prio.med { background: var(--gold); }
.prio.low { background: var(--green); }

/* Dean table mini */
.dean-mini-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.dean-mini-table th { background: #f4f7fb; padding: 8px 10px; text-align: left; color: var(--muted); font-size: 11px; font-weight: 600; }
.dean-mini-table td { padding: 8px 10px; border-bottom: 1px solid #f3f5f9; }
.cat-badge { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 10px; font-weight: 700; font-family: var(--mono); }
.cat-i { background: rgba(0,87,184,0.1); color: var(--blue); }
.cat-ii { background: rgba(10,173,126,0.1); color: var(--green); }
.cat-iii { background: rgba(240,165,0,0.12); color: #b07800; }

/* ── FORM IMPROVEMENT ── */
.form-demo { padding: 24px; }
.form-section-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.form-section-title:first-child { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text); }
.form-label span { color: var(--red); }
.form-input {
  padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: var(--sans); color: var(--text); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,87,184,0.12); }
.form-input.readonly { background: #f8fafc; color: var(--muted); }
.form-select {
  padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: var(--sans); color: var(--text); outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7a99' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-color: white; padding-right: 32px;
}
.form-textarea { padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 13px; font-family: var(--sans); color: var(--text); resize: vertical; min-height: 80px; outline: none; }
.form-actions-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.priority-pills { display: flex; gap: 8px; }
.priority-pill {
  padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s;
}
.priority-pill.low { background: rgba(10,173,126,0.08); color: var(--green); }
.priority-pill.low.active { background: var(--green); color: white; }
.priority-pill.med { background: rgba(240,165,0,0.1); color: #b07800; }
.priority-pill.med.active { background: var(--gold); color: white; }
.priority-pill.high { background: rgba(192,57,43,0.08); color: var(--red); }
.priority-pill.high.active { background: var(--red); color: white; }

/* ── LOGIN REDESIGN ── */
.login-demo { display: grid; grid-template-columns: 1fr 1fr; min-height: 360px; }
.login-left { background: var(--navy); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; }
.login-right { padding: 40px; background: white; }
.login-brand-big { font-size: 28px; font-weight: 800; color: white; line-height: 1.2; margin-bottom: 8px; }
.login-brand-sub { font-size: 12px; color: rgba(255,255,255,0.45); font-family: var(--mono); }
.login-decorations { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.login-dec-tag { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 100px; padding: 4px 12px; font-size: 11px; color: rgba(255,255,255,0.5); }
.login-form-title { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.login-form-sub { font-size: 12px; color: var(--muted); margin-bottom: 24px; }

/* ── NOTIFICATION CARD ── */
.notif-card { background: white; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.notif-hd { padding: 14px 18px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.notif-prio { width: 4px; border-radius: 2px; align-self: stretch; flex-shrink: 0; }
.notif-prio.urgent { background: var(--red); }
.notif-prio.important { background: var(--gold); }
.notif-prio.normal { background: var(--blue); }
.notif-info { flex: 1; }
.notif-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.notif-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.notif-badge { padding: 3px 10px; border-radius: 100px; font-size: 10px; font-weight: 700; font-family: var(--mono); }
.notif-badge.urgent { background: rgba(192,57,43,0.1); color: var(--red); }
.notif-badge.important { background: rgba(240,165,0,0.12); color: #b07800; }
.notif-badge.normal { background: rgba(0,87,184,0.08); color: var(--blue); }
.notif-body { padding: 0 18px 16px 34px; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── IMPROVEMENT ITEMS ── */
.improve-list { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.improve-item { background: white; border: 1px solid var(--border); border-radius: 12px; display: flex; gap: 20px; padding: 20px 24px; align-items: flex-start; }
.improve-num { width: 40px; height: 40px; border-radius: 10px; background: var(--navy); color: white; font-size: 14px; font-weight: 800; font-family: var(--mono); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.improve-content h4 { font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.improve-content p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.improve-content code { background: #f4f7fb; border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-family: var(--mono); font-size: 12px; color: var(--blue); }
.improve-tag { margin-top: 10px; display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; font-family: var(--mono); }
.tag-ui { background: rgba(0,87,184,0.08); color: var(--blue); }
.tag-ux { background: rgba(10,173,126,0.1); color: var(--green); }
.tag-data { background: rgba(240,165,0,0.12); color: #b07800; }
.tag-security { background: rgba(192,57,43,0.08); color: var(--red); }
.tag-perf { background: rgba(107,122,153,0.1); color: var(--muted); }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); margin: 48px 0; }

/* ── SUMMARY CALLOUT ── */
.callout { background: linear-gradient(135deg, var(--navy) 0%, #1a3a6c 100%); border-radius: 16px; padding: 40px; color: white; margin-top: 28px; }
.callout h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.callout p { color: rgba(255,255,255,0.65); font-size: 14px; line-height: 1.7; max-width: 700px; }
.callout-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 32px; }
.callout-item h4 { font-size: 28px; font-weight: 800; color: #1a8cff; margin-bottom: 4px; font-family: var(--mono); }
.callout-item p { font-size: 13px; color: rgba(255,255,255,0.5); }

/* ── PREVIEW RESPONSIVE ── */
@media (max-width: 768px) {
  .grid2, .grid3, .stats-row { grid-template-columns: 1fr; }
  .login-demo { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .cover { padding: 50px 24px; }
  .page { padding: 40px 20px; }
  .callout-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cover-meta { flex-wrap: wrap; gap: 24px; }
  .workflow-track { overflow-x: auto; }
  .tab-row { grid-template-columns: 120px 1fr; }
  .tab-cell.after { display: none; }
}

/* ═══════════════════════════════════════════════════════
   TRIPS TABLE
═══════════════════════════════════════════════════════ */
#trips-grid { display:block !important; width:100% !important; }

.trips-table { width:100%; border-collapse:collapse; }
.trips-table th {
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
}
.trips-table td { padding:10px 14px; border-bottom:1px solid var(--border-color); vertical-align:middle; }
.trips-table tr:last-child td { border-bottom:none; }
.trips-table tbody tr:hover td { background:rgba(0,87,184,0.04); }
.trip-row-active td { background:rgba(16,185,129,0.05) !important; }
.trip-row-mine td { background:rgba(0,87,184,0.02); }
[data-theme="dark"] .trips-table th { background:#1e3a6e; }

.trip-purpose { font-weight:600; color:var(--navy); font-size:13px; }
.trip-location-cell { font-size:11px; color:var(--text-muted); margin-top:3px; }
.trip-notes-cell { font-size:11px; color:var(--text-muted); font-style:italic; margin-top:3px; }
.trip-dates-cell { font-size:12px; white-space:nowrap; }
.trip-arrow { color:var(--text-muted); }
.trip-leader-cell { font-size:12px; font-weight:600; color:var(--primary); }
.trip-members-cell { font-size:11px; color:var(--text-muted); line-height:1.7; word-break:break-word; }
.trip-vehicle-cell { font-size:18px; text-align:center; letter-spacing:2px; }
.trip-budget-cell { font-size:12px; font-weight:600; white-space:nowrap; }
.trip-actions-cell { white-space:nowrap; }
.trip-badge {
    display:inline-block; font-size:10px; font-weight:700;
    padding:1px 7px; border-radius:100px; margin-left:6px; vertical-align:middle;
}
.badge-active { color:var(--success); background:rgba(16,185,129,0.1); }
.badge-mine   { color:var(--primary); background:rgba(0,87,184,0.08); }
.btn-danger-outline { color:var(--danger); border:1px solid var(--border-color); background:transparent; }

/* ── Mobile: bảng → card ─────────────────────────────── */
@media (max-width: 768px) {
    .trips-table thead { display:none; }
    .trips-table, .trips-table tbody { display:block; width:100%; }
    .trips-table tbody tr {
        display:block;
        margin-bottom:12px;
        border:1px solid var(--border-color);
        border-radius:10px;
        overflow:hidden;
        background:var(--bg-card);
        box-shadow:0 1px 4px rgba(0,0,0,0.06);
    }
    .trips-table tbody tr td {
        display:flex;
        align-items:flex-start;
        gap:10px;
        padding:8px 14px;
        border:none;
        border-bottom:1px solid var(--border-color);
        font-size:13px;
    }
    .trips-table tbody tr td:last-child { border-bottom:none; }
    .trips-table tbody tr td[data-label]::before {
        content: attr(data-label);
        font-weight:700; font-size:10px;
        color:var(--text-muted); text-transform:uppercase;
        letter-spacing:0.05em; min-width:85px;
        padding-top:2px; flex-shrink:0;
    }
    /* Cột đầu (mục đích): không có label, làm header card */
    .trips-table tbody tr td:first-child {
        display:block;
        background:rgba(0,87,184,0.04);
        border-bottom:2px solid var(--primary) !important;
        padding:10px 14px;
    }
    .trip-vehicle-cell { font-size:16px; letter-spacing:3px; }
}

/* ═══════════════════════════════════════════════════
   PHẦN MỞ RỘNG v2 — Correspondence, Reports,
   Doc Library, Subtasks, Comments, Gantt
   ═══════════════════════════════════════════════════ */

/* ── Corr Tab Buttons ────────────────────────── */
.corr-tab-btn {
    transition: background 0.2s, color 0.2s;
}
.corr-tab-btn:hover:not(.active) {
    background: var(--surface-alt, rgba(0,0,0,0.04)) !important;
}

/* ── Report Stat Cards ───────────────────────── */
.report-stat-card {
    background: var(--bg-secondary, rgba(0,0,0,0.04));
    border-radius: var(--radius-md, 8px);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.report-stat-card .rsc-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.report-stat-card .rsc-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

/* ── Subtask Items ───────────────────────────── */
.subtask-item:hover {
    background: rgba(0,0,0,0.02);
}
.subtask-progress-bar {
    padding: 4px 0;
}

/* ── Task Progress Bar on Card ───────────────── */
.task-progress-fill {
    transition: width 0.3s ease;
}

/* ── Comment Thread ──────────────────────────── */
#task-detail-modal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* ── Gantt Chart Container ───────────────────── */
#gantt-container {
    background: var(--surface, #fff);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
#gantt-container::-webkit-scrollbar { height: 6px; width: 6px; }
#gantt-container::-webkit-scrollbar-track { background: transparent; }
#gantt-container::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

/* ── Doc Library Grid ────────────────────────── */
#doc-library-grid .glass-panel {
    border: 0.5px solid var(--border-color);
    transition: box-shadow 0.2s, transform 0.15s;
}
#doc-library-grid .glass-panel:hover {
    transform: translateY(-1px);
}

/* ── Global Search Results ───────────────────── */
#global-search-results:not(.hidden) {
    display: block;
}
#global-search-results > div:first-child {
    border-radius: 10px 10px 0 0;
}
#global-search-results > div:last-child {
    border-radius: 0 0 10px 10px;
    border-bottom: none;
}

/* ── Audit Log ───────────────────────────────── */
#audit-log-list::-webkit-scrollbar { width: 4px; }
#audit-log-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

/* ── Period Comparison Rows ──────────────────── */
#period-comparison > div > div {
    transition: background 0.15s;
}
#period-comparison > div > div:hover {
    background: var(--surface-alt, rgba(0,0,0,0.03)) !important;
}

/* ── Incoming CV Urgent Row ──────────────────── */
tr:has(.status-badge.status-pending) td:first-child strong {
    color: var(--primary);
}

/* ── Mobile: Correspondence ──────────────────── */
@media (max-width: 768px) {
    .corr-tab-btn {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
    #global-search-wrap {
        max-width: 100% !important;
    }
    .view-header:has(#global-search-wrap) {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    /* Reports 2-col → 1-col */
    #view-reports > div:nth-of-type(2) {
        grid-template-columns: 1fr !important;
    }
    /* Gantt scroll hint */
    #gantt-container {
        overflow-x: auto;
    }
    /* Doc library: 1 col */
    #doc-library-grid > div {
        grid-template-columns: 1fr !important;
    }
    /* Task detail modal: 1 col */
    #task-detail-modal .modal-body > div:last-child {
        grid-template-columns: 1fr !important;
    }
}

/* ── Dark mode overrides ─────────────────────── */
[data-theme="dark"] .report-stat-card {
    background: rgba(255,255,255,0.05);
}
[data-theme="dark"] #gantt-container {
    background: var(--surface, #1a1a2e);
}
[data-theme="dark"] #global-search-results {
    background: var(--surface, #1e1e2e);
    border: 1px solid var(--border-color);
}
[data-theme="dark"] .corr-tab-btn:hover:not(.active) {
    background: rgba(255,255,255,0.08) !important;
}

/* ═══ UPLOAD PROGRESS ═══ */
.upload-progress-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 16px;
    z-index: 10000;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: slideUp 0.3s ease-out;
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-progress-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.upload-progress-percent {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.2s ease-out;
}

/* Style for rows in Doc Library modal */
.lib-upload-progress-row {
    margin-top: 6px;
    width: 100%;
}

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

/* ── HEADER GOOGLE LOGIN BUTTON ── */
.btn-google-header {
  background: white !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all var(--transition-fast) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.btn-google-header:hover {
  background: var(--bg-hover) !important;
  border-color: var(--blue) !important;
  transform: translateY(-1px);
}

.btn-google-header.connected {
  background: var(--success-bg) !important;
  border-color: var(--success) !important;
  color: var(--success) !important;
}

.btn-google-header.connected i {
  color: var(--success) !important;
}

@media (max-width: 768px) {
  .btn-google-header .btn-text {
    display: none;
  }
  .btn-google-header {
    padding: 6px !important;
  }
}
