/* =========================================================================
   AttendPro — Theme
   Elegant · Simple · Clean layout
   ========================================================================= */

:root {
  --ap-primary: #0d9488;
  --ap-primary-rgb: 13, 148, 136;
  --ap-primary-dark: #0f766e;
  --ap-primary-darker: #115e59;
  --ap-primary-light: #14b8a6;
  --ap-primary-soft: rgba(13, 148, 136, 0.08);
  --ap-accent: #6366f1;

  --ap-ink: #0f172a;
  --ap-ink-soft: #334155;
  --ap-muted: #64748b;
  --ap-line: #e2e8f0;
  --ap-line-soft: #f1f5f9;
  --ap-surface: #ffffff;
  --ap-canvas: #f8fafc;

  --ap-sidebar-w: 16rem;
  --ap-sidebar-bg: #0b1727;
  --ap-sidebar-bg-2: #0f2238;
  --ap-topbar-h: 4.25rem;

  --tblr-primary: #0d9488;
  --tblr-primary-rgb: 13, 148, 136;
  --tblr-primary-fg: #ffffff;
  --tblr-font-sans-serif: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tblr-body-bg: var(--ap-canvas);
  --tblr-border-color: var(--ap-line);
  --tblr-border-radius: 0.85rem;
  --tblr-border-radius-sm: 0.5rem;
  --tblr-border-radius-lg: 1.15rem;
  --tblr-box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);

  --bs-primary: #0d9488;
  --bs-primary-rgb: 13, 148, 136;
  --bs-body-font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bs-link-color: var(--ap-primary-dark);
  --bs-link-hover-color: var(--ap-primary-darker);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  font-family: var(--tblr-font-sans-serif);
  letter-spacing: -0.01em;
  color: var(--ap-ink);
  background: var(--ap-canvas);
}

::selection {
  background: rgba(13, 148, 136, 0.22);
}

a {
  text-decoration: none;
}

/* =========================================================================
   App shell layout
   ========================================================================= */

.ap-app.page {
  min-height: 100vh;
  background: var(--ap-canvas);
}

.ap-app .page-wrapper {
  background: transparent;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ap-app .page-body {
  flex: 1 1 auto;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

/* =========================================================================
   Brand
   ========================================================================= */

.ap-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--ap-ink);
  text-decoration: none;
  padding: 1.15rem 0.25rem 0.85rem;
}

.ap-brand:hover {
  color: inherit;
}

.ap-brand-light {
  color: #fff;
}

.ap-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.ap-brand-text small {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
  margin-top: 0.15rem;
}

.ap-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, #2dd4bf 0%, #0d9488 55%, #0f766e 100%);
  color: #fff;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -6px rgba(13, 148, 136, 0.55);
}

.ap-mark-sm {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  font-size: 0.95rem;
}

/* =========================================================================
   Sidebar
   ========================================================================= */

.ap-sidebar.navbar-vertical {
  background: linear-gradient(180deg, var(--ap-sidebar-bg) 0%, var(--ap-sidebar-bg-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1030;
}

.ap-sidebar .container-fluid {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.ap-sidebar .navbar-collapse {
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.ap-sidebar-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 0.75rem;
  margin-right: -0.25rem;
  padding-right: 0.25rem;
}

.ap-sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}

.ap-sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.ap-sidebar .navbar-nav {
  margin: 0;
  gap: 0.1rem;
}

.ap-nav-label {
  list-style: none;
  color: rgba(148, 163, 184, 0.55);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1.15rem 0.85rem 0.4rem;
  margin: 0;
}

.ap-sidebar .navbar-nav .nav-link {
  color: rgba(226, 232, 240, 0.72);
  border-radius: 0.55rem;
  margin: 0;
  padding: 0.55rem 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ap-sidebar .navbar-nav .nav-link .nav-link-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.75);
  font-size: 1.1rem;
  margin: 0;
  transition: color 0.15s ease;
}

.ap-sidebar .navbar-nav .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.ap-sidebar .navbar-nav .nav-link:hover .nav-link-icon {
  color: #5eead4;
}

.ap-sidebar .navbar-nav .nav-link.active {
  color: #fff;
  background: rgba(13, 148, 136, 0.28);
  box-shadow: inset 2px 0 0 #2dd4bf;
}

.ap-sidebar .navbar-nav .nav-link.active .nav-link-icon {
  color: #5eead4;
}

.ap-sidebar-user {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 0 1rem;
  margin-top: auto;
}

.ap-sidebar-user-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.65rem;
  color: rgba(226, 232, 240, 0.85);
  transition: background-color 0.15s ease;
}

.ap-sidebar-user-link:hover,
.ap-sidebar-user-link.active {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.ap-sidebar-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.ap-sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-sidebar-user-role {
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.8);
}

/* SaaS sidebar variant */
.ap-saas-sidebar.navbar-vertical {
  background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
}

.ap-saas-sidebar .navbar-nav .nav-link.active {
  background: rgba(100, 116, 139, 0.28);
  box-shadow: inset 2px 0 0 #94a3b8;
}

.ap-saas-sidebar .navbar-nav .nav-link.active .nav-link-icon,
.ap-saas-sidebar .navbar-nav .nav-link:hover .nav-link-icon {
  color: #cbd5e1;
}

/* Desktop: fixed sidebar */
@media (min-width: 992px) {
  .ap-sidebar.navbar-vertical {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--ap-sidebar-w) !important;
    max-width: var(--ap-sidebar-w);
    height: 100vh !important;
    overflow: hidden;
  }

  .ap-sidebar .navbar-collapse {
    display: flex !important;
    height: 100%;
  }

  .ap-sidebar > .container-fluid > .navbar-toggler {
    display: none !important;
  }

  .ap-app .page-wrapper {
    margin-left: var(--ap-sidebar-w) !important;
    margin-inline-start: var(--ap-sidebar-w) !important;
  }
}

/* Mobile: hide chrome bar, use off-canvas drawer */
@media (max-width: 991.98px) {
  .ap-sidebar.navbar-vertical {
    position: fixed !important;
    inset: 0 auto auto 0;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    z-index: 1045;
  }

  .ap-sidebar > .container-fluid {
    padding: 0 !important;
    height: auto !important;
    display: block !important;
  }

  .ap-sidebar .ap-brand,
  .ap-sidebar > .container-fluid > .navbar-toggler {
    display: none !important;
  }

  .ap-sidebar .navbar-collapse {
    display: none !important;
  }

  .ap-sidebar .navbar-collapse.show {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(var(--ap-sidebar-w), 88vw);
    height: 100vh !important;
    max-height: 100vh;
    background: linear-gradient(180deg, var(--ap-sidebar-bg) 0%, var(--ap-sidebar-bg-2) 100%);
    padding: 1rem 0.85rem;
    z-index: 1050;
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
  }

  .ap-sidebar .navbar-collapse.show::before {
    content: "AttendPro";
    display: block;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: #fff;
    padding: 0.35rem 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.5rem;
  }

  .ap-saas-sidebar .navbar-collapse.show {
    background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
  }

  .ap-app .page-wrapper {
    margin-left: 0 !important;
  }
}

/* =========================================================================
   Topbar
   ========================================================================= */

.ap-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: var(--ap-topbar-h);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ap-line);
  box-shadow: none;
  padding: 0;
}

.ap-topbar > .container-xl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--ap-topbar-h);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.ap-topbar-left,
.ap-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.ap-topbar-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.ap-topbar-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ap-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-topbar-heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ap-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  border: 1px solid var(--ap-line);
  background: var(--ap-surface);
  color: var(--ap-ink-soft);
  font-size: 1.15rem;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ap-menu-btn:hover {
  background: var(--ap-line-soft);
  border-color: #d5dde7;
}

.ap-tenant-chip {
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--ap-primary-soft);
  color: var(--ap-primary-dark);
  font-size: 0.78rem;
  font-weight: 600;
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-tenant-chip i {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.ap-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--ap-line);
  background: var(--ap-surface);
  color: var(--ap-muted);
  font-size: 1.05rem;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.ap-bell:hover {
  border-color: #d5dde7;
  background: var(--ap-line-soft);
  color: var(--ap-primary-dark);
}

.ap-bell .badge {
  font-size: 0.6rem;
  padding: 0.2rem 0.35rem;
}

.ap-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.4rem 0.25rem 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--ap-line);
  background: var(--ap-surface);
  color: var(--ap-ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ap-user-trigger:hover {
  border-color: #d5dde7;
  background: var(--ap-line-soft);
  color: var(--ap-ink);
}

.ap-user-trigger-text {
  flex-direction: column;
  line-height: 1.15;
  padding-right: 0.15rem;
  max-width: 11rem;
}

.ap-user-trigger-text span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
}

.ap-user-chevron {
  font-size: 0.85rem;
  color: var(--ap-muted);
  margin-right: 0.2rem;
}

.ap-dropdown {
  border: 1px solid var(--ap-line);
  border-radius: 0.85rem;
  box-shadow: 0 16px 40px -16px rgba(15, 23, 42, 0.22);
  padding: 0.4rem;
  min-width: 14rem;
}

.ap-dropdown-head {
  padding: 0.65rem 0.75rem 0.55rem;
  border-bottom: 1px solid var(--ap-line-soft);
  margin-bottom: 0.25rem;
}

.ap-dropdown .dropdown-item {
  border-radius: 0.5rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.875rem;
}

.ap-footer {
  border-top: 1px solid var(--ap-line);
  padding: 1rem 0;
  color: var(--ap-muted);
  font-size: 0.8rem;
}

/* =========================================================================
   Page header (in content)
   Title lives in topbar — body headers keep actions only
   ========================================================================= */

.page-header {
  margin-bottom: 1.15rem;
}

.page-pretitle {
  color: var(--ap-primary-dark);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.page-title {
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--ap-ink);
}

.ap-app .page-body .page-header .page-pretitle,
.ap-app .page-body .page-header .page-title {
  display: none;
}

.ap-app .page-body .page-header:not(:has(.btn)):not(:has(form)):not(:has(.btn-list)) {
  display: none;
}

.ap-app .page-body .page-header > .row {
  justify-content: flex-end;
}

.ap-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
}

/* =========================================================================
   Cards & stats
   ========================================================================= */

.card {
  border: 1px solid var(--ap-line);
  border-radius: 0.9rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  background: var(--ap-surface);
}

.card-header {
  border-bottom: 1px solid var(--ap-line-soft);
  background: transparent;
  border-radius: 0.9rem 0.9rem 0 0 !important;
  padding: 0.95rem 1.15rem;
}

.card-title {
  font-weight: 650;
  letter-spacing: -0.015em;
  font-size: 0.95rem;
}

.card-body {
  padding: 1.15rem;
}

.ap-stat-card {
  border: 1px solid var(--ap-line);
  border-radius: 0.9rem;
  background: var(--ap-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ap-stat-card:hover {
  border-color: rgba(13, 148, 136, 0.28);
  box-shadow: 0 10px 24px -16px rgba(13, 148, 136, 0.35);
}

.ap-stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.ap-stat-icon.bg-teal-lt { background: rgba(13, 148, 136, 0.12); color: var(--ap-primary-dark); }
.ap-stat-icon.bg-blue-lt { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.ap-stat-icon.bg-amber-lt { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.ap-stat-icon.bg-rose-lt { background: rgba(244, 63, 94, 0.1); color: #be123c; }
.ap-stat-icon.bg-slate-lt { background: rgba(100, 116, 139, 0.12); color: #475569; }

.ap-stat-value {
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ap-ink);
  line-height: 1.1;
}

.ap-stat-label {
  color: var(--ap-muted);
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =========================================================================
   Buttons / forms / tables
   ========================================================================= */

.btn {
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 0.55rem;
}

.btn-primary {
  background: var(--ap-primary);
  border-color: var(--ap-primary);
  box-shadow: 0 1px 2px rgba(13, 148, 136, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--ap-primary-dark);
  border-color: var(--ap-primary-dark);
}

.btn-outline-primary {
  color: var(--ap-primary-dark);
  border-color: rgba(13, 148, 136, 0.35);
}

.btn-outline-primary:hover {
  background: var(--ap-primary);
  border-color: var(--ap-primary);
}

.form-control,
.form-select {
  border-radius: 0.55rem;
  border-color: var(--ap-line);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ap-primary-light);
  box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.14);
}

.form-label {
  font-weight: 600;
  color: var(--ap-ink-soft);
  font-size: 0.85rem;
}

.form-check-input:checked {
  background-color: var(--ap-primary);
  border-color: var(--ap-primary);
}

.table thead th {
  color: var(--ap-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ap-line);
  background: #f8fafc;
}

.table-vcenter td {
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: rgba(13, 148, 136, 0.03);
}

.avatar-teal {
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
  color: #fff;
  font-weight: 700;
}

.dropdown-menu {
  border: 1px solid var(--ap-line);
  border-radius: 0.85rem;
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.18);
}

/* =========================================================================
   Badges
   ========================================================================= */

.ap-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

.ap-badge::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.ap-badge-active,
.ap-badge-aktif {
  background: rgba(13, 148, 136, 0.12);
  color: var(--ap-primary-darker);
}

.ap-badge-trial {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.ap-badge-suspended,
.ap-badge-nonaktif,
.ap-badge-inactive {
  background: rgba(244, 63, 94, 0.12);
  color: #be123c;
}

.ap-badge-read_only,
.ap-badge-cancelled,
.ap-badge-terminated,
.ap-badge-neutral {
  background: #f1f5f9;
  color: #475569;
}

/* =========================================================================
   Auth
   ========================================================================= */

.ap-auth-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, #134e4a 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, #0f766e 0%, transparent 40%),
    linear-gradient(160deg, #020617 0%, #0b1f1e 50%, #0f2a28 100%);
}

.ap-auth-shell::before,
.ap-auth-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.ap-auth-shell::before {
  width: 560px;
  height: 560px;
  top: -200px;
  right: -160px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.18), transparent 70%);
}

.ap-auth-shell::after {
  width: 480px;
  height: 480px;
  bottom: -200px;
  left: -140px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.25), transparent 70%);
}

.ap-auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 0.5), transparent 70%);
  pointer-events: none;
}

.ap-auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 26rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1.15rem;
  box-shadow: 0 28px 56px -20px rgba(2, 12, 12, 0.55);
  padding: 2rem 2rem 1.6rem;
}

.ap-auth-eyebrow {
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ap-auth-footer {
  position: relative;
  z-index: 2;
  color: rgba(226, 232, 240, 0.5);
  font-size: 0.8rem;
  text-align: center;
  margin-top: 1.5rem;
}

.ap-auth-footer a {
  color: rgba(94, 234, 212, 0.9);
}

.ap-brand-tagline {
  color: var(--ap-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.ap-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.empty-state-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: var(--ap-primary-soft);
  color: var(--ap-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

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

/* Chart bars (reports / dashboard) */
.ap-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 160px;
  padding-top: 0.5rem;
  overflow-x: auto;
}

.ap-chart-col {
  flex: 1 1 0;
  min-width: 1.6rem;
  text-align: center;
}

.ap-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 120px;
}

.ap-bar {
  display: block;
  width: 6px;
  border-radius: 3px 3px 0 0;
  min-height: 0;
}

.ap-bar-present { background: #0f766e; }
.ap-bar-late { background: #ea580c; }
.ap-bar-leave { background: #2563eb; }

.ap-chart-label {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: var(--ap-muted);
  white-space: nowrap;
}

.ap-legend {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.ap-legend-present { background: #0f766e; }
.ap-legend-late { background: #ea580c; }
.ap-legend-leave { background: #2563eb; }

.text-primary { color: var(--ap-primary-dark) !important; }
.bg-primary { background-color: var(--ap-primary) !important; }
.link-primary { color: var(--ap-primary-dark) !important; }

/* —— Password visibility toggle —— */
.ap-password-wrap {
  position: relative !important;
}

.ap-password-wrap .form-control {
  padding-right: 2.85rem !important;
}

/* Tabler input-icon: keep left lock + right eye aligned */
.ap-password-wrap.input-icon .form-control {
  padding-left: 2.5rem !important;
  padding-right: 2.85rem !important;
}

/* Self-contained eye button — jangan andalkan Tabler dual .input-icon-addon */
.ap-password-wrap > .ap-password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 0.35rem !important;
  left: auto !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.25rem !important;
  height: 2.25rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0.5rem;
  background: transparent !important;
  box-shadow: none !important;
  color: #64748b !important;
  cursor: pointer;
  line-height: 1;
  z-index: 6;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  pointer-events: auto;
}

.ap-password-wrap > .ap-password-toggle:hover,
.ap-password-wrap > .ap-password-toggle:focus-visible {
  color: var(--ap-primary-dark, #0f766e) !important;
  background: rgba(15, 118, 110, 0.08) !important;
  outline: none;
}

.ap-password-toggle i {
  font-size: 1.2rem;
  line-height: 1;
  display: block;
}

/* Auth form polish */
.ap-auth-card .input-icon {
  min-height: 2.5rem;
}

.ap-auth-card .form-control {
  min-height: 2.75rem;
}

/* —— Payroll UI —— */
.ap-payroll-eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ap-primary-dark, #0f766e);
  margin-bottom: 0.35rem;
}

.ap-payroll-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.35);
  border-radius: 1rem;
  overflow: hidden;
}

.ap-payroll-stat {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.15rem;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 1rem;
  box-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.4);
  height: 100%;
}

.ap-payroll-stat-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.ap-payroll-stat-icon--teal {
  background: rgba(13, 148, 136, 0.14);
  color: #0d9488;
}

.ap-payroll-stat-icon--amber {
  background: rgba(217, 119, 6, 0.14);
  color: #d97706;
}

.ap-payroll-stat-icon--slate {
  background: rgba(71, 85, 105, 0.12);
  color: #475569;
}

.ap-payroll-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ap-payroll-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.2;
}

.ap-payroll-stat-value--sm {
  font-size: 1.05rem;
}

.ap-payroll-table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 700;
}

.ap-payroll-inline-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ap-payroll-inline-form .form-control {
  width: 7rem;
}

.ap-payroll-net-chip {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.08);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

.ap-payroll-aside {
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.18), transparent 45%),
    linear-gradient(160deg, #0f172a 0%, #134e4a 100%);
  color: #e2e8f0;
  border-radius: 1.15rem;
  padding: 1.5rem 1.4rem;
  height: 100%;
  box-shadow: 0 18px 40px -20px rgba(15, 23, 42, 0.55);
}

.ap-payroll-aside h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: #fff;
}

.ap-payroll-aside ol {
  padding-left: 1.15rem;
  margin-bottom: 1rem;
}

.ap-payroll-aside li {
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.btn-teal,
.btn-outline-teal {
  --tblr-btn-color: #0f766e;
  --tblr-btn-bg: #0f766e;
  --tblr-btn-border-color: #0f766e;
  --tblr-btn-hover-bg: #0d9488;
  --tblr-btn-hover-border-color: #0d9488;
  --tblr-btn-active-bg: #0f766e;
  --tblr-btn-active-border-color: #0f766e;
  color: #fff;
  background-color: #0f766e;
  border-color: #0f766e;
}

.btn-outline-teal {
  color: #0f766e;
  background-color: transparent;
}

.btn-outline-teal:hover {
  color: #fff;
  background-color: #0f766e;
  border-color: #0f766e;
}

.btn-teal:hover {
  color: #fff;
  background-color: #0d9488;
  border-color: #0d9488;
}

/* =========================================================================
   COLLAPSIBLE SIDEBAR & AVATAR PHOTO ENHANCEMENTS
   ========================================================================= */

/* Toggle Sidebar Trigger Button */
.ap-sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  border: 1px solid var(--ap-line);
  background: var(--ap-surface);
  color: var(--ap-ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ap-sidebar-toggle-btn:hover {
  background: var(--ap-line-soft);
  color: var(--ap-primary-dark);
}

/* Collapsed Sidebar Styles on Desktop */
@media (min-width: 992px) {
  body.ap-sidebar-collapsed .ap-sidebar {
    width: 4.75rem !important;
    min-width: 4.75rem !important;
  }

  body.ap-sidebar-collapsed .ap-brand-text,
  body.ap-sidebar-collapsed .ap-nav-label,
  body.ap-sidebar-collapsed .nav-link-title,
  body.ap-sidebar-collapsed .ap-sidebar-user-meta {
    display: none !important;
  }

  body.ap-sidebar-collapsed .ap-sidebar-user-link {
    justify-content: center;
    padding: 0.5rem 0;
  }

  body.ap-sidebar-collapsed .nav-link {
    justify-content: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.ap-sidebar-collapsed .nav-link-icon {
    margin-right: 0 !important;
    font-size: 1.35rem;
  }

  body.ap-sidebar-collapsed .ap-brand {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  body.ap-sidebar-collapsed .page-wrapper {
    margin-left: 4.75rem !important;
  }
}

/* Avatar Photo & Gradient Fallback */
.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar-teal-gradient {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 50%, #0f766e 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

/* Dashboard Redesign Cards */
.ap-dash-stat-card {
  background: #ffffff;
  border: 1px solid var(--ap-line-soft);
  border-radius: 1.15rem;
  padding: 1.35rem 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ap-dash-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.08);
}

.ap-dash-stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.ap-dash-stat-icon.teal { background: rgba(13, 148, 136, 0.12); color: #0d9488; }
.ap-dash-stat-icon.amber { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.ap-dash-stat-icon.blue { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.ap-dash-stat-icon.rose { background: rgba(244, 63, 94, 0.12); color: #e11d48; }

.ap-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--ap-line);
  color: var(--ap-ink);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.ap-quick-chip:hover {
  background: var(--ap-primary);
  border-color: var(--ap-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.3);
}

/* Profile Edit Header Card */
.ap-profile-header-card {
  background: linear-gradient(135deg, #07131e 0%, #0e1e2e 60%, #134e4a 100%);
  border-radius: 1.25rem;
  padding: 2rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
  box-shadow: 0 14px 30px rgba(7, 19, 30, 0.15);
}

.ap-profile-avatar-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
}

.ap-profile-avatar-wrapper .avatar {
  width: 90px;
  height: 90px;
  font-size: 2.2rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.ap-avatar-edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0d9488;
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 2px solid #ffffff;
  font-size: 0.85rem;
}

