/* Portal-specific styles — extends the main WebStream design system (../../../css/style.css) */
/* Customer Entitlement Portal — login, dashboard, settings, audit */

/* ============================================
   PORTAL LAYOUT & BODY OVERRIDES
   ============================================
   The main style.css is a dark-theme marketing site.
   The portal uses a light theme, so we scope all overrides
   under .portal-body to avoid specificity collisions.
   ============================================ */

.portal-body {
  background: var(--color-light-bg);
  color: var(--color-text-dark);
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.portal-body p,
.portal-body li,
.portal-body span {
  color: inherit;
}

.portal-body a {
  color: var(--color-primary);
}

.portal-body a:hover {
  color: var(--color-primary-dark);
}

.portal-body h1,
.portal-body h2,
.portal-body h3,
.portal-body h4 {
  color: var(--color-text-dark);
}

.portal-container {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}

/* ---- Override main style.css .form-group input (specificity fix) ---- */
.portal-body .form-group input,
.portal-body .form-group select,
.portal-body .form-group textarea,
.portal-body .form-input {
  background: #fafbfc;
  color: var(--color-text-dark);
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 10px 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.portal-body .form-group input::placeholder,
.portal-body .form-group textarea::placeholder,
.portal-body .form-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.portal-body .form-group input:focus,
.portal-body .form-group select:focus,
.portal-body .form-group textarea:focus,
.portal-body .form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(247, 147, 30, 0.15);
  background: white;
  color: var(--color-text-dark);
}

.portal-body .form-group label {
  color: var(--color-text-dark);
}

/* ---- Override main style.css .card hover (no dark-theme glow/float) ---- */
.portal-body .card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.portal-body .card:hover {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-md);
  transform: none;
}

.portal-body .card p {
  color: #4b5563;
}

/* ---- Override dark-theme code tag for portal light theme ---- */
.portal-body code {
  background: #e5e7eb;
  color: var(--color-text-dark);
}

/* ---- Override table styles for light theme ---- */
.portal-body thead {
  background: #f9fafb;
}

.portal-body th {
  color: #6b7280;
}

.portal-body th,
.portal-body td {
  border-color: #e5e7eb;
}

.portal-body tbody tr:hover {
  background: #f9fafb;
}

/* ============================================
   PORTAL NAV (minimal, separate from marketing)
   ============================================ */

.portal-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--color-dark-bg);
  border-bottom: 1px solid var(--color-border-dark);
  display: flex;
  align-items: center;
  padding: 0 var(--space-xl);
}

.portal-nav-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: var(--space-xl);
}

.portal-nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-text-light);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.portal-nav-logo img {
  height: 32px;
  width: 32px;
}

.portal-nav-badge {
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--color-primary);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-family: var(--font-body);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.portal-nav-links a:hover,
.portal-nav-links a.active {
  color: var(--color-text-light);
  background: rgba(255, 255, 255, 0.08);
}

.portal-nav-spacer {
  flex: 1;
}

.portal-nav-account {
  color: var(--color-text-light);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: var(--space-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.portal-nav-logout {
  color: var(--color-text-muted) !important;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  padding: var(--space-xs) var(--space-md) !important;
  border-radius: var(--radius-sm) !important;
}

.portal-nav-logout:hover {
  color: #ff6b6b !important;
  border-color: #ff6b6b !important;
  background: rgba(255, 107, 107, 0.1) !important;
}

/* ============================================
   ACCOUNT-TYPE CHIP (shown on account page)
   ============================================ */

.portal-role-chip {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  vertical-align: middle;
  margin-left: var(--space-sm);
  position: relative;
  top: -2px;
}

.portal-role-admin {
  background: linear-gradient(135deg, #f79321, #e5820e);
  color: white;
}

.portal-role-support {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.portal-role-partner {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.portal-role-customer {
  background: #e5e7eb;
  color: #374151;
}

/* ============================================
   LOGIN / AUTH CARD
   ============================================ */

.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: var(--space-2xl);
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3xl) var(--space-2xl);
  width: 100%;
  max-width: 440px;
}

.auth-card h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-xs);
  text-align: center;
}

.auth-card .auth-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
  margin-bottom: var(--space-2xl);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.portal-body .form-group {
  margin-bottom: var(--space-lg);
}

.portal-body .form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: var(--space-xs);
  font-family: var(--font-body);
}

.form-input-mono {
  font-family: var(--font-mono) !important;
  letter-spacing: 2px !important;
  font-size: 1rem !important;
  text-align: center !important;
}

.form-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 4px;
  margin-bottom: 0;
}

.form-error {
  font-size: 0.8rem;
  color: #dc3545;
  margin-top: 4px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-portal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-portal-primary {
  background: var(--gradient-primary);
  color: white;
  width: 100%;
}

.btn-portal-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-portal-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-portal-secondary {
  background: white;
  color: var(--color-text-dark);
  border: 1px solid #d1d5db;
}

.btn-portal-secondary:hover {
  background: var(--color-light-bg);
  border-color: #9ca3af;
}

.btn-portal-danger {
  background: #dc3545;
  color: white;
}

.btn-portal-danger:hover {
  background: #c82333;
}

.btn-portal-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-portal-icon {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #6b7280;
  transition: all var(--transition-fast);
}

.btn-portal-icon:hover {
  background: var(--color-light-bg);
  color: var(--color-text-dark);
}

/* ============================================
   ALERT MESSAGES
   ============================================ */

.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: var(--space-lg);
  font-family: var(--font-body);
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-hidden {
  display: none;
}

/* ============================================
   DASHBOARD CARDS
   ============================================ */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0;
}

.page-header-actions {
  display: flex;
  gap: var(--space-sm);
}

.portal-body .card {
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  overflow: hidden;
}

.portal-body .card-header {
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.portal-body .card-header h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin: 0;
}

.portal-body .card-body {
  padding: var(--space-xl);
}

/* ============================================
   ENTITLEMENT CARDS
   ============================================ */

.ent-card {
  border-left: 4px solid var(--color-primary);
  transition: box-shadow var(--transition-fast);
}

.ent-card:hover {
  box-shadow: var(--shadow-md);
  transform: none;
}

.ent-card-cancelled {
  border-left-color: #dc3545;
}

.ent-card-collapsed {
  opacity: 0.6;
}

.ent-card-collapsed:hover {
  opacity: 0.85;
}

.ent-tenant-struck {
  text-decoration: line-through;
  color: #9ca3af;
}

.ent-expand-toggle {
  padding: 2px 8px !important;
  font-size: 0.65rem !important;
  line-height: 1 !important;
  border: 1px solid #d1d5db !important;
  background: transparent !important;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: #6b7280;
}

.ent-expand-toggle:hover {
  background: #f3f4f6 !important;
  color: var(--color-text-dark);
}

.ent-card-pending {
  border-left-color: #ffc107;
}

.ent-card-expired {
  border-left-color: #6c757d;
  opacity: 0.75;
}

.ent-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.ent-tenant {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.btn-copy-tenant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 5px;
  margin-right: 4px;
  cursor: pointer;
  color: var(--color-text-muted, #6b7280);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  vertical-align: middle;
  flex-shrink: 0;
}
.btn-copy-tenant:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.06);
}
.btn-copy-tenant.copied {
  color: #10b981;
  border-color: #10b981;
}

.ent-badges {
  display: flex;
  gap: var(--space-xs);
  margin-left: auto;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-active   { background: #d1fae5; color: #065f46; }
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-expired  { background: #f3f4f6; color: #6b7280; }
.badge-cancelled { background: #fef2f2; color: #991b1b; }
.badge-revoked  { background: #fef2f2; color: #991b1b; }
.badge-core     { background: #ede9fe; color: #5b21b6; }
.badge-standard { background: #dbeafe; color: #1e40af; }
.badge-professional { background: #fce7f3; color: #9d174d; }
.badge-enterprise   { background: #fef3c7; color: #92400e; }

.ent-details-section {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid #f1f3f5;
}

.ent-details-section:first-child {
  border-top: none;
  padding-top: 0;
}

.ent-details-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9ca3af;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ent-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  font-size: 0.82rem;
}

.ent-detail-item {
  min-width: 0;
}

.ent-detail-label {
  color: #6b7280;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.ent-detail-value {
  color: var(--color-text-dark);
  font-weight: 500;
}

.ent-contact-email-display {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.ent-contact-email-text {
  word-break: break-word;
  overflow-wrap: break-word;
}

.btn-edit-email {
  padding: 2px 6px !important;
  font-size: 0.75rem !important;
  border: 1px solid #e5e7eb !important;
  background: transparent !important;
  cursor: pointer;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.btn-edit-email:hover {
  background: #f3f4f6 !important;
}

.ent-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid #f1f3f5;
  flex-wrap: wrap;
  align-items: center;
}

/* Edition change dropdown — custom styled select */
.ent-edition-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fafbfc;
  color: var(--color-text-dark);
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 2.5rem 8px 14px;
  cursor: pointer;
  width: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ent-edition-select:hover {
  border-color: #9ca3af;
}

.ent-edition-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(247, 147, 30, 0.15);
  background-color: white;
}

.ent-edition-select option {
  background: white;
  color: var(--color-text-dark);
}

/* ============================================
   INSTALLER DOWNLOAD SECTION
   ============================================ */

.ent-download-section {
  background: #f9fafb;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-lg);
}

.ent-download-area {
  margin-top: var(--space-sm);
}

.ent-download-build {
  margin-bottom: var(--space-lg);
}

.ent-download-build:last-child {
  margin-bottom: 0;
}

.ent-download-build-header {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-text-dark);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--color-primary);
}

.ent-download-version-group {
  padding: var(--space-sm) 0;
}

.ent-download-version-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ent-download-version-old {
  opacity: 0.8;
  border-top: 1px solid #e5e7eb;
}

.ent-download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xs) 0;
  padding-left: var(--space-md);
}

.ent-download-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}

.ent-download-file-type {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.ent-dl-type-exe {
  background: #dbeafe;
  color: #1e40af;
}

.ent-dl-type-doc {
  background: #f3f4f6;
  color: #6b7280;
}

.ent-download-file {
  font-size: 0.75rem;
  color: #6b7280;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ent-download-btn {
  flex-shrink: 0;
  width: auto !important;
}

.ent-download-older-toggle {
  display: block;
  width: 100%;
  background: none;
  border: 1px dashed #d1d5db;
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  text-align: center;
  margin-top: var(--space-sm);
  transition: all var(--transition-fast);
}

.ent-download-older-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: #fffbf5;
}

/* ============================================
   AUDIT LOG TABLE
   ============================================ */

.audit-table-wrap {
  overflow-x: auto;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-family: var(--font-body);
}

.audit-table th {
  text-align: left;
  font-weight: 600;
  color: #6b7280;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.audit-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid #f3f4f6;
  color: var(--color-text-dark);
  vertical-align: top;
}

.audit-table tr:hover td {
  background: #fafbfc;
}

.audit-action-auth {
  color: #6b7280;
}

.audit-action-ent {
  color: #d97706;
  font-weight: 600;
}

.audit-action-cancel {
  color: #dc3545;
  font-weight: 600;
}

.audit-timestamp {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #9ca3af;
  white-space: nowrap;
}

.audit-ip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #9ca3af;
}

.audit-load-more {
  text-align: center;
  padding: var(--space-xl);
}

/* ============================================
   SETTINGS
   ============================================ */

.settings-section {
  margin-bottom: var(--space-2xl);
}

.settings-section h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: var(--space-lg);
}

.portal-body .mfa-status span {
  color: var(--color-text-dark);
}

.mfa-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.mfa-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mfa-dot-on  { background: #22c55e; }
.mfa-dot-off { background: #d1d5db; }

.qr-container {
  text-align: center;
  margin: var(--space-xl) 0;
}

.qr-container canvas,
.qr-container img {
  border: 4px solid white;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
}

/* ============================================
   ACCOUNT PAGE
   ============================================ */

.portal-body textarea.form-input {
  font-family: var(--font-body);
  line-height: 1.5;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-dark {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: var(--color-primary);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl);
}

/* ============================================
   LINKS
   ============================================ */

.portal-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
}

.portal-link:hover {
  text-decoration: underline;
  color: var(--color-primary-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  .portal-container {
    padding: var(--space-lg) var(--space-md);
  }

  .auth-card {
    padding: var(--space-2xl) var(--space-lg);
  }

  .portal-nav-account {
    display: none;
  }

  .portal-nav-links {
    gap: var(--space-xs);
  }

  .portal-nav-links a {
    font-size: 0.78rem;
    padding: var(--space-xs);
  }

  .ent-details {
    grid-template-columns: 1fr 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .audit-table {
    font-size: 0.75rem;
  }
}

/* ============================================
   MODAL / DIALOG
   ============================================ */

.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.modal-backdrop.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2xl);
  max-width: 480px;
  width: 100%;
}

.modal-content h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  margin-top: var(--space-xl);
}

.modal-body-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--color-text-dark);
  margin: var(--space-md) 0;
}

.modal-body-warning {
  color: #991b1b;
}

.modal-consent-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--color-text-dark);
  background: #fef9c3;
  border-left: 3px solid #ca8a04;
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin: var(--space-md) 0;
}

.modal-post-action {
  font-size: 0.85rem;
  line-height: 1.6;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-left: 3px solid #059669;
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  color: #065f46;
}

/* ============================================
   ENTITLEMENT FILTER DROPDOWN
   ============================================ */

.ent-filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fafbfc;
  color: var(--color-text-dark);
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  padding: 0.35rem 2rem 0.35rem 0.65rem;
  font-size: 0.82rem;
  font-family: var(--font-body);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 8l3-3.5H3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  transition: border-color 0.2s;
}

.ent-filter-select:hover {
  border-color: #9ca3af;
}

.ent-filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(247, 147, 30, 0.15);
}

/* ============================================
   RENEWAL INFO ICON & DISABLED RENEW BUTTON
   ============================================ */

.ent-renew-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ent-renew-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ent-renew-caption {
  margin: 0.25rem 0 0 0;
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.3;
}

/* ============================================
   MODAL FORM LAYOUT HELPERS
   ============================================ */

.form-row {
  display: flex;
  gap: var(--space-md);
}

.form-group-half {
  flex: 1;
}

.form-required {
  color: #dc2626;
}