.vn-subscriptions {
  margin: 20px 0;
}
.vn-subscriptions h2 {
  margin-bottom: 20px;
}

.vn-subscriptions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.vn-subscription-item {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vn-subscription-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}
.vn-subscription-header h3 {
  margin: 0;
}

.vn-subscription-details {
  margin-bottom: 15px;
}

.vn-subscription-actions {
  margin-top: 15px;
  text-align: right;
}

.vn-subscription-status {
  background-color: #f9f9f9;
  color: #333;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}
.vn-subscription-status.vn-status-active, .vn-subscription-status.vn-status-trial {
  background-color: #d4edda;
  color: #155724;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: bold;
}
.vn-subscription-status.vn-status-expired {
  background-color: #f8d7da;
  color: #721c24;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: bold;
}
.vn-subscription-status.vn-status-cancelled {
  background-color: #ff6b6b;
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: bold;
}

.vn-subscription-details-container {
  max-width: 800px;
  margin: 0 auto;
}
.vn-subscription-details-container button:disabled[disabled] {
  background-color: #a7a7a7;
  color: #f0f8ff;
}
.vn-subscription-details-container .vn-csv-import-section {
  background-color: #f0f8ff;
  border: 1px solid #4a90e2;
  padding: 20px;
  border-radius: 5px;
  margin: 20px 0;
}
.vn-subscription-details-container .vn-csv-import-section h4 {
  margin-top: 0;
  color: #0073aa;
}
.vn-subscription-details-container .vn-csv-import-section > p {
  margin-bottom: 20px;
}
.vn-subscription-details-container .vn-buy-additional-licenses {
  background-color: #e8f4f8;
  border: 1px solid #b8e0e8;
  padding: 20px;
  border-radius: 5px;
  margin: 20px 0;
  text-align: center;
}
.vn-subscription-details-container .vn-buy-additional-licenses h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #0073aa;
}
.vn-subscription-details-container .vn-buy-additional-licenses p {
  margin-bottom: 15px;
  color: #555;
}
.vn-subscription-details-container .vn-csv-requirements {
  background-color: #fff;
  padding: 15px;
  border-radius: 3px;
  margin-bottom: 20px;
}
.vn-subscription-details-container .vn-csv-requirements p {
  margin-bottom: 10px;
}
.vn-subscription-details-container .vn-csv-requirements ul {
  margin: 10px 20px;
  list-style-type: disc;
}
.vn-subscription-details-container .vn-csv-requirements ul li {
  margin-bottom: 5px;
  padding-left: 0;
}
.vn-subscription-details-container .vn-csv-requirements ul li:before {
  content: unset;
}

.vn-subscription-info {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 30px;
}

.vn-subusers-section {
  margin-bottom: 30px;
}

.vn-subusers-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.vn-subusers-table th, .vn-subusers-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
.vn-subusers-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}
.vn-subusers-table tr:hover {
  background-color: #f9f9f9;
}

.vn-sublicense-purchase-form {
  display: inline-block;
  text-align: left;
}

.vn-price-info,
.vn-total-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}

.vn-price-label,
.vn-total-label {
  font-weight: 600;
  color: #333;
  margin-right: 4px;
}

.vn-price-value,
.vn-total-value {
  font-size: 18px;
  font-weight: bold;
  color: #0073aa;
}

.vn-total-price {
  padding-top: 15px;
  margin-top: 10px;
}

.vn-error-message {
  color: #dc3545;
  font-style: italic;
}

.vn-quantity-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.vn-quantity-row label {
  margin: 0;
  font-weight: normal;
}

.vn-quantity-input {
  width: 80px;
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  text-align: center;
}

.vn-quantity-selection {
  margin: 20px 0;
}

.vn-quantity-label {
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.vn-quantity-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.vn-quantity-radio-label {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border: 2px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fff;
  min-width: 80px;
  justify-content: center;
}
.vn-quantity-radio-label:hover {
  border-color: #0073aa;
  background-color: #f5f9fc;
}
.vn-quantity-radio-label input[type=radio] {
  display: none;
}
.vn-quantity-radio-label input[type=radio]:checked + .vn-quantity-radio-text {
  font-weight: bold;
}
.vn-quantity-radio-label input[type=radio]:checked ~ .vn-quantity-radio-text {
  color: #0073aa;
}
.vn-quantity-radio-label:has(input[type=radio]:checked) {
  border-color: #0073aa;
  background-color: #e8f4f8;
  box-shadow: 0 0 0 1px #0073aa;
}

.vn-quantity-radio-text {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.vn-no-licenses-message {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
}

.vn-add-subuser-form {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 5px;
  margin-top: 20px;
}

.vn-form-row {
  margin-bottom: 15px;
}
.vn-form-row label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.vn-form-row input[type=text],
.vn-form-row input[type=email],
.vn-form-row input[type=password],
.vn-form-row input[type=date] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.vn-form-row input[type=date] {
  max-width: 200px;
}

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

.vn-cancel-subscription-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #ddd;
}
.vn-cancel-subscription-section h4 {
  color: #dc3545;
  margin-bottom: 15px;
}

.vn-cancel-subscription-btn {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}
.vn-cancel-subscription-btn:hover {
  background-color: #c82333;
  border-color: #b21f2d;
  color: #fff;
}
.vn-cancel-subscription-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.vn-cancel-form {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 20px;
  border-radius: 5px;
  margin-top: 15px;
}

.vn-cancel-confirm {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}
.vn-cancel-confirm:hover {
  background-color: #c82333;
  border-color: #b21f2d;
  color: #fff;
}
.vn-cancel-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.vn-cancel-warning {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
}
.vn-cancel-warning p {
  margin: 0;
  font-weight: 600;
}

.vn-cancellation-notice {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
  margin: 10px 0;
  padding: 10px;
}
.vn-cancellation-notice strong {
  color: #856404;
}

.vn-disabled-action {
  color: #999;
  font-style: italic;
}

.vn-csv-upload-form {
  background-color: #fff;
  padding: 20px;
  border-radius: 3px;
}
.vn-csv-upload-form .vn-form-row {
  margin-bottom: 15px;
}
.vn-csv-upload-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}
.vn-csv-upload-form input[type=file] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background-color: #fff;
}
.vn-csv-upload-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#vn-csv-preview-section {
  margin-top: 30px;
  padding: 20px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.vn-csv-preview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.vn-stat-box {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 3px;
  text-align: center;
}
.vn-stat-box .vn-stat-number {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}
.vn-stat-box .vn-stat-label {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
}
.vn-stat-box.vn-stat-success {
  background-color: #d4edda;
  color: #155724;
}
.vn-stat-box.vn-stat-warning {
  background-color: #fff3cd;
  color: #856404;
}
.vn-stat-box.vn-stat-error {
  background-color: #f8d7da;
  color: #721c24;
}

#vn-import-progress-section {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 5px;
  margin-top: 20px;
}

.vn-progress-bar {
  width: 100%;
  height: 30px;
  background-color: #f0f0f0;
  border-radius: 15px;
  overflow: hidden;
  margin: 20px 0;
}

.vn-progress-bar-fill {
  height: 100%;
  background-color: #4caf50;
  transition: width 0.3s ease, background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
}
.vn-progress-bar-fill.stopped {
  background-color: #ff9800;
}

#vn-import-status {
  text-align: center;
  margin-top: 20px;
  font-size: 16px;
}

.vn-csv-preview-table-wrapper {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 3px;
  margin-top: 10px;
}

.vn-csv-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.vn-csv-preview-table thead {
  position: sticky;
  top: 0;
  background-color: #f2f2f2;
}
.vn-csv-preview-table th, .vn-csv-preview-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
.vn-csv-preview-table tr.vn-row-error {
  background-color: #fee;
}
.vn-csv-preview-table tr.vn-row-warning {
  background-color: #ffeaa7;
}
.vn-csv-preview-table tr.vn-row-success {
  background-color: #d4edda;
}

.vn-status-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 5px;
}
.vn-status-icon.vn-status-success {
  background-color: #4caf50;
}
.vn-status-icon.vn-status-warning {
  background-color: #ff9800;
}
.vn-status-icon.vn-status-error {
  background-color: #f44336;
}

.vn-import-results {
  text-align: center;
  padding: 30px;
}
.vn-import-results h4 {
  color: #4caf50;
  font-size: 24px;
  margin-bottom: 20px;
}
.vn-import-results.vn-licenses-exhausted h4 {
  color: #ff9800;
}

.vn-import-summary {
  margin: 20px 0;
}
.vn-import-summary .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  vertical-align: text-bottom !important;
  margin-right: 5px;
}
.vn-import-summary .dashicons:before {
  vertical-align: text-bottom !important;
}

.vn-success-count {
  color: #4caf50;
  font-size: 18px;
  margin-bottom: 10px;
}

.vn-info-count {
  font-size: 18px;
  margin-bottom: 10px;
}

.vn-warning-count {
  color: #ff9800;
  font-size: 18px;
  margin-bottom: 10px;
}

.vn-error-count {
  color: #f44336;
  font-size: 18px;
  margin-bottom: 5px;
}

.vn-error-note {
  color: #666;
  font-size: 14px;
  font-style: italic;
}

.vn-license-message {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #333;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
  max-width: 500px;
  margin: 20px auto;
  text-align: left;
}
.vn-license-message p {
  margin-bottom: 10px;
  font-weight: 600;
}
.vn-license-message ul {
  margin-left: 20px;
  list-style-type: disc;
}
.vn-license-message ul li {
  margin-bottom: 5px;
}

.vn-import-actions {
  margin-top: 30px;
}

.vn-error-details {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
  margin-top: 20px;
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.vn-error-details h5 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #856404;
}

.vn-error-list {
  max-height: 300px;
  overflow-y: auto;
}

.vn-error-item {
  padding: 5px 0;
  border-bottom: 1px solid #ffd93d;
}
.vn-error-item:last-child {
  border-bottom: none;
}

.vn-csv-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.vn-csv-report-section {
  margin: 20px 0;
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-align: center;
}

#vn-download-csv-report {
  font-size: 14px;
  padding: 8px 16px;
}
#vn-download-csv-report .dashicons {
  vertical-align: middle;
  margin-right: 5px;
}

.vn-report-description {
  margin-top: 10px;
  color: #666;
  font-size: 13px;
  font-style: italic;
}

@keyframes vn-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.vn-spin {
  animation: vn-spin 1s linear infinite;
}

@media (max-width: 1024px) {
  .vn-subscriptions-list {
    grid-template-columns: 1fr;
  }
  .vn-subscription-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .vn-subscription-status {
    margin-top: 10px;
  }
  .vn-subusers-table {
    border: 0;
  }
  .vn-subusers-table thead {
    display: none;
  }
  .vn-subusers-table tbody {
    display: block;
  }
  .vn-subusers-table tr {
    display: block;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  .vn-subusers-table tr:hover {
    background-color: #f9f9f9;
  }
  .vn-subusers-table td {
    display: block;
    text-align: left;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 40%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .vn-subusers-table td:last-child {
    border-bottom: 0;
  }
  .vn-subusers-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 35%;
    padding-right: 10px;
    font-weight: bold;
    text-align: left;
    color: #666;
  }
  .vn-buy-additional-licenses {
    text-align: left;
  }
  .vn-buy-additional-licenses .button-primary {
    width: 100%;
  }
  .vn-sublicense-purchase-form {
    display: block;
    width: 100%;
  }
  .vn-quantity-row {
    flex-wrap: wrap;
  }
  .vn-csv-preview-stats {
    grid-template-columns: 1fr;
  }
  .vn-csv-preview-table {
    font-size: 14px;
  }
  .vn-csv-actions {
    flex-direction: column;
  }
  .vn-csv-actions button {
    width: 100%;
  }
  .vn-error-details,
  .vn-license-message {
    margin: 20px 10px;
  }
}
@media (max-width: 480px) {
  .vn-quantity-radio-group {
    justify-content: space-between;
  }
  .vn-quantity-radio-label {
    flex: 0 0 calc(50% - 5px);
    min-width: auto;
  }
}