/*
 * teacher-ui.css — শিক্ষক রেজিস্ট্রেশন/রিকোয়েস্ট/প্যানেল পেজের শেয়ার্ড ডিজাইন
 * ---------------------------------------------------------------
 * কীভাবে কাজ করে (ভবিষ্যৎ ডেভেলপার/AI-এর জন্য):
 * - সব ক্লাস `.tr-` প্রিফিক্সে; header.php/সাইডবার/গ্লোবাল স্টাইলে কোনো প্রভাব নেই।
 * - পেজের কনটেন্ট `<div class="tr-scope">…</div>`-এর ভেতরে রাখুন; টোকেন (--tr-*) শুধু এর ভেতরে কাজ করে।
 * - রং/রেডিয়াস বদলাতে শুধু নিচের :root-সদৃশ `.tr-scope` টোকেন বদলান, কম্পোনেন্ট নয়।
 * - মোবাইল-ফার্স্ট; ডেস্কটপ গ্রিড ≥992px। প্রিন্ট নিয়ম এখানে নেই (teacher_print.php-তে)।
 */

.tr-scope {
  --tr-primary: #0f766e;
  --tr-primary-dark: #115e59;
  --tr-primary-soft: #ccfbf1;
  --tr-accent: #f59e0b;
  --tr-danger: #dc2626;
  --tr-danger-soft: #fee2e2;
  --tr-success: #16a34a;
  --tr-success-soft: #dcfce7;
  --tr-warn-soft: #fef3c7;
  --tr-warn-text: #92400e;
  --tr-surface: #ffffff;
  --tr-bg: #f1f5f9;
  --tr-border: #dbe2ea;
  --tr-text: #0f172a;
  --tr-muted: #64748b;
  --tr-radius: 12px;
  --tr-radius-sm: 8px;
  --tr-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .06);
  --tr-shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --tr-font: "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Kalpurush", "SolaimanLipi", sans-serif;

  font-family: var(--tr-font);
  color: var(--tr-text);
  line-height: 1.55;
  box-sizing: border-box;
}
.tr-scope *, .tr-scope *::before, .tr-scope *::after { box-sizing: inherit; }

/* ---------- পেজ ও কার্ড ---------- */
.tr-page { max-width: 1140px; margin: 0 auto; padding: 16px 12px 88px; }
.tr-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.tr-page-title { margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--tr-primary-dark); }
.tr-page-sub { margin: 2px 0 0; color: var(--tr-muted); font-size: .9rem; }

.tr-card { background: var(--tr-surface); border: 1px solid var(--tr-border); border-radius: var(--tr-radius); box-shadow: var(--tr-shadow); margin-bottom: 16px; overflow: hidden; }
.tr-card-body { padding: 16px; }

.tr-section-title { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; font-size: 1.05rem; font-weight: 700; color: var(--tr-primary-dark); background: linear-gradient(90deg, var(--tr-primary-soft), #f8fffe); border-bottom: 1px solid var(--tr-border); }
.tr-section-no { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: 50%; background: var(--tr-primary); color: #fff; font-size: .85rem; font-weight: 700; flex: 0 0 auto; }

/* ---------- গ্রিড ---------- */
.tr-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.tr-col-full { grid-column: 1 / -1; }
@media (min-width: 600px) { .tr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) {
  .tr-page { padding: 24px 16px 40px; }
  .tr-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tr-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tr-card-body { padding: 20px; }
}

/* ---------- ফিল্ড ---------- */
.tr-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tr-label { font-size: .88rem; font-weight: 600; color: var(--tr-text); margin: 0; }
.tr-req::after { content: " *"; color: var(--tr-danger); }
.tr-input, .tr-select, .tr-textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: inherit; font-size: 16px; /* iOS জুম বন্ধ */
  color: var(--tr-text); background: #fff;
  border: 1px solid var(--tr-border); border-radius: var(--tr-radius-sm);
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.tr-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.tr-textarea { min-height: 96px; resize: vertical; }
.tr-input:focus, .tr-select:focus, .tr-textarea:focus { outline: none; border-color: var(--tr-primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .18); }
.tr-input::placeholder, .tr-textarea::placeholder { color: #94a3b8; }
.tr-input:disabled, .tr-select:disabled { background: #f8fafc; color: var(--tr-muted); }
.tr-help { font-size: .8rem; color: var(--tr-muted); }
.tr-error-text { font-size: .8rem; color: var(--tr-danger); display: none; }
.tr-field.tr-has-error .tr-input, .tr-field.tr-has-error .tr-select, .tr-field.tr-has-error .tr-textarea { border-color: var(--tr-danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.tr-field.tr-has-error .tr-error-text { display: block; }

.tr-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: .95rem; }
.tr-check input { width: 20px; height: 20px; accent-color: var(--tr-primary); flex: 0 0 auto; }

/* ---------- বাটন ---------- */
.tr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2; color: #fff; background: var(--tr-primary); border: 1px solid var(--tr-primary); border-radius: var(--tr-radius-sm); cursor: pointer; text-decoration: none; transition: background .15s, transform .05s, box-shadow .15s; }
.tr-btn:hover { background: var(--tr-primary-dark); color: #fff; text-decoration: none; }
.tr-btn:active { transform: translateY(1px); }
.tr-btn:focus-visible { outline: 3px solid rgba(15, 118, 110, .35); outline-offset: 2px; }
.tr-btn[disabled], .tr-btn.tr-loading { opacity: .65; pointer-events: none; }
.tr-btn-outline { color: var(--tr-primary-dark); background: #fff; }
.tr-btn-outline:hover { background: var(--tr-primary-soft); color: var(--tr-primary-dark); }
.tr-btn-danger { background: var(--tr-danger); border-color: var(--tr-danger); }
.tr-btn-danger:hover { background: #b91c1c; }
.tr-btn-ghost { color: var(--tr-muted); background: transparent; border-color: transparent; }
.tr-btn-ghost:hover { background: #f1f5f9; color: var(--tr-text); }
.tr-btn-sm { min-height: 44px; padding: 6px 12px; font-size: .85rem; }
.tr-btn-block { width: 100%; }
.tr-btn-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* সাবমিট বার: মোবাইলে নিচে আটকে থাকে */
.tr-submit-bar { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; padding: 10px 12px; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--tr-border); box-shadow: 0 -4px 14px rgba(15, 23, 42, .08); }
.tr-submit-bar .tr-btn { flex: 1; }
@media (min-width: 992px) { .tr-submit-bar { position: static; justify-content: flex-end; background: transparent; border: 0; box-shadow: none; padding: 8px 0; } .tr-submit-bar .tr-btn { flex: 0 0 auto; min-width: 200px; } }

/* ---------- ব্যাজ ---------- */
.tr-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: .78rem; font-weight: 700; border-radius: 999px; white-space: nowrap; }
.tr-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tr-badge-pending { color: var(--tr-warn-text); background: var(--tr-warn-soft); }
.tr-badge-active { color: #166534; background: var(--tr-success-soft); }
.tr-badge-inactive { color: #991b1b; background: var(--tr-danger-soft); }

/* ---------- টেবিল (ডেস্কটপে টেবিল, মোবাইলে কার্ড) ---------- */
.tr-table-wrap { width: 100%; }
.tr-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tr-table thead th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; text-align: left; font-weight: 700; color: var(--tr-primary-dark); background: var(--tr-primary-soft); border-bottom: 2px solid var(--tr-primary); white-space: nowrap; }
.tr-table tbody td { padding: 10px 12px; vertical-align: middle; border-bottom: 1px solid var(--tr-border); }
.tr-table tbody tr:hover { background: #f8fafc; }
.tr-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--tr-primary-soft); background: #e2e8f0; }
@media (max-width: 767.98px) {
  .tr-table thead { display: none; }
  .tr-table, .tr-table tbody, .tr-table tr, .tr-table td { display: block; width: 100%; }
  .tr-table tbody tr { margin-bottom: 12px; padding: 10px 12px; background: var(--tr-surface); border: 1px solid var(--tr-border); border-radius: var(--tr-radius); box-shadow: var(--tr-shadow); }
  .tr-table tbody td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border: 0; border-bottom: 1px dashed var(--tr-border); text-align: right; }
  .tr-table tbody td:last-child { border-bottom: 0; }
  .tr-table tbody td::before { content: attr(data-label); flex: 0 0 38%; font-weight: 600; color: var(--tr-muted); text-align: left; }
}

/* ---------- স্টেপার ---------- */
.tr-stepper { display: flex; gap: 6px; padding: 0; margin: 0 0 16px; list-style: none; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tr-step { flex: 1 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: .85rem; font-weight: 600; color: var(--tr-muted); background: #fff; border: 1px solid var(--tr-border); border-radius: 999px; white-space: nowrap; }
.tr-step-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-size: .75rem; color: #fff; background: #94a3b8; border-radius: 50%; }
.tr-step.tr-active { color: var(--tr-primary-dark); border-color: var(--tr-primary); background: var(--tr-primary-soft); }
.tr-step.tr-active .tr-step-no, .tr-step.tr-done .tr-step-no { background: var(--tr-primary); }

/* ---------- ছবি আপলোড বক্স ---------- */
.tr-photo-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 200px; margin: 0 auto; padding: 14px; text-align: center; cursor: pointer; color: var(--tr-muted); background: #f8fafc; border: 2px dashed var(--tr-primary); border-radius: var(--tr-radius); transition: background .15s, border-color .15s; }
.tr-photo-box:hover, .tr-photo-box.tr-drag { background: var(--tr-primary-soft); }
.tr-photo-box img { display: none; width: 140px; height: 160px; object-fit: cover; border-radius: var(--tr-radius-sm); border: 3px solid #fff; box-shadow: var(--tr-shadow); }
.tr-photo-box.tr-has-image img { display: block; }
.tr-photo-box.tr-has-image .tr-photo-hint { display: none; }
.tr-photo-hint { font-size: .85rem; }
.tr-photo-box input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.tr-photo-box.tr-has-error { border-color: var(--tr-danger); background: var(--tr-danger-soft); }

/* ---------- ডায়নামিক সারি (শিক্ষা/অভিজ্ঞতা/স্কিল) ---------- */
.tr-repeat { position: relative; padding: 14px; margin-bottom: 12px; background: #f8fafc; border: 1px solid var(--tr-border); border-radius: var(--tr-radius-sm); }
.tr-repeat-remove { position: absolute; top: 8px; right: 8px; }

/* ---------- সামারি কার্ড ও খালি অবস্থা ---------- */
.tr-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (min-width: 768px) { .tr-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tr-stat { padding: 14px 16px; background: var(--tr-surface); border: 1px solid var(--tr-border); border-left: 4px solid var(--tr-primary); border-radius: var(--tr-radius); box-shadow: var(--tr-shadow); }
.tr-stat-num { font-size: 1.6rem; font-weight: 700; color: var(--tr-primary-dark); line-height: 1.1; }
.tr-stat-label { font-size: .82rem; color: var(--tr-muted); }
.tr-empty { padding: 36px 16px; text-align: center; color: var(--tr-muted); }
.tr-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.tr-toolbar .tr-input, .tr-toolbar .tr-select { width: auto; flex: 1 1 180px; }

/* ---------- মোশন কমানো ---------- */
@media (prefers-reduced-motion: reduce) { .tr-scope *, .tr-scope *::before, .tr-scope *::after { transition: none !important; } }
