/* NIS — Natdanai Investigation System · Shared branding */

.nis-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 4px 14px rgba(77, 139, 111, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
}

a.nis-brand-mark:hover {
  transform: translateY(-1px);
  box-shadow:
    0 8px 20px rgba(77, 139, 111, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nis-brand-logo {
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

/* Hero logo — index & login landing */
.nis-hero-logo-wrap {
  position: relative;
  width: clamp(6.75rem, 20vw, 8rem);
  height: clamp(6.75rem, 20vw, 8rem);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nis-hero-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -18%;
  border-radius: 2rem;
  background: radial-gradient(circle, rgba(77, 139, 111, 0.32) 0%, rgba(122, 181, 208, 0.12) 45%, transparent 72%);
  z-index: 0;
  pointer-events: none;
}

.nis-hero-logo-wrap::after {
  content: '';
  position: absolute;
  inset: -6%;
  border-radius: 1.85rem;
  border: 2px solid rgba(77, 139, 111, 0.22);
  box-shadow: 0 0 0 6px rgba(77, 139, 111, 0.08);
  z-index: 0;
  pointer-events: none;
}

.nis-hero-logo-wrap .nis-brand-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 1.65rem;
  object-fit: cover;
  box-shadow:
    0 18px 52px rgba(77, 139, 111, 0.38),
    0 6px 18px rgba(44, 62, 45, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.65);
  filter: drop-shadow(0 4px 12px rgba(58, 111, 87, 0.25));
}

.dark-theme .nis-hero-logo-wrap::before {
  background: radial-gradient(circle, rgba(127, 196, 160, 0.28) 0%, rgba(77, 139, 111, 0.1) 45%, transparent 72%);
}

.dark-theme .nis-hero-logo-wrap::after {
  border-color: rgba(127, 196, 160, 0.28);
  box-shadow: 0 0 0 6px rgba(127, 196, 160, 0.1);
}

.dark-theme .nis-hero-logo-wrap .nis-brand-logo {
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.45),
    0 6px 18px rgba(77, 139, 111, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.header-logo .nis-brand-mark .nis-brand-logo,
.portal-header .nis-brand-mark .nis-brand-logo {
  width: 44px;
  height: 44px;
}

.brand-mark.nis-brand-mark,
.login-logo-mark.nis-brand-mark {
  border: none;
  background: transparent;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.brand-mark.nis-brand-mark .nis-brand-logo {
  width: 40px;
  height: 40px;
}

.login-logo-mark.nis-brand-mark .nis-brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.nis-brand-tagline {
  margin: 2px 0 0;
  font-family: var(--font-thai, 'Sarabun', sans-serif);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-tertiary, #64748b);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nis-brand-tagline strong {
  color: var(--accent, #3b82f6);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nis-credit-line {
  font-family: var(--font-thai, 'Sarabun', sans-serif);
  font-size: 0.7rem;
  color: var(--text-tertiary, #64748b);
  line-height: 1.45;
}

.nis-credit-line strong {
  color: var(--text-secondary, #94a3b8);
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* App footer */
.nis-app-footer,
.app-footer.nis-app-footer {
  margin-top: auto;
  padding: 18px 24px;
  border-top: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.08) 100%);
  text-align: left;
}

.nis-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}

.nis-footer-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: inline-block;
  object-fit: cover;
}

.nis-footer-title {
  margin: 0 0 3px;
  font-family: var(--font-thai, 'Sarabun', sans-serif);
  font-size: 0.82rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.4;
}

.nis-footer-title strong {
  font-family: var(--font-ui, 'Outfit', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary, #f1f5f9);
}

.nis-footer-credit {
  margin: 0;
  font-family: var(--font-thai, 'Sarabun', sans-serif);
  font-size: 0.74rem;
  color: var(--text-tertiary, #64748b);
  line-height: 1.45;
}

.portal-footer.nis-app-footer {
  text-align: center;
  padding: 20px 0 8px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  margin-top: 32px;
}

.portal-footer.nis-app-footer .nis-footer-brand {
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 10px;
}

.login-developer {
  font-family: var(--font-thai, 'Sarabun', sans-serif);
  font-size: 0.78rem;
  color: var(--login-muted, #888);
  margin-top: -4px;
}

@media (max-width: 640px) {
  .nis-brand-tagline {
    display: none;
  }

  .header-logo .nis-brand-mark .nis-brand-logo {
    width: 38px;
    height: 38px;
  }
}

.nav-brand-logo {
  display: inline-block;
  object-fit: cover;
  border-radius: 8px;
}

/* Redesigned reactive SVG hero logo */
.nis-brand-logo-svg {
  color: var(--accent);
  filter: drop-shadow(0 12px 32px rgba(var(--accent-rgb), 0.38));
  transition: color 0.25s ease, filter 0.25s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nis-hero-logo-wrap:hover .nis-brand-logo-svg {
  transform: scale(1.08) rotate(3deg);
  filter: drop-shadow(0 16px 40px rgba(var(--accent-rgb), 0.48));
}

/* Google Calendar sync is turned off on the Windows/Mac desktop app for now
   (nis-desktop-ui.js adds this class when window.nisDesktop is present) —
   hides the settings card, table columns, and detail-view rows for it. */
html.is-desktop-app .st-gcal-card,
html.is-desktop-app .th-gcal-sync,
html.is-desktop-app .td-gcal-sync,
html.is-desktop-app .detail-gcal-row {
  display: none !important;
}
