﻿.account-card {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.account-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px;
  border: 0;
  color: #fff;
  text-align: left;
  background: linear-gradient(135deg, #0d6efd, #1746a2);
  cursor: pointer;
}

.account-header:hover {
  filter: brightness(1.03);
}

.account-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.account-email {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  opacity: 0.95;
}

.account-summary {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.account-info {
  display: none;
  padding: 16px;
  border-top: 1px solid #e9ecef;
  background: #fff;
}

.account-info.is-open {
  display: block;
}

.account-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.account-detail {
  padding: 10px 12px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #f8fafc;
}

.account-detail span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.account-detail strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-free {
  color: #166534;
  background: #dcfce7;
}

.status-used {
  color: #fff;
  background: #0d6efd;
}

.status-danger {
  color: #fff;
  background: #dc3545;
}

.status-muted {
  color: #475569;
  background: #e2e8f0;
}

.table-profiles th,
.table-profiles td {
  vertical-align: middle;
}

.empty-state,
.loading-state,
.error-state {
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  text-align: center;
  background: #f8fafc;
}

.error-state {
  color: #842029;
  border-color: #f5c2c7;
  background: #f8d7da;
}

@media (max-width: 768px) {
  .account-header,
  .account-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-details {
    grid-template-columns: 1fr;
  }
}

.account-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.account-form {
  display: none;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.account-form.is-open {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
}

.form-grid .full-row {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.notice-state {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #084298;
  background: #cfe2ff;
}

.notice-state.is-error {
  color: #842029;
  background: #f8d7da;
}

.netshop-login {
  width: min(380px, calc(100% - 32px));
}

.netshop-login-logo {
  width: min(260px, 80%);
  height: auto;
  margin-bottom: 8px;
}

.brand-link .brand-image {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: #070b12;
  border-radius: 8px;
}

[data-bs-theme="dark"] body,
body[data-netshop-theme="dark"] {
  color: #e5e7eb;
  background: #070b12;
}

[data-bs-theme="dark"] .app-wrapper,
[data-bs-theme="dark"] .app-main,
[data-bs-theme="dark"] .app-content,
[data-bs-theme="dark"] .app-content-header,
[data-bs-theme="dark"] .bg-body-tertiary {
  background: #070b12 !important;
}

[data-bs-theme="dark"] .app-header,
[data-bs-theme="dark"] .app-footer,
[data-bs-theme="dark"] .bg-body,
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .account-card,
[data-bs-theme="dark"] .sale-edit-card,
[data-bs-theme="dark"] .mini-metric,
[data-bs-theme="dark"] .liberacion-profile-card,
[data-bs-theme="dark"] .confirm-action-modal {
  color: #e5e7eb;
  border-color: #1f2937;
  background: #0f172a !important;
}

[data-bs-theme="dark"] .app-sidebar,
[data-bs-theme="dark"] .bg-body-secondary {
  background: #020617 !important;
}

[data-bs-theme="dark"] .sale-edit-header,
[data-bs-theme="dark"] .sale-form,
[data-bs-theme="dark"] .sale-free-list,
[data-bs-theme="dark"] .edit-account-form,
[data-bs-theme="dark"] .filter-panel,
[data-bs-theme="dark"] .account-form,
[data-bs-theme="dark"] .account-info,
[data-bs-theme="dark"] .account-detail,
[data-bs-theme="dark"] .empty-state,
[data-bs-theme="dark"] .loading-state,
[data-bs-theme="dark"] .combo-profile-list,
[data-bs-theme="dark"] .combo-profile-option,
[data-bs-theme="dark"] .liberacion-order,
[data-bs-theme="dark"] .confirm-action-detail {
  color: #e5e7eb;
  border-color: #243244;
  background: #111827 !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] .input-group-text {
  color: #e5e7eb;
  border-color: #334155;
  background-color: #0b1220;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  color: #fff;
  border-color: #60a5fa;
  background-color: #0b1220;
  box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.2);
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .form-text,
[data-bs-theme="dark"] .mini-metric span,
[data-bs-theme="dark"] .account-detail span,
[data-bs-theme="dark"] .liberacion-profile-detail {
  color: #9ca3af !important;
}

[data-bs-theme="dark"] .mini-metric strong,
[data-bs-theme="dark"] .account-detail strong {
  color: #f9fafb;
}

[data-bs-theme="dark"] .table {
  --bs-table-color: #e5e7eb;
  --bs-table-bg: #0f172a;
  --bs-table-border-color: #243244;
  --bs-table-hover-color: #fff;
  --bs-table-hover-bg: #111f35;
}

[data-bs-theme="dark"] .modal-content {
  color: #e5e7eb;
  background: #0f172a;
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-body,
[data-bs-theme="dark"] .login-card-body {
  color: #e5e7eb;
  background: #0f172a;
}

@media (max-width: 768px) {
  .account-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

.account-actions {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 14px;
}

.edit-account-form {
  margin-top: 0;
  background: #fff;
}

.sale-form {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.sale-summary {
  margin-top: 16px;
}

.sale-free-list {
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.sale-filter {
  min-width: min(320px, 100%);
}

.sale-edit-card {
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.sale-edit-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.sale-edit-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.sale-edit-form {
  padding: 16px;
}

@media (max-width: 768px) {
  .sale-edit-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sale-edit-badges {
    justify-content: flex-start;
  }

  .renewal-direct-header,
  .renewal-direct-controls {
    grid-template-columns: 1fr;
  }

  .renewal-direct-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sale-edit-toggle {
  width: 100%;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.sale-edit-toggle:hover {
  background: #eef6ff;
}

.sale-edit-panel {
  display: none;
}

.sale-edit-panel.is-open {
  display: block;
}

.renewal-direct-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-bottom: 0;
}

.renewal-direct-info {
  min-width: 0;
}

.renewal-direct-info .small {
  overflow-wrap: anywhere;
}

.renewal-direct-controls {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: center;
}

.renewal-direct-badges {
  flex-wrap: nowrap;
}

.renewal-direct-actions {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 8px;
}

.renewal-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
}

.confirm-renewal-form {
  display: grid;
  gap: 10px;
}

.dashboard-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.dashboard-line:last-child {
  border-bottom: 0;
}

.combo-profile-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}

.combo-profile-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
}

.combo-profile-option:has(input:checked) {
  border-color: #0d6efd;
  background: #eef6ff;
}

.combo-profile-option span {
  line-height: 1.3;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.renewal-summary {
  margin-bottom: 16px;
}

.mini-metric {
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.mini-metric span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.mini-metric strong {
  display: block;
  color: #111827;
  font-size: 20px;
}

@media (max-width: 992px) {
  .filter-panel {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 576px) {
  .renewal-direct-actions {
    grid-template-columns: 1fr;
  }

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

.liberacion-filter-panel {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.liberacion-list {
  display: grid;
  gap: 10px;
}

.liberacion-profile-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.liberacion-profile-card:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.liberacion-profile-card:has(input:checked) {
  border-color: #0d6efd;
  background: #eef6ff;
}

.liberacion-profile-select {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  cursor: pointer;
}

.liberacion-profile-select input {
  margin-top: 4px;
}

.liberacion-profile-body {
  display: grid;
  gap: 8px;
  width: 100%;
}

.liberacion-profile-main,
.liberacion-profile-detail,
.liberacion-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.liberacion-profile-detail {
  color: #475569;
  font-size: 13px;
}

.liberacion-copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 28px;
}

.liberacion-order {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.confirm-action-modal {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.confirm-action-detail {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  background: #f8fafc;
  font-size: 14px;
}

@media (max-width: 576px) {
  .liberacion-filter-panel {
    grid-template-columns: 1fr;
  }

  .liberacion-profile-card {
    padding: 12px;
  }
}
