.mb-panel {
	max-width: 1100px;
	margin: 0 auto;
	font-family: inherit;
	color: #1f2937;
}

.mb-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 10px;
}

.mb-panel__header h2 {
	margin: 0;
	font-size: 20px;
}

.mb-btn {
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 9px 16px;
	font-size: 14px;
	cursor: pointer;
	transition: all .15s ease;
}
.mb-btn:hover { background: #e5e7eb; }
.mb-btn--primary { background: #0f766e; border-color: #0f766e; color: #fff; }
.mb-btn--primary:hover { background: #0d5c56; }
.mb-btn--ghost { background: transparent; }
.mb-btn--block { width: 100%; margin-top: 8px; }
.mb-btn--danger { color: #b91c1c; }

.mb-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
	background: #f9fafb;
	padding: 12px;
	border-radius: 10px;
	border: 1px solid #eee;
}
.mb-filters select,
.mb-filters input {
	padding: 8px 10px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 13px;
}

.mb-documents {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 14px;
}

.mb-doc-card {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 14px;
	background: #fff;
	position: relative;
	transition: box-shadow .15s ease;
}
.mb-doc-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); }

.mb-doc-card__type {
	display: inline-block;
	font-size: 11px;
	background: #ecfdf5;
	color: #047857;
	padding: 3px 9px;
	border-radius: 999px;
	margin-bottom: 8px;
}

.mb-doc-card__title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 6px;
}

.mb-doc-card__meta {
	font-size: 12.5px;
	color: #6b7280;
	line-height: 1.9;
}

.mb-doc-card__actions {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.mb-loading, .mb-empty {
	grid-column: 1/-1;
	text-align: center;
	color: #9ca3af;
	padding: 30px 0;
}

/* مودال */
.mb-modal {
	position: fixed; inset: 0;
	background: rgba(17,24,39,.5);
	display: flex; align-items: center; justify-content: center;
	z-index: 9999;
	padding: 16px;
}
.mb-modal[hidden] { display: none; }
.mb-modal__box {
	background: #fff;
	border-radius: 14px;
	padding: 24px;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
}
.mb-modal__close {
	position: absolute; top: 12px; left: 12px;
	background: none; border: none; font-size: 22px; cursor: pointer; color: #9ca3af;
}

.mb-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 5px; }
.mb-field label { font-size: 13px; font-weight: 600; }
.mb-field input, .mb-field select {
	padding: 9px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13.5px;
}
.mb-field small { color: #9ca3af; font-size: 11px; }
.mb-field-row { display: flex; gap: 10px; }
.mb-field-row .mb-field { flex: 1; }

.mb-progress-bar { background: #e5e7eb; border-radius: 6px; overflow: hidden; height: 8px; }
.mb-progress-bar span { display: block; height: 100%; background: #0f766e; width: 0%; transition: width .2s; }

.mb-form-msg { font-size: 13px; margin-bottom: 8px; }
.mb-form-msg--error { color: #b91c1c; }
.mb-form-msg--success { color: #047857; }

.mb-panel--locked {
	text-align: center;
	padding: 40px;
	background: #f9fafb;
	border-radius: 12px;
	color: #6b7280;
}

/* انتخاب‌گر روش افزودن مدرک */
.mb-modal__box--sm { max-width: 380px; }
.mb-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.mb-choice-card {
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	border: 1.5px solid #e5e7eb; border-radius: 14px; padding: 18px 10px;
	background: #fff; cursor: pointer; transition: all .15s ease; text-align: center;
}
.mb-choice-card:hover { border-color: #0f766e; box-shadow: 0 4px 14px rgba(15,118,110,.12); }
.mb-choice-card__icon { font-size: 26px; }
.mb-choice-card__title { font-weight: 700; font-size: 13px; }
.mb-choice-card__desc { font-size: 11px; color: #6b7280; }

/* اسکن هوشمند */
.mb-scan-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.mb-scan-btn { flex: 1; text-align: center; cursor: pointer; }
.mb-scan-preview { text-align: center; }
.mb-scan-preview img { max-width: 100%; max-height: 220px; border-radius: 10px; margin-bottom: 10px; }
.mb-scan-status { font-size: 12.5px; color: #6b7280; text-align: center; padding: 10px; }
.mb-scan-summary {
	background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857;
	border-radius: 10px; padding: 10px 12px; font-size: 12px; margin-bottom: 14px;
}

/* ردیف فیلتر تاریخ شمسی */
.mb-jcal-inline input[type="text"] {
	padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; width: 120px;
}
