/* Customer pages after login (Profile first; the others will follow). Same palette as auth.css and Home v2. */
.yd-acc {
	--or: #106a99; --or-dark: #0b5279; --ink: #1f2a37; --muted: #6b7684; --line: #e3e8ee; --soft: #f7f9fb;
	--ok: #1e7a45; --ok-bg: #e8f6ee; --bad: #a42222; --bad-bg: #fdecec;
	max-width: 960px; margin: 24px auto 48px; padding: 0 16px; box-sizing: border-box; color: var(--ink);
	font-size: 16px; line-height: 1.5;
}
.yd-acc *, .yd-acc *::before, .yd-acc *::after { box-sizing: border-box; }
.yd-acc h2, .yd-acc h3 { margin: 0; color: var(--ink); }

/* Greeting bar */
.yd-acc-head {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px;
	padding: 22px 24px; border-radius: 18px; color: #fff; margin-bottom: 18px;
	background: linear-gradient(135deg, #106a99 0%, #2b8fc7 100%);
}
.yd-acc-head h2 { color: #fff; font-size: 26px; font-weight: 800; overflow-wrap: anywhere; }
.yd-acc-head p { margin: 4px 0 0; opacity: .92; }

/* Buttons */
.yd-acc .yd-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px;
	border-radius: 12px; font-weight: 800; font-size: 16px; text-decoration: none !important; border: 0; cursor: pointer;
	background: var(--or); color: #fff; transition: background .15s, transform .15s; white-space: nowrap;
}
.yd-acc .yd-btn:hover { background: var(--or-dark); color: #fff; transform: translateY(-1px); }
.yd-acc .yd-btn.is-light { background: #fff; color: var(--or); }
.yd-acc .yd-btn.is-light:hover { background: #e8f2fa; color: var(--or-dark); }

/* Stat tiles */
.yd-acc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.yd-stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.yd-stat .k { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.yd-stat .v { margin-top: 6px; font-size: 22px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.yd-stat .v.is-big { font-size: 30px; color: var(--or); }
.yd-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 15px; font-weight: 800; }
.yd-badge.is-ok { background: var(--ok-bg); color: var(--ok); }
.yd-badge.is-bad { background: var(--bad-bg); color: var(--bad); }

/* Cards */
.yd-acc-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; margin-bottom: 18px; }
.yd-acc-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: 0 2px 8px rgba(31, 42, 55, .04); }
.yd-acc-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.yd-acc-card .sub { margin: -6px 0 14px; color: var(--muted); font-size: 15px; }

.yd-dl { margin: 0; }
.yd-dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.yd-dl > div:first-child { border-top: 0; padding-top: 0; }
.yd-dl dt { color: var(--muted); font-weight: 600; flex: 0 0 auto; }
.yd-dl dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; min-width: 0; }

.yd-links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.yd-links li { margin: 0; list-style: none; }
.yd-links a {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px;
	border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 700; text-decoration: none; background: var(--soft);
}
.yd-links a:hover { border-color: var(--or); color: var(--or); background: #f2f8fc; }
.yd-links a::after { content: "\203A"; font-size: 22px; line-height: 1; color: var(--or); }

/* Forms */
.yd-acc label { display: block; margin: 0 0 6px; font-weight: 700; font-size: 14px; }
.yd-acc input[type=text], .yd-acc select {
	height: 46px; margin: 0; padding: 0 14px; font-size: 16px; color: var(--ink);
	background: #fff; border: 1px solid #cfd8e3; border-radius: 12px; box-shadow: none; width: 100%;
}
.yd-acc input:focus, .yd-acc select:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 3px rgba(16, 106, 153, .15); }
.yd-form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.yd-form-row .yd-group { display: flex; flex: 1 1 320px; min-width: 0; }
.yd-form-row .yd-group input { flex: 1 1 auto; min-width: 0; border-radius: 12px 0 0 12px; }
.yd-form-row .yd-group select { flex: 0 0 auto; width: auto; max-width: 50%; border-left: 0; border-radius: 0 12px 12px 0; }

.yd-acc .yd-alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; font-weight: 600; border: 1px solid; }
.yd-acc .yd-alert.is-error { background: var(--bad-bg); border-color: #f5c2c2; color: var(--bad); }
.yd-acc .yd-alert.is-ok { background: var(--ok-bg); border-color: #bfe5cd; color: var(--ok); }
.yd-acc .yd-alert.is-info { background: #f2f8fc; border-color: #c9def0; color: #8a4512; }

.yd-acc input[type=date] {
	height: 46px; margin: 0; padding: 0 12px; font-size: 16px; color: var(--ink);
	background: #fff; border: 1px solid #cfd8e3; border-radius: 12px; box-shadow: none; width: 100%;
}
.yd-acc-stats.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Lists (calls, payments...) */
.yd-acc-card.is-flush { padding: 0; overflow: hidden; }
.yd-table { width: 100%; border-collapse: collapse; margin: 0; font-size: 15px; border: 0; }
.yd-table th, .yd-table td { padding: 12px 16px; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; vertical-align: middle; }
.yd-table thead th { border-top: 0; background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.yd-table tbody tr:hover td { background: #f2f8fc; }
.yd-table .num { text-align: right; white-space: nowrap; }
.yd-table .strong { font-weight: 700; }
.yd-order-no { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.yd-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.yd-pager a { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; }
.yd-pager a:hover { border-color: var(--or); color: var(--or); }
.yd-pager-info { color: var(--muted); font-weight: 600; font-size: 15px; }
.yd-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 36px 20px; color: var(--muted); }
.yd-empty strong { color: var(--ink); font-size: 18px; }

@media (max-width: 860px) {
	.yd-acc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.yd-acc-stats.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.yd-acc-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
	.yd-acc { padding: 0 8px; }
	.yd-acc-head { padding: 18px; border-radius: 16px; }
	.yd-acc-head h2 { font-size: 22px; }
	.yd-acc-head .yd-btn { width: 100%; }
	.yd-acc-stats { gap: 10px; }
	.yd-stat { padding: 13px 14px; }
	.yd-stat .v { font-size: 18px; }
	.yd-stat .v.is-big { font-size: 24px; }
	.yd-acc-card { padding: 18px 16px; }
	.yd-dl > div { flex-direction: column; gap: 2px; }
	.yd-dl dd { text-align: left; }
	.yd-form-row .yd-group { flex-direction: column; flex-basis: 100%; }
	.yd-form-row .yd-group input { border-radius: 12px 12px 0 0; }
	.yd-form-row .yd-group select { width: 100%; max-width: none; border-left: 1px solid #cfd8e3; border-top: 0; border-radius: 0 0 12px 12px; }
	.yd-form-row .yd-btn { width: 100%; }
	.yd-form-row input[type=date] { max-width: none !important; }
	.yd-acc-stats.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.yd-acc-stats.is-3 .yd-stat { padding: 11px 10px; }
	.yd-acc-stats.is-3 .k { font-size: 11px; }
	.yd-acc-stats.is-3 .v { font-size: 15px; }
	.yd-acc-stats.is-3 .v.is-big { font-size: 22px; }
	/* each row becomes a small card: number + cost on top, date and duration below */
	.yd-table thead { display: none; }
	.yd-table, .yd-table tbody, .yd-table tr, .yd-table td { display: block; width: 100%; }
	.yd-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
	.yd-table tbody tr:first-child { border-top: 0; }
	.yd-table td { padding: 0; border: 0; }
	.yd-table td[data-label="Number"] { grid-column: 1; grid-row: 1; font-size: 16px; }
	.yd-table td[data-label="Cost"] { grid-column: 2; grid-row: 1; font-weight: 800; color: var(--ink); }
	.yd-table td[data-label="Date"] { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 14px; }
	.yd-table td[data-label="Duration"] { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 14px; text-align: right; }
	/* payments: method + credit on top, date + paid below */
	.yd-table td[data-label="Method"] { grid-column: 1; grid-row: 1; font-size: 16px; }
	.yd-table td[data-label="Credit"] { grid-column: 2; grid-row: 1; font-size: 16px; }
	.yd-table.is-payments td[data-label="Date"] { grid-column: 1; grid-row: 2; }
	.yd-table td[data-label="Paid"] { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 14px; }
	.yd-table td[data-label="Paid"]::before { content: "Paid "; }
	.yd-table td[data-label="Paid"].is-refund::before { content: none; }
	.yd-pager a { padding: 0 12px; }
}
