/* Evertech PMO - custom styles */
html, body { height: 100%; }
body { font-feature-settings: 'cv02','cv03','cv04','cv11'; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Utility badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; font-size: 11px; font-weight: 600;
  border-radius: 9999px; border: 1px solid transparent;
  white-space: nowrap;
}

.sla-OnTrack { background:#dcfce7; color:#166534; border-color:#86efac; }
.sla-AtRisk  { background:#fef9c3; color:#854d0e; border-color:#fde047; }
.sla-Delayed { background:#fee2e2; color:#991b1b; border-color:#fca5a5; }

.pri-Khan      { background:#fee2e2; color:#991b1b; }
.pri-Cao       { background:#ffedd5; color:#9a3412; }
.pri-TrungBinh { background:#e0f2fe; color:#075985; }
.pri-Thap      { background:#f1f5f9; color:#475569; }

.role-Admin        { background:#e2e8f0; color:#334155; }
.role-BLĐ          { background:#ccfbf1; color:#115e59; }
.role-TruongBP     { background:#dbeafe; color:#1e40af; }
.role-PM           { background:#fce7f3; color:#9d174d; }
.role-KyThuat      { background:#d1fae5; color:#065f46; }
.role-Sales        { background:#fbcfe8; color:#831843; }
.role-SalesSupport { background:#ede9fe; color:#5b21b6; }
.role-MuaHang      { background:#ffedd5; color:#7c2d12; }
.role-TCKT         { background:#ccfbf1; color:#134e4a; }
.role-Viewer       { background:#f1f5f9; color:#334155; }
.role-KhachHang    { background:#fef9c3; color:#713f12; }

/* Sidebar */
.nav-item {
  display:flex; align-items:center; gap:12px;
  padding: 10px 14px; border-radius: 8px;
  color:#cbd5e1; font-weight:500; font-size:14px;
  transition: all .15s ease;
}
.nav-item:hover { background:#134e4a; color:white; }
.nav-item.active { background:#0d9488; color:white; }
.nav-item i { width: 18px; text-align: center; }

/* Cards */
.card {
  background:white; border:1px solid #e2e8f0;
  border-radius: 12px; padding: 20px;
  transition: box-shadow .15s ease;
}
.card:hover { box-shadow: 0 4px 12px -4px rgba(0,0,0,.08); }

/* Buttons */
.btn {
  display:inline-flex; align-items:center; gap:6px;
  padding: 8px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  transition: all .15s ease; cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background:#0d9488; color:white; }
.btn-primary:hover { background:#0f766e; }
.btn-secondary { background:white; color:#334155; border-color:#cbd5e1; }
.btn-secondary:hover { background:#f8fafc; }
.btn-danger { background:#dc2626; color:white; }
.btn-danger:hover { background:#b91c1c; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon { padding: 6px; width: 32px; height: 32px; justify-content: center; }

/* Inputs */
.input, .select, .textarea {
  width:100%; padding: 8px 12px;
  border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 14px; background:white;
  transition: border-color .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline:none; border-color:#0d9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,.1);
}

/* Table */
.tbl { width:100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align:left; padding: 10px 14px;
  font-weight:600; color:#475569; font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em;
  background:#f8fafc; border-bottom:1px solid #e2e8f0;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; }
.tbl tbody tr:hover { background:#f8fafc; }

/* Login */
.login-bg {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 50%, #042f2e 100%);
}

/* Avatar */
.avatar {
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: 9999px; color:white; font-weight:600;
  flex-shrink:0;
}

/* Toast */
.toast {
  background:white; border-left: 4px solid #0d9488;
  padding: 12px 16px; border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,.15);
  min-width: 280px; max-width: 400px;
  animation: slideInRight .25s ease;
}
.toast-error { border-color:#dc2626; }
.toast-warning { border-color:#f59e0b; }
.toast-success { border-color:#16a34a; }

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

/* Modal */
.modal-backdrop {
  position:fixed; inset:0; background:rgba(15,23,42,.45);
  display:flex; align-items:center; justify-content:center;
  z-index: 100; padding: 16px;
  animation: fadeIn .15s ease;
}
.modal-body {
  background:white; border-radius: 14px;
  width:100%; max-width: 600px;
  max-height: 92vh; overflow-y: auto;
  animation: popIn .2s ease;
}
.modal-lg { max-width: 800px; }

@keyframes fadeIn { from { opacity:0;} to { opacity:1;} }
@keyframes popIn {
  from { transform: scale(.95); opacity:0; }
  to   { transform: scale(1); opacity:1; }
}

/* Status dot */
.dot { width:8px; height:8px; border-radius:50%; display:inline-block; }
.dot-green { background:#16a34a; }
.dot-yellow{ background:#f59e0b; }
.dot-red   { background:#dc2626; }
.dot-gray  { background:#94a3b8; }

/* Tabs */
.tab-item {
  padding: 10px 16px; border-bottom: 2px solid transparent;
  color:#64748b; font-weight:500; font-size: 14px;
  cursor: pointer; white-space: nowrap;
}
.tab-item:hover { color:#0d9488; }
.tab-item.active { color:#0d9488; border-color:#0d9488; }

/* Progress bar */
.progress-bar {
  height: 6px; background:#e2e8f0; border-radius:9999px;
  overflow:hidden; width:100%;
}
.progress-fill { height:100%; transition: width .3s ease; }

/* Quick-login card */
.quicklogin-card {
  border:1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  padding: 12px; border-radius: 10px;
  cursor:pointer; transition: all .15s ease;
  text-align:left;
}
.quicklogin-card:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.4);
  transform: translateY(-2px);
}

/* Empty state */
.empty {
  padding: 48px 20px; text-align:center;
  color:#94a3b8;
}

/* Responsive sidebar */
@media (max-width: 1024px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s; z-index: 50; }
  .sidebar.open { transform: translateX(0); }
}
