/* ==========================================================================
   P30 License Management — چیدمان دو ستونه، مثل بقیه‌ی تب‌های پنل کاربری
   جایگزین کامل: style.css همین پلاگین
   ========================================================================== */

.p30-wrap{
  --p30-bg: #f3f5f9;
  --p30-border: #e4e7f1;
  --p30-text: #1b1f3b;
  --p30-muted: #6e7391;
  --p30-accent: #1e87f0;
  --p30-success: #1fa97d;
  --p30-danger: #e1483d;
  --p30-warning: #db8a22;

  direction: rtl;
  color: var(--p30-text);
  background: var(--p30-bg);
  border: 1px solid var(--p30-border);
  border-radius: 12px;
  display: flex;
  overflow: hidden;
  min-height: 560px;
  box-shadow: 0 10px 30px rgba(27,31,59,.06);
}
.p30-wrap *{ box-sizing: border-box; }

.p30-notice{
  border: none;
  border-inline-start: 4px solid var(--p30-accent, #1e87f0);
  border-radius: 10px;
  padding: 12px 14px;
  background: #f1f6fe;
  margin-bottom: 16px;
}
.p30-notice p{ margin: 0 0 6px; font-size: 13px; line-height: 1.8; }
.p30-notice p:last-child{ margin-bottom: 0; }
.p30-notice-compact{
  border-inline-start-color: var(--p30-warning);
  background: #fef7ec;
  color: #96650f;
  padding: 10px 14px;
  font-size: 12.5px;
  margin-bottom: 14px;
}

/* ---------- ستون‌ها ---------- */
.p30-col{ display: flex; flex-direction: column; min-height: 0; }
.p30-col-list{ width: 320px; flex: 0 0 320px; background: #fff; border-inline-start: 1px solid var(--p30-border); }
.p30-col-detail{ flex: 1 1 auto; background: var(--p30-bg); min-width: 0; }

.p30-col-header{
  display: flex; align-items: center; gap: 10px; padding: 16px 18px;
  border-bottom: 1px solid var(--p30-border); background: #fff; flex: 0 0 auto;
}
.p30-col-title{ font-size: 15px; font-weight: 700; color: var(--p30-text); flex: 1; margin: 0; }
.p30-btn-icon{
  background: var(--p30-bg); border: 1px solid var(--p30-border); width: 32px; height: 32px;
  border-radius: 10px; font-size: 16px; cursor: pointer; color: var(--p30-muted);
  transform: rotate(180deg); display: none; align-items: center; justify-content: center; flex: 0 0 auto;
}
.p30-btn-icon:hover{ background: var(--p30-border); }

/* ---------- لیست محصولات ---------- */
.p30-products-list{ overflow-y: auto; flex: 1 1 auto; padding: 10px; }
.p30-product-item{
  position: relative; width: 100%; background: #fff; border: 1px solid var(--p30-border);
  border-radius: 14px; padding: 10px; margin-bottom: 10px; cursor: pointer;
  display: flex; gap: 10px; align-items: center; text-align: right; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.p30-product-item:hover{ border-color: var(--p30-accent); box-shadow: 0 4px 14px rgba(30,135,240,.10); }
.p30-product-item.is-active{ border-color: var(--p30-accent); background: #f1f6fe; }
.p30-product-thumb{ width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: var(--p30-bg); flex: 0 0 auto; border: 1px solid var(--p30-border); }
.p30-product-thumb img{ width: 100%; height: 100%; object-fit: contain; }
.p30-product-info{ display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.p30-product-name{
  font-size: 13.5px; font-weight: 700; color: var(--p30-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}

/* ---------- چیپ‌ها ---------- */
.p30-chip{
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  line-height: 1.4; padding: 3px 10px; border-radius: 20px; background: rgba(31,169,125,.10); color: var(--p30-success);
}
.p30-chip.is-success{ background: rgba(31,169,125,.10); color: var(--p30-success); }
.p30-chip.is-warning{ background: rgba(219,138,34,.12); color: var(--p30-warning); }
.p30-chip.is-danger{ background: rgba(225,72,61,.12); color: var(--p30-danger); }
.p30-chip.is-unlimited{ background: rgba(30,135,240,.10); color: var(--p30-accent); }

/* ---------- حالت خالی ---------- */
.p30-empty-state-panel{ height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--p30-muted); text-align: center; padding: 30px; }
.p30-empty-icon{ font-size: 40px; margin-bottom: 10px; opacity: .7; }
.p30-empty-state{ text-align: center; color: var(--p30-muted); padding: 40px 10px; font-size: 14px; }

/* ---------- پنل جزئیات ---------- */
.p30-product-detail{ height: 100%; display: flex; flex-direction: column; min-height: 0; }
.p30-detail-body{ overflow-y: auto; flex: 1; padding: 18px; }

.p30-detail-stats{ display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.p30-stat-box{ flex: 1 1 140px; background: #fff; border: 1px solid var(--p30-border); border-radius: 10px; padding: 12px 14px; text-align: center; }
.p30-stat-value{ display: block; font-size: 14px; font-weight: 800; color: var(--p30-accent); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p30-stat-label{ display: block; font-size: 11.5px; color: var(--p30-muted); }

.p30-actions-row{ display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.p30-btn{
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent;
  border-radius: 8px; padding: 9px 18px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: opacity .15s ease, border-color .15s ease, color .15s ease;
}
.p30-btn-accent{ background: var(--p30-accent); border-color: var(--p30-accent); color: #fff; box-shadow: 0 2px 8px rgba(30,135,240,.25); }
.p30-btn-accent:hover{ opacity: .92; }
.p30-btn-outline{ background: #fff; border-color: var(--p30-border); color: var(--p30-text); }
.p30-btn-outline:hover{ border-color: var(--p30-accent); color: var(--p30-accent); }
.p30-btn.is-disabled{ opacity: .5; cursor: not-allowed; }
.p30-btn.p30-is-loading{ opacity: .7; cursor: progress; }

.p30-copyable{ cursor: pointer; }
.p30-copyable:hover{ text-decoration: underline dotted; }
.p30-copyable.is-copied{ color: var(--p30-success) !important; }

.p30-buy-more, .p30-add-domain-form{ display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.p30-buy-more .uk-input, .p30-add-domain-form .uk-input{ height: 38px; border-radius: 8px; flex: 1 1 200px; }
.p30-form-msg{ display: block; font-size: 12.5px; color: var(--p30-success); margin-bottom: 14px; }
.p30-form-msg.is-error{ color: var(--p30-danger); }

/* ---------- لیست دامنه‌ها ---------- */
.p30-domains-section{ margin-top: 18px; border-top: 1px solid var(--p30-border); padding-top: 16px; }
.p30-domains-title{ font-size: 13px; font-weight: 700; color: var(--p30-muted); margin: 0 0 12px; }
.p30-domains-empty{ font-size: 13px; color: var(--p30-muted); }

.p30-domains-list{ display: flex; flex-direction: column; gap: 8px; }
.p30-domain-row{
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--p30-border); border-radius: 10px; padding: 10px 14px;
}
.p30-domain-name{ font-weight: 600; font-size: 13px; flex: 1; min-width: 140px; }
.p30-domain-date{ font-size: 11.5px; color: var(--p30-muted); }
.p30-domain-locked{ font-size: 11px; color: var(--p30-muted); background: #f0f0f1; padding: 2px 10px; border-radius: 20px; }
.p30-domain-edit-btn{
  background: none; border: 1px solid var(--p30-border); border-radius: 6px; padding: 4px 10px;
  font-size: 11.5px; cursor: pointer; color: var(--p30-accent);
}
.p30-domain-edit-form{ display: flex; gap: 8px; width: 100%; margin-top: 8px; }
.p30-domain-edit-form .uk-input{ flex: 1; height: 34px; border-radius: 6px; }

/* ---------- موبایل ---------- */
@media (max-width: 780px){
  .p30-wrap{ flex-direction: column; margin: 0; border-radius: 12px; }
  .p30-col-list{ width: 100%; flex: 0 0 auto; max-height: 40vh; border-inline-start: none; border-bottom: 1px solid var(--p30-border); }
  .p30-col-detail{ flex: 1 1 auto; }
  .p30-btn-icon{ display: flex; }
}
