/* Shared visual polish for the public site and internal console. */
:root {
  --primary: #092f4a;
  --primary-light: #0f6fa8;
  --primary-lighter: #e7f2f8;
  --accent: #bf7d16;
  --accent-light: #e2a63b;
  --text: #112033;
  --text-secondary: #44556b;
  --text-muted: #718196;
  --bg: #ffffff;
  --bg-section: #f3f7fa;
  --border: rgba(9, 47, 74, 0.12);
  --glass-border: rgba(9, 47, 74, 0.12);
  --shadow-sm: 0 1px 2px rgba(9, 47, 74, 0.06), 0 8px 22px rgba(9, 47, 74, 0.06);
  --shadow-md: 0 12px 34px rgba(9, 47, 74, 0.12);
  --shadow-lg: 0 24px 64px rgba(9, 47, 74, 0.16);
  --gradient-primary: linear-gradient(135deg, #092f4a 0%, #0f6fa8 100%);
}

html {
  text-rendering: geometricPrecision;
}

body {
  background:
    linear-gradient(90deg, rgba(9, 47, 74, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(9, 47, 74, 0.03) 1px, transparent 1px),
    var(--bg-section);
  background-size: 40px 40px, 40px 40px, auto;
}

a,
button,
input {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(15, 111, 168, 0.28);
  outline-offset: 3px;
}

.bg-decoration {
  display: none;
}

.header {
  border-bottom: 1px solid rgba(9, 47, 74, 0.08);
}

.header.scrolled,
body.console-page .header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.logo img {
  filter: drop-shadow(0 8px 16px rgba(9, 47, 74, 0.14));
}

.btn,
.section-action,
.action-btn,
.filter-btn,
.logout-btn,
button[type="submit"] {
  border-radius: 8px;
}

.hero {
  min-height: 88vh;
  isolation: isolate;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  padding: 140px 40px 90px;
  background: #071a2b;
}

.hero::before {
  content: none;
}

.hero-media,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}

.hero-scrim {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 24, 39, 0.9) 0%, rgba(5, 24, 39, 0.68) 42%, rgba(5, 24, 39, 0.28) 100%),
    linear-gradient(180deg, rgba(5, 24, 39, 0.34) 0%, rgba(5, 24, 39, 0.14) 55%, rgba(5, 24, 39, 0.66) 100%);
}

.hero-content {
  max-width: 760px;
  text-align: left;
  margin-left: max(0px, calc((100vw - 1400px) / 2));
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  color: #ffffff;
  font-size: 64px;
  letter-spacing: 0;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: #f3c46f;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  margin: 0 0 34px;
  max-width: 680px;
}

.hero-buttons {
  justify-content: flex-start;
}

.hero .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 650px;
  margin-top: 34px;
}

.hero-trust-item {
  padding: 14px 16px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-trust-item strong {
  display: block;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.scroll-indicator {
  color: rgba(255, 255, 255, 0.62);
}

.section-title {
  font-size: 40px;
}

.stats-section {
  background:
    linear-gradient(135deg, rgba(9, 47, 74, 0.98), rgba(15, 111, 168, 0.94)),
    #092f4a;
}

.stat-card,
.service-card,
.news-card,
.video-container,
.contact-card,
.about-badge,
.section,
.quick-action-card,
.login-container {
  border-radius: 8px;
}

.service-card,
.news-card,
.contact-card,
.section,
.quick-action-card {
  box-shadow: var(--shadow-sm);
}

.service-card,
.contact-card,
.quick-action-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    var(--bg);
}

body.login-page {
  min-height: 100vh;
  display: block;
  background:
    linear-gradient(90deg, rgba(9, 47, 74, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(9, 47, 74, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, #eef4f8 0%, #ffffff 44%, #eef6f2 100%);
  background-size: 36px 36px, 36px 36px, auto;
}

body.login-page::before,
body.login-page::after {
  content: none;
}

.login-shell {
  width: min(1080px, calc(100vw - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
}

.login-aside {
  color: var(--text);
}

.login-aside-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  font-size: 13px;
}

.login-aside h2 {
  margin: 22px 0 18px;
  font-family: "Noto Serif SC", serif;
  font-size: 46px;
  line-height: 1.16;
  color: var(--primary);
}

.login-aside p {
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.9;
}

.login-assurance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.login-assurance span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.login-assurance i {
  color: var(--accent);
}

.login-wrapper {
  max-width: none;
  padding: 0;
}

.login-container {
  padding: 42px;
  border: 1px solid rgba(9, 47, 74, 0.12);
  box-shadow: 0 28px 70px rgba(9, 47, 74, 0.16);
}

.form-group input {
  border-radius: 8px;
  background: #f8fafc;
}

.message {
  border-radius: 8px;
}

body.console-page {
  background:
    linear-gradient(90deg, rgba(9, 47, 74, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(9, 47, 74, 0.03) 1px, transparent 1px),
    #f3f7fa;
  background-size: 36px 36px, 36px 36px, auto;
}

body.console-page .header {
  box-shadow: 0 1px 0 rgba(9, 47, 74, 0.06), 0 12px 30px rgba(9, 47, 74, 0.08);
}

body.console-page .nav a {
  border: 1px solid transparent;
}

body.console-page .nav a:hover,
body.console-page .nav a.active {
  border-color: rgba(9, 47, 74, 0.12);
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 28px;
  padding: 30px;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(9, 47, 74, 0.98) 0%, rgba(15, 111, 168, 0.92) 72%),
    var(--primary);
  box-shadow: var(--shadow-md);
}

.dashboard-hero .page-title {
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: 0;
}

.dashboard-hero .page-subtitle {
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: 0;
}

.dashboard-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

body.console-page .stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(9, 47, 74, 0.1);
}

body.console-page .stat-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  opacity: 0;
  transition: opacity 0.2s ease;
}

body.console-page .stat-card:hover::after,
body.console-page .stat-card.active::after {
  opacity: 1;
}

body.console-page th {
  background: #edf3f7;
}

body.console-page tbody tr {
  transition: background 0.16s ease;
}

body.console-page .quick-action-card {
  align-items: flex-start;
  min-height: 118px;
}

@media (max-width: 900px) {
  .hero {
    min-height: 92vh;
    padding: 116px 24px 72px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .hero-content {
    margin-left: 0;
  }

  .section-title {
    font-size: 30px;
  }

  .hero-trust,
  .login-assurance {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
    gap: 28px;
    width: min(560px, calc(100vw - 32px));
    padding: 28px 0;
  }

  .login-aside {
    padding-top: 10px;
  }

  .login-aside h2 {
    font-size: 32px;
  }

  .login-container {
    padding: 32px 24px;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
}

@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;
  }
}
