* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #070f24;
  color: #e2e8f0;
}
.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: #ffffff;
  border-right: 1px solid #dbe4f5;
  padding: 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { font-weight: 700; margin-bottom: 14px; }
.nav-btn {
  width: 100%; text-align: left; margin-bottom: 8px; border: 1px solid #d6e2ff;
  background: #1e3a8a; color: #ffffff; border-radius: 10px; padding: 9px;
}
.nav-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.content-wrap { padding: 0 18px 18px; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(247, 249, 252, 0.96);
  border-bottom: 1px solid #dbe4f5; backdrop-filter: blur(7px);
  display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 0;
}
.search { flex: 1; max-width: 520px; padding: 10px; border-radius: 10px; border: 1px solid #cdddfd; background: #fff; color: #111827; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-actions #guest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  visibility: visible;
  opacity: 1;
  z-index: 25;
}
.top-actions #user-actions {
  display: flex;
  align-items: center;
  visibility: visible;
  opacity: 1;
  z-index: 25;
}
.auth-loading {
  font-size: 12px;
  color: #64748b;
}
.auth-loading.hide {
  display: none !important;
}
.btn { border: 1px solid #c4d5fb; background: #0f2f7a; color: #ffffff; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.btn.primary { background: linear-gradient(135deg,#2d6cff,#7c4dff); border: 0; }
.panel { background: #ffffff; border: 1px solid #dbe4f5; border-radius: 12px; padding: 14px; margin-top: 14px; box-shadow: 0 6px 16px rgba(15,23,42,0.04); }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: #ffffff; border: 1px solid #dbe4f5; border-radius: 10px; padding: 12px; }
.card .label { color: #6b7280; font-size: 12px; }
.card .value { font-size: 24px; font-weight: 700; margin-top: 6px; }
.module-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.module-tools input,.module-tools select, .form-grid input, .form-grid select, .form-grid textarea {
  padding: 8px; border-radius: 9px; border: 1px solid #cdddfd; background: #fff; color: #111827;
}
table { width: 100%; border-collapse: collapse; }
th,td { text-align: left; border-bottom: 1px solid #e5ecfa; padding: 8px; font-size: 13px; vertical-align: top; }
.hide { display: none !important; }
.kanban { display: grid; gap: 10px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.lane { background:#f8fbff; border:1px solid #d6e2ff; border-radius:10px; padding:8px; min-height:180px; }
.deal-card { background:#fff; border:1px solid #d2ddf8; border-radius:8px; padding:8px; margin-bottom:8px; cursor: grab; }
.pagination { display:flex; gap:8px; justify-content:flex-end; margin-top:8px; }
#toast-root { position:fixed; right:14px; top:14px; display:grid; gap:8px; z-index:1000; }
.toast { background:#fff; border:1px solid #d3e0fc; border-radius:10px; padding:10px; box-shadow: 0 8px 20px rgba(15,23,42,0.08); }
.toast.success { border-color:#2dd29a; }
.toast.error { border-color:#ff5d8c; }
.notif-dropdown,.profile-dropdown {
  position: absolute; right: 0; top: 38px; background:#fff; border:1px solid #d8e4fc; border-radius:10px; width: 280px; max-height: 320px; overflow:auto; padding:8px;
}
.relative { position: relative; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 2000;
  padding: 16px;
}
.modal-card {
  width: min(820px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #dce7fd;
  border-radius: 14px;
  padding: 16px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.form-group {
  display: grid;
  gap: 6px;
}
.form-group.full {
  grid-column: 1 / -1;
}
.form-group label {
  font-size: 12px;
  color: #4b5563;
  font-weight: 600;
}
.modal-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
@media (max-width: 1080px) {
  .cards,.kanban { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: static; }
  .cards,.kanban { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: stretch; }
}

/* —— AXSPOT world-class dark glass UI —— */
body { font-family: "Outfit", Inter, system-ui, sans-serif; }
.app-shell {
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.2), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(79, 70, 229, 0.18), transparent 26%),
    linear-gradient(130deg, #070f24, #0b1a3f 50%, #0d1a3b);
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8eef9;
}
.brand-logo {
  border-radius: 11px;
  box-shadow: 0 6px 18px rgba(30, 58, 138, 0.18);
}
.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #e5ecff;
}
.brand-sub {
  font-size: 10px;
  color: #aac0ef;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-top: 2px;
}
.nav-btn .nav-ic {
  opacity: 0.88;
  margin-right: 8px;
  font-size: 13px;
}
.sidebar-home-link {
  display: block;
  margin-top: 18px;
  font-size: 13px;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
}
.sidebar-home-link:hover { text-decoration: underline; }
.topbar-left {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sidebar {
  background: rgba(9, 17, 42, 0.82);
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(12px);
}
.topbar {
  background: rgba(9, 17, 42, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.panel,
.card,
.lane {
  background: rgba(12, 25, 55, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
  color: #dbeafe;
  backdrop-filter: blur(8px);
}
.panel h2, .panel h3, .panel h4, th, td, .card .value { color: #eaf1ff; }
.card .label { color: #b6c8f0; }
.search,
.module-tools input,
.module-tools select,
.form-grid input,
.form-grid select,
.form-grid textarea {
  background: rgba(10, 21, 48, 0.72);
  color: #eaf1ff;
  border-color: rgba(147, 197, 253, 0.38);
}
.search::placeholder,
.module-tools input::placeholder { color: #a8bce8; }
.icon-nav-btn,
.btn.ghost-link {
  background: rgba(18, 37, 78, 0.86);
  color: #dbeafe;
  border-color: rgba(147, 197, 253, 0.34);
}
.icon-nav-btn:hover,
.btn:hover,
.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.34);
}
.nav-btn {
  background: rgba(23, 56, 128, 0.88);
  border-color: rgba(147, 197, 253, 0.34);
}
.nav-btn.active {
  background: linear-gradient(135deg, #2563eb, #4338ca);
}
.crm-footer {
  margin: 14px 18px 10px;
}
.crm-footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(147, 197, 253, 0.58), transparent);
}
.crm-footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 11px 0 4px;
  color: #bfdbfe;
  font-size: 12px;
}
.crm-footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.crm-footer-links a {
  color: #93c5fd;
  text-decoration: none;
}
.crm-footer-links a:hover {
  color: #dbeafe;
  text-decoration: underline;
}
.module-tools label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c7d9ff;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 8px;
  background: rgba(13, 29, 66, 0.5);
}
#sa-upload-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
#sa-upload-list a {
  color: #93c5fd;
}
.topbar-quick {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.icon-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid #c7d7f7;
  background: #fff;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.icon-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.1);
  border-color: #93c5fd;
}
.btn.ghost-link {
  background: transparent;
  color: #ffffff;
  border: 1px solid #c7d7f7;
  text-decoration: none;
  padding: 8px 12px;
  font-weight: 500;
}
.btn.ghost-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.icon-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#profile-btn {
  position: relative;
  overflow: visible;
}

.profile-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #64748b;
  border: 2px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  transition: background 0.2s ease;
}

#profile-btn.is-online .profile-status-dot {
  background: #22c55e;
  animation: profilePulse 1.8s ease-out infinite;
}

@keyframes profilePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

#user-email {
  color: #000000;
  font-weight: 600;
}

.profile-menu-item {
  width: 100%;
  display: block;
  margin-bottom: 6px;
  text-align: center;
  text-decoration: none !important;
}

#logout-btn.profile-menu-item {
  margin-bottom: 0;
}

#profile-menu a,
#profile-menu button {
  text-decoration: none !important;
}

#sa-attendance-body td a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 500;
}

#sa-attendance-body td a:hover {
  text-decoration: underline;
}

/* World-class alerts + notifications + profile menu */
#toast-root {
  right: 18px;
  top: 18px;
  z-index: 3000;
}

.toast {
  min-width: 290px;
  max-width: 380px;
  background: linear-gradient(155deg, rgba(9, 20, 45, 0.98), rgba(18, 42, 88, 0.94));
  border: 1px solid rgba(147, 197, 253, 0.4);
  color: #eaf1ff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast.success { border-color: rgba(52, 211, 153, 0.65); }
.toast.error { border-color: rgba(251, 113, 133, 0.7); }

.toast-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(147, 197, 253, 0.25);
  font-size: 12px;
}

.toast-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #c7d9ff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.toast-msg {
  color: #dbeafe;
  font-size: 13px;
}

#notif-btn #notif-count {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #ec4899);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 5px;
}

.notif-dropdown {
  width: 340px;
  max-height: 420px;
  border-radius: 14px;
  border: 1px solid rgba(147, 197, 253, 0.35);
  background: linear-gradient(155deg, rgba(9, 20, 45, 0.98), rgba(18, 42, 88, 0.94));
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.45);
  padding: 10px;
}

.notif-item {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 33, 72, 0.8);
  border-radius: 10px;
  text-align: left;
  padding: 10px;
  margin-bottom: 8px;
  color: #e2e8f0;
  cursor: pointer;
}

.notif-item.unread {
  border-color: rgba(59, 130, 246, 0.85);
  background: rgba(30, 64, 140, 0.55);
}

.notif-item-title {
  font-weight: 700;
  color: #eaf1ff;
  margin-bottom: 4px;
}

.notif-item-msg {
  color: #bfdbfe;
  font-size: 12px;
  margin-bottom: 6px;
}

.notif-item-time {
  color: #93c5fd;
  font-size: 11px;
}

.notif-empty {
  color: #bfdbfe;
  text-align: center;
  padding: 18px 10px;
  font-size: 13px;
}

#profile-menu {
  width: 258px;
  border-radius: 16px;
  border: 1px solid rgba(147, 197, 253, 0.42);
  background:
    radial-gradient(circle at 16% 14%, rgba(56, 189, 248, 0.2), transparent 40%),
    linear-gradient(160deg, rgba(9, 20, 45, 0.98), rgba(18, 42, 88, 0.95));
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 12px;
  animation: profileMenuIn 0.18s ease;
}

@keyframes profileMenuIn {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#profile-menu #user-email {
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(59, 130, 246, 0.18));
  border: 1px solid rgba(147, 197, 253, 0.4);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 10px;
  font-weight: 600;
}

.profile-menu-divider {
  height: 1px;
  margin: 2px 2px 10px;
  background: linear-gradient(90deg, transparent, rgba(147, 197, 253, 0.55), transparent);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  background: linear-gradient(125deg, rgba(30, 64, 140, 0.54), rgba(30, 58, 138, 0.46));
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 10px;
  color: #ffffff;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  margin-bottom: 7px;
}

.profile-menu-item:hover {
  transform: translateY(-1px) scale(1.01);
  background: linear-gradient(125deg, rgba(37, 99, 235, 0.82), rgba(67, 56, 202, 0.8));
  border-color: rgba(191, 219, 254, 0.7);
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.38);
}

.profile-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(191, 219, 254, 0.2);
  border: 1px solid rgba(191, 219, 254, 0.3);
  font-size: 14px;
  flex-shrink: 0;
}

#logout-btn.profile-logout-item {
  margin-bottom: 0;
  background: linear-gradient(125deg, rgba(127, 29, 29, 0.5), rgba(159, 18, 57, 0.48));
  border-color: rgba(251, 113, 133, 0.35);
}

#logout-btn.profile-logout-item:hover {
  background: linear-gradient(125deg, rgba(190, 24, 93, 0.8), rgba(220, 38, 38, 0.78));
  border-color: rgba(253, 164, 175, 0.72);
  box-shadow: 0 10px 24px rgba(190, 24, 93, 0.35);
}
