/* ====== TYC Customers – Scoped Styles (safe) ====== */
:root{
  --tyc-bg:#1f1f22;
  --tyc-bg-2:#232325;
  --tyc-head:#2b2b2d;
  --tyc-border:#333;
  --tyc-text:#FEFFF1;
  --tyc-accent:#D6933D;
}

.tyc-customer-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.tyc-customer-table{
  width:100%; min-width:820px; border-collapse:collapse;
  background:var(--tyc-bg); color:var(--tyc-text);
  font-family: Vazirmatn, IRANSans, Segoe UI, sans-serif;
}
.tyc-customer-table th,.tyc-customer-table td{
  border:1px solid var(--tyc-border); padding:10px 12px; text-align:right;
}
.tyc-customer-table th{ background:var(--tyc-head); color:var(--tyc-accent); font-weight:800 }
.tyc-customer-table tr:nth-child(even){ background:var(--tyc-bg-2) }

.tyc-customer-table td{ white-space:nowrap; word-break:keep-all; overflow:hidden; text-overflow:ellipsis; vertical-align:middle }
.tyc-customer-table td.c-name,
.tyc-customer-table td.c-contact{ white-space:normal; word-wrap:break-word }

.tyc-customer-table .c-code,
.tyc-customer-table .c-mobile{ direction:ltr; font-family: ui-monospace, Menlo, Consolas, monospace }

.tyc-btn{ background:var(--tyc-accent); color:#1a1a1a; border:none; border-radius:10px; padding:8px 12px; font-weight:800; cursor:pointer; transition:transform .12s ease, filter .12s ease }
.tyc-btn:hover{ filter:brightness(0.95) }
.tyc-btn:active{ transform:translateY(1px) }

.tyc-edit-modal{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,.55); z-index:9999; padding:16px }
.tyc-edit-modal:not([hidden]){ display:flex }
.tyc-edit-card{
  width:min(720px,92vw); background:var(--tyc-bg);
  border:1px solid var(--tyc-border); border-radius:16px; padding:16px;
  color:var(--tyc-text); direction:rtl; font-family: Vazirmatn, IRANSans, Segoe UI, sans-serif
}
.tyc-edit-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px }
.tyc-edit-head .tyc-title{ margin:0; font-size:18px; font-weight:800; color:var(--tyc-accent) }
.tyc-edit-head .tyc-close{ background:transparent; color:var(--tyc-text); border:none; font-size:22px; cursor:pointer; line-height:1 }

.tyc-edit-form{ display:grid; grid-template-columns:1fr; gap:10px }
.tyc-edit-form .row{ display:flex; flex-direction:column; gap:6px }
.tyc-edit-form label{ font-size:13px; opacity:.9 }
.tyc-edit-form input,.tyc-edit-form textarea{
  background:var(--tyc-head); border:1px solid var(--tyc-border); border-radius:10px;
  color:var(--tyc-text); outline:none; padding:10px 12px; font-family: Vazirmatn, IRANSans, Segoe UI, sans-serif
}
.tyc-edit-form textarea{ resize:vertical }

.tyc-add-form{ display:grid; grid-template-columns:1fr; gap:10px; color:var(--tyc-text); font-family: Vazirmatn, IRANSans, Segoe UI, sans-serif }
.tyc-add-form .row{ display:flex; flex-direction:column; gap:6px }
.tyc-add-form label{ font-size:13px; opacity:.9 }
.tyc-add-form input,.tyc-add-form textarea, .tyc-add-form select{
  background:var(--tyc-head); border:1px solid var(--tyc-border); border-radius:10px;
  color:var(--tyc-text); outline:none; padding:10px 12px; font-family: Vazirmatn, IRANSans, Segoe UI, sans-serif
}
.tyc-add-form textarea{ resize:vertical }
.tyc-add-form .tyc-add-msg{ margin-right:8px; font-size:12px; opacity:.9 }

@media (max-width:640px){
  .tyc-edit-card{ padding:12px }
  .tyc-customer-table{ min-width:640px }
}
