@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

@font-face {
  font-family: "GHEA Grapalat Armenian Unicode";
  src: url("../fonts/GHEAGrpalatReg.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "GHEA Grapalat Armenian Unicode";
  src: url("../fonts/GHEAGpalatBld.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "GHEA Grapalat Armenian Unicode";
  src: url("../fonts/GHEAGrapalatRit.otf") format("opentype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg-0: #f4f7fb;
  --bg-1: #eef3fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --line: #b8c9e2;
  --line-strong: #8ea6c8;
  --text: #10213a;
  --muted: #5f7494;
  --accent: #0ea5e9;
  --accent-2: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow-lg: 0 20px 45px rgba(22, 37, 66, 0.12);
  --shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body.admin-body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg-0), var(--bg-1));
  min-height: 100vh;
  position: relative;
}

html:lang(hy) body.admin-body,
html:lang(hy) body.admin-body .app-brand,
html:lang(hy) body.admin-body .app-link,
html:lang(hy) body.admin-body .mk-title,
html:lang(hy) body.admin-body .mk-subtitle,
html:lang(hy) body.admin-body .mk-label,
html:lang(hy) body.admin-body .mk-input,
html:lang(hy) body.admin-body .btn,
html:lang(hy) body.admin-body th,
html:lang(hy) body.admin-body td {
  font-family: "GHEA Grapalat Armenian Unicode", "Noto Sans Armenian", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.app-bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}

.app-bg-orb-a {
  width: 340px;
  height: 340px;
  background: #93c5fd;
  top: -80px;
  right: -100px;
}

.app-bg-orb-b {
  width: 280px;
  height: 280px;
  background: #99f6e4;
  bottom: -100px;
  left: -80px;
}

.app-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(245, 249, 255, 0.8);
  border-bottom: 2px solid var(--line-strong);
}

.app-nav-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.app-brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 21px;
}

.app-brand:hover {
  color: var(--accent-2);
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.app-lang-menu {
  position: relative;
}

.app-lang-menu-fixed {
  position: fixed;
  right: 16px;
  bottom: max(88px, calc(env(safe-area-inset-bottom, 0px) + 24px));
  z-index: 80;
}

@media (max-width: 768px) {
  .app-lang-menu-fixed {
    right: 12px;
    bottom: max(88px, calc(env(safe-area-inset-bottom, 0px) + 20px));
  }
}

.app-lang-menu summary::-webkit-details-marker {
  display: none;
}

.app-lang-globe {
  list-style: none;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  cursor: pointer;
}

.app-lang-menu[open] .app-lang-globe {
  border-color: #7ea1d2;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.app-lang-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 120px;
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
  z-index: 40;
}

.app-lang-item {
  text-decoration: none;
  border: 2px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.88);
  color: #2a3f63;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transition: all 0.18s ease;
}

.app-lang-item:hover {
  border-color: #9eb4d4;
  color: #11284f;
}

.app-lang-item.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.app-link {
  text-decoration: none;
  border: 2px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.88);
  color: #2a3f63;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.18s ease;
}

.app-link:hover {
  border-color: #9eb4d4;
  color: #11284f;
  transform: translateY(-1px);
}

.app-link.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

.app-link-admin {
  color: #78350f;
  background: #ffedd5;
  border-color: #fcd9a7;
}

.app-link-logout {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: #fecaca;
}

.app-main {
  position: relative;
  z-index: 1;
  padding-top: 20px;
  padding-bottom: 30px;
}

.app-alert {
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 14px;
  border: 2px solid var(--line-strong);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}

.app-alert-success {
  border-color: rgba(16, 185, 129, 0.32);
  color: #065f46;
  background: #ecfdf5;
}

.app-alert-danger,
.app-alert-error {
  border-color: rgba(239, 68, 68, 0.35);
  color: #7f1d1d;
  background: #fef2f2;
}

.app-alert-warning {
  border-color: rgba(245, 158, 11, 0.35);
  color: #7c2d12;
  background: #fffbeb;
}

.app-alert-info {
  border-color: rgba(14, 165, 233, 0.35);
  color: #0c4a6e;
  background: #f0f9ff;
}

.mk-page {
  max-width: 1200px;
  margin: 0 auto;
}

.mk-window {
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.mk-titlebar {
  background: linear-gradient(135deg, #0f1f3a, #1e3a73);
  color: #e0ecff;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mk-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mk-subtitle {
  margin-top: 3px;
  font-size: 13px;
  color: #aec6f2;
}

.mk-form {
  padding: 18px;
}

.mk-group {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.mk-group-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4f678a;
}

.mk-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 18, 33, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 3000;
}

.mk-popup-card {
  width: min(640px, 100%);
  background: #ffffff;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
}

.mk-popup-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
}

.mk-popup-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mk-label {
  display: block;
  margin-bottom: 6px;
  color: #2a4365;
  font-weight: 700;
  font-size: 13px;
}

.router-banner-preview {
  position: relative;
  display: inline-block;
}

.router-banner-preview-img {
  max-width: 100%;
  max-height: 220px;
  border: 1px solid #9da8b4;
  background: #fff;
  border-radius: 8px;
}

.router-banner-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 1px solid #ef4444;
  border-radius: 999px;
  background: #fff;
  color: #ef4444;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.router-banner-remove-btn:hover {
  background: #ef4444;
  color: #fff;
}

.mk-input {
  height: 42px;
  border-radius: 10px;
  border: 2px solid #b1c5e3;
  background: #fff;
  color: #11284f;
  font-size: 14px;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-shadow: none;
}

.mk-input:focus {
  border-color: #2f89e4;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

textarea.mk-input {
  height: auto;
  min-height: 120px;
}

.mk-check {
  margin-top: 2px;
}

.mk-check .form-check-input {
  border-color: #9ab0d0;
}

.mk-check .form-check-label {
  font-size: 13px;
  color: #294466;
}

.mk-actions {
  border-top: 2px dashed var(--line-strong);
  padding-top: 14px;
}

.mk-btn-primary,
.mk-btn-secondary {
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  padding: 10px 14px;
  transition: all 0.16s ease;
}

.mk-btn-primary {
  color: #fff;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
}

.mk-btn-primary:hover {
  color: #fff;
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.mk-btn-secondary {
  color: #284569;
  border: 2px solid #9eb7d7;
  background: #f8fbff;
}

.mk-btn-secondary:hover {
  color: #17385f;
  border-color: #9db4d4;
  background: #f0f6ff;
}

.mk-table {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #a9c0df;
  margin: 0;
}

.mk-table thead th {
  background: linear-gradient(180deg, #eff5ff, #e5eefc);
  border-bottom: 2px solid #afc5e3;
  color: #1f3a5f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.mk-table td {
  border-top: 1px solid #c6d7ef;
  color: #1e3758;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.93);
  vertical-align: middle;
}

.mk-table th,
.mk-table td {
  border-right: 1px solid #b7cce7 !important;
  border-left: 1px solid #d4e1f2 !important;
}

.mk-table tbody tr:nth-child(even) td {
  background: rgba(244, 249, 255, 0.95);
}

.mk-table tbody tr.mk-row-active td {
  background: rgba(220, 252, 231, 0.92) !important;
  border-top-color: #86efac;
}

.mk-table tbody tr.mk-row-inactive td {
  background: rgba(254, 226, 226, 0.92) !important;
  border-top-color: #fca5a5;
}

.mk-table-inline td,
.mk-table-inline th {
  font-size: 12px;
}

@media (max-width: 768px) {
  .mk-form {
    padding: 14px;
  }

  .mk-group {
    padding: 12px;
  }

  .mk-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mk-table th,
  .mk-table td {
    font-size: 12px;
    white-space: nowrap;
  }

  .mk-table-inline th,
  .mk-table-inline td {
    font-size: 11px;
  }
}

.mk-mono {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.mk-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid transparent;
}

.mk-badge-loading {
  background: #e8eef7;
  border-color: #cbd7e8;
  color: #415979;
}

.mk-badge-online {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.mk-badge-offline {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.text-muted {
  color: var(--muted) !important;
}

.auth-layout {
  max-width: 1040px;
  margin: 8px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.auth-info-card,
.auth-card,
.auth-hero {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.auth-info-card {
  padding: 24px;
  background: linear-gradient(165deg, rgba(96, 165, 250, 0.18), rgba(186, 230, 253, 0.18)), var(--surface);
}

.auth-info-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #1d4f91;
  border: 1px solid #b8d0f2;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.7);
}

.auth-info-title {
  margin: 14px 0 10px;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-info-text {
  color: #486388;
  font-size: 15px;
  line-height: 1.55;
}

.auth-info-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: #24446f;
  font-size: 14px;
}

.auth-info-list li {
  margin-bottom: 8px;
}

.auth-card {
  padding: 16px;
}

.auth-tabs {
  gap: 8px;
}

.auth-tabs .nav-link {
  border-radius: 10px;
  border: 1px solid #c6d7ef;
  color: #31537f;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  background: #f6faff;
}

.auth-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

.auth-tab-content {
  margin-top: 14px;
}

.auth-form {
  padding: 4px;
}

.auth-input {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #cedbef;
  background: #fff;
}

.auth-input:focus {
  border-color: #5dadef;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.auth-hero {
  max-width: 920px;
  margin: 10px auto 0;
  padding: 26px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(13, 148, 136, 0.1)), var(--surface);
}

.auth-hero-badge {
  display: inline-block;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid #b8d0f2;
  color: #1d4f91;
  background: rgba(255, 255, 255, 0.72);
}

.auth-hero-title {
  margin: 14px 0 8px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-hero-text {
  margin: 0;
  color: #4a6588;
  font-size: 15px;
}

.auth-hero-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 992px) {
  .app-nav-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-links {
    justify-content: flex-start;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .mk-form {
    padding: 12px;
  }

  .mk-group {
    padding: 10px;
    border-radius: 12px;
  }

  .mk-titlebar {
    padding: 12px 14px;
  }

  .mk-title {
    font-size: 18px;
  }

  .auth-info-title,
  .auth-hero-title {
    font-size: 27px;
  }

  .app-main {
    padding-top: 14px;
  }
}
