:root {
  --blue-600: #1e88e5;
  --blue-500: #42a5f5;
  --blue-100: #e3f2fd;
  --gray-50: #f3f5fb;
  --gray-100: #e8ebf5;
  --gray-300: #d0d6e4;
  --text-dark: #203049;
  --text-muted: #5b6880;
  --card-radius: 10px;
  --shadow-soft: 0 8px 18px rgba(22, 45, 89, 0.06);
  --sidebar-width: 240px;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--gray-50);
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--blue-100);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  border-right: 1px solid var(--gray-300);
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.2s ease, transform 0.3s ease;
  z-index: 100;
}

.sidebar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 18px;
}

.sidebar .logo .mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
}

.client-info {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 12px;
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}

.client-info .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.client-info .value {
  font-weight: 600;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.menu-item .icon {
  width: 22px;
  display: inline-flex;
  justify-content: center;
  color: var(--blue-600);
}

.menu-item:hover {
  background: rgba(66, 165, 245, 0.12);
  color: var(--text-dark);
}

.menu-item.active {
  background: #fff;
  color: var(--blue-600);
  border-left-color: var(--blue-600);
  box-shadow: inset 0 0 0 1px rgba(30, 136, 229, 0.06);
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: 64px;
  background: var(--blue-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 4px 12px rgba(18, 62, 120, 0.2);
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar .top-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 0;
}

.top-tab {
  padding: 8px 14px;
  border-radius: 10px;
  background: transparent;
  color: #e3f2fd;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.top-tab.active {
  background: #fff;
  color: var(--blue-600);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  border-color: rgba(227, 242, 253, 0.8);
}

.topbar .top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(227, 242, 253, 0.16);
  color: #fff;
  font-weight: 600;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(227, 242, 253, 0.2);
  padding: 6px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.content {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
  background: var(--gray-50);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.metrics {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background: #fff;
  border-radius: var(--card-radius);
  border: 1px solid var(--gray-300);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.card-header h3 {
  margin: 0;
  font-size: 18px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.btn {
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.3;
  font-weight: 600;
  background: #fff;
  color: var(--text-dark);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary,
.btn.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.btn-primary:hover,
.btn.primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-secondary,
.btn.secondary {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

.btn-secondary:hover,
.btn.secondary:hover {
  background: #e5e7eb;
}

.metric-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  background: #fff;
}

.metric-box .metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--blue-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-600);
  font-weight: 700;
}

.metric-box .metric-value {
  font-size: 20px;
  font-weight: 700;
}

.metric-box .metric-label {
  font-size: 12px;
  color: var(--text-muted);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--card-radius);
  border: 1px solid var(--gray-300);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: #fff;
}

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray-300);
}

th {
  background: var(--gray-100);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
}

tr:nth-child(even) td {
  background: #fafbff;
}

tr:hover td {
  background: rgba(66, 165, 245, 0.08);
}

.placeholder-chart {
  height: 260px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--card-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: #fff;
}

.layout-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.layout-two-columns .column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.muted {
  color: var(--text-muted);
}

.contact-actions {
  align-items: center;
}

.btn.btn-outline {
  background: transparent;
  color: var(--text-dark);
  border-color: var(--gray-300);
}

.btn.small {
  padding: 6px 10px;
  font-size: 13px;
}

.btn-small {
  padding: 6px 10px;
  font-size: 13px;
}

.btn.danger {
  border-color: #e53935;
  color: #e53935;
}

.btn-disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.table-actions {
  display: flex;
  gap: 6px;
}

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

.detail-grid .label {
  color: var(--text-muted);
  font-size: 12px;
}

.detail-grid .value {
  font-weight: 700;
}

.customer-pods {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-300);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.input,
input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  font-size: 14px;
}

/* Overlay a schermo intero */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.is-hidden {
  display: none;
}

/* Card della modale */
.modal-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  max-width: 720px;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.modal-card.large {
  max-width: 960px;
}

.modal-card header,
.modal-card .modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eef1f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-card header h3,
.modal-card .modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.modal-card .modal-body {
  padding: 16px 20px;
  overflow-y: auto;
}

.modal-card .modal-actions {
  padding: 12px 20px 16px;
  border-top: 1px solid #eef1f7;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-card .modal-actions .spacer {
  flex: 1 1 auto;
}

/* Form dentro la modale */
.modal-card form label {
  display: block;
  font-size: 13px;
  margin-bottom: 12px;
  color: #4b5563;
}

.modal-card form label span,
.modal-card form label .label-text {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.upload-dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  background: #f9fafb;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-dropzone:hover {
  border-color: var(--primary-500);
  background: #f4f7ff;
}

.upload-dropzone.dragging {
  border-color: var(--primary-600);
  background: #eef2ff;
}

.upload-dropzone input[type="file"] {
  display: none;
}

.upload-dropzone .title {
  margin: 0;
  font-weight: 600;
  color: #111827;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 12px 0;
}

.preview-meta .warning {
  background: #fef3c7;
  color: #92400e;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #f59e0b;
}

.modal-card input[type="text"],
.modal-card input[type="number"],
.modal-card input[type="email"],
.modal-card select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-card input:focus,
.modal-card select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

/* Mobile */
@media (max-width: 640px) {
  .modal-card {
    width: 95%;
    max-width: 100%;
    border-radius: 12px;
  }
}

#pod-consumi-section {
  margin-top: 16px;
  padding: 12px;
}

.pod-consumi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.pod-consumi-header h4 {
  margin: 0;
}

.consumptions-table-wrapper {
  overflow-x: auto;
}

#pod-consumi-table {
  width: 100%;
}

.row-selected td {
  background: rgba(66, 165, 245, 0.12) !important;
}

.topbar .hamburger {
  display: none;
  cursor: pointer;
  padding: 8px;
  margin-right: 10px;
}

@media (max-width: 1200px) {
  :root {
    --sidebar-width: 220px;
  }
}

@media (max-width: 992px) {
  .sidebar {
    width: 72px;
  }

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

  .sidebar .logo span,
  .client-info,
  .menu-item .label,
  .client-info .label,
  .client-info .value {
    display: none;
  }

  .sidebar .logo {
    justify-content: center;
  }

  .menu-item {
    justify-content: center;
    padding: 12px 8px;
  }

  .menu-item .icon {
    margin: 0;
  }
}

@media (max-width: 768px) {
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    width: 240px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  }

  .topbar .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
  }

  .main-area {
    width: 100%;
  }

  .topbar {
    gap: 10px;
  }

  .content {
    padding: 14px;
  }

  .grid.metrics {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .topbar .top-tabs {
    overflow-x: auto;
  }
}

@media (max-width: 540px) {
  .card {
    padding: 14px;
  }

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

.users-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.form-inline,
.assign-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 16px 12px 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding: 0 16px 12px 16px;
}

.form-grid.three-cols {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stacked .table-wrapper {
  margin-top: 8px;
}

.badge.muted {
  background: #eef1f4;
  color: #4a5568;
}

.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  background: #f9fafb;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-area.is-hovered {
  border-color: var(--blue-500);
  background: #eef5ff;
}

.upload-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.upload-title {
  font-weight: 700;
  margin: 0;
}

.selected-file {
  margin-top: 8px;
  font-size: 13px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-tag.muted {
  background: #eef1f4;
  color: #4a5568;
  border-color: #e5e7eb;
}

.status-tag.info {
  background: #e0ecff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.status-tag.success {
  background: #ecfdf3;
  color: #0f7a3a;
  border-color: #bbf7d0;
}

.status-tag.warning {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.status-tag.danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecdd3;
}

.card-actions.align-end {
  justify-content: flex-end;
}

.import-metrics .metric-icon {
  background: var(--gray-100);
}

/* --- PORTALE CLIENTE --- */
.hidden {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal-dialog {
  background: #fff;
  border-radius: 12px;
  width: min(900px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.modal-header,
.modal-footer {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-body {
  padding: 0 20px 20px;
  overflow: auto;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

.mandato-body {
  white-space: pre-wrap;
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.portal-body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, #eef3fb 100%);
  color: var(--text-dark);
  min-height: 100vh;
}

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid var(--gray-300);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 20;
}

.portal-topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-topbar .mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.brand-text .suite-name {
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-text .suite-subtitle {
  color: var(--text-muted);
  font-size: 13px;
}

.portal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--text-dark);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(30, 136, 229, 0.12);
}

.portal-content {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 14px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-message {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--gray-300);
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-weight: 600;
}

.portal-message.error {
  border-color: #ef4444;
  color: #b91c1c;
  background: #fff1f2;
}

.portal-message.warning {
  border-color: #f59e0b;
  color: #92400e;
  background: #fffbeb;
}

.portal-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--gray-300);
}

.btn.ghost {
  background: #fff;
  border-color: var(--gray-300);
  color: var(--text-dark);
}

.portal-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 13px;
}

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

.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.pill {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-dark);
}

.info-grid .label,
.list-item .label,
.pod-card .label,
.kpi-card .label,
.drawer-label {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0 0 4px 0;
}

.info-grid .value,
.pod-card .value,
.list-item h3,
.kpi-card h3 {
  margin: 0;
  font-weight: 700;
}

.pod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.pod-card {
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pod-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pod-header h3 {
  margin: 0 0 2px 0;
}

.pod-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pod-actions {
  display: flex;
  align-items: center;
}

.muted {
  color: var(--text-muted);
  margin: 4px 0 0 0;
}

.inline-import {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.text-muted {
  font-size: 0.8rem;
  opacity: 0.7;
}

.hidden {
  display: none;
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.badge.subtle {
  background: #eef5ff;
  color: var(--blue-600);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.kpi-card {
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
}

.report-output {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-output textarea {
  width: 100%;
  min-height: 160px;
  border-radius: 10px;
  border: 1px solid var(--gray-300);
  padding: 10px;
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  background: #f7fafc;
}

.drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.drawer.open {
  display: flex;
}

.drawer-content {
  background: #fff;
  width: min(760px, 100%);
  max-height: 90vh;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  overflow: auto;
}

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

.drawer-header h3 {
  margin: 0;
}

.app-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, rgba(66, 165, 245, 0.12), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(30, 136, 229, 0.14), transparent 45%),
    #0f172a;
  color: #e5ecf5;
  padding: 24px;
}

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

.login-card {
  background: linear-gradient(135deg, rgba(16, 24, 40, 0.95), rgba(11, 15, 25, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  color: #e5ecf5;
  padding: 32px;
  text-align: center;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-bottom: 10px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
}

.brand-subtitle {
  color: #b8c4d6;
  font-size: 14px;
}

.login-subtitle {
  color: #c8d3e5;
  margin-top: 8px;
  margin-bottom: 24px;
}

.login-button {
  width: 100%;
  font-size: 16px;
  padding: 12px 16px;
  margin-top: 4px;
}

.text-error {
  color: #f97373;
  margin-top: 14px;
  font-size: 14px;
}

.page-tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 16px;
}

.tab-button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.tab-button.is-active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.cer-tab-pane.is-hidden {
  display: none;
}

.cer-tab-pane.is-active {
  display: block;
}

@media (max-width: 720px) {
  .portal-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .pod-body {
    flex-direction: column;
    align-items: flex-start;
  }
}
