/* DropKey customer account. Follows the active theme's tokens (--accent, --text-primary, ...)
   with neutral fallbacks, matching storefront.css. */
.dk2-account {
	--dk2-accent: var(--accent, #C84B20);
	--dk2-accent-hover: var(--accent-hover, #AF3E17);
	--dk2-accent-subtle: var(--accent-subtle, #FCF4EE);
	--dk2-accent-border: var(--accent-border, #F3D2C2);
	--dk2-text: var(--text-primary, #151618);
	--dk2-text-2: var(--text-secondary, #50545F);
	--dk2-text-3: var(--text-tertiary, #7D818D);
	--dk2-surface: var(--bg-surface, #FFFFFF);
	--dk2-subtle: var(--bg-subtle, #F3F1EC);
	--dk2-muted-bg: var(--bg-surface-muted, #F8F7F3);
	--dk2-border: var(--border-subtle, #E6E4DD);
	--dk2-border-2: var(--border-medium, #D5D2C8);
	--dk2-success: var(--success-text, #166534);
	--dk2-success-bg: var(--success-bg, #DCFCE7);
	--dk2-danger: var(--danger-text, #991B1B);
	--dk2-danger-bg: var(--danger-bg, #FEE2E2);
	--dk2-warn: #92400E;
	--dk2-warn-bg: #FEF3C7;
	--dk2-mono: var(--font-mono, SFMono-Regular, Menlo, Consolas, monospace);
	--dk2-radius: 14px;
	--dk2-shadow: 0 1px 2px rgba(21,22,24,.04), 0 8px 24px rgba(21,22,24,.05);
	--dk2-focus: 0 0 0 3px rgba(200,75,32,.2);
	max-width: 880px; margin: 8px auto 56px; color: var(--dk2-text); font-size: 15px; line-height: 1.5;
}
.dk2-account * { box-sizing: border-box; }
body .dk2-account p { margin: 0; font-size: inherit; color: inherit; line-height: inherit; }
.dk2-account .dk2-icon { flex: none; width: 1.1em; height: 1.1em; }
.dk2-account a { color: var(--dk2-accent); }

/* Buttons */
.dk2-account .dk2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; background: var(--dk2-accent); color: #fff; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.dk2-account .dk2-btn:hover { background: var(--dk2-accent-hover); color: #fff; }
.dk2-account .dk2-btn:focus-visible { outline: none; box-shadow: var(--dk2-focus); }
.dk2-account .dk2-btn-secondary { background: var(--dk2-surface); border-color: var(--dk2-border-2); color: var(--dk2-text); }
.dk2-account .dk2-btn-secondary:hover { background: var(--dk2-subtle); color: var(--dk2-text); }
.dk2-account .dk2-btn-ghost { min-height: 38px; padding: 7px 12px; background: transparent; border-color: var(--dk2-border); color: var(--dk2-text-2); font-weight: 600; }
.dk2-account .dk2-btn-ghost:hover { background: var(--dk2-subtle); color: var(--dk2-text); }
.dk2-account .dk2-btn-lg { min-height: 50px; padding: 12px 28px; font-size: 16px; }
.dk2-inline-form { margin: 0; }

/* Notices */
.dk2-notice { margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--dk2-border); border-radius: 12px; font-size: 14px; }
.dk2-notice-success { background: var(--dk2-success-bg); border-color: rgba(22,101,52,.2); color: var(--dk2-success); }
.dk2-notice-error { background: var(--dk2-danger-bg); border-color: #FECACA; color: var(--dk2-danger); }
.dk2-notice a { color: inherit; font-weight: 700; }

/* Welcome bar + section tabs */
.dk2-welcome { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border: 1px solid var(--dk2-border); border-radius: var(--dk2-radius); background: var(--dk2-surface); }
.dk2-account .dk2-welcome-title { color: var(--dk2-text); font-size: 20px; font-weight: 800; line-height: 1.25; }
.dk2-account .dk2-welcome-sub { margin-top: 2px; color: var(--dk2-text-3); font-size: 14px; overflow-wrap: anywhere; }
.dk2-welcome-actions { display: flex; gap: 8px; }
.dk2-tabs { position: sticky; top: calc(var(--header-h, 0px) + 8px); z-index: 5; display: flex; gap: 4px; margin: 14px 0 8px; padding: 5px; border: 1px solid var(--dk2-border); border-radius: 12px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); overflow-x: auto; scrollbar-width: none; }
.dk2-tabs::-webkit-scrollbar { display: none; }
.dk2-account .dk2-tabs a { flex: none; padding: 8px 14px; border-radius: 8px; color: var(--dk2-text-2); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.dk2-account .dk2-tabs a:hover { background: var(--dk2-subtle); color: var(--dk2-text); }

/* Sections */
.dk2-section { margin-top: 32px; scroll-margin-top: calc(var(--header-h, 0px) + 72px); }
.dk2-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dk2-section-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--dk2-text); font-size: 20px; font-weight: 800; line-height: 1.3; }
.dk2-section-head h2 .dk2-icon { color: var(--dk2-accent); }
.dk2-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--dk2-subtle); color: var(--dk2-text-2); font-size: 13px; font-weight: 700; }
.dk2-card { padding: clamp(18px, 3vw, 24px); border: 1px solid var(--dk2-border); border-radius: var(--dk2-radius); background: var(--dk2-surface); box-shadow: var(--dk2-shadow); }
.dk2-card + .dk2-card { margin-top: 14px; }
.dk2-empty { display: grid; justify-items: start; gap: 8px; padding: 22px; border: 1px dashed var(--dk2-border-2); border-radius: var(--dk2-radius); background: var(--dk2-muted-bg); color: var(--dk2-text-2); }
.dk2-empty .dk2-btn { margin-top: 6px; }
.dk2-account .dk2-help { color: var(--dk2-text-3); font-size: 13px; line-height: 1.5; }
.dk2-label,.dk2-account .dk2-overline { color: var(--dk2-text-3); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* Pills */
.dk2-pill { display: inline-flex; align-items: center; flex: none; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dk2-pill-success { background: var(--dk2-success-bg); color: var(--dk2-success); }
.dk2-pill-warn { background: var(--dk2-warn-bg); color: var(--dk2-warn); }
.dk2-pill-error { background: var(--dk2-danger-bg); color: var(--dk2-danger); }
.dk2-pill-neutral { background: var(--dk2-subtle); color: var(--dk2-text-2); }
.dk2-account .dk2-warn-text { color: var(--dk2-warn); font-weight: 600; }

/* License card */
.dk2-license-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dk2-license-head h3 { margin: 2px 0 0; color: var(--dk2-text); font-size: 19px; font-weight: 800; line-height: 1.3; }
.dk2-key { margin-top: 16px; }
.dk2-key-row { display: flex; gap: 8px; margin-top: 6px; }
.dk2-key code { flex: 1; min-width: 0; display: flex; align-items: center; padding: 10px 14px; border: 1px dashed var(--dk2-accent-border); border-radius: 10px; background: var(--dk2-accent-subtle); color: var(--dk2-text); font-family: var(--dk2-mono); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; white-space: normal; }
.dk2-key .dk2-help { margin-top: 6px; }
.dk2-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 16px 0 0; border: 1px solid var(--dk2-border); border-radius: 12px; background: var(--dk2-border); overflow: hidden; }
.dk2-facts > div { padding: 12px 14px; background: var(--dk2-muted-bg); }
.dk2-facts dt { color: var(--dk2-text-3); font-size: 12px; font-weight: 600; }
.dk2-facts dd { margin: 2px 0 0; color: var(--dk2-text); font-size: 14px; font-weight: 700; }
.dk2-license-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.dk2-sites { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--dk2-border); }
.dk2-sites h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--dk2-text); font-size: 15px; font-weight: 700; }
.dk2-sites h4 .dk2-icon { color: var(--dk2-text-3); }
.dk2-sites ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dk2-sites li { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 12px; border: 1px solid var(--dk2-border); border-radius: 10px; }
.dk2-sites li > div { display: flex; flex-direction: column; min-width: 0; }
.dk2-sites li strong { color: var(--dk2-text); font-size: 14px; overflow-wrap: anywhere; }
.dk2-sites li span { color: var(--dk2-text-3); font-size: 12px; }

/* Lists (subscriptions, orders) */
.dk2-list { padding: 0; overflow: hidden; }
.dk2-list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--dk2-border); }
.dk2-list-row:last-child { border-bottom: 0; }
.dk2-list-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dk2-list-main strong { color: var(--dk2-text); font-size: 15px; }
.dk2-list-main span { color: var(--dk2-text-3); font-size: 13px; }
.dk2-list-side { display: flex; align-items: center; gap: 12px; flex: none; }
.dk2-amount { color: var(--dk2-text); font-size: 15px; font-weight: 800; }
.dk2-account .dk2-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.dk2-account .dk2-link:hover { text-decoration: underline; }
.dk2-callout { display: flex; gap: 12px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--dk2-accent-border); border-radius: 12px; background: var(--dk2-accent-subtle); color: var(--dk2-text-2); font-size: 14px; }
.dk2-callout > .dk2-icon { margin-top: 2px; color: var(--dk2-accent); }
.dk2-callout strong { color: var(--dk2-text); }
.dk2-callout a { font-weight: 600; }

/* Profile */
.dk2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dk2-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dk2-field-full { grid-column: 1 / -1; }
.dk2-account .dk2-field label { margin: 0; color: var(--dk2-text); font-size: 14px; font-weight: 600; }
.dk2-account .dk2-field input { width: 100%; min-height: 46px; margin: 0; padding: 10px 14px; border: 1px solid var(--dk2-border-2); border-radius: 10px; background: var(--dk2-surface); color: var(--dk2-text); font: inherit; font-size: 16px; box-shadow: none; }
.dk2-account .dk2-field input:focus { outline: none; border-color: var(--dk2-accent); box-shadow: var(--dk2-focus); }
.dk2-account .dk2-field input[readonly] { background: var(--dk2-muted-bg); color: var(--dk2-text-2); }
.dk2-password { margin-top: 18px; border-top: 1px solid var(--dk2-border); padding-top: 14px; }
.dk2-password summary { color: var(--dk2-accent); font-weight: 700; cursor: pointer; }
.dk2-password .dk2-grid { margin-top: 14px; }
.dk2-form-actions { margin-top: 20px; }

/* Signed-out */
.dk2-account-guest { max-width: 520px; }
.dk2-guest { display: grid; justify-items: center; gap: 12px; padding: clamp(28px, 5vw, 44px); text-align: center; }
.dk2-guest-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--dk2-accent-subtle); color: var(--dk2-accent); }
.dk2-guest-icon .dk2-icon { width: 26px; height: 26px; }
.dk2-guest h2 { margin: 4px 0 0; color: var(--dk2-text); font-size: 24px; font-weight: 800; }
.dk2-guest > p:not(.dk2-help) { color: var(--dk2-text-2); font-size: 16px; }
.dk2-guest .dk2-btn { margin-top: 6px; }

@media (max-width: 720px) {
	.dk2-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.dk2-account { font-size: 15px; }
	.dk2-welcome { padding: 16px; }
	.dk2-welcome-actions { width: 100%; }
	.dk2-welcome-actions .dk2-btn { flex: 1; }
	.dk2-key-row { flex-direction: column; }
	.dk2-license-actions .dk2-inline-form,.dk2-license-actions .dk2-btn { width: 100%; }
	.dk2-list-row { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }
	.dk2-list-side { width: 100%; justify-content: space-between; }
	.dk2-sites li { flex-direction: column; align-items: flex-start; }
	.dk2-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Wide screens: licenses on the left, subscriptions / orders / profile on the right,
   so the page uses the horizontal space instead of one long column. */
.dk2-account-main,.dk2-account-side { min-width: 0; }
@media (min-width: 1024px) {
	.dk2-account:not(.dk2-account-guest) { max-width: 1240px; }
	.dk2-tabs { display: none; }
	.dk2-account-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: 28px; align-items: start; margin-top: 24px; }
	.dk2-account-layout .dk2-section:first-child { margin-top: 0; }
	.dk2-account-side .dk2-section + .dk2-section { margin-top: 28px; }
	.dk2-account-side .dk2-section-head h2 { font-size: 18px; }
	/* The side column is narrow: stack list rows and form fields. */
	.dk2-account-side .dk2-list-row { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 18px; }
	.dk2-account-side .dk2-list-side { width: 100%; justify-content: space-between; }
	.dk2-account-side .dk2-grid { grid-template-columns: minmax(0, 1fr); }
}
