/*!
 * eeSave DataCenter — UI styles
 */
:root {
  --ld-brand: #0f4c5c;
  --ld-brand-deep: #0a3540;
  --ld-brand-red: #e31e24;
  --ld-accent: #e31e24;
  --ld-accent-hover: #c4181e;
  --ld-accent-soft: #f4a261;
  --ld-bg: #eef3f5;
  --ld-card: #ffffff;
  --ld-muted: #5c6b73;
  --ld-font: "Manrope", system-ui, sans-serif;
  --ld-display: "Sora", "Manrope", sans-serif;
  --ld-nav-h: auto;
}

body.ld-body {
  font-family: var(--ld-font);
  background:
    radial-gradient(1200px 400px at 8% -8%, rgba(227, 30, 36, 0.06), transparent 50%),
    linear-gradient(180deg, #e2ebef 0%, var(--ld-bg) 38%, #e8eef1 100%);
  min-height: 100vh;
  color: #1a2428;
}

/* ——— Top navigation (white) ——— */
.navbar.ld-nav {
  min-height: 5.5rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  background: #ffffff !important;
  box-shadow: 0 1px 0 rgba(15, 76, 92, 0.08), 0 6px 18px rgba(15, 76, 92, 0.06);
  border-bottom: 1px solid rgba(15, 76, 92, 0.1);
}

.ld-nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.ld-brand {
  display: inline-flex !important;
  align-items: center;
  padding: 0 !important;
  margin-right: 1rem;
  margin-left: 8%;
  text-decoration: none !important;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
}

/* Nav logo */
.ld-brand-logo {
  display: block;
  width: min(236px, 16.2vw);
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: left center;
}

.ld-toggler {
  border-color: rgba(15, 76, 92, 0.35);
}
.ld-toggler .navbar-toggler-icon {
  filter: none;
}

.ld-nav-links .nav-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a2428 !important;
  padding: 0.45rem 0.75rem !important;
  border-radius: 0.45rem;
  margin: 0 0.1rem;
  border-bottom: none !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.ld-nav-links .nav-link:hover,
.ld-nav-links .nav-link:focus {
  color: var(--ld-brand) !important;
  background: rgba(15, 76, 92, 0.08);
}

.ld-nav-links .nav-link.active {
  color: #fff !important;
  background: var(--ld-brand-red);
  box-shadow: none;
}

.ld-dropdown {
  border: 1px solid rgba(15, 76, 92, 0.1);
  border-radius: 0.65rem;
  padding: 0.4rem;
  margin-top: 0.45rem !important;
  box-shadow: 0 12px 32px rgba(15, 76, 92, 0.12);
  min-width: 15.5rem;
  background: #fff;
}

.ld-dropdown .dropdown-item {
  border-radius: 0.45rem;
  padding: 0.55rem 0.75rem;
  white-space: normal;
  color: #1a2428;
}

.ld-dropdown .dropdown-item:hover,
.ld-dropdown .dropdown-item:focus {
  background: rgba(15, 76, 92, 0.08);
  color: var(--ld-brand);
}

.ld-dropdown .dropdown-item.active {
  background: rgba(227, 30, 36, 0.1);
  color: var(--ld-brand-deep);
}

.ld-dd-label {
  display: block;
  font-weight: 650;
  font-size: 0.9rem;
  color: #1a2428;
}

.ld-dd-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--ld-muted);
  margin-top: 0.1rem;
}

.ld-nav-user-name {
  color: var(--ld-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.ld-btn-logout {
  border: 1px solid rgba(15, 76, 92, 0.3);
  color: var(--ld-brand);
  font-weight: 600;
  background: #fff;
}
.ld-btn-logout:hover {
  background: var(--ld-brand);
  border-color: var(--ld-brand);
  color: #fff;
}

@media (max-width: 991.98px) {
  .ld-brand {
    max-width: calc(100% - 3.5rem);
  }
  .ld-brand-logo {
    width: min(95px, 15.75vw);
  }
  .ld-nav-links {
    padding-top: 0.75rem;
  }
  .ld-nav-links .nav-link {
    margin: 0.15rem 0;
  }
  .ld-nav-user {
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid rgba(15, 76, 92, 0.1);
    margin-top: 0.5rem;
  }
}

/* ——— Content ——— */
.ld-hero {
  padding: 1.5rem 0 0.5rem;
}

.ld-hero h1 {
  font-family: var(--ld-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ld-brand);
}

.ld-card {
  background: var(--ld-card);
  border: 1px solid rgba(15, 76, 92, 0.08);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(15, 76, 92, 0.06);
}

.ld-stat {
  font-family: var(--ld-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ld-brand);
  line-height: 1.1;
}

.ld-stat-label {
  color: var(--ld-muted);
  font-size: 0.9rem;
}

.ld-footer {
  color: var(--ld-muted);
  font-size: 0.85rem;
  padding: 2rem 0 1.25rem;
}

.ld-footer-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 280px;
  margin: 0 auto 0.5rem;
  object-fit: contain;
}

.ld-footer-note {
  font-size: 0.8rem;
  color: var(--ld-muted);
}

.btn-ld {
  background: var(--ld-accent);
  border-color: var(--ld-accent);
  color: #fff;
  font-weight: 600;
}

.btn-ld:hover {
  background: var(--ld-accent-hover);
  border-color: var(--ld-accent-hover);
  color: #fff;
}

/* Schedule */
.ld-schedule-table thead th {
  background: rgba(15, 76, 92, 0.06);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ld-muted);
  white-space: nowrap;
  padding: 0.5rem 0.65rem;
}
.ld-schedule-table td {
  padding: 0.4rem 0.65rem;
  vertical-align: middle;
}
.ld-schedule-table .ld-levels-cell {
  max-width: 14rem;
}
.ld-schedule-table tr.ld-empty-day td {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.ld-sched-block {
  border-radius: 0.65rem;
  border: 1px solid rgba(15, 76, 92, 0.1);
  background: #fafbfc;
}
.ld-sched-bmc {
  border-left: 3px solid #c45c26;
}
.ld-sched-os {
  border-left: 3px solid #2c5f4a;
}
.ld-sched-l3 {
  border-left: 3px solid #3b6ea5;
}
.ld-sched-stack {
  border-radius: 0.5rem;
  background: rgba(15, 76, 92, 0.04);
  border: 1px solid rgba(15, 76, 92, 0.08);
}
.ld-levels-compact {
  max-height: 220px;
  overflow-y: auto;
}
.ld-levels-compact th,
.ld-levels-compact td {
  padding: 0.2rem 0.25rem;
  font-size: 0.8rem;
}
.ld-os-status-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ld-muted);
  border-bottom-width: 1px;
}
.ld-os-status-table td {
  vertical-align: middle;
}

/* Подсказки «?» и бейджи каналов */
.ld-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.25rem;
  padding: 0;
  border: 1px solid rgba(15, 76, 92, 0.35);
  border-radius: 50%;
  background: rgba(15, 76, 92, 0.06);
  color: var(--ld-brand);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
}
.ld-help:hover,
.ld-help:focus {
  background: var(--ld-brand);
  color: #fff;
  border-color: var(--ld-brand);
  outline: none;
}
.ld-channel-badge {
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: help;
}
.ld-hero .ld-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.tooltip.ld-tooltip .tooltip-inner {
  max-width: 280px;
  text-align: left;
  font-size: 0.8rem;
}

.login-wrap {
  max-width: 440px;
  margin: 8vh auto;
}

.login-wrap .ld-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

.login-wrap .ld-login-logo {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
}

.ld-tagline {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ld-brand-deep);
  max-width: 40rem;
}

.ld-feature {
  height: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: 0.55rem;
  background: rgba(15, 76, 92, 0.04);
  border: 1px solid rgba(15, 76, 92, 0.08);
}

.ld-feature-title {
  font-family: var(--ld-display);
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--ld-brand);
  margin-bottom: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.ld-feature-text {
  font-size: 0.85rem;
  color: var(--ld-muted);
  line-height: 1.4;
}
