/* IJC Portal — front styles. Consumes the child theme tokens (--ijc-*) with
   Stitch fallbacks, so it looks right with or without ijc-hello-child. */
.ijc-portal {
	--p-primary: var(--ijc-primary, var(--e-global-color-primary, #102a43));
	--p-on-primary: var(--ijc-on-primary, #ffffff);
	--p-surface: var(--ijc-surface, #f7f9ff);
	--p-surface-2: var(--ijc-surface-container, #edf4ff);
	--p-surface-3: var(--ijc-surface-container-high, #e3efff);
	--p-card: var(--ijc-surface-lowest, #ffffff);
	--p-text: var(--ijc-on-surface, #0f1c2c);
	--p-muted: var(--ijc-on-surface-variant, #44474e);
	--p-border: var(--ijc-outline-variant, #c4c6cf);
	--p-radius: var(--ijc-radius, 8px);
	--p-ok: #1b6b3a; --p-ok-bg: #e3f4e8;
	--p-warn: #7a4b00; --p-warn-bg: #fff1d6;
	--p-err: #a1251b; --p-err-bg: #fde8e6;
	--p-info: #1d4f8a; --p-info-bg: #e3efff;
	direction: rtl;
	font-family: var(--ijc-font, inherit), Vazirmatn, Tahoma, sans-serif;
	color: var(--p-text);
	max-width: 960px;
	margin-inline: auto;
	line-height: 1.8;
	font-size: 15px;
}
.ijc-portal *, .ijc-portal *::before, .ijc-portal *::after { box-sizing: border-box; }
/* Theme-proof lists: content styles of the host theme must not number or indent portal lists. */
.ijc-portal ol, .ijc-portal ul { list-style: none !important; margin: 0; padding: 0 !important; }
.ijc-portal li { list-style: none !important; margin: 0; padding-inline-start: 0; }
.ijc-portal li::before, .ijc-portal li::marker { content: none !important; }
.ijc-portal img { max-width: 100%; height: auto; }
.ijc-portal a { box-shadow: none; }
.ijc-card { background: var(--p-card); border: 1px solid var(--p-surface-3); border-radius: var(--p-radius); padding: 24px; box-shadow: 0 1px 2px rgba(16,42,67,.06); }
.ijc-login { max-width: 440px; margin-inline: auto; }
.ijc-title { font-size: 1.35rem; font-weight: 700; margin: 0 0 8px; color: var(--p-primary); line-height: 1.5; }
.ijc-muted { color: var(--p-muted); font-size: .9em; }
.ijc-hint { color: var(--p-muted); font-size: .82rem; margin: 4px 0 0; }
.ijc-req { color: var(--p-err); }
.ijc-ltr { direction: ltr; text-align: right; unicode-bidi: plaintext; }
.ijc-form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ijc-form[hidden], .ijc-portal [hidden] { display: none !important; }
.ijc-label { font-weight: 600; font-size: .9rem; margin-top: 10px; display: block; }
.ijc-input { width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: inherit; background: var(--p-surface); border: 1px solid var(--p-border); border-radius: var(--p-radius); transition: border-color .15s, box-shadow .15s; }
.ijc-input:focus { outline: none; border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(16,42,67,.15); }
.ijc-input[disabled] { background: var(--p-surface-2); color: var(--p-muted); }
textarea.ijc-input { min-height: 120px; resize: vertical; }
.ijc-code { font-size: 1.5rem; letter-spacing: .5em; text-align: center; }
.ijc-file { font: inherit; font-size: .9rem; max-width: 100%; }
.ijc-check { display: flex; gap: 8px; align-items: center; margin-top: 12px; cursor: pointer; }
.ijc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 20px; font: inherit; font-weight: 600; background: var(--p-primary); color: var(--p-on-primary) !important; border: 1px solid var(--p-primary); border-radius: var(--p-radius); text-decoration: none !important; cursor: pointer; transition: opacity .15s; }
.ijc-btn:hover { opacity: .9; }
.ijc-btn[disabled], .ijc-btn.is-busy { opacity: .6; cursor: progress; }
.ijc-btn--block { width: 100%; margin-top: 12px; }
.ijc-btn--ghost { background: transparent; color: var(--p-primary) !important; }
.ijc-link { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--p-primary); cursor: pointer; text-decoration: underline; }
.ijc-link[disabled] { color: var(--p-muted); cursor: default; text-decoration: none; }
.ijc-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ijc-row--between { justify-content: space-between; }
.ijc-actions { margin-top: 16px; }
.ijc-alert { padding: 10px 14px; border-radius: var(--p-radius); margin: 12px 0; font-size: .92rem; }
.ijc-alert--error { background: var(--p-err-bg); color: var(--p-err); }
.ijc-alert--success { background: var(--p-ok-bg); color: var(--p-ok); }
.ijc-alert--warn { background: var(--p-warn-bg); color: var(--p-warn); }
.ijc-alert--info { background: var(--p-info-bg); color: var(--p-info); }
.ijc-alert a { color: inherit; font-weight: 700; }
.ijc-field-error { color: var(--p-err); font-size: .85rem; margin: 4px 0 0; }
.ijc-nav { display: flex; gap: 4px; margin-bottom: 16px; background: var(--p-surface-2); padding: 4px; border-radius: var(--p-radius); overflow-x: auto; }
.ijc-nav__item { padding: 8px 16px; border-radius: calc(var(--p-radius) - 2px); color: var(--p-primary); text-decoration: none; white-space: nowrap; font-weight: 500; }
.ijc-nav__item.is-active { background: var(--p-card); box-shadow: 0 1px 2px rgba(16,42,67,.1); font-weight: 700; }
.ijc-nav__logout { margin-inline-start: auto; color: var(--p-muted); }
.ijc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ijc-grid__full { grid-column: 1 / -1; }
.ijc-avatar-row { display: flex; gap: 16px; align-items: center; }
.ijc-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; background: var(--p-surface-2); flex: none; }
.ijc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.ijc-chip { padding: 4px 14px; border-radius: 999px; border: 1px solid var(--p-border); color: var(--p-text); text-decoration: none; font-size: .85rem; background: var(--p-card); }
.ijc-chip.is-active { background: var(--p-primary); border-color: var(--p-primary); color: var(--p-on-primary); }
.ijc-pager { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.ijc-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; line-height: 1.8; }
.ijc-pill--info { background: var(--p-info-bg); color: var(--p-info); }
.ijc-pill--pending { background: var(--p-warn-bg); color: var(--p-warn); }
.ijc-pill--success { background: var(--p-ok-bg); color: var(--p-ok); }
.ijc-pill--neutral { background: #eceef1; color: #50555c; }
.ijc-empty { text-align: center; padding: 32px 8px; }
.ijc-tickets { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--p-surface-3); }
.ijc-ticket-row a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--p-surface-3); color: inherit; text-decoration: none; flex-wrap: wrap; }
.ijc-ticket-row a:hover { background: var(--p-surface); }
.ijc-ticket-row__main { display: flex; flex-direction: column; min-width: 0; }
.ijc-ticket-row__ref { font-size: .78rem; color: var(--p-muted); font-family: ui-monospace, monospace; }
.ijc-ticket-row__subject { font-weight: 600; color: var(--p-primary); overflow-wrap: anywhere; }
.ijc-ticket-row__meta { display: flex; gap: 12px; align-items: center; font-size: .82rem; color: var(--p-muted); flex-wrap: wrap; }
.ijc-back { display: inline-block; margin-bottom: 12px; color: var(--p-muted); text-decoration: none; font-size: .9rem; }
.ijc-thread-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--p-surface-3); padding-bottom: 12px; margin-bottom: 12px; }
.ijc-thread-head .ijc-title { margin: 2px 0; overflow-wrap: anywhere; }
.ijc-thread { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ijc-msg { padding: 12px 16px; border-radius: var(--p-radius); max-width: 88%; }
.ijc-msg--user { background: var(--p-surface-2); align-self: flex-start; }
.ijc-msg--staff { background: var(--p-card); border: 1px solid var(--p-surface-3); align-self: flex-end; }
.ijc-msg--note { background: var(--p-warn-bg); border-color: #f0d7a6; }
.ijc-msg--system { align-self: center; max-width: 100%; background: none; padding: 2px 8px; font-size: .8rem; color: var(--p-muted); text-align: center; }
.ijc-msg--system time { margin-inline-start: 6px; }
.ijc-msg__head { display: flex; gap: 8px; align-items: center; font-size: .85rem; margin-bottom: 4px; flex-wrap: wrap; }
.ijc-msg__head time { color: var(--p-muted); margin-inline-start: auto; font-size: .78rem; }
.ijc-msg__body { overflow-wrap: anywhere; text-align: start; }
.ijc-attachments { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ijc-attachments a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--p-border); border-radius: var(--p-radius); background: var(--p-card); color: inherit; text-decoration: none; font-size: .82rem; max-width: 280px; }
.ijc-attachments img { width: 40px !important; height: 40px !important; object-fit: cover; border-radius: 4px; }
.ijc-attachments__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.ijc-file-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 4px; background: var(--p-surface-3); color: var(--p-primary); font-size: .7rem; font-weight: 700; }
.ijc-composer { border-top: 1px solid var(--p-surface-3); padding-top: 8px; }
.ijc-close-form { margin-top: 12px; text-align: left; }
.ijc-counter { text-align: left; }
.ijc-account-link { font-weight: 600; }
@media (max-width: 640px) {
	.ijc-card { padding: 16px; }
	.ijc-grid { grid-template-columns: 1fr; }
	.ijc-msg { max-width: 100%; }
	.ijc-thread-head { flex-direction: column; }
	.ijc-close-form { text-align: right; }
	.ijc-close-form .ijc-btn { width: 100%; }
}
