/* =========================================================================
   مدیریت دارایی اکوحسین - استایل فرانت (مطابق طرح اپ)
   بدون کتابخانه‌ی خارجی.
   ========================================================================= */

.ecoh-pf-wrap {
	direction: rtl;
	max-width: 600px;
	margin: 0 auto;
	padding: 16px;
	color: #e8edf6;
	font-family: inherit;
}
.ecoh-pf-login {
	text-align: center; padding: 40px 20px; background: #0f1b34;
	border-radius: 14px; color: #c3cad8;
}
.ecoh-pf-login a { color: #7d8dff; }

/* ---------- هدر ارزش کل ---------- */
.ecoh-pf-header { text-align: center; padding: 18px 0 24px; }
.ecoh-pf-total-label { color: #8d99b3; font-size: 14px; margin-bottom: 10px; }
.ecoh-pf-total-value { font-size: 28px; font-weight: 800; color: #fff; }
.ecoh-pf-total-value span { letter-spacing: .5px; }

/* ---------- دکمه‌های عملیات ---------- */
.ecoh-pf-actions {
	display: flex; gap: 12px; justify-content: center; margin-bottom: 24px;
}
.ecoh-pf-action {
	flex: 1; max-width: 130px;
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	background: #16233f; border: none; border-radius: 16px;
	padding: 16px 8px; cursor: pointer; color: #cdd5e6;
	font-family: inherit; font-size: 13px; transition: background .15s ease;
}
.ecoh-pf-action:hover { background: #1d2d4f; }
.ecoh-pf-action-ic {
	width: 44px; height: 44px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	font-size: 22px; background: #22304f; color: #5fd6a0;
}
.ecoh-pf-action-target .ecoh-pf-action-ic { background: #1f9d57; color: #fff; }

/* ---------- فیلتر دسته‌ها ---------- */
.ecoh-pf-filters {
	display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; margin-bottom: 10px;
	flex-direction: row-reverse; justify-content: flex-start;
}
.ecoh-pf-filter {
	white-space: nowrap; border: none; cursor: pointer;
	background: #16233f; color: #aab4c8;
	padding: 9px 18px; border-radius: 999px; font-family: inherit; font-size: 14px;
}
.ecoh-pf-filter-active { background: #fff; color: #0b1428; font-weight: 700; }

/* ---------- لیست دارایی‌ها ---------- */
.ecoh-pf-list { display: flex; flex-direction: column; gap: 14px; }
.ecoh-pf-loading, .ecoh-pf-empty {
	text-align: center; color: #8d99b3; padding: 30px 10px;
}
.ecoh-pf-item {
	background: #13213d; border-radius: 16px; padding: 16px 18px;
}
.ecoh-pf-item-top {
	display: flex; justify-content: space-between; align-items: center;
}
.ecoh-pf-item-right { display: flex; align-items: center; gap: 12px; flex-direction: row-reverse; }
.ecoh-pf-item-icon {
	width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
	display: flex; align-items: center; justify-content: center; background: #22304f; flex-shrink: 0;
}
.ecoh-pf-item-icon img { width: 100%; height: 100%; object-fit: cover; }
.ecoh-pf-item-icon-ph { font-weight: 700; color: #8d99b3; }
.ecoh-pf-item-name { font-size: 17px; font-weight: 700; color: #fff; }
.ecoh-pf-item-amount { color: #5fd6a0; font-size: 16px; font-weight: 700; }
.ecoh-pf-item-amount span { color: #6c7791; font-size: 13px; font-weight: 400; }
.ecoh-pf-item-bottom {
	display: flex; justify-content: space-between; align-items: center;
	margin-top: 14px; padding-top: 14px; border-top: 1px solid #1e2d4d;
}
.ecoh-pf-item-vlabel { color: #6c7791; font-size: 13px; }
.ecoh-pf-item-value { color: #cdd5e6; font-size: 15px; font-weight: 600; }

/* ---------- مودال ---------- */
.ecoh-pf-modal-overlay {
	position: fixed; inset: 0; background: rgba(5, 10, 22, .7);
	display: none; align-items: flex-end; justify-content: center; z-index: 99999;
}
.ecoh-pf-modal-overlay.ecoh-pf-open { display: flex; animation: ecohpf-fade .2s ease; }
@keyframes ecohpf-fade { from { opacity: 0; } to { opacity: 1; } }

.ecoh-pf-modal {
	direction: rtl; background: #0b1428; width: 100%; max-width: 600px;
	border-radius: 22px 22px 0 0; padding: 26px 20px 30px;
	max-height: 92vh; overflow-y: auto; position: relative;
	box-shadow: 0 -10px 40px rgba(0,0,0,.5);
	animation: ecohpf-slide .25s ease;
}
@media (min-width: 620px) {
	.ecoh-pf-modal-overlay { align-items: center; }
	.ecoh-pf-modal { border-radius: 22px; }
}
@keyframes ecohpf-slide { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ecoh-pf-modal-wide { max-width: 640px; }

.ecoh-pf-modal-close {
	position: absolute; top: 18px; left: 18px;
	background: none; border: none; color: #8d99b3; font-size: 20px; cursor: pointer;
}
.ecoh-pf-modal-title { text-align: center; font-size: 20px; color: #fff; margin: 0 0 22px; }

.ecoh-pf-field-label { display: block; font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.ecoh-pf-field-head { display: flex; justify-content: space-between; align-items: center; }
.ecoh-pf-field-hint { font-size: 12px; color: #8d99b3; font-weight: 400; }

/* سلکت سفارشی */
.ecoh-pf-select { position: relative; margin-bottom: 20px; }
.ecoh-pf-select-btn {
	width: 100%; display: flex; justify-content: space-between; align-items: center;
	background: #13213d; border: 1px solid #243353; color: #cdd5e6;
	padding: 16px 18px; border-radius: 14px; cursor: pointer; font-family: inherit; font-size: 15px;
}
.ecoh-pf-select-arrow { color: #6c7791; }
.ecoh-pf-select-dropdown {
	position: absolute; top: calc(100% + 6px); right: 0; left: 0;
	background: #13213d; border: 1px solid #243353; border-radius: 14px;
	padding: 12px; z-index: 5; max-height: 320px; overflow-y: auto;
}
.ecoh-pf-select-search {
	width: 100%; background: #0b1428; border: 1px solid #243353; color: #fff;
	padding: 12px 14px; border-radius: 10px; margin-bottom: 10px; font-family: inherit; font-size: 14px;
}
.ecoh-pf-opt {
	display: flex; align-items: center; gap: 10px; flex-direction: row-reverse;
	padding: 12px 10px; border-radius: 10px; cursor: pointer; color: #e8edf6;
}
.ecoh-pf-opt:hover { background: #1b2a49; }
.ecoh-pf-opt img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.ecoh-pf-opt-ph {
	width: 30px; height: 30px; border-radius: 50%; background: #2b3a5c;
	display: flex; align-items: center; justify-content: center; font-size: 13px; color: #aab4c8;
}
.ecoh-pf-opt-empty { text-align: center; color: #8d99b3; padding: 16px; }

/* فیلدهای مقدار/ارزش */
.ecoh-pf-field {
	background: #13213d; border: 1px solid #243353;
	border-radius: 14px; padding: 16px; margin-bottom: 4px;
}
.ecoh-pf-input-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ecoh-pf-input-row input {
	flex: 1; background: transparent; border: none; color: #fff;
	font-size: 18px; font-family: inherit; text-align: left; direction: ltr; outline: none;
}
.ecoh-pf-input-row input::placeholder { color: #4a5878; font-size: 14px; }
.ecoh-pf-input-unit { font-weight: 700; font-size: 14px; }
.ecoh-pf-unit-amount { color: #7d8dff; }
.ecoh-pf-unit-value { color: #5fd6a0; }
.ecoh-pf-value-words { margin-top: 8px; color: #6c7791; font-size: 12px; }

.ecoh-pf-swap {
	width: 38px; height: 38px; margin: 6px auto; border-radius: 50%;
	background: #22304f; color: #aab4c8; display: flex; align-items: center; justify-content: center;
	font-size: 18px;
}

.ecoh-pf-modal-msg { text-align: center; font-size: 13px; min-height: 18px; margin: 10px 0; }
.ecoh-pf-modal-msg.err { color: #f87171; }

/* دکمه‌ها */
.ecoh-pf-btn {
	display: block; width: 100%; text-align: center; text-decoration: none;
	border: none; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 16px;
	padding: 16px; border-radius: 14px; margin-top: 12px;
}
.ecoh-pf-btn-primary { background: linear-gradient(135deg, #4f63ff, #3b4ee0); color: #fff !important; }
.ecoh-pf-btn-primary:disabled { opacity: .45; cursor: not-allowed; }

/* لیست ویرایش */
.ecoh-pf-edit-note { color: #8d99b3; font-size: 14px; text-align: center; margin-bottom: 16px; }
.ecoh-pf-edit-list { display: flex; flex-direction: column; gap: 10px; }
.ecoh-pf-edit-item {
	display: flex; align-items: center; gap: 12px; background: #13213d;
	border-radius: 12px; padding: 14px 16px; cursor: pointer;
}
.ecoh-pf-edit-item:hover { background: #1b2a49; }
.ecoh-pf-edit-name { flex: 1; font-weight: 700; color: #fff; }
.ecoh-pf-edit-amount { color: #5fd6a0; font-size: 14px; }
.ecoh-pf-edit-del { color: #f87171; font-size: 13px; padding: 4px 8px; }
.ecoh-pf-edit-del:hover { text-decoration: underline; }

/* پورتفوی هدف */
.ecoh-pf-target-locked { text-align: center; padding: 30px 16px; }
.ecoh-pf-lock-ic { font-size: 44px; margin-bottom: 12px; }
.ecoh-pf-lock-text { color: #cdd5e6; font-size: 15px; margin-bottom: 20px; line-height: 1.9; }

.ecoh-pf-target-head { color: #cdd5e6; font-size: 15px; margin-bottom: 20px; text-align: center; }
.ecoh-pf-target-head strong { color: #5fd6a0; }

.ecoh-pf-chart { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.ecoh-pf-chart-name { font-size: 14px; color: #fff; margin-bottom: 8px; font-weight: 600; }
.ecoh-pf-bars { display: flex; flex-direction: column; gap: 6px; }
.ecoh-pf-bar-track {
	position: relative; background: #13213d; border-radius: 8px; height: 26px; overflow: hidden;
}
.ecoh-pf-bar { height: 100%; border-radius: 8px; transition: width .4s ease; }
.ecoh-pf-bar-target { background: linear-gradient(90deg, #4f63ff, #6f7dff); }
.ecoh-pf-bar-current { background: linear-gradient(90deg, #1f9d57, #2fd07a); }
.ecoh-pf-bar-track span {
	position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
	font-size: 12px; color: #fff; font-weight: 600;
}

.ecoh-pf-target-table {
	width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px;
}
.ecoh-pf-target-table th, .ecoh-pf-target-table td {
	padding: 10px; text-align: center; border-bottom: 1px solid #1e2d4d; color: #cdd5e6;
}
.ecoh-pf-target-table th { color: #8d99b3; font-weight: 600; }
.ecoh-pf-target-table td.pos { color: #f87171; }
.ecoh-pf-target-table td.neg { color: #5fd6a0; }
.ecoh-pf-target-note { color: #6c7791; font-size: 12px; margin-top: 16px; line-height: 1.9; text-align: center; }
