/* ==========================================================================
   MAILAND HANOI CITY — Enterprise Event Access Control Design System
   Tailwind CSS Utility Integrations & Core Class Definitions
   ========================================================================== */

/* Base transitions and theme variables */
:root {
  --brand-green: #064e3b;
  --brand-green-hover: #043c2d;
  --brand-gold: #b98a27;
  --brand-gold-hover: #936b1e;
  --brand-dark: #10231e;
  --surface: #f6f8f7;
  --surface-raised: #ffffff;
  --line: #dce5e1;
  --ink-muted: #60716a;
}

html { scroll-behavior: smooth; }

.admin-shell {
  background:
    radial-gradient(circle at 100% 0%, rgba(185, 138, 39, 0.08), transparent 27rem),
    radial-gradient(circle at 0% 100%, rgba(6, 78, 59, 0.065), transparent 30rem),
    var(--surface);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  background: var(--brand-green);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

/* GPU Acceleration for Chrome Windows Performance */
body, .tab-view, .sidebar, .modal-card {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Global Table Alignment: Centered, Middle, Single Line across all pages & modals */
.custom-table th,
.custom-table td,
table th,
table td {
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.custom-table td > div,
table td > div {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  width: auto;
}

/* Modal Overlay Display Control (Toggled via JS class 'active' or style.display) */
.modal-overlay {
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-card {
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

/* Navigation active button state */
.nav-btn.active {
  background: linear-gradient(135deg, #07513e, #064536) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: inset 3px 0 0 #d4aa52, 0 8px 18px rgba(3, 52, 39, 0.22);
}

.nav-btn.active i {
  color: #fbbf24 !important;
}

/* Tab View Transitions */
.tab-view {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.tab-view.active {
  display: block !important;
}

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

/* Custom Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-danger {
  background-color: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.badge-primary {
  background-color: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

.badge-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 0.75rem;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn:active {
  transform: scale(0.97);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(185, 138, 39, 0.48) !important;
  outline-offset: 2px;
}

.sidebar {
  background: linear-gradient(165deg, #10251f 0%, #0a1915 100%) !important;
  box-shadow: 10px 0 30px rgba(10, 25, 21, 0.12);
}

.app-header {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: rgba(220, 229, 225, 0.86) !important;
  box-shadow: 0 8px 24px rgba(11, 42, 31, 0.045) !important;
}

.container { max-width: 1600px !important; margin: 0 auto; }

.glass-card {
  border-color: var(--line) !important;
  box-shadow: 0 12px 30px rgba(11, 42, 31, 0.055) !important;
}

.stat-card {
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.stat-card::after {
  content: '';
  position: absolute;
  width: 8rem;
  height: 8rem;
  top: -5rem;
  right: -4rem;
  border-radius: 50%;
  background: rgba(6, 78, 59, 0.045);
}

.stat-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(11, 42, 31, 0.1) !important; }

.custom-table thead,
table thead { background: #f1f5f3; }

.custom-table tbody tr,
table tbody tr { transition: background-color 150ms ease; }

.custom-table tbody tr:hover,
table tbody tr:hover { background: #f5faf7; }

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
}

.btn-primary {
  background-color: #005a36;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #004428;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

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

.btn-success {
  background-color: #c59b27;
  color: #ffffff;
}

.btn-success:hover {
  background-color: #a37e1d;
}

.btn-danger {
  background-color: #e11d48;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #be123c;
}

.btn-warning {
  background-color: #d97706;
  color: #ffffff;
}

.btn-warning:hover {
  background-color: #b45309;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #005a36;
}

/* Confirm modal icons */
.confirm-icon.warning {
  background-color: #fef3c7;
  color: #d97706;
}

.confirm-icon.danger {
  background-color: #ffe4e6;
  color: #e11d48;
}

.confirm-icon.success {
  background-color: #dcfce7;
  color: #166534;
}

.confirm-icon.info {
  background-color: #e0f2fe;
  color: #0284c7;
}

/* Toast Notifications Container & Animation */
#toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: 24rem;
  width: 100%;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  font-size: 0.875rem;
  font-weight: 600;
  border-left-width: 4px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success {
  border-left-color: #166534;
  color: #0f172a;
}

.toast.toast-error {
  border-left-color: #e11d48;
  color: #0f172a;
}

.toast.toast-warning {
  border-left-color: #d97706;
  color: #0f172a;
}

.toast.toast-info {
  border-left-color: #0284c7;
  color: #0f172a;
}

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

/* Force absolute horizontal centering for all avatar/face images in tables */
.custom-table th,
.custom-table td {
  text-align: center !important;
  vertical-align: middle !important;
}

.custom-table td img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.custom-table td .flex-center-img {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE SYSTEM (iOS & Android Optimized)
   ========================================================================== */

/* Mobile Sidebar Drawer */
@media (max-width: 767.98px) {
  .sidebar {
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 50 !important;
  }
  .sidebar.mobile-open,
  .sidebar.active {
    transform: translateX(0) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4) !important;
  }
  .sidebar-mobile-overlay {
    display: none;
    z-index: 40 !important;
  }
  .sidebar-mobile-overlay.active {
    display: block !important;
  }
}

/* Touch targets and Mobile Inputs (prevent iOS auto-zoom on input focus) */
@media (max-width: 767.98px) {
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
    min-height: 44px !important;
  }

  .btn {
    min-height: 40px !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  /* Table Container Touch Inertia & Styling */
  .table-responsive {
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    border-radius: 0.75rem !important;
  }

  .custom-table th {
    font-size: 0.7rem !important;
    padding: 0.5rem 0.5rem !important;
    letter-spacing: 0.02em !important;
  }

  .custom-table td {
    font-size: 0.78125rem !important;
    padding: 0.625rem 0.5rem !important;
  }

  /* Card padding on mobile */
  .glass-card {
    padding: 1rem !important;
    border-radius: 1rem !important;
  }

  /* Stat cards spacing */
  .stat-card {
    padding: 0.875rem 1rem !important;
  }

  .stat-icon {
    width: 2.5rem !important;
    height: 2.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.75rem !important;
  }

  .stat-info h3 {
    font-size: 1.25rem !important;
  }

  .category-pill {
    font-size: 9px !important;
    padding: 2px 8px !important;
  }

  /* Toast notification on mobile */
  #toast-container {
    left: 0.75rem !important;
    right: 0.75rem !important;
    bottom: 0.75rem !important;
    max-width: none !important;
    width: auto !important;
  }

  .toast {
    font-size: 0.8125rem !important;
    padding: 0.75rem 1rem !important;
  }

  /* Modals on Mobile Screens */
  .modal-overlay {
    padding: 0.75rem !important;
    align-items: flex-end !important;
  }

  @media (min-height: 600px) {
    .modal-overlay {
      align-items: center !important;
    }
  }

  .modal-card {
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 1.25rem !important;
    border-radius: 1.25rem !important;
    width: 100% !important;
  }

  /* Header Bar on Mobile */
  .app-header {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .header-page-title {
    font-size: 0.875rem !important;
  }

  .main-wrapper { min-height: 100dvh; }

  .container { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)) !important; }

  .sidebar { width: min(19rem, calc(100vw - 2.5rem)) !important; }
}

/* Extra small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
  .custom-table th,
  .custom-table td {
    padding-left: 0.375rem !important;
    padding-right: 0.375rem !important;
    font-size: 0.75rem !important;
  }

  .badge {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.6875rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* FaceID system log — focused, high-density recognition timeline */
.face-log-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  padding: 1.75rem 1.875rem 2rem;
  background:
    radial-gradient(circle at 92% 8%, rgba(0, 90, 54, 0.08), transparent 34%),
    #ffffff;
  border: 1px solid #dbe5e0;
  border-radius: 1.125rem;
  box-shadow: 0 14px 38px rgba(15, 62, 43, 0.07);
}

.face-log-heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}

.face-log-heading-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
  background: #064e3b;
  color: #f8fafc;
  font-size: 1.35rem;
  box-shadow: 0 10px 24px rgba(6, 78, 59, 0.18);
}

.face-log-heading h2 {
  margin: 0.3rem 0 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: #0f172a;
  text-wrap: balance;
}

.face-log-heading p {
  max-width: 65ch;
  margin: 0.65rem 0 0;
  color: #64748b;
  font-size: 0.825rem;
  line-height: 1.65;
}

.face-log-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #087352;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.face-log-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
  animation: face-log-pulse 2s ease-in-out infinite;
}

@keyframes face-log-pulse {
  50% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0.02); }
}

.face-log-toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.face-log-filter {
  display: grid;
  gap: 0.35rem;
}

.face-log-filter > span {
  color: #64748b;
  font-size: 0.675rem;
  font-weight: 700;
}

.face-log-filter input,
.face-log-filter select {
  height: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  color: #1e293b;
  font-size: 0.78rem;
  font-weight: 600;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.face-log-event-filter select {
  width: min(15rem, 42vw);
}

.face-log-filter input:focus,
.face-log-filter select:focus {
  background: #ffffff;
  border-color: #087352;
  box-shadow: 0 0 0 3px rgba(8, 115, 82, 0.12);
}

.face-log-refresh,
.face-log-delete-all {
  height: 2.5rem;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 0.625rem;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.face-log-refresh {
  background: #064e3b;
  color: #ffffff;
}

.face-log-refresh:hover { background: #043d2f; }
.face-log-delete-all { background: #fff1f2; color: #be123c; }
.face-log-delete-all:hover { background: #ffe4e6; }

.face-log-refresh:active,
.face-log-delete-all:active,
.face-log-delete:active {
  transform: translateY(1px) scale(0.98);
}

.face-log-refresh:focus-visible,
.face-log-delete-all:focus-visible,
.face-log-delete:focus-visible {
  outline: 3px solid rgba(8, 115, 82, 0.22);
  outline-offset: 2px;
}

.face-log-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(7.5rem, 1fr)) minmax(12rem, auto);
  align-items: stretch;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dbe5e0;
  border-radius: 0.875rem;
}

.face-log-summary-item {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.15rem 1.05rem;
  border-right: 1px solid #e2e8f0;
}

.face-log-summary-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: #64748b;
}

.face-log-summary-item.is-success::before { background: #059669; }
.face-log-summary-item.is-warning::before { background: #d97706; }
.face-log-summary-item.is-info::before { background: #2563eb; }
.face-log-summary-item.is-muted::before { background: #94a3b8; }

.face-log-summary-item span {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
}

.face-log-summary-item strong {
  color: #0f172a;
  font-family: "Outfit", sans-serif;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.face-log-updated {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 0 1.15rem;
  color: #64748b;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.face-log-updated i { color: #087352; }
.face-log-updated strong { color: #334155; }

.face-log-table-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dbe5e0;
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(15, 62, 43, 0.055);
}

.face-log-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.face-log-table {
  width: 100%;
  min-width: 58rem;
  border-collapse: collapse;
  table-layout: auto;
}

.face-log-table th {
  padding: 0.85rem 1rem;
  background: #f3f7f5;
  border-bottom: 1px solid #dbe5e0;
  color: #52635c;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-align: left !important;
  text-transform: uppercase;
  white-space: nowrap;
}

.face-log-table th:nth-child(4),
.face-log-table th:nth-child(5),
.face-log-table th:last-child {
  text-align: center !important;
}

.face-log-table td {
  padding: 1rem;
  border-bottom: 1px solid #edf2ef;
  color: #334155;
  text-align: left !important;
  vertical-align: middle !important;
  white-space: normal !important;
}

.face-log-table tbody tr {
  transition: background 180ms ease;
}

.face-log-table tbody tr:hover {
  background: #f8fbf9;
}

.face-log-table tbody tr:last-child td {
  border-bottom: 0;
}

#face-recognition-table td > div {
  display: flex !important;
  width: auto !important;
}

.face-log-time {
  display: grid;
  min-width: 7.4rem;
  font-variant-numeric: tabular-nums;
}

.face-log-time strong {
  color: #0f172a;
  font-family: "Outfit", sans-serif;
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: 0.015em;
}

.face-log-time span {
  margin-top: 0.1rem;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 650;
}

.face-log-time small {
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.6rem;
}

.face-log-person,
.face-log-event {
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 0.2rem;
}

.face-log-person { min-width: 13rem; }
.face-log-event { min-width: 10.5rem; }

.face-log-person > strong,
.face-log-event > strong {
  max-width: 17rem;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.face-log-person > span,
.face-log-event > span {
  max-width: 17rem;
  overflow: hidden;
  color: #64748b;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.face-log-person small {
  color: #475569;
  font-size: 0.66rem;
}

.face-log-person small i {
  width: 0.75rem;
  color: #087352;
}

.face-log-person code {
  margin-top: 0.15rem;
  padding: 0.14rem 0.35rem;
  background: #f1f5f9;
  border-radius: 0.25rem;
  color: #64748b;
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
}

.face-log-result {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 0.55rem;
  min-width: 11.5rem;
  padding: 0.6rem 0.7rem;
  border-radius: 0.65rem;
  background: #f8fafc;
}

.face-log-result > i {
  margin-top: 0.1rem;
  font-size: 0.85rem;
}

.face-log-result > div {
  display: grid !important;
  justify-items: start !important;
  gap: 0.12rem;
}

.face-log-result strong {
  font-size: 0.72rem;
  font-weight: 800;
}

.face-log-result span,
.face-log-result small {
  color: #64748b;
  font-size: 0.59rem;
}

.face-log-result.is-success { background: #ecfdf5; color: #047857; }
.face-log-result.is-warning { background: #fffbeb; color: #b45309; }
.face-log-result.is-info { background: #eff6ff; color: #1d4ed8; }
.face-log-result.is-muted { background: #f1f5f9; color: #64748b; }

.face-log-device {
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem;
  min-width: 8.5rem;
}

.face-log-device small {
  color: #64748b;
  font-size: 0.6rem;
}

.face-log-device small i { color: #10b981; }

.face-log-live-image {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid #bbf7d0;
  border-radius: 0.55rem;
  background: #f0fdf4;
  color: #047857;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.face-log-live-image:hover { background: #dcfce7; border-color: #6ee7b7; }
.face-log-live-image:active { transform: scale(0.97); }

.face-log-delete {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.face-log-delete:hover {
  background: #fff1f2;
  color: #be123c;
}

.face-log-loading,
.face-log-empty {
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem;
  min-height: 13rem;
  color: #64748b;
  text-align: center;
}

.face-log-loading {
  flex-direction: row;
  flex-wrap: wrap;
}

.face-log-loading span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #087352;
  animation: face-log-loading 900ms ease-in-out infinite alternate;
}

.face-log-loading span:nth-child(2) { animation-delay: 150ms; }
.face-log-loading span:nth-child(3) { animation-delay: 300ms; }

.face-log-loading p {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.72rem;
}

@keyframes face-log-loading {
  to { transform: translateY(-0.3rem); opacity: 0.35; }
}

.face-log-empty > i {
  color: #94a3b8;
  font-size: 1.65rem;
}

.face-log-empty strong {
  color: #334155;
  font-size: 0.84rem;
}

.face-log-empty p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.7rem;
}

.face-log-empty.is-error > i,
.face-log-empty.is-error strong {
  color: #be123c;
}

@media (max-width: 1180px) {
  .face-log-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .face-log-toolbar {
    justify-content: flex-start;
  }

  .face-log-summary {
    grid-template-columns: repeat(5, minmax(7rem, 1fr));
  }

  .face-log-updated {
    grid-column: 1 / -1;
    justify-content: flex-start;
    min-height: 2.5rem;
    border-top: 1px solid #e2e8f0;
  }
}

@media (max-width: 700px) {
  .face-log-hero {
    gap: 1.25rem;
    padding: 1.15rem !important;
  }

  .face-log-heading-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .face-log-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .face-log-filter,
  .face-log-event-filter {
    grid-column: 1 / -1;
  }

  .face-log-filter input,
  .face-log-filter select,
  .face-log-event-filter select {
    width: 100%;
  }

  .face-log-refresh,
  .face-log-delete-all {
    width: 100%;
  }

  .face-log-summary {
    grid-template-columns: 1fr 1fr;
  }

  .face-log-summary-item:nth-child(2) {
    border-right: 0;
  }

  .face-log-summary-item {
    min-height: 4.8rem;
  }

  .face-log-updated {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .face-log-live-dot,
  .face-log-loading span {
    animation: none;
  }
}
