:root {
  --blue-950: #062052;
  --blue-900: #092d6d;
  --blue-800: #0745a5;
  --blue-700: #075bd8;
  --blue-600: #1474ed;
  --blue-100: #dcecff;
  --blue-50: #f1f7ff;

  --ink: #10264a;
  --muted: #667d9d;
  --line: #dce7f5;
  --surface: #ffffff;
  --background: #f3f7fc;

  --success: #07965a;
  --success-soft: #e9f9f1;
  --danger: #d63c56;
  --danger-soft: #fff0f3;

  --shadow:
    0 24px 70px rgba(26, 67, 123, 0.14);

  --shadow-soft:
    0 12px 32px rgba(29, 75, 139, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--background);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 42px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(
      135deg,
      #061f50 0%,
      #073f93 42%,
      #0b70df 100%
    );
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.13) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.13) 1px,
      transparent 1px
    );
  background-size: 48px 48px;
}

.auth-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  pointer-events: none;
}

.auth-glow-one {
  width: 480px;
  height: 480px;
  top: -190px;
  right: -120px;
  background: rgba(111, 192, 255, 0.3);
}

.auth-glow-two {
  width: 390px;
  height: 390px;
  bottom: -160px;
  left: -90px;
  background: rgba(255, 255, 255, 0.13);
}

.auth-layout {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns:
    minmax(0, 1.25fr)
    minmax(380px, 0.75fr);
  gap: 52px;
  align-items: center;
}

.auth-brand-panel {
  max-width: 650px;
  color: white;
}

.brand-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.27);
  border-radius: 24px;
  color: white;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.25),
      rgba(255, 255, 255, 0.08)
    );
  box-shadow:
    0 20px 45px rgba(0, 21, 65, 0.25);
  backdrop-filter: blur(14px);
}

.brand-mark-wing {
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
  font-style: italic;
}

.eyebrow {
  display: inline-block;
  color: var(--blue-600);
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.auth-brand-panel .eyebrow {
  color: #9fd1ff;
}

.auth-brand-panel h1 {
  max-width: 620px;
  margin: 18px 0 20px;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.052em;
}

.auth-brand-panel > p {
  max-width: 600px;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  line-height: 1.75;
}

.auth-features {
  display: grid;
  gap: 14px;
  margin-top: 38px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 520px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(4, 32, 82, 0.23);
  backdrop-filter: blur(12px);
}

.feature-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #cfeaff;
  font-size: 11px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.12);
}

.auth-feature strong,
.auth-feature small {
  display: block;
}

.auth-feature strong {
  font-size: 14px;
}

.auth-feature small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.45;
}

.login-card {
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 32px 90px rgba(0, 22, 69, 0.32);
}

.login-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.15em;
  background: var(--blue-50);
}

.login-card h2 {
  margin: 20px 0 9px;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.login-card-head > p {
  margin: 0 0 29px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field > span {
  display: block;
  margin-bottom: 8px;
  color: #294467;
  font-size: 12px;
  font-weight: 750;
}

.field input {
  width: 100%;
  min-height: 51px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fafdff;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.field input:focus {
  border-color: var(--blue-600);
  background: white;
  box-shadow:
    0 0 0 4px rgba(20, 116, 237, 0.11);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 68px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  transform: translateY(-50%);
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 800;
  background: var(--blue-50);
}

.form-error {
  margin: -4px 0 16px;
  padding: 11px 13px;
  border: 1px solid #ffd0d9;
  border-radius: 11px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
  background: var(--danger-soft);
}

.primary-button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 19px;
  border: 0;
  border-radius: 14px;
  color: white;
  font-weight: 800;
  background:
    linear-gradient(
      135deg,
      var(--blue-800),
      var(--blue-600)
    );
  box-shadow:
    0 14px 25px rgba(7, 91, 216, 0.24);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 30px rgba(7, 91, 216, 0.3);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.login-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  color: #7690af;
  font-size: 11px;
}

.secure-dot,
.online-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  background: #12aa65;
  box-shadow:
    0 0 0 5px rgba(18, 170, 101, 0.12);
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 27px 20px;
  color: white;
  background:
    linear-gradient(
      180deg,
      #061f50,
      #073b89 62%,
      #075bd8
    );
  box-shadow:
    14px 0 45px rgba(10, 42, 91, 0.11);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 8px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark-small {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 14px;
}

.brand-mark-small .brand-mark-wing {
  font-size: 22px;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand strong {
  font-size: 17px;
  letter-spacing: 0.05em;
}

.sidebar-brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.57);
  font-size: 11px;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
  margin-top: 28px;
}

.nav-item {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.69);
  text-align: left;
  background: transparent;
}

.nav-item:hover,
.nav-item.active {
  color: white;
  background: rgba(255, 255, 255, 0.13);
}

.nav-symbol {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-status {
  margin-top: auto;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  background: rgba(0, 23, 68, 0.21);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 750;
}

.sidebar-status small {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.51);
  font-size: 10px;
  line-height: 1.5;
}

.dashboard-main {
  min-width: 0;
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 17px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(15px);
}

.topbar h2 {
  margin: 6px 0 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-left: auto;
}

.secondary-button,
.logout-button,
.mobile-menu-button {
  border: 1px solid var(--line);
  color: #365373;
  background: white;
}

.secondary-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 800;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  font-size: 12px;
  font-weight: 850;
  background:
    linear-gradient(
      145deg,
      var(--blue-800),
      var(--blue-600)
    );
}

.admin-identity strong,
.admin-identity small {
  display: block;
}

.admin-identity strong {
  max-width: 150px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-identity small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.07em;
}

.logout-button {
  min-height: 37px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--danger);
  font-size: 10px;
  font-weight: 800;
}

.mobile-menu-button {
  display: none;
  width: 39px;
  height: 39px;
  border-radius: 11px;
}

.dashboard-content {
  padding: 28px 30px 42px;
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 30px;
  overflow: hidden;
  border-radius: 23px;
  color: white;
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(120, 194, 255, 0.38),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #06265e,
      #075bd8
    );
  box-shadow:
    0 19px 45px rgba(6, 56, 130, 0.2);
}

.hero-badge {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  color: #d4edff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.15em;
  background: rgba(255, 255, 255, 0.13);
}

.hero-card h1 {
  margin: 16px 0 7px;
  font-size: clamp(27px, 3vw, 42px);
  letter-spacing: -0.045em;
}

.hero-card p {
  max-width: 600px;
  margin: 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 13px;
  line-height: 1.65;
}

.hero-access {
  min-width: 310px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.hero-access > div {
  padding: 15px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(0, 29, 79, 0.2);
}

.hero-access span,
.hero-access strong {
  display: block;
}

.hero-access span {
  color: rgba(255, 255, 255, 0.57);
  font-size: 9px;
}

.hero-access strong {
  margin-top: 6px;
  font-size: 11px;
}

.summary-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.summary-card {
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.summary-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.summary-card-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.summary-card-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 900;
  background: var(--blue-50);
}

.summary-card-value {
  margin-top: 16px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.045em;
}

.summary-card-foot {
  margin-top: 7px;
  color: #8799af;
  font-size: 9px;
}

.panel-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    300px;
  gap: 18px;
  margin-top: 20px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.panel-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 21px;
  border-bottom: 1px solid var(--line);
}

.panel-header h3 {
  margin: 6px 0 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.count-badge {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--blue-700);
  font-size: 9px;
  font-weight: 800;
  background: var(--blue-50);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid #edf2f8;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #7a90ac;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.05em;
  background: #fbfdff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafdff;
}

.brand-cell strong,
.brand-cell small {
  display: block;
}

.brand-cell strong {
  font-size: 12px;
}

.brand-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.status-badge {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.status-active {
  color: var(--success);
  background: var(--success-soft);
}

.status-inactive {
  color: var(--danger);
  background: var(--danger-soft);
}

.empty-state {
  padding: 35px;
  color: var(--muted);
  text-align: center;
}

.access-panel {
  align-self: start;
}

.access-list {
  margin: 0;
  padding: 5px 21px;
}

.access-list > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid #edf2f8;
}

.access-list dt {
  color: var(--muted);
  font-size: 10px;
}

.access-list dd {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.access-notice {
  margin: 15px;
  padding: 16px;
  border: 1px solid #cee3ff;
  border-radius: 14px;
  background: var(--blue-50);
}

.access-notice strong {
  color: var(--blue-800);
  font-size: 11px;
}

.access-notice p {
  margin: 7px 0 0;
  color: #6280a4;
  font-size: 9px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 13px 16px;
  border-radius: 13px;
  color: white;
  font-size: 11px;
  font-weight: 700;
  background: #17365f;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--danger);
}

@media (max-width: 1100px) {
  .auth-layout {
    grid-template-columns: 1fr 400px;
    gap: 30px;
  }

  .summary-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-access {
    width: 100%;
  }
}

@media (max-width: 850px) {
  .auth-shell {
    padding: 25px;
  }

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

  .auth-brand-panel {
    display: none;
  }

  .login-card {
    width: min(430px, 100%);
    margin: auto;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    left: -270px;
    width: 250px;
    transition: left 0.2s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .topbar {
    padding: 14px 18px;
  }

  .dashboard-content {
    padding: 20px 18px 35px;
  }

  .secondary-button,
  .admin-identity {
    display: none;
  }
}

@media (max-width: 600px) {
  .auth-shell {
    padding: 15px;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .topbar h2 {
    font-size: 16px;
  }

  .topbar .eyebrow {
    font-size: 8px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 23px;
  }

  .hero-access {
    grid-template-columns: 1fr;
  }

  .admin-profile {
    margin-left: auto;
  }

  .admin-avatar {
    display: none;
  }
}
