:root {
  --ops-navy: #081426;
  --ops-navy-2: #10233f;
  --ops-blue: #2563eb;
  --ops-blue-dark: #1d4ed8;
  --ops-bg: #f4f7fb;
  --ops-card: #ffffff;
  --ops-text: #111827;
  --ops-muted: #64748b;
  --ops-line: #e2e8f0;
  --ops-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.login-shell {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
}

.login-panel {
  gap: 14px;
  padding: clamp(24px, 4vw, 38px);
}

.login-panel h2 {
  font-size: 25px;
}

.login-company-card {
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
}

.login-company-card img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.login-form input,
.login-form select,
.master-login input {
  min-height: 44px;
  border-radius: 8px;
}

.login-form .btn,
.master-login .btn {
  min-height: 44px;
  border-radius: 8px;
}

.login-master-link {
  width: fit-content;
  color: var(--ops-muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.login-master-link:hover {
  color: var(--ops-blue);
}

.master-shell {
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--ops-bg);
}

.master-shell .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  gap: 12px;
  padding: 14px 10px;
  background: linear-gradient(180deg, #081a34, #06152b);
}

.master-shell .sidebar .brand {
  gap: 9px;
  padding: 2px 7px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.master-shell .brand-logo.master-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  padding: 2px;
  box-shadow: none;
}

.master-shell .brand-text strong {
  font-size: 14px;
}

.master-shell .brand-text span {
  margin-top: 2px;
  font-size: 9px;
}

.master-shell .nav {
  gap: 2px;
}

.master-shell .nav button {
  min-height: 38px;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.master-shell .nav button::before {
  display: none;
}

.master-shell .nav button.active {
  background: #1d4f91;
}

.master-shell .nav button.active .nav-icon {
  color: #ffffff;
}

.master-shell .nav-icon,
.master-shell .nav-icon svg {
  width: 18px;
  height: 18px;
}

.master-shell .user-box {
  gap: 6px;
  padding: 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.master-shell .user-box strong {
  font-size: 12px;
}

.master-shell .user-box span {
  font-size: 10px;
}

.master-shell .user-box .btn {
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 11px;
}

.master-shell .main {
  width: 100%;
  max-width: 1500px;
  gap: 14px;
  margin: 0 auto;
  padding: 18px;
}

.master-hero {
  grid-template-columns: minmax(300px, 0.8fr) minmax(520px, 1.2fr);
  gap: 18px;
  padding: 20px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--ops-shadow);
}

.master-hero::before {
  display: none;
}

.master-hero-copy h1 {
  font-size: 30px;
  line-height: 1.05;
}

.master-hero-copy p:not(.eyebrow) {
  margin-top: 8px;
  font-size: 13px;
}

.master-hero-stats {
  gap: 10px;
}

.master-hero-stats div {
  min-height: 82px;
  padding: 12px;
  border-radius: 8px;
  box-shadow: none;
}

.master-hero-stats strong {
  margin-top: 5px;
  font-size: 18px;
}

.master-hero-stats small {
  margin-top: 4px;
  font-size: 10px;
}

.master-hero-actions {
  gap: 8px;
}

.master-shell .panel {
  padding: 14px;
  border-radius: 10px;
  box-shadow: var(--ops-shadow);
}

.master-shell .panel-head {
  margin-bottom: 12px;
}

.master-shell .panel-head h2 {
  font-size: 17px;
}

.master-shell .panel-head p {
  margin: 3px 0 0;
  font-size: 11px;
}

.master-shell .backup-grid {
  gap: 10px;
}

.master-shell .backup-stat {
  min-height: 78px;
  padding: 12px;
  border-radius: 8px;
  box-shadow: none;
}

.master-shell .backup-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.master-shell .backup-stat strong {
  font-size: 18px;
}

.master-shell .table-wrap {
  border-radius: 8px;
}

.master-shell th,
.master-shell td {
  height: 48px;
  padding: 8px 10px;
  font-size: 11px;
}

.master-shell th {
  color: var(--ops-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.master-shell tbody tr:hover td {
  background: #f8fbff;
}

.master-shell .tenant-cell img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.master-shell .tenant-cell strong {
  font-size: 12px;
}

.master-module-badge {
  min-height: 25px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
}

.master-shell .btn {
  min-height: 38px;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 11px;
}

.master-shell .btn.primary {
  background: var(--ops-blue);
  box-shadow: none;
}

.master-shell .btn.primary:hover {
  background: var(--ops-blue-dark);
}

.master-shell .tag {
  padding: 4px 8px;
  font-size: 10px;
}

.master-shell .modal-card[data-form="master-tenant"] {
  border-radius: 10px;
}

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

  .master-shell .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }

  .master-shell .user-box {
    margin-top: 0;
  }

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

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

  .login-brand {
    min-height: 210px;
    padding: 24px;
  }

  .login-brand h1 {
    font-size: 38px;
  }

  .login-brand p {
    margin-top: 10px;
    font-size: 14px;
  }

  .login-panel {
    min-height: calc(100vh - 210px);
    padding: 24px 18px;
  }

  .master-shell .main {
    padding: 10px;
  }

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

  .master-hero-stats div:last-child {
    grid-column: 1 / -1;
  }

  .master-hero-actions .btn {
    flex: 1;
  }
}
