﻿:root {
  --nton-blue: #1d5c8f;
  --nton-green: #36a852;
  --nton-ink: #1f2933;
  --nton-muted: #697386;
  --nton-line: #d7dde8;
  --nton-surface: #f5f7fb;
  --nton-red: #f44336;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--nton-ink);
  background: var(--nton-surface);
}

a {
  color: inherit;
}

.hide {
  display: none !important;
}

.nton-primary.e-btn,
.nton-primary {
  background: var(--nton-blue);
  border-color: var(--nton-blue);
  color: #fff;
}

.nton-danger.e-btn,
.nton-danger {
  background: var(--nton-red);
  border-color: var(--nton-red);
  color: #fff;
}

.nton-secondary.e-btn,
.nton-secondary {
  background: var(--nton-green);
  border-color: var(--nton-green);
  color: #fff;
}

.full {
  width: 100%;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns .2s ease;
}

  .admin-shell.sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
  }

    .admin-shell.sidebar-collapsed .admin-sidebar {
      width: 0;
      overflow: hidden;
      visibility: hidden;
    }

.admin-menu-backdrop {
  display: none;
}

.admin-sidebar {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  color: #fff;
  background: #202834;
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

  .admin-brand img {
    width: 200px;
    height: 44px;
    object-fit: cover;
    border-radius: 4px;
  }

  .admin-brand strong,
  .admin-brand span {
    display: block;
  }

  .admin-brand span {
    margin-top: 2px;
    color: #b8c2d4;
    font-size: .82rem;
  }

.admin-nav {
  padding: 12px;
}

  .admin-nav > a,
  .admin-menu-level a,
  .admin-menu-group-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    text-decoration: none;
    color: #dce5f4;
    text-align: left;
  }

    .admin-nav > a:hover,
    .admin-nav > a.active,
    .admin-menu-level a:hover,
    .admin-menu-level a.active,
    .admin-menu-group-trigger:hover,
    .admin-menu-group-trigger.open {
      background: rgba(255, 255, 255, .1);
    }

.admin-menu-level {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

  .admin-menu-level.level-1,
  .admin-menu-level.level-2,
  .admin-menu-level.level-3 {
    margin-left: 12px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, .12);
  }

.group-arrow {
  margin-left: auto;
  transition: transform .16s ease;
}

.admin-menu-group-trigger.open .group-arrow {
  transform: rotate(180deg);
}

.menu-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  font-size: .86rem;
  line-height: 32px;
}

  .menu-icon i:nth-child(2) {
    color: rgba(255, 255, 255, .86);
  }

.admin-nav-status {
  display: block;
  padding: 10px 12px;
  color: #b8c2d4;
  font-size: .88rem;
}

.admin-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--nton-muted);
  background: var(--nton-surface);
}

.nton-loader-wrapper .loader-message {
  position: fixed;
  z-index: 12;
  top: calc(50% + 92px);
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0;
}

.nton-loader-wrapper {
  background: rgba(20, 28, 38, .42);
  backdrop-filter: blur(2px);
}

  .nton-loader-wrapper .loader-section {
    background: transparent !important;
  }

.admin-main {
  height: 100vh;
  overflow: hidden;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.admin-topbar {
  position: relative;
  z-index: 100;
  overflow: visible;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--nton-line);
}

.menu-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--nton-line);
  border-radius: 4px;
  background: #fff;
}

.admin-title {
  font-weight: 700;
}

.admin-notification-menu {
  position: relative;
  margin-left: auto;
}

.admin-notification-trigger {
  position: relative;
  width: 38px;
  height: 38px;
  border: 0px solid var(--nton-line);
  border-radius: 6px;
  background: #fff;
  color: var(--nton-muted);
  cursor: pointer;
  outline: thick;
}

.admin-notification-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 10px;
  background: #d9363e;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;
}

.admin-notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 340px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--nton-line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(38, 50, 68, .16);
}

.admin-notification-header {
  padding: 12px 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--nton-line);
}

.admin-notification-empty {
  padding: 18px 14px;
  color: var(--nton-muted);
}

.admin-notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #eef1f5;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

  .admin-notification-item:hover {
    background: #f4f7fb;
  }

.admin-notification-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--nton-ink);
}

.admin-notification-item small, .admin-notification-modal-meta {
  color: var(--nton-muted);
  white-space: nowrap;
}

.admin-notification-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 28, 40, .45);
}

.admin-notification-modal {
  width: min(760px, 100%);
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

  .admin-notification-modal header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px 10px;
    border-bottom: 1px solid var(--nton-line);
  }

  .admin-notification-modal h2 {
    margin: 0;
    font-size: 20px;
  }

  .admin-notification-modal header button {
    border: 0;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
  }

.admin-notification-modal-meta {
  padding: 10px 22px 0;
  font-size: 13px;
}

.admin-notification-body {
  padding: 18px 22px 24px;
  white-space: normal;
}

.admin-user-menu {
  position: relative;
  /*margin-left: auto;*/
}

.admin-user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--nton-line);
  border-radius: 6px;
  background: #fff;
  color: var(--nton-muted);
  padding: 0 10px;
  cursor: pointer;
}

.admin-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 210px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--nton-line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(38, 50, 68, .16);
}

  .admin-user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--nton-ink);
    text-align: left;
  }

    .admin-user-dropdown button:hover {
      background: #f4f7fb;
    }

.topbar-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff6dc;
  color: #755700;
}

  .topbar-message button {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
  }

.admin-content {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

  .dashboard-header h1 {
    margin: 0;
    font-size: 1.8rem;
  }

  .dashboard-header p {
    margin: 6px 0 0;
    color: var(--nton-muted);
  }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.dashboard-tile {
  display: grid;
  gap: 8px;
  padding: 18px;
  min-height: 132px;
  background: #fff;
  border: 1px solid var(--nton-line);
  border-radius: 8px;
  text-decoration: none;
}

  .dashboard-tile i {
    color: var(--nton-blue);
    font-size: 1.4rem;
  }

  .dashboard-tile span {
    color: var(--nton-muted);
  }

.mock-page {
  display: grid;
  gap: 16px;
}

.mock-page-header,
.mock-page-body {
  background: #fff;
  border: 1px solid var(--nton-line);
  border-radius: 8px;
  padding: 18px;
}

.mock-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

  .mock-page-header h1 {
    margin: 4px 0 6px;
    font-size: 1.55rem;
  }

  .mock-page-header p,
  .mock-page-body p {
    margin: 0;
    color: var(--nton-muted);
  }

.mock-breadcrumb {
  color: var(--nton-blue);
  font-size: .86rem;
}

.mock-badge {
  max-width: 220px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eaf3fb;
  color: var(--nton-blue);
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-frame-wrap {
  height: calc(100vh - 108px);
  background: #fff;
  border: 1px solid var(--nton-line);
}

  .legacy-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }

.nton-login-page {
  height: 100vh;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 28px 14px 48px;
  background: #f4f6f9;
}

  .nton-login-page footer {
    margin-top: 14px;
    color: #788397;
    font-size: .9rem;
  }

.login-card {
  width: min(960px, 100%);
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(310px, 1.1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--nton-line);
  box-shadow: 0 16px 40px rgba(38, 50, 68, .16);
}

.brand-side {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 38px;
  color: #fff;
  text-align: center;
  background: linear-gradient(145deg, #17456d, #277447);
}

  .brand-side.registration-complete {
    grid-column: 1 / -1;
    min-height: 570px;
  }

    .brand-side.registration-complete > img,
    .brand-side.registration-complete > .heading {
      display: none;
    }

  .brand-side img {
    width: 250px;
    /*height: 130px;*/
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
  }

  .brand-side h2 {
    margin: 0;
    font-size: 2rem;
  }

  .brand-side p {
    margin: 4px 0 0;
  }

.success-msg {
  display: none;
}

  .success-msg.active {
    display: grid;
    max-width: 430px;
    gap: 12px;
    place-items: center;
    margin: auto;
  }

    .success-msg.active h2,
    .success-msg.active p {
      margin: 0;
    }

.success-icon {
  font-size: 4rem;
  color: #bff3d2;
}

.form-side.hide {
  display: none;
}

.form-side {
  position: relative;
  padding: 42px 50px;
}

.form-piece {
  display: grid;
  gap: 9px;
  transition: opacity .2s ease;
}

  .form-piece.switched {
    display: none;
  }

  .form-piece h3 {
    margin: 0 0 12px;
    color: var(--nton-blue);
    font-size: 1.55rem;
  }

  .form-piece label {
    margin-top: 6px;
    color: #576173;
    font-size: .86rem;
  }

  .form-piece input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cfd7e6;
    border-radius: 4px;
    outline: none;
  }

    .form-piece input:focus {
      border-color: var(--nton-blue);
      box-shadow: 0 0 0 3px rgba(29, 92, 143, .14);
    }

.link-button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nton-blue);
  text-decoration: underline;
}

.message {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: .92rem;
}

.page-message {
  margin-bottom: 16px;
}

.message.error {
  color: #8a1f1f;
  background: #fde9e9;
}

.message.success {
  color: #1f6b38;
  background: #e8f7ee;
}

.message.warning,
.message.info {
  color: #755700;
  background: #fff6dc;
}

.code-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(21, 30, 43, .64);
}

.code-panel {
  position: relative;
  width: min(420px, calc(100vw - 28px));
  padding: 28px;
  background: #fff;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .25);
}

  .code-panel h2 {
    margin: 8px 0;
    color: var(--nton-blue);
  }

  .code-panel > p {
    margin: 0;
    color: #667085;
  }

.code-shield {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #17456d, #277447);
  font-size: 1.45rem;
}

.code-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
}

.code-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 18px 0;
}

  .code-inputs input {
    min-width: 0;
    width: 100%;
    height: 48px;
    padding: 0;
    text-align: center;
    text-transform: uppercase;
    font-size: 1.35rem;
    font-weight: 700;
    border: 1px solid var(--nton-line);
    border-radius: 6px;
  }

    .code-inputs input:focus {
      border-color: var(--nton-blue);
      box-shadow: 0 0 0 3px rgba(29, 92, 143, .14);
    }

@media (max-width: 420px) {
  .code-panel {
    padding: 24px 18px;
  }

  .code-inputs {
    gap: 5px;
  }
}

@media (max-width: 820px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-shell.sidebar-collapsed .admin-sidebar {
    display: block;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 300;
    width: min(82vw, 300px);
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    visibility: visible;
    box-shadow: 14px 0 38px rgba(0, 0, 0, .28);
  }

  .admin-shell.sidebar-collapsed .admin-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 250;
    padding: 0;
    border: 0;
    background: rgba(20, 28, 38, .52);
    cursor: default;
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .brand-side {
    min-height: 220px;
    padding: 26px;
  }

    .brand-side img {
      width: 92px;
      height: 92px;
    }

  .form-side {
    padding: 28px 22px;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
