.tfo-alert,
.tfo-modal-alert{
  margin-bottom:12px;
  padding:12px 14px;
  border-radius:12px;
  font-size:14px;
  line-height:1.7;
  font-weight:700;
  border:1px solid transparent;
}

.tfo-alert-success,
.tfo-modal-alert-success{
  background:var(--tfo-success-soft);
  border-color:var(--tfo-success-border);
  color:var(--tfo-success);
}

.tfo-alert-warning,
.tfo-modal-alert-warning,
.tfo-modal-alert-policy{
  background:var(--tfo-warning-soft);
  border-color:var(--tfo-warning-border);
  color:var(--tfo-warning);
}

.tfo-alert-error,
.tfo-modal-alert-error{
  background:var(--tfo-danger-soft);
  border-color:var(--tfo-danger-border);
  color:var(--tfo-danger);
}

.tfo-alert-info,
.tfo-modal-alert-info{
  background:var(--tfo-info-soft);
  border-color:var(--tfo-info-border);
  color:var(--tfo-info);
}

.tfo-btn-buy,
.tfo-btn-sell{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:10px 14px;
  border-radius:10px;
  font-weight:700;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,opacity .18s ease;
}

.tfo-btn-buy,
.tfo-btn-buy:focus,
.tfo-btn-buy:active{
  background:#15803d;
  border-color:#15803d;
  color:#ffffff;
}

.tfo-btn-buy:hover{
  background:var(--tfo-success);
  border-color:var(--tfo-success);
  color:#ffffff;
}

.tfo-btn-sell,
.tfo-btn-sell:focus,
.tfo-btn-sell:active{
  background:#dc2626;
  border-color:#dc2626;
  color:#ffffff;
}

.tfo-btn-sell:hover{
  background:#b91c1c;
  border-color:#b91c1c;
  color:#ffffff;
}

.tfo-btn-buy[disabled],
.tfo-btn-buy.is-disabled,
.tfo-btn-sell[disabled],
.tfo-btn-sell.is-disabled{
  opacity:.55;
  cursor:not-allowed;
  pointer-events:none;
}


.tfo-btn-approve,
.tfo-btn-reject,
.tfo-btn-cancel{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 20px;
  border-radius:14px;
  font-weight:700;
  font-size:15px;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,opacity .18s ease,box-shadow .18s ease;
}

.tfo-btn-approve,
.tfo-btn-approve:focus,
.tfo-btn-approve:active{
  background:#15803d;
  border:1px solid #15803d;
  color:#fff;
}

.tfo-btn-approve:hover{
  background:var(--tfo-success);
  border-color:var(--tfo-success);
  color:#fff;
}

.tfo-btn-reject,
.tfo-btn-reject:focus,
.tfo-btn-reject:active{
  background:#dc2626;
  border:1px solid #dc2626;
  color:#fff;
}

.tfo-btn-reject:hover{
  background:#b91c1c;
  border-color:#b91c1c;
  color:#fff;
}

.tfo-btn-cancel,
.tfo-btn-cancel:focus,
.tfo-btn-cancel:active{
  background:#ffffff;
  border:1px solid #d1d5db;
  color:#111827;
}

.tfo-btn-cancel:hover{
  background:#f9fafb;
  border-color:#9ca3af;
  color:#111827;
}

.tfo-btn-approve[disabled],
.tfo-btn-reject[disabled],
.tfo-btn-cancel[disabled]{
  opacity:.55;
  cursor:not-allowed;
  pointer-events:none;
}

.tfo-admin-msg{
  display:none;
  margin:12px 0;
}

.tfo-admin-modal-backdrop{
  position:fixed;
  inset:0;
  background:var(--tfo-overlay);
  z-index:99998;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.tfo-admin-modal{
  width:min(620px,92vw);
  max-height:88vh;
  overflow:auto;
  background:#fff;
  border-radius:var(--tfo-panel-radius);
  box-shadow:var(--tfo-panel-shadow);
  padding:20px;
  direction:rtl;
  margin:0 auto;
}

.tfo-admin-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.tfo-admin-modal-title{
  font-size:24px;
  font-weight:800;
  line-height:1.25;
  margin:0;
}

.tfo-admin-modal-sub{
  color:#6b7280;
  font-size:15px;
  margin-top:6px;
}

.tfo-admin-close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:16px;
  width:52px;
  height:52px;
  font-size:30px;
  line-height:1;
  cursor:pointer;
  flex:0 0 auto;
  color:#111827;
}

.tfo-admin-close:hover{
  background:#f9fafb;
}

.tfo-admin-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin:14px 0;
}

.tfo-admin-card{
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:12px 14px;
  background:#fafafa;
  min-height:88px;
}

.tfo-admin-card.is-wide{
  grid-column:1 / -1;
}

.tfo-admin-card-label{
  font-size:13px;
  color:#6b7280;
  margin-bottom:6px;
}

.tfo-admin-card-value{
  font-size:16px;
  font-weight:800;
  color:#111827;
  word-break:break-word;
  line-height:1.45;
}

.tfo-admin-card-value.is-meta{
  font-size:14px;
  font-weight:700;
  color:#374151;
}

.tfo-admin-detail-box{
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:14px;
  background:#fff;
  margin-top:12px;
}

.tfo-admin-detail-row{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid #f3f4f6;
}

.tfo-admin-detail-row:last-child{
  border-bottom:none;
}

.tfo-admin-detail-key{
  font-weight:700;
  color:#374151;
}

.tfo-admin-detail-val{
  color:#111827;
  white-space:pre-wrap;
  word-break:break-word;
}

.tfo-admin-effect{
  margin-top:14px;
  padding:13px 15px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#0f172a;
  font-weight:700;
}

.tfo-admin-effect.is-danger{
  background:var(--tfo-warning-soft);
  border-color:#fed7aa;
  color:var(--tfo-warning);
}

.tfo-admin-modal-actions{
  display:flex;
  gap:12px;
  justify-content:flex-start;
  margin-top:16px;
  flex-wrap:wrap;
}

.tfo-admin-inline-error{
  display:none;
  margin-top:12px;
}

@media (max-width:640px){
  .tfo-admin-modal-backdrop{padding:12px}
  .tfo-admin-modal{width:min(100%,96vw);max-height:90vh;padding:16px;border-radius:18px}
  .tfo-admin-grid{grid-template-columns:1fr}
  .tfo-admin-card,.tfo-admin-card.is-wide{grid-column:auto;min-height:auto}
  .tfo-admin-detail-row{grid-template-columns:1fr}
  .tfo-admin-modal-title{font-size:21px}
  .tfo-admin-modal-sub{font-size:14px}
  .tfo-admin-close{width:46px;height:46px;font-size:26px}
  .tfo-admin-modal-actions{flex-direction:column}
  .tfo-admin-modal-actions .tfo-btn-approve,
  .tfo-admin-modal-actions .tfo-btn-reject,
  .tfo-admin-modal-actions .tfo-btn-cancel{width:100%;justify-content:center}
}

