/**
 * Üretim Maliyet Hesaplayıcı – frontend stilleri.
 * Tüm seçiciler "umh-" ön ekiyle izole edilmiştir.
 */

.umh-app {
	--umh-bg: #ffffff;
	--umh-surface: #f7f9fc;
	--umh-border: #dfe5ee;
	--umh-text: #1b2733;
	--umh-muted: #64748b;
	/* Füllen marka rengi (#ff9b00) ve türevleri.
	   Turuncu beyaz zeminde okunmadığı için başlık/metin tonu koyulaştırılır;
	   turuncu zeminde metin koyu antrasit olur (kontrast ~7:1). */
	--umh-primary: #ff9b00;
	--umh-primary-dark: #e08a00;
	--umh-primary-text: #a35f00;
	--umh-on-primary: #16202b;
	--umh-dark: #16202b;
	--umh-dark-2: #1f2c3a;
	--umh-success: #0f7b3f;
	--umh-success-bg: #e7f6ed;
	--umh-danger: #b32424;
	--umh-danger-bg: #fdecec;
	--umh-warn-bg: #fff7e6;
	--umh-warn-border: #f0c36d;
	--umh-radius: 10px;

	box-sizing: border-box;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0;
	color: var(--umh-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
}

.umh-app *,
.umh-app *::before,
.umh-app *::after {
	box-sizing: border-box;
}

/* ---------- Başlık ---------- */

.umh-header {
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 2px solid var(--umh-border);
}

.umh-app .umh-title {
	margin: 0 0 6px;
	font-size: 26px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--umh-text);
}

.umh-app .umh-subtitle {
	margin: 0;
	font-size: 14px;
	color: var(--umh-muted);
}

/* ---------- Bilgilendirme (disclaimer) ---------- */

.umh-app .umh-disclaimer {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 22px;
	padding: 13px 16px;
	border-radius: var(--umh-radius);
	font-size: 13px;
	line-height: 1.5;
}

.umh-app .umh-disclaimer p {
	margin: 0;
}

.umh-disclaimer-top {
	background: #fff6e6;
	border: 1px solid #f5cf8e;
	color: #5c4413;
}

.umh-disclaimer-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--umh-primary);
	color: var(--umh-on-primary);
	font-size: 12px;
	font-weight: 700;
	font-style: italic;
}

.umh-disclaimer-bottom {
	margin: 14px 0 0;
	background: var(--umh-surface);
	border: 1px solid var(--umh-border);
	color: var(--umh-muted);
	font-size: 12px;
}

@media (max-width: 480px) {
	.umh-app .umh-disclaimer {
		padding: 12px 13px;
		font-size: 12.5px;
	}
}

/* ---------- Form bölümleri ---------- */

.umh-section {
	margin-bottom: 20px;
	padding: 18px 20px;
	background: var(--umh-surface);
	border: 1px solid var(--umh-border);
	border-radius: var(--umh-radius);
}

.umh-app .umh-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--umh-primary-text);
}

.umh-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--umh-primary);
	color: var(--umh-on-primary);
	font-size: 13px;
	font-weight: 700;
}

.umh-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px 18px;
}

.umh-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

/* Etiketler iki satira tasabildigi icin sabit yukseklik veriyoruz;
   boylece ayni satirdaki tum inputlar ayni hizada baslar. */
.umh-label {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 0 5px;
	min-height: 2.7em;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--umh-text);
}

.umh-label em {
	font-style: normal;
	font-weight: 400;
	color: var(--umh-muted);
}

.umh-app .umh-input {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid var(--umh-border);
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	color: var(--umh-text);
	line-height: 1.4;
	height: auto;
	box-shadow: none;
}

/* Tema select oklarını sıfırlayabildiği için kendi okumuzu çiziyoruz. */
.umh-app select.umh-input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
	cursor: pointer;
}

.umh-app .umh-input:focus {
	outline: none;
	border-color: var(--umh-primary);
	box-shadow: 0 0 0 3px rgba(255, 155, 0, .28);
}

.umh-app .umh-input.umh-invalid {
	border-color: var(--umh-danger);
	background: var(--umh-danger-bg);
}

.umh-error {
	min-height: 14px;
	font-size: 12px;
	color: var(--umh-danger);
}

.umh-hint {
	font-size: 12px;
	color: var(--umh-muted);
}

.umh-field .umh-hint {
	margin-top: -2px;
}

.umh-readonly .umh-computed {
	padding: 10px 12px;
	background: #eef2f7;
	border: 1px dashed var(--umh-border);
	border-radius: 8px;
	font-weight: 700;
	color: var(--umh-primary-text);
}

.umh-app .umh-section-title .umh-optional {
	font-style: normal;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: var(--umh-muted);
	font-size: 13px;
}

.umh-app .umh-section-note {
	margin: -6px 0 14px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--umh-muted);
}

.umh-app .umh-panel-note {
	margin: 12px 0 0;
	padding-top: 10px;
	border-top: 1px dashed var(--umh-border);
	font-size: 12px;
	line-height: 1.45;
	color: var(--umh-muted);
}

.umh-app .umh-panel[hidden],
.umh-app .umh-card[hidden] {
	display: none;
}

/* ---------- Tarife kutusu ---------- */

.umh-tariff-box {
	margin-top: 16px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid var(--umh-border);
	border-radius: 8px;
}

.umh-tariff-loading {
	color: var(--umh-muted);
	font-size: 14px;
}

.umh-tariff-error {
	color: var(--umh-danger);
	font-size: 14px;
	font-weight: 600;
}

.umh-tariff-warn {
	margin-bottom: 10px;
	padding: 8px 10px;
	background: var(--umh-warn-bg);
	border: 1px solid var(--umh-warn-border);
	border-radius: 6px;
	font-size: 13px;
}

/* ---------- Manuel elektrik fiyatı ---------- */

.umh-manual-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}

.umh-app .umh-linkbtn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 7px 12px;
	background: #fff;
	border: 1px solid var(--umh-border);
	border-radius: 999px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--umh-primary-text);
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}

.umh-app .umh-linkbtn:hover {
	border-color: var(--umh-primary);
	background: var(--umh-primary-soft, #fff7ec);
}

.umh-app .umh-linkbtn:focus-visible {
	outline: 2px solid var(--umh-primary);
	outline-offset: 2px;
}

.umh-manual-box {
	margin-top: 12px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid var(--umh-primary);
	border-radius: 8px;
}

.umh-manual-box[hidden] {
	display: none;
}

.umh-manual-note {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--umh-muted);
}

.umh-manual-note strong {
	color: var(--umh-text);
}

.umh-tariff-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 10px 16px;
}

.umh-tariff-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.umh-tariff-item span {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--umh-muted);
}

.umh-tariff-item b {
	font-size: 15px;
	color: var(--umh-text);
	overflow-wrap: anywhere;
}

.umh-tariff-detail {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed var(--umh-border);
	font-size: 12px;
	color: var(--umh-muted);
}

/* ---------- Butonlar ---------- */

.umh-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 24px 0;
}

.umh-app .umh-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .04em;
	padding: 14px 34px;
	transition: background-color .15s ease, color .15s ease;
}

.umh-app .umh-btn-primary {
	flex: 1 1 260px;
	background: var(--umh-primary);
	color: var(--umh-on-primary);
}

.umh-app .umh-btn-primary:hover {
	background: var(--umh-primary-dark);
	color: var(--umh-on-primary);
}

.umh-app .umh-btn-ghost {
	background: #fff;
	border-color: var(--umh-border);
	color: var(--umh-muted);
	font-weight: 600;
}

.umh-app .umh-btn-ghost:hover {
	border-color: var(--umh-primary);
	color: var(--umh-primary);
}

/* ---------- Sonuçlar ---------- */

.umh-results[hidden] {
	display: none;
}

.umh-highlight-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 14px;
	margin-bottom: 22px;
}

.umh-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px;
	background: linear-gradient(180deg, var(--umh-primary) 0%, var(--umh-primary-dark) 100%);
	border-radius: var(--umh-radius);
	color: #fff;
	text-shadow: 0 1px 2px rgba(120, 62, 0, .35);
}

.umh-card-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .06em;
	opacity: .95;
}

.umh-card-value {
	font-size: 22px;
	font-weight: 700;
	color: #fff;
	overflow-wrap: anywhere;
}

.umh-card-breakdown {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-top: 6px;
	padding-top: 8px;
	border-top: 1px solid rgba(255, 255, 255, .35);
}

.umh-card-breakdown > span {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.umh-card-breakdown i {
	font-style: normal;
	font-size: 12.5px;
	color: #fff;
	opacity: .95;
}

.umh-card-breakdown b {
	font-size: 12.5px;
	font-weight: 600;
	color: #fff;
	overflow-wrap: anywhere;
}

.umh-card-sub {
	font-size: 12.5px;
	font-weight: 600;
	color: #fff;
	opacity: 1;
}

/* Gün karşılığı, üstündeki saat/dakika değeriyle aynı boyutta gösterilir. */
.umh-card-sub-lg {
	font-size: 22px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.umh-card-profit {
	background: linear-gradient(180deg, var(--umh-primary) 0%, var(--umh-primary-dark) 100%);
}

.umh-card-profit.umh-positive {
	background: linear-gradient(180deg, #12864a 0%, #0f7b3f 100%);
}

.umh-card-profit.umh-negative {
	background: linear-gradient(180deg, #c22f2f 0%, #a82323 100%);
}

.umh-panels {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 16px;
}

.umh-panel {
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--umh-border);
	border-radius: var(--umh-radius);
}

.umh-app .umh-panel-title {
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--umh-border);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--umh-primary-text);
}

.umh-app .umh-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.umh-app .umh-list li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 8px 0;
	border-bottom: 1px dashed #eef1f6;
	list-style: none;
}

.umh-app .umh-list li:last-child {
	border-bottom: 0;
}

/* [hidden] satirlar display:flex tarafindan ezilmesin. */
.umh-app .umh-list li[hidden] {
	display: none !important;
}

.umh-app .umh-list li span {
	font-size: 13px;
	color: var(--umh-muted);
}

.umh-app .umh-list li b {
	font-size: 14px;
	font-weight: 700;
	text-align: right;
	overflow-wrap: anywhere;
}

/* ---------- Dışa aktarma ---------- */

.umh-export {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--umh-border);
}

.umh-app .umh-btn-outline {
	background: #fff;
	border-color: var(--umh-primary);
	color: var(--umh-primary-text);
	font-size: 14px;
	font-weight: 700;
	padding: 11px 20px;
}

.umh-app .umh-btn-outline:hover {
	background: var(--umh-primary);
	color: var(--umh-on-primary);
}

.umh-export-note {
	flex: 1 1 240px;
	font-size: 12px;
	color: var(--umh-muted);
}

@media (max-width: 480px) {
	.umh-app .umh-btn-outline {
		flex: 1 1 100%;
	}
}

.umh-footnote {
	margin-top: 18px;
	font-size: 12px;
	color: var(--umh-muted);
}

/* ---------- Duyarlı (responsive) ---------- */

@media (max-width: 782px) {
	.umh-app { font-size: 15px; }
	.umh-app .umh-title { font-size: 22px; }
	.umh-section { padding: 16px 14px; }
	.umh-card-value { font-size: 20px; }
}

@media (max-width: 480px) {
	.umh-grid,
	.umh-highlight-grid,
	.umh-panels,
	.umh-tariff-grid {
		grid-template-columns: 1fr;
	}

	.umh-app .umh-btn-primary {
		flex: 1 1 100%;
	}

	.umh-label {
		min-height: 0;
	}

	.umh-app .umh-list li {
		flex-direction: column;
		align-items: flex-start;
	}

	.umh-app .umh-list li b {
		text-align: left;
	}

	/* MADDE 18: yeni alanların dar ekranda taşmaması. */
	.umh-card-breakdown {
		grid-template-columns: 1fr;
	}

	.umh-card-breakdown > span {
		justify-content: space-between;
	}

	.umh-export {
		flex-direction: column;
		align-items: stretch;
	}

	.umh-app .umh-disclaimer {
		padding: 12px 12px;
		font-size: 12px;
	}

	.umh-disclaimer-top {
		flex-direction: column;
		gap: 8px;
	}
}

/* Makine seçimi: tarife kutusunun hemen üstünde, elektrik bölümünün parçası. */
.umh-app .umh-grid-machine {
	margin-top: 14px;
}

.umh-app .umh-field[hidden] {
	display: none !important;
}
