/* Admin Panel Styles */
.admin-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  /* Visual style inherited from .panel-section or .panel */
}

.admin-invite-section {
  margin-bottom: 1.25rem;
  /* Visual style inherited from .panel-section or .panel */
}

.invite-form-container {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  /* Visual style inherited from .panel-section or .panel */
}

.invite-form-container input {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  /* Visual style inherited from .apple-input */
}

.message-text {
  font-size: 0.9rem;
  color: var(--accent-color);
  margin-top: 0.5rem;
  min-height: 1.5rem;
}

.admin-table-container {
  overflow-x: auto;
  border: 1px solid var(--color-border-light, #eaeaea);
  margin-bottom: 1rem;
  /* Visual style inherited from .panel */
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  /* Visual style inherited from .panel */
}


/* Form controls in tables */
.admin-table select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-background);
  font-size: 0.85rem;
  max-width: 200px;
  /* Visual style inherited from .apple-input */
}

.admin-table select[multiple] {
  height: auto;
  /* Visual style inherited from .apple-input */
  min-height: 80px;
}

/* Minimal, dense admin table */
.admin-table th,
.admin-table td {
  padding: 0.35rem 0.5rem;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--color-border);
  background: none;
  color: #222;
}

.admin-table th {
  font-weight: 500;
  color: #666;
  background: #fafbfc;
}

.admin-table tbody tr:hover {
  background-color: #f5f5f5;
}

.admin-email-cell,
.admin-map-plan-cell,
.admin-status-cell,
.admin-roles-cell,
.admin-edit-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.admin-map-plan-cell {
  max-width: 120px;
  font-family: monospace;
  font-size: 0.85rem;
}

.admin-status-cell {
  text-align: center;
  max-width: 60px;
}


.admin-edit-cell {
  text-align: center;
  width: 36px;
}

/* Hide legacy action buttons */
.admin-table .action-buttons,
.admin-table .btn-action {
  display: none !important;
}

/* Edit (⋯) button */
.admin-edit-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.admin-edit-btn:hover,
.admin-edit-btn:focus {
  background: #ececec;
  color: #222;
  outline: none;
}

/* Minimal popover for actions */
.user-actions-popover {
  z-index: 10000;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  padding: 0.5rem 0.75rem;
  min-width: 200px;
  font-size: 0.97rem;
  color: #222;
}

.user-actions-popover .popover-header {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.4rem;
  font-weight: 500;
  word-break: break-all;
}

.user-actions-popover .popover-action {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #222;
  text-align: left;
  padding: 0.27rem 0.2rem;
  border-radius: 3px;
  margin-bottom: 2px;
  font-size: 0.97rem;
  cursor: pointer;
  transition: background 0.13s;
}

.user-actions-popover .popover-action:hover,
.user-actions-popover .popover-action:focus {
  background: #f0f0f0;
  color: #111;
  outline: none;
}

.user-actions-popover .popover-action.text-danger {
  color: #b33;
}

.user-actions-popover .popover-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: #bbb;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
}

.user-actions-popover .popover-close:hover {
  color: #666;
}

/* Minimal modal for editing plan/roles */
.simple-modal {
  z-index: 10001;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 30, 30, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
}

.simple-modal-content {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.13);
  min-width: 300px;
  max-width: 95vw;
  padding: 0 0 0.7rem 0;
  color: #222;
}

.simple-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.1rem 0.2rem 1.1rem;
  border-bottom: 1px solid #eee;
}

.simple-modal-title {
  font-weight: 500;
  font-size: 1.05rem;
  color: #444;
}

.simple-modal-close {
  background: none;
  border: none;
  color: #bbb;
  font-size: 1.2rem;
  cursor: pointer;
}

.simple-modal-close:hover {
  color: #333;
}

.simple-modal-body {
  padding: 1rem 1.1rem 0.2rem 1.1rem;
}

.simple-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.5rem 1.1rem 0.5rem 1.1rem;
}

.simple-modal-confirm,
.simple-modal-cancel {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  color: #222;
  padding: 0.36rem 1.1rem;
  border-radius: 5px;
  font-size: 0.97rem;
  cursor: pointer;
  transition: background 0.13s;
}

.simple-modal-confirm:hover,
.simple-modal-cancel:hover {
  background: #ececec;
}

.simple-modal-confirm {
  font-weight: 500;
  color: #1a1a1a;
}

.simple-modal-cancel {
  color: #666;
}


/* Status indicators */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}


/* Admin table status colors - higher specificity to override Bootstrap */
.admin-table .admin-status-active {
  color: #28a745 !important;
  font-weight: bold !important;
}

.admin-table .admin-status-trial {
  color: #17a2b8 !important;
  font-weight: bold !important;
}

.admin-table .admin-status-canceling {
  color: #ffc107 !important;
  font-weight: bold !important;
}

.admin-table .admin-status-canceled {
  color: #dc3545 !important;
  font-weight: bold !important;
}

.admin-table .admin-status-free {
  color: #6c757d !important;
}

/* Success checkmark animation */
.success-update {
  position: relative;
  transition: background-color 0.3s ease;
}

/* Highlight the select itself */
.success-update {
  animation: highlightSuccess 1.5s ease-in-out;
}

/* Add a more visible checkmark */
.success-update::after {
  content: '✓';
  position: absolute;
  right: -35px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  background-color: var(--success-color);
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: checkmarkFadeInOut 1.5s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes highlightSuccess {
  0% {
    background-color: transparent;
  }

  30% {
    background-color: rgba(52, 199, 89, 0.1);
  }

  70% {
    background-color: rgba(52, 199, 89, 0.1);
  }

  100% {
    background-color: transparent;
  }
}

@keyframes checkmarkFadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.5);
  }

  30% {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
  }

  70% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-50%) scale(1);
  }
}

/* Plan selector styling */
.plan-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1em;
  padding-right: 2rem;
}

/* Account Tab Styling */
#account-tab .section-header {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-light, #eaeaea);
  padding-bottom: 0.75rem;
}

#account-tab .section-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary, #333);
  margin-bottom: 0.25rem;
}

#account-tab .section-header p {
  color: var(--color-text-secondary, #666);
  font-size: 0.9rem;
  margin: 0;
}

/* Account sections styling */
.account-section {
  margin-bottom: 1.25rem;
  background: var(--card-background, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 1rem 1rem 0.75rem;
}

.account-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary, #333);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-light, #eef0f2);
}

/* Profile Info */
.profile-info {
  margin-bottom: 1rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.settings-container .info-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--color-border-light, #eaeaea);
}

.settings-container .info-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-container .info-row label {
  font-weight: 500;
  color: var(--color-text-secondary, #666);
  width: 120px;
  flex-shrink: 0;
}

.settings-container .info-row span {
  font-weight: 500;
  color: var(--color-text-primary, #333);
}

/* Action Buttons */
.settings-container .action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.settings-container .btn-action {
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.settings-container .btn-action:hover {
  transform: translateY(-1px);
}

.settings-container .btn-action:active {
  transform: translateY(0);
}

.settings-container .btn-action.primary {
  background-color: var(--primary-color, #2563eb);
  color: white;
}

.settings-container .btn-action.primary:hover {
  background-color: var(--primary-color-dark, #1d4ed8);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.settings-container .btn-action.secondary {
  background-color: var(--color-background-alt, #f5f5f5);
  color: var(--color-text-primary, #333);
  border: 1px solid var(--color-border, #ddd);
}

.settings-container .btn-action.secondary:hover {
  background-color: var(--color-background, #eee);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.settings-container .btn-action.danger {
  background-color: var(--danger-color, #dc2626);
  color: white;
}

.settings-container .btn-action.danger:hover {
  background-color: var(--danger-color-dark, #b91c1c);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.2);
}

.admin-edit-btn {
  @extend .panel-btn;
  /* fallback for vanilla CSS: copy .panel-btn styles if @extend not supported */
  background: var(--panel-btn-bg, linear-gradient(180deg, #f8fafc 80%, #f1f5f9 100%));
  color: var(--panel-btn-color, #222);
  border: 1.5px solid var(--panel-btn-border, #dde6ef);
  border-radius: 8px;
  box-shadow: 0 1px 2px 0 rgba(200, 200, 200, 0.05);
  font-family: var(--panel-font);
  font-size: 15px;
  font-weight: 500;
  padding: 7px 18px;
  transition: background 0.2s, border 0.2s, box-shadow 0.2s;
  outline: none;
  min-width: 32px;
  min-height: 32px;
  padding: 0 8px;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-edit-btn:hover {
  background: #e8eef4;
  border-color: #b6c6da;
  color: #222;
}

.admin-edit-btn:active {
  background: #e1e7ed;
  box-shadow: 0 1px 2px 0 rgba(200, 200, 200, 0.08);
}

.modal-actions button {
  @extend .panel-btn;
  /* fallback for vanilla CSS: copy .panel-btn styles if @extend not supported */
  background: var(--panel-btn-bg, linear-gradient(180deg, #f8fafc 80%, #f1f5f9 100%));
  color: var(--panel-btn-color, #222);
  border: 1.5px solid var(--panel-btn-border, #dde6ef);
  border-radius: 8px;
  box-shadow: 0 1px 2px 0 rgba(200, 200, 200, 0.05);
  font-family: var(--panel-font);
  font-size: 15px;
  font-weight: 500;
  padding: 7px 18px;
  transition: background 0.2s, border 0.2s, box-shadow 0.2s;
  outline: none;
}

.modal-actions button:hover {
  background: #e8eef4;
  border-color: #b6c6da;
  color: #222;
}

.modal-actions button:active {
  background: #e1e7ed;
  box-shadow: 0 1px 2px 0 rgba(200, 200, 200, 0.08);
}

/* Plan Info Section */
.settings-container .plan-info-section {
  margin-top: 1rem;
}

.settings-container .plan-info-container {
  background-color: var(--color-background-alt, #f8f9fa);
  border-radius: 6px;
  padding: 1rem;
  border: 1px solid var(--color-border-light, #eaeaea);
}

.settings-container .plan-info-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.settings-container .plan-info-item:last-child {
  margin-bottom: 0;
}

.settings-container .plan-label {
  font-weight: 500;
  color: var(--color-text-secondary, #666);
  width: 140px;
  flex-shrink: 0;
}

.settings-container .plan-value {
  font-weight: 500;
  color: var(--color-text-primary, #333);
}

.settings-container .text-danger {
  color: var(--danger-color, #dc2626);
}

.settings-container .mt-3 {
  margin-top: 1rem;
}

.settings-container .mt-4 {
  margin-top: 1.5rem;
}

.settings-container .mb-0 {
  margin-bottom: 0;
}

/* Button styling for plan management */
.settings-container #change-plan-btn {
  margin-top: 1rem;
  width: auto;
}

/* Modal styling improvements */
.settings-container .modal-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.settings-container .modal-content {
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: none;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-container .modal-header {
  border-bottom: 1px solid var(--color-border-light, #eaeaea);
  padding: 1.25rem 1.5rem;
}

.settings-container .modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.settings-container .modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Stripe Payment Element in Settings modal */
#payment-element-container {
  margin: 0.5rem 0 1rem 0;
}

.stripe-payment-element {
  background: var(--color-background, #fff);
  border: 1px solid var(--color-border, #ddd);
  border-radius: 8px;
  padding: 12px;
}

.settings-container .form-group {
  margin-bottom: 1.25rem;
}

.settings-container .modal-actions {
  flex-shrink: 0;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border-light, #eaeaea);
  background: var(--card-background);
  margin: 0 -1.5rem -1.5rem -1.5rem;
}

.settings-container .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-text-secondary, #666);
}

.settings-container .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-container .form-control:focus {
  border-color: var(--primary-color, #2563eb);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
  outline: none;
}

.settings-container .error-message {
  color: var(--danger-color, #dc2626);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.settings-container .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Loading and animation styles */
.settings-container .loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  color: var(--color-text-secondary, #666);
}

.settings-container .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color, #2563eb);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1rem;
}

.settings-container .spinner-small {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Shake animation for error feedback */
.shake-animation {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  transform: translate3d(0, 0, 0);
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-3px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(3px, 0, 0);
  }
}

/* Notification system */
#notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}

/* Global notification styles (not scoped to settings container) */
#notification-container .notification {
  background: #ffffff; /* fully opaque for readability over satellite map */
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  color: #1f2937;
  overflow: hidden;
  margin-bottom: 10px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#notification-container .notification.visible {
  transform: translateX(0);
  opacity: 1;
}

#notification-container .notification-content {
  display: flex;
  align-items: flex-start;
  padding: 12px 16px;
}

#notification-container .notification-message {
  flex: 1;
  padding-right: 10px;
  font-size: 0.92rem;
}

#notification-container .notification-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
}

#notification-container .notification-close:hover {
  color: #374151;
}

#notification-container .notification-success {
  border-left: 4px solid var(--success-color, #059669);
  background-color: #ecfdf5; /* solid pale green */
}

#notification-container .notification-error {
  border-left: 4px solid var(--danger-color, #dc2626);
  background-color: #fef2f2; /* solid pale red */
}

#notification-container .notification-info {
  border-left: 4px solid var(--primary-color, #2563eb);
  background-color: #eff6ff; /* solid pale blue */
}

/* Profile info initial state for animation */
.settings-container .profile-info {
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.3s ease;
}

/* Edit user form styles */
.edit-user-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 250px;
}

.edit-user-form label {
  font-weight: 500;
  color: #333;
  margin-bottom: 0.25rem;
  display: block;
}

.edit-user-form select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  font-size: 0.9rem;
  color: #333;
}

.edit-user-form select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Plan modal form styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  background: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.plan-note {
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Table-like plan display for settings */
.plans-container {
  margin: 0.5rem 0 0.75rem 0;
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-background, #FFFFFF);
}

.plan-row {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #F3F4F6;
  transition: background-color 0.15s ease;
}

.plan-row:last-child {
  border-bottom: none;
}

.plan-row:hover {
  background-color: #F8F9FA;
}

.plan-row.map-plan {
  border-left: 3px solid #2C3E50;
}

.plan-icon {
  font-size: 1.25rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
}

.plan-info {
  flex: 1;
  min-width: 0;
}

.plan-name-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.plan-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2C3E50;
  margin: 0;
}

.plan-current {
  font-size: 0.875rem;
  font-weight: 500;
  color: #2C3E50;
}

.plan-features {
  font-size: 0.75rem;
  color: #7F8C8D;
  line-height: 1.3;
}

.plan-status-section {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.status-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.status-badge.status-active {
  background-color: rgba(39, 174, 96, 0.1);
  color: #27AE60;
}

.status-badge.status-free {
  background-color: rgba(52, 152, 219, 0.1);
  color: #3498DB;
}

.status-badge.status-none {
  background-color: rgba(127, 140, 141, 0.1);
  color: #7F8C8D;
}

/* Management buttons */
.plan-actions {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-light, #E5E7EB);
  display: flex;
  justify-content: center;
}

.manage-btn {
  background: linear-gradient(90deg, #f4f7fa 0%, #e8eef4 100%);
  border: 1.5px solid #dde6ef;
  color: #222;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 2px rgba(200, 200, 200, 0.05);
  cursor: pointer;
  transition: background 0.2s, border 0.2s, box-shadow 0.2s, transform 0.15s;
}

.manage-btn:hover {
  background: #e8eef4;
  border-color: #b6c6da;
  transform: translateY(-1px);
}

.manage-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 0.875rem;
}

.btn-text {
  font-size: 0.875rem;
  font-weight: 500;
}

@media (max-width: 640px) {
  .plan-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .plan-name-section {
    width: 100%;
    justify-content: space-between;
  }
  
  .plan-status-section {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  
  .plan-icon {
    margin-right: 0.5rem;
  }
}

/* Loading states and animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.plan-card.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Error states */
.error-message {
  text-align: center;
  padding: 2rem;
  color: #e53e3e;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .plan-card {
    padding: 1rem;
  }
  
  .plan-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .plan-icon {
    margin-right: 0;
  }
  
  .manage-btn {
    min-width: 200px;
    padding: 0.875rem 1.5rem;
  }
  
  .btn-text {
    font-size: 1rem;
  }
  
  .btn-subtitle {
    font-size: 0.8125rem;
  }
}
