/* Личный кабинет 1Микрон: меню слева, содержимое справа. Цвета — переменные шаблона (--mk-blue, --mk-line, --mk-muted, --mk-bg). */
.cab { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; margin: 4px 0 48px; }
.cab__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cab__side { position: sticky; top: 16px; background: #fff; border: 1px solid var(--mk-line); border-radius: 14px; padding: 18px 12px 12px; }
.cab-user { display: flex; align-items: center; gap: 12px; padding: 0 8px 16px; border-bottom: 1px solid var(--mk-line); margin-bottom: 8px; }
.cab-user__ava { flex: none; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--mk-blue), var(--mk-navy)); color: #fff; font-weight: 700; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.cab-user__txt { display: flex; flex-direction: column; min-width: 0; }
.cab-user__txt b { font-size: 15px; color: #111; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-user__txt span { font-size: 12.5px; color: var(--mk-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-nav { display: flex; flex-direction: column; gap: 2px; }
.cab-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #2b2f36; text-decoration: none; font-size: 14.5px; font-weight: 500; transition: background .15s, color .15s; }
.cab-nav a svg { flex: none; color: #8a93a0; transition: color .15s; }
.cab-nav a span { flex: 1; }
.cab-nav a em { font-style: normal; font-size: 12px; font-weight: 700; background: var(--mk-orange); color: #fff; border-radius: 10px; padding: 1px 8px; }
.cab-nav a:hover { background: var(--mk-bg); color: var(--mk-blue); text-decoration: none; }
.cab-nav a:hover svg { color: var(--mk-blue); }
.cab-nav a.is-active { background: #eaf2fb; color: var(--mk-blue); font-weight: 600; }
.cab-nav a.is-active svg { color: var(--mk-blue); }
.cab-nav a.cab-nav__out { margin-top: 6px; border-top: 1px solid var(--mk-line); border-radius: 0 0 10px 10px; padding-top: 14px; color: var(--mk-muted); }

.cab-card { background: #fff; border: 1px solid var(--mk-line); border-radius: 14px; padding: 22px 24px 24px; }
.cab-card__h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 18px; }
.cab-card__h h2 { margin: 0; font-size: 20px; font-weight: 600; color: #111; }
.cab-card__h a { font-size: 14px; }
.cab-muted { color: var(--mk-muted); font-size: 13.5px; font-weight: 400; }
.cab-ok { color: #1b7f3b; font-weight: 600; }
.cab-mt { margin-top: 14px; }

.cab-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--mk-orange); color: #fff !important; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s; }
.cab-btn:hover { background: #e06f00; }
.cab-btn:disabled { opacity: .6; cursor: wait; }
.cab-btn--ghost { background: #fff; color: var(--mk-blue) !important; border: 1px solid var(--mk-blue); }
.cab-btn--ghost:hover { background: #eaf2fb; }
.cab-btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.cab-btn svg { margin-right: 6px; flex: none; }
.cab-btn--danger { background: #fff; color: #d32f2f !important; border: 1px solid #e5a3a3; }
.cab-btn--danger:hover { background: #fdeeee; }
.cab-cancel .cab-btn--danger[type=submit] { background: #d32f2f; color: #fff !important; border-color: #d32f2f; }
.cab-cancel .cab-btn--danger[type=submit]:hover { background: #b71c1c; }
.cab-info__hint { margin-top: 6px; font-size: 12.5px; }
.cab-cancel { margin-top: 14px; padding: 16px 18px; border: 1px solid #f0c4c4; border-radius: 12px; background: #fff8f8; }
.cab-cancel[hidden] { display: none; }
.cab-cancel__h { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.cab-cancel p { margin: 0 0 10px; font-size: 13.5px; }
.cab-cancel__reasons { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; font-size: 14px; }
.cab-cancel__reasons label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cab-cancel textarea { width: 100%; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--mk-line); border-radius: 8px; font: inherit; font-size: 14px; resize: vertical; }
.cab-cancel__btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.cab-cancel__no { margin-top: 10px; font-size: 13px; }
.cab-order__actions .cab-link { margin-left: auto; }
.cab-link { border: 0; background: none; padding: 0; font: inherit; font-size: 13.5px; color: var(--mk-blue); cursor: pointer; }

/* обзор */
.cab-hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 26px; border-radius: 14px; color: #fff; background: linear-gradient(120deg, var(--mk-navy) 0%, var(--mk-blue) 100%); }
.cab-hello h2 { margin: 0 0 4px; font-size: 22px; font-weight: 700; color: #fff; }
.cab-hello p { margin: 0; opacity: .85; font-size: 14.5px; }
.cab-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cab-stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: #fff; border: 1px solid var(--mk-line); border-radius: 14px; text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.cab-stat:hover { border-color: #9fbbe0; box-shadow: 0 6px 20px rgba(15, 35, 70, .07); }
.cab-stat b { font-size: 28px; line-height: 1.1; color: var(--mk-blue); }
.cab-stat span { font-size: 13px; color: var(--mk-muted); }
.cab-stat.is-warn b { color: var(--mk-orange); }
.cab-tip { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border: 1px solid #cfe0f3; background: #f4f8fd; border-radius: 14px; font-size: 14px; color: #333; }
.cab-empty { background: #fff; border: 1px dashed #cfd6df; border-radius: 14px; padding: 28px; text-align: center; color: #555; font-size: 14.5px; }

/* вкладки заказов */
.cab-tabs { display: flex; gap: 4px; background: #fff; border: 1px solid var(--mk-line); border-radius: 12px; padding: 5px; overflow-x: auto; scrollbar-width: none; }
.cab-tabs::-webkit-scrollbar { display: none; }
.cab-tabs a { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 9px; color: #444; font-size: 14.5px; font-weight: 500; text-decoration: none !important; white-space: nowrap; }
.cab-tabs a em { font-style: normal; font-size: 12px; font-weight: 700; color: #6b7480; background: #eef1f5; border-radius: 10px; padding: 1px 8px; }
.cab-tabs a:hover { background: var(--mk-bg); }
.cab-tabs a.is-active { background: var(--mk-blue); color: #fff; }
.cab-tabs a.is-active em { background: rgba(255, 255, 255, .22); color: #fff; }
.cab-pager { display: flex; gap: 6px; justify-content: center; }
.cab-pager a { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--mk-line); border-radius: 9px; background: #fff; color: #333; text-decoration: none !important; }
.cab-pager a.is-active { background: var(--mk-blue); border-color: var(--mk-blue); color: #fff; }

/* карточка заказа */
.cab-orders { display: flex; flex-direction: column; gap: 12px; }
.cab-order { background: #fff; border: 1px solid var(--mk-line); border-left: 4px solid var(--mk-blue); border-radius: 12px; overflow: hidden; transition: box-shadow .15s; }
.cab-order--green { border-left-color: #1b9a4b; } .cab-order--orange { border-left-color: var(--mk-orange); } .cab-order--red { border-left-color: #c9ced6; } .cab-order--gray { border-left-color: #c9ced6; }
.cab-order[open] { box-shadow: 0 8px 28px rgba(15, 35, 70, .08); }
.cab-order__head { display: grid; grid-template-columns: minmax(150px, auto) auto 1fr auto 24px; align-items: center; gap: 8px 18px; padding: 16px 18px; cursor: pointer; list-style: none; }
.cab-order__head::-webkit-details-marker { display: none; }
.cab-order__head:hover { background: #fafbfd; }
.cab-order__num { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; color: #111; }
.cab-order__num small { font-weight: 400; font-size: 12.5px; color: var(--mk-muted); }
.cab-order__meta { font-size: 13.5px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-order__sum { font-weight: 700; font-size: 17px; color: #111; white-space: nowrap; }
.cab-order__chev { width: 10px; height: 10px; border-right: 2px solid #8a93a0; border-bottom: 2px solid #8a93a0; transform: rotate(45deg); transition: transform .2s; margin-top: -4px; justify-self: center; }
.cab-order[open] .cab-order__chev { transform: rotate(-135deg); margin-top: 4px; }
.cab-badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.cab-badge--blue { background: #e6f0fb; color: var(--mk-blue); } .cab-badge--green { background: #e4f5ea; color: #1b7f3b; } .cab-badge--orange { background: #fff1e0; color: #c25e00; } .cab-badge--red, .cab-badge--gray { background: #eef0f3; color: #6b7480; }
.cab-order__body { padding: 4px 18px 18px; border-top: 1px solid var(--mk-line); }

.cab-steps { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 18px 0 20px; padding: 0; counter-reset: st; }
.cab-steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding-top: 34px; font-size: 13px; color: #8a93a0; counter-increment: st; }
.cab-steps li::before { content: counter(st); position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid #d5dae1; color: #8a93a0; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.cab-steps li::after { content: ''; position: absolute; top: 12px; left: calc(-50% + 13px); right: calc(50% + 13px); height: 2px; background: #d5dae1; }
.cab-steps li:first-child::after { display: none; }
.cab-steps li b { font-weight: 600; color: inherit; }
.cab-steps li span { font-size: 12px; }
.cab-steps li.is-done { color: #1b7f3b; }
.cab-steps li.is-done::before { content: '✓'; background: #1b9a4b; border-color: #1b9a4b; color: #fff; }
.cab-steps li.is-done::after, .cab-steps li.is-cur::after { background: #1b9a4b; }
.cab-steps li.is-cur { color: var(--mk-blue); }
.cab-steps li.is-cur::before { border-color: var(--mk-blue); background: var(--mk-blue); color: #fff; box-shadow: 0 0 0 4px rgba(30, 106, 184, .16); }

.cab-items { border: 1px solid var(--mk-line); border-radius: 12px; overflow: hidden; }
.cab-items__row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 90px 110px 120px; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid #f0f2f5; font-size: 14px; }
.cab-items__row:first-child { border-top: 0; }
.cab-items__row--head { background: var(--mk-bg); font-size: 12.5px; color: var(--mk-muted); padding-top: 8px; padding-bottom: 8px; }
.cab-items__img { width: 56px; height: 56px; border-radius: 8px; background: #f4f6f9; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cab-items__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cab-items__row--head .cab-items__img, .cab-items__row--head span:first-child { background: none; height: auto; }
.cab-items__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cab-items__name a { color: #1f2329; }
.cab-items__name small { font-size: 12.5px; color: var(--mk-muted); }
.cab-items__qty, .cab-items__price, .cab-items__sum { text-align: right; white-space: nowrap; }
.cab-items__sum { font-weight: 600; }
.cab-items__total { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 12px 14px; background: #fafbfd; border-top: 1px solid var(--mk-line); font-size: 14px; }
.cab-items__total div { display: grid; grid-template-columns: 120px 140px; gap: 12px; text-align: right; }
.cab-items__total span { color: #555; }
.cab-items__total .is-big { font-size: 17px; padding-top: 4px; }

.cab-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.cab-info__box { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 12px; background: var(--mk-bg); font-size: 14px; color: #222; min-width: 0; overflow-wrap: anywhere; }
.cab-info__h { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--mk-muted); font-weight: 600; margin-bottom: 4px; }
.cab-info__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cab-note { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #f4f8fd; font-size: 13.5px; color: #333; }
.cab-note--red { background: #f5f6f8; color: #555; margin: 16px 0; }
.cab-order__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }

/* доставка со второго склада */
.cab-move { margin: 0 0 14px; border: 1px solid #f3c98b; background: #fff8ec; border-radius: 12px; padding: 14px 16px; font-size: 13.5px; color: #4a3b22; line-height: 1.5; }
.cab-move__h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: #8a4b00; margin-bottom: 6px; }
.cab-move p { margin: 0 0 8px; }
.cab-move ul { list-style: none; margin: 0; padding: 0; border-top: 1px dashed #efd3a8; }
.cab-move li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed #efd3a8; }
.cab-move li b { white-space: nowrap; }

/* формы */
.cab .co-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cab-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }
.cab-msg { font-size: 13.5px; }
.cab-msg.is-ok { color: #1b7f3b; } .cab-msg.is-err { color: #d32f2f; }
.cab-pass { margin-top: 18px; border-top: 1px solid var(--mk-line); padding-top: 14px; }
.cab-pass summary { cursor: pointer; color: var(--mk-blue); font-weight: 600; font-size: 14.5px; }
.cab-pass .cab-form { margin-top: 14px; }
.cab-seg { margin-bottom: 18px; }
.cab-profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cab-prof { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 16px 16px 14px; border: 1px solid #d5dae1; border-radius: 12px; font-size: 13.5px; color: #444; line-height: 1.45; }
.cab-prof b { font-size: 15.5px; color: #111; padding-right: 10px; }
.cab-prof__acts { display: flex; gap: 14px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--mk-line); }
.cab-prof__acts .is-del { color: #b4232a; }
.cab-prof--add { align-items: center; justify-content: center; gap: 8px; min-height: 130px; border-style: dashed; color: var(--mk-blue); font-weight: 600; font-size: 14.5px; cursor: pointer; background: #fbfcfe; transition: background .15s, border-color .15s; font-family: inherit; }
.cab-prof--add:hover { background: #f1f6fc; border-color: var(--mk-blue); }
.cab-prof--add i { font-style: normal; font-size: 26px; line-height: 1; }
.cab-pform { margin-top: 18px; padding: 20px; border: 1px solid #cfe0f3; background: #fbfdff; border-radius: 14px; }
.cab-pform[hidden], .cab-pform [hidden] { display: none !important; }
.cab-pform__h { font-weight: 700; font-size: 17px; margin-bottom: 14px; color: #111; }

/* политика */
.cab-policy { font-size: 15px; line-height: 1.65; color: #2b2f36; }
.cab-policy h2 { font-size: 22px; margin: 0 0 6px; }
.cab-policy h3 { font-size: 17px; margin: 26px 0 8px; color: #111; }
.cab-policy p, .cab-policy li { margin: 0 0 8px; }
.cab-policy ul, .cab-policy ol { padding-left: 22px; margin: 0 0 10px; }
.cab-policy .pp-meta { color: var(--mk-muted); font-size: 13.5px; margin-bottom: 18px; }
.cab-policy .pp-req { background: var(--mk-bg); border-radius: 12px; padding: 14px 18px; margin: 10px 0 14px; }

.cab-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; background: #1f2329; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: calc(100% - 32px); }
.cab-toast[hidden] { display: none; }

@media (max-width: 1100px) {
	.cab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cab-info { grid-template-columns: 1fr 1fr; }
	.cab-order__head { grid-template-columns: 1fr auto 24px; }
	.cab-order__head .cab-badge { grid-column: 1; grid-row: 2; justify-self: start; }
	.cab-order__meta { grid-column: 1 / 3; grid-row: 3; }
	.cab-order__sum { grid-column: 2; grid-row: 1; }
	.cab-order__chev { grid-column: 3; grid-row: 1; }
}
@media (max-width: 900px) {
	.cab { grid-template-columns: 1fr; gap: 14px; }
	.cab__side { position: static; padding: 10px; }
	.cab-user { display: none; }
	.cab-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px; }
	.cab-nav::-webkit-scrollbar { display: none; }
	.cab-nav a { flex: none; padding: 9px 12px; font-size: 14px; }
	.cab-nav a.cab-nav__out { margin: 0; border: 0; border-radius: 10px; padding-top: 9px; }
	.cab .co-grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	.cab-card { padding: 18px 14px; border-radius: 12px; }
	.cab-hello { padding: 20px 18px; }
	.cab-info, .cab .co-grid--3, .cab .co-grid { grid-template-columns: 1fr; }
	.cab-steps { grid-template-columns: 1fr; gap: 0; margin: 14px 0; }
	.cab-steps li { flex-direction: row; align-items: baseline; text-align: left; gap: 8px; padding: 0 0 14px 38px; min-height: 26px; }
	.cab-steps li::before { left: 13px; }
	.cab-steps li::after { top: -14px; bottom: auto; left: 12px; right: auto; width: 2px; height: 14px; }
	.cab-steps li b { padding-top: 3px; }
	.cab-items__row { grid-template-columns: 56px 1fr; gap: 4px 12px; }
	.cab-items__row--head { display: none; }
	.cab-items__img { grid-row: span 4; }
	.cab-items__qty, .cab-items__price, .cab-items__sum { text-align: left; font-size: 13px; }
	.cab-items__qty::before, .cab-items__price::before, .cab-items__sum::before { content: attr(data-l) ': '; color: var(--mk-muted); font-weight: 400; }
	.cab-items__total div { grid-template-columns: 1fr auto; width: 100%; }
	.cab-order__head { padding: 14px; }
	.cab-order__body { padding: 4px 12px 14px; }
}
