html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  color: #162033;
  background: #f6f7fb;
}

.footer {
  margin-top: 1.25rem;
  padding: 1rem 0;
}

.app-nav {
  background: #ffffff;
  border-bottom: 1px solid #dfe4ec;
  box-shadow: 0 1px 8px rgba(22, 32, 51, 0.05);
}

.brand-mark {
  align-items: center;
  color: #0f5d5e;
  display: inline-flex;
  gap: 0.5rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  height: 2rem;
  object-fit: contain;
  width: 2rem;
}

.navbar .nav-link {
  color: #445268;
  font-weight: 600;
}

.auth-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.auth-actions form {
  margin: 0;
}

.dropdown-icon {
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dropdown-item form {
  margin: 0;
  display: contents;
}

.nav-avatar-btn {
  background: transparent;
  border: 2px solid transparent;
  border-radius: 50%;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-avatar-btn::after {
  display: none;
}

.nav-avatar-btn:hover,
.nav-avatar-btn:focus,
.nav-avatar-btn.show {
  border-color: #0f5d5e;
  background: transparent;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-avatar-initial {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f5d5e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

main {
  padding-top: 1.5rem;
}

.hero {
  padding: 3rem 0 2rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
}

.eyebrow {
  color: #0f5d5e;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 800;
}

.lead-text {
  color: #58677d;
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-primary {
  background: #0f5d5e;
  border-color: #0f5d5e;
}

.btn-primary:hover {
  background: #0b4a4b;
  border-color: #0b4a4b;
}

.google-login-btn {
  align-items: center;
  display: inline-flex;
  gap: 0.5rem;
  justify-content: center;
}

.google-logo {
  background: #ffffff;
  border-radius: 50%;
  flex: 0 0 auto;
  height: 1.15rem;
  padding: 0.12rem;
  width: 1.15rem;
}

.btn-outline-primary {
  border-color: #0f5d5e;
  color: #0f5d5e;
}

.btn-outline-primary:hover {
  background: #0f5d5e;
  border-color: #0f5d5e;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.info-panel,
.pricing-card,
.empty-state,
.table-panel {
  background: #ffffff;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 32, 51, 0.06);
}

.pricing-card p,
.muted {
  color: #64748b;
  margin-bottom: 0;
}

.features-section,
.steps-section,
.info-section {
  padding: 2.5rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-card {
  background: #ffffff;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 32, 51, 0.06);
  padding: 1.25rem;
}

.feature-card h3 {
  color: #0f5d5e;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: #58677d;
  margin-bottom: 0;
}

.steps-list {
  display: grid;
  gap: 1rem;
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step-number {
  background: #0f5d5e;
  color: #ffffff;
  font-weight: 800;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.step p {
  color: #58677d;
  margin-bottom: 0;
}

.info-content p {
  color: #58677d;
  margin-bottom: 1rem;
  font-size: 1.08rem;
  line-height: 1.7;
}

.info-panel {
  padding: 1.25rem;
}



.form-card {
  background: #ffffff;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 32, 51, 0.06);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 480px;
}

.form-card label {
  font-weight: 700;
  color: #445268;
}

.form-card input {
  border: 1px solid #dfe4ec;
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
}

.form-card .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.form-error {
  color: #c43e3e;
  font-weight: 600;
  margin-bottom: 0;
}

.disclaimer {
  background: #fef9e7;
  border: 1px solid #f7e8b5;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.disclaimer p {
  color: #7a6b2e;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 1.25rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 300px;
  padding: 1.25rem;
}

.pricing-card .btn {
  margin-top: auto;
}

.price {
  color: #162033;
  font-size: 1.55rem;
  font-weight: 800;
}

.plan-facts,
.detail-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.plan-facts div,
.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #eef1f5;
  padding-top: 0.75rem;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.plan-features li {
  color: #58677d;
  font-size: 0.9rem;
  padding-left: 1.25rem;
  position: relative;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.5rem;
  height: 0.5rem;
  background: #1f9d72;
  border-radius: 50%;
}

dt {
  color: #64748b;
  font-weight: 700;
}

dd {
  margin: 0;
  text-align: right;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .account-grid {
    grid-template-columns: 1fr 1fr;
  }

  .account-grid .info-panel:first-child {
    grid-column: 1 / -1;
  }
}

.profile-card {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.profile-name {
  font-size: 1.25rem;
  margin-bottom: 0.15rem;
}

.profile-email {
  color: #64748b;
  margin-bottom: 0.5rem;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #0f5d5e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.empty-sub {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sub-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.sub-id {
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
}

.sub-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.badge-active {
  background: #dcfce7;
  color: #166534;
}

.badge-expired {
  background: #fee2e2;
  color: #991b1b;
}

.sub-details {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.sub-details div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
}

.sub-details dt {
  color: #64748b;
  font-weight: 600;
  font-size: 0.88rem;
}

.sub-details dd {
  margin: 0;
  font-size: 0.88rem;
}

.sub-actions {
  margin-top: 0.75rem;
}

.empty-state {
  padding: 1.25rem;
}

.locked-state {
  max-width: 560px;
  margin: 1rem auto 2rem;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 2rem 1.5rem;
}

.locked-icon { color: #c2410c; margin-bottom: 0.75rem; }

.locked-message {
  color: #475569;
  margin-bottom: 1.25rem;
}

.locked-contact {
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  background: #f8fafc;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.35rem 0;
}

.contact-row + .contact-row { border-top: 1px dashed #e2e8f0; }

.contact-label { color: #64748b; font-size: 0.9rem; }

.contact-value { font-weight: 600; }

.locked-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

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

.admin-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.dashboard-lists .admin-table {
  min-width: 0;
  white-space: nowrap;
}

.dashboard-lists .admin-table th,
.dashboard-lists .admin-table td {
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #eef1f5;
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: #445268;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e8f2f2;
  color: #0f5d5e;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
}

.privacy-content {
  display: grid;
  gap: 1rem;
  padding: 0.5rem 0 1rem;
}

.privacy-content article h2 {
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
  color: #0f5d5e;
}

.privacy-content ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.privacy-content ul li {
  color: #58677d;
  margin-bottom: 0.2rem;
  line-height: 1.45;
}

.privacy-content p {
  color: #58677d;
  line-height: 1.5;
  margin-bottom: 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-copy {
  margin-bottom: 0;
}

.footer-version {
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  margin-bottom: 0;
}

.footer-disclaimer {
  color: #8a94a6;
  font-size: 0.82rem;
  margin-bottom: 0;
}

.footer-nav {
  display: flex;
  gap: 1rem;
}

.footer-nav a {
  color: #0f5d5e;
  font-size: 0.88rem;
}

.device-list,
.order-list {
  display: grid;
  gap: 0.5rem;
}

.device-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #eef1f5;
}

.device-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.device-icon {
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.device-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.device-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.device-meta {
  color: #64748b;
  font-size: 0.8rem;
}

.device-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-active {
  background: #1f9d72;
}

.dot-inactive {
  background: #cbd5e1;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #eef1f5;
}

.order-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.order-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.order-product {
  font-weight: 600;
  font-size: 0.9rem;
}

.order-number {
  color: #94a3b8;
  font-size: 0.78rem;
}

.order-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.order-amount {
  font-weight: 700;
  font-size: 0.9rem;
}

.download-section {
  padding: 1rem 0 2rem;
}

.download-card {
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 480px;
  margin: 0 auto;
}

.download-card h2 {
  margin: 1rem 0 0.5rem;
}

.download-card .btn {
  margin: 1.25rem 0;
}

.download-note {
  color: #94a3b8;
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

.download-icon {
  display: flex;
  justify-content: center;
}

.order-status {
  font-size: 0.78rem;
  font-weight: 600;
}

.status-paid {
  color: #166534;
}

.status-pending {
  color: #b45309;
}

/* Admin layout */
.admin-body {
  margin: 0;
  background: #f1f5f9;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: #1e293b;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #334155;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #f1f5f9;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.sidebar-brand:hover {
  color: #fff;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav li a:hover {
  background: #334155;
  color: #f1f5f9;
}

.sidebar-nav li.active a {
  background: #0f5d5e;
  color: #fff;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.5rem 0;
  border-top: 1px solid #334155;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
}

.sidebar-link:hover {
  background: #334155;
  color: #f1f5f9;
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  min-height: 56px;
}

.admin-topbar-title {
  font-weight: 700;
  color: #1e293b;
  flex: 1;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-sidebar-toggle {
  background: none;
  border: none;
  color: #64748b;
  padding: 0.25rem;
}

.admin-content {
  flex: 1;
  padding: 1.5rem;
  overflow-x: auto;
}

/* Dashboard stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f5d5e;
  line-height: 1.2;
}

.stat-label {
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Dashboard lists */
.dashboard-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.admin-panel h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.permission-matrix .perm-toggle-form { gap: 1rem; }
.permission-matrix .perm-code { flex: 0 0 220px; max-width: 220px; }
.permission-matrix .perm-desc { flex: 1 1 auto; min-width: 0; }

/* Admin filters */
.admin-page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-page-header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.filter-input,
.filter-select {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
  background: #fff;
}

.filter-input {
  min-width: 200px;
}

.filter-field {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.filter-field .field-icon {
  position: absolute;
  left: 0.6rem;
  width: 15px;
  height: 15px;
  color: #64748b;
  pointer-events: none;
}

.filter-field .filter-input.has-icon {
  padding-left: 2rem;
}

.btn-icon {
  width: 14px;
  height: 14px;
  margin-right: 0.35rem;
  flex-shrink: 0;
}

.page-header-icon {
  width: 1.6rem;
  height: 1.6rem;
  color: #0f5d5e;
  flex-shrink: 0;
}

.feature-icon {
  width: 2rem;
  height: 2rem;
  color: #0f5d5e;
  flex-shrink: 0;
}

.feature-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.step-icon {
  width: 2rem;
  height: 2rem;
  color: #0f5d5e;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.stat-icon {
  width: 1.4rem;
  height: 1.4rem;
  color: #0f5d5e;
  margin-bottom: 0.4rem;
}

/* Pagination */
.admin-pagination {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 1rem;
}

/* User detail grid */
.user-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.action-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.action-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.action-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.action-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.action-form .form-control,
.action-form input,
.action-form select {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.88rem;
}

.action-form .btn {
  align-self: flex-start;
}

.user-detail-grid .admin-panel:last-child {
  grid-column: 1 / -1;
}

/* Mobile admin */
@media (max-width: 767.98px) {
  .admin-sidebar {
    display: none;
  }

  .admin-sidebar.show {
    display: flex;
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    height: 100vh;
  }

  .dashboard-lists,
  .user-detail-grid {
    grid-template-columns: 1fr;
  }

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

@media (min-width: 768px) {
  .admin-sidebar-toggle {
    display: none;
  }
}

/* Nav section labels */
.nav-section-label {
  padding: 0.6rem 1rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.05em;
  list-style: none;
}

/* Selection bar */
.selection-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.selection-count {
  font-size: 0.88rem;
  color: #0369a1;
  white-space: nowrap;
}

.selection-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* Resource header */
.resource-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}

.resource-identity {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.resource-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.resource-avatar-initial {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0f5d5e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.resource-name {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
}

.resource-subtitle {
  color: #64748b;
  margin: 0;
  font-size: 0.88rem;
}

.resource-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.status-badge.active { background: #dcfce7; color: #166534; }
.status-badge.suspended { background: #fee2e2; color: #991b1b; }
.status-badge.inactive { background: #f1f5f9; color: #475569; }

/* Command bar */
.command-bar {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* Sub-navigation tabs */
.subnav-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.subnav-tabs .tab-item {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.subnav-tabs .tab-item:hover { color: #0f5d5e; }
.subnav-tabs .tab-item.active { color: #0f5d5e; border-bottom-color: #0f5d5e; }

/* Summary strip */
.summary-strip {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.summary-value {
  font-weight: 700;
  font-size: 1.1rem;
}

.summary-label {
  font-size: 0.78rem;
  color: #64748b;
}

.device-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.device-actions form {
  margin: 0;
}

.remote-control-panel {
  background: #f3f4f6;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1rem;
}

.remote-control-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.remote-control-header h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
}

.remote-control-header p {
  color: #64748b;
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
}

.remote-control-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.remote-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
}

.remote-status-dot.connected {
  background: #16a34a;
}

.remote-empty {
  color: #64748b;
  font-size: 0.9rem;
  padding: 0.75rem 0;
}

.kauto-console {
  background: #e5e7eb;
  border: 1px solid #b9c0cc;
  border-radius: 6px;
  padding: 0.5rem;
}

.kauto-client-list {
  background: #ffffff;
  border: 1px solid #8f98a8;
  height: 118px;
  overflow: auto;
}

.kauto-client-list table {
  border-collapse: collapse;
  font-size: 0.82rem;
  width: 100%;
}

.kauto-client-list th,
.kauto-client-list td {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.32rem 0.45rem;
  white-space: nowrap;
}

.kauto-client-list th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  position: sticky;
  top: 0;
}

.kauto-client-list tr {
  cursor: default;
}

.kauto-client-list tbody tr:hover,
.kauto-client-list tbody tr.active {
  background: #dbeafe;
}

.kauto-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin-top: 0.55rem;
}

.kauto-tab {
  background: #eef2f7;
  border: 1px solid #aeb7c4;
  border-bottom-color: #8f98a8;
  border-radius: 5px 5px 0 0;
  color: #1f2937;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
}

.kauto-tab.active {
  background: #ffffff;
  border-bottom-color: #ffffff;
}

.kauto-tab-pages {
  background: #ffffff;
  border: 1px solid #8f98a8;
  margin-top: -1px;
  min-height: 360px;
  padding: 0.55rem;
}

.kauto-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 0.55rem;
}

.kauto-group {
  border: 1px solid #aeb7c4;
  border-radius: 3px;
  margin: 0;
  min-width: 0;
  padding: 0.65rem 0.55rem 0.55rem;
}

.kauto-group.kauto-wide {
  grid-column: 1 / -1;
}

.kauto-group legend {
  float: none;
  font-size: 0.82rem;
  font-weight: 800;
  margin: 0;
  padding: 0 0.35rem;
  width: auto;
}

.kauto-check,
.kauto-radio-row label,
.kauto-key-grid label,
.kauto-key-delay label {
  align-items: center;
  color: #1f2937;
  display: inline-flex;
  font-size: 0.82rem;
  gap: 0.3rem;
  margin: 0.15rem 0.55rem 0.15rem 0;
}

.kauto-field {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  margin: 0.15rem 0.55rem 0.15rem 0;
}

.kauto-field span {
  color: #475569;
  font-size: 0.78rem;
}

.kauto-field select,
.kauto-field input,
.kauto-input {
  border: 1px solid #9ca3af;
  border-radius: 2px;
  font-size: 0.78rem;
  height: 24px;
  padding: 0.1rem 0.25rem;
  width: 96px;
}

.kauto-field.small input {
  width: 54px;
}

.kauto-input.wide {
  width: min(420px, 100%);
}

.kauto-listbox {
  background: #ffffff;
  border: 1px solid #9ca3af;
  height: 72px;
  margin: 0.35rem 0;
}

.kauto-listbox.large {
  height: 220px;
}

.kauto-static {
  color: #475569;
  display: inline-block;
  font-size: 0.78rem;
  margin: 0.15rem 0.55rem 0.15rem 0;
}

.kauto-radio-row,
.kauto-key-grid,
.kauto-key-delay,
.kauto-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.45rem;
  margin: 0.2rem 0;
}

.kauto-key-delay input {
  border: 1px solid #9ca3af;
  border-radius: 2px;
  height: 22px;
  margin-left: 0.2rem;
  width: 42px;
}

.kauto-mini-table {
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-top: 0.4rem;
  width: 100%;
}

.kauto-mini-table th,
.kauto-mini-table td {
  border: 1px solid #d1d5db;
  padding: 0.25rem;
}

.kauto-mini-table input {
  border: 1px solid #9ca3af;
  height: 22px;
  width: 100%;
}

@media (max-width: 900px) {
  .kauto-config-grid {
    grid-template-columns: 1fr;
  }

  .kauto-tab-pages {
    min-height: 0;
  }
}

/* Bulk upload */
.bulk-upload-panel {
  max-width: 600px;
}

.bulk-upload-panel .file-input {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.bulk-upload-panel .file-input:hover {
  border-color: #0f5d5e;
  background: #f8fafc;
}

.bulk-upload-panel .file-input.has-file {
  border-color: #1f9d72;
  background: #f0fdf4;
}

.bulk-upload-panel .template-link {
  font-size: 0.88rem;
  margin-top: 0.5rem;
  display: block;
}

.admin-header-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 767.98px) {
  .features-grid,
  .pricing-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
  }

  h1 {
    font-size: 2.2rem;
  }
}
