@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root { --bs-body-font-family: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif; }
body { font-family: var(--bs-body-font-family); }
.ltr-text { direction: ltr; unicode-bidi: plaintext; text-align: left; }
input[type="email"].ltr-text, input[type="password"].ltr-text { text-align: left; }
.sidebar { min-height: calc(100vh - 56px); }
.search-form { max-width: 520px; }
.filter-form .form-control, .filter-form .form-select { width: auto; max-width: 160px; }
.mail-row.unread { background: #f3faf5; }
.mail-row.unread .who, .mail-row.unread .subj { font-weight: 700; }
.mail-row .star { color: #ccc; }
.mail-row .star.on { color: #f5b301; }
.min-w-0 { min-width: 0; }
.mail-frame { width: 100%; height: 65vh; min-height: 320px; border: 1px solid var(--bs-border-color); border-radius: .375rem; background: #fff; }
.rt-editor { min-height: 280px; overflow: auto; background: #fff; }
.error-card { max-width: 520px; margin-top: 3rem; }
.hdr dt { font-weight: 600; color: var(--bs-secondary-color); }
@media (max-width: 991.98px) { .sidebar { min-height: 0; } }

/* ===== نمایش مدرن پیام ===== */
.msg-card { overflow: hidden; }
.msg-head { padding: 1.25rem 1.5rem 1rem; border-bottom: 1px solid var(--bs-border-color); margin-bottom: 1rem; background: linear-gradient(180deg, #f8fbf9, #fff); }
.msg-subject { font-size: 1.35rem; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; color: #14231b; }
.sender-name { font-weight: 700; }
.sender-email { color: var(--bs-secondary-color); font-size: .85rem; display: inline-block; }
.msg-date { color: var(--bs-secondary-color); font-size: .85rem; white-space: nowrap; }
.msg-recips { overflow-wrap: anywhere; }
.msg-details dt { font-weight: 600; }
.avatar { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.15rem; line-height: 1; }
.avatar-sm { width: 34px; height: 34px; font-size: .95rem; }
.avatar-0 { background: #198754; } .avatar-1 { background: #0d6efd; } .avatar-2 { background: #6f42c1; } .avatar-3 { background: #d63384; }
.avatar-4 { background: #fd7e14; } .avatar-5 { background: #0dcaf0; color: #05323a; } .avatar-6 { background: #20c997; color: #053b2c; } .avatar-7 { background: #6c757d; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.att-card { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border: 1px solid var(--bs-border-color); border-radius: .6rem; background: #fff; text-decoration: none; color: inherit; }
.att-card:hover { border-color: #198754; background: #f3faf5; }
.att-icon { font-size: 1.5rem; line-height: 1; }
.att-name { font-weight: 600; font-size: .9rem; }
.mail-frame { height: 70vh; }
.mail-row .who { font-weight: 500; }
.mail-row { transition: background .12s; }
.mail-row:hover { background: #f6f9f7; }
@media (max-width: 575.98px) { .msg-head { padding: 1rem; } .msg-date { white-space: normal; } .avatar { width: 38px; height: 38px; } }
.app-credit { text-align: center; padding: .9rem 1rem 1.1rem; font-size: .8rem; color: #6c757d; }
@media print { .app-credit { display: none; } }
.captcha-box { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.captcha-img { width: 230px; max-width: 100%; height: auto; border: 1px solid var(--bs-border-color); border-radius: .5rem; background: #fff; user-select: none; -webkit-user-drag: none; }
.captcha-input { text-transform: uppercase; letter-spacing: .15em; text-align: center; }
.captcha-input::placeholder { text-transform: none; letter-spacing: normal; }



.login-logo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  
  animation: logo-flip 4s linear infinite;
  padding:5px;
}

@keyframes logo-flip {
  from { transform: perspective(600px) rotateY(0deg); }
  to   { transform: perspective(600px) rotateY(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .login-logo { animation: none; }
}