/* Account Page */

.acc-page {
	width: 100%;
	padding: 2.5rem 20px 4rem;
	min-height: 70vh;
	background: linear-gradient(160deg, #F3EEEC 0%, #EDE8E6 25%, #E8EAF0 50%, #EBE6E4 75%, #F0ECEA 100%);
}

.acc-container {
	width: 100%;
	max-width: 880px;
	margin: 0 auto;
}

.acc-shell {
	background: var(--bg-white);
	border-radius: 16px;
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}

/* Header */
.acc-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0;
	padding: 1.5rem 1.6rem 1.25rem;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.acc-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--primary-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.05rem;
	flex-shrink: 0;
	line-height: 1;
}

.acc-user-info {
	min-width: 0;
	flex: 1;
}

.acc-user-email {
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--text-dark);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.acc-verify-banner {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.3rem;
	font-size: 0.8rem;
	color: #b45309;
}

.acc-verify-banner svg {
	flex-shrink: 0;
	stroke: #b45309;
}

.acc-resend-btn {
	all: unset;
	cursor: pointer;
	color: var(--primary-color);
	font-weight: 600;
	font-size: 0.8rem;
	margin-left: 0.25rem;
	background: none;
	border: none;
	padding: 0;
}

.acc-resend-btn:hover {
	text-decoration: underline;
	background: none;
	border: none;
}

/* Tabs */
.acc-tabs {
	display: flex;
	gap: 0;
	margin: 0;
	padding: 0 1.35rem;
	background: transparent;
	border: none;
	border-bottom: 1px solid rgba(0, 0, 0, 0.07);
	border-radius: 0;
	box-shadow: none;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

.acc-tab {
	all: unset;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	flex: 0 0 auto;
	padding: 0.85rem 1.05rem;
	margin-bottom: 0;
	font-size: 0.84rem;
	font-weight: 500;
	color: var(--text-light);
	border-radius: 0;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
	transition: color 0.15s, border-color 0.15s;
	text-align: center;
}

.acc-tab:hover {
	color: var(--text-dark);
	background: transparent;
}

.acc-tab.is-active {
	color: var(--primary-color);
	background: transparent;
	font-weight: 650;
	border-bottom-color: var(--primary-color);
}

.acc-tab svg {
	flex-shrink: 0;
	opacity: 0.45;
}

.acc-tab:hover svg {
	opacity: 0.7;
}

.acc-tab.is-active svg {
	opacity: 1;
	color: var(--primary-color);
}

.acc-tab[data-tab="deals"].is-active {
	color: var(--text-dark);
	border-bottom-color: #d4a017;
}

.acc-tab[data-tab="deals"].is-active svg {
	color: #a16207;
}

/* Panels */
.acc-panel {
	display: none;
	padding: 1.45rem 1.6rem 1.85rem;
}

.acc-panel.is-active {
	display: block;
}

/* Deals list */
.acc-deals-intro {
	margin: 0 0 1.1rem;
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--text-light);
}

.acc-deals-group + .acc-deals-group {
	margin-top: 1.75rem;
	padding-top: 1.35rem;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.acc-deals-group-title {
	margin: 0 0 0.85rem;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-light);
}

.acc-deals-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.acc-deal-row {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(160px, 0.85fr) auto;
	align-items: center;
	gap: 0.85rem 1.15rem;
	padding: 1.1rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.acc-deal-row:first-child {
	padding-top: 0.45rem;
}

.acc-deal-row:last-child {
	border-bottom: none;
	padding-bottom: 0.35rem;
}

.acc-deal-product {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

.acc-deal-product:hover .acc-deal-name {
	color: #a16207;
}

.acc-deal-logo {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.acc-deal-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.acc-deal-logo-placeholder {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.04);
	font-size: 0.65rem;
	font-weight: 700;
	color: var(--text-light);
}

.acc-deal-info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.12rem;
}

.acc-deal-name {
	font-size: 0.94rem;
	font-weight: 650;
	color: var(--text-dark);
	line-height: 1.25;
	transition: color 0.15s ease;
}

.acc-deal-note {
	font-size: 0.78rem;
	line-height: 1.35;
	color: var(--text-light);
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.acc-deal-code-field {
	min-width: 0;
}

.acc-deal-code-row {
	display: flex;
	align-items: stretch;
	min-width: 0;
	min-height: 36px;
	border: none;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.035);
	overflow: hidden;
	transition: background 0.15s ease;
}

.acc-deal-code-row:hover {
	background: rgba(0, 0, 0, 0.055);
	box-shadow: none;
	border: none;
}

.acc-deal-promo-code {
	all: unset;
	box-sizing: border-box;
	flex: 1;
	min-width: 0;
	padding: 0.45rem 0.65rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	color: var(--text-dark);
	cursor: pointer;
	text-align: left;
	overflow: hidden;
	background: transparent;
}

.acc-deal-promo-code:hover,
.acc-deal-promo-code:focus,
.acc-deal-promo-code:active {
	background: transparent;
	color: var(--text-dark);
	transform: none;
}

.acc-deal-code-field.is-promo-link .acc-deal-promo-code {
	letter-spacing: normal;
	font-size: 0.74rem;
	font-weight: 600;
}

.acc-deal-promo-code-value {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.acc-deal-promo-code.is-copied,
.acc-deal-promo-code.is-copied:hover {
	color: #a16207;
}

.acc-deal-copy-code {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	flex-shrink: 0;
	padding: 0 0.65rem;
	border-left: 1px solid rgba(0, 0, 0, 0.06);
	background: transparent;
	color: var(--text-gray, #6b7280);
	font-family: inherit;
	font-size: 0.74rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease;
}

.acc-deal-copy-code:hover,
.acc-deal-copy-code:focus,
.acc-deal-copy-code:active {
	background: rgba(161, 98, 7, 0.08);
	color: #92400e;
	border-left-color: rgba(0, 0, 0, 0.06);
	transform: none;
}

.acc-deal-copy-code.is-copied,
.acc-deal-copy-code.is-copied:hover {
	background: rgba(161, 98, 7, 0.1);
	color: #92400e;
}

.acc-deal-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.55rem 0.9rem;
	border-radius: 8px;
	border: none;
	background: linear-gradient(135deg, #f5d78e 0%, #e4b84a 55%, #d4a017 100%);
	color: #422006;
	font-size: 0.78rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(180, 130, 20, 0.18);
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.acc-deal-cta:hover {
	background: linear-gradient(135deg, #f8e0a8 0%, #ebb84f 55%, #c99412 100%);
	color: #422006;
	text-decoration: none;
	box-shadow: 0 2px 5px rgba(180, 130, 20, 0.22);
}

.acc-deal-cta svg {
	flex-shrink: 0;
	transition: transform 0.15s ease;
}

.acc-deal-cta:hover svg {
	transform: translateX(2px);
}

/* Collection cards */
.acc-collection-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
	align-items: stretch;
}

.acc-collection-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	height: 100%;
	min-height: 100%;
	padding: 1rem 1.05rem 0.95rem;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	background: var(--bg-white, #fff);
}

.acc-collection-card-main {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	text-decoration: none;
	color: inherit;
	min-width: 0;
	min-height: 4.75rem;
	padding-right: 1.6rem;
}

.acc-collection-logo {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border-radius: 0;
	overflow: visible;
}

.acc-collection-logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 40px;
	max-height: 40px;
	object-fit: contain;
	object-position: center;
}

.acc-collection-logo-placeholder {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.04);
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--text-light);
}

.acc-collection-body {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.acc-collection-name {
	font-size: 0.98rem;
	font-weight: 650;
	line-height: 1.3;
	color: var(--text-dark);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.acc-collection-card-main:hover .acc-collection-name {
	color: var(--primary-color);
}

.acc-collection-desc {
	font-size: 0.82rem;
	line-height: 1.45;
	color: var(--text-light);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(1.45em * 3);
}

.acc-collection-deal {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin-top: auto;
}

.acc-collection-deal .acc-deal-cta {
	width: 100%;
	justify-content: center;
}

.acc-collection-remove {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: var(--text-light);
	cursor: pointer;
	transform: none;
}

.acc-collection-remove:hover,
.acc-collection-remove:focus,
.acc-collection-remove:active {
	color: #b91c1c;
	background: rgba(185, 28, 28, 0.08);
	transform: none;
}

.acc-collection-remove:disabled {
	opacity: 0.55;
	cursor: wait;
}

.acc-collection-browse {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.15rem;
	border-radius: 10px;
	background: var(--primary-color);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 650;
	text-decoration: none;
}

.acc-collection-browse:hover {
	filter: brightness(1.05);
	color: #fff;
}

.acc-tab[data-tab="collection"].is-active {
	color: var(--text-dark);
	border-bottom-color: var(--primary-color);
}

/* Empty state */
.acc-empty-state {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--text-light);
}

.acc-empty-state > svg {
	stroke: #cbd5e1;
	margin-bottom: 0.75rem;
}

.acc-empty-state p {
	margin-bottom: 1.5rem;
	font-size: 0.92rem;
	line-height: 1.5;
	max-width: 360px;
	margin-left: auto;
	margin-right: auto;
}

.acc-deals-disclaimer {
	margin: 1.35rem 0 0;
	padding-top: 1.1rem;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	font-size: 0.78rem;
	line-height: 1.55;
	color: var(--text-light);
	max-width: 42rem;
}

/* Settings */
.acc-settings {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
}

.acc-settings-title {
	font-size: 0.88rem;
	font-weight: 650;
	color: var(--text-dark);
	margin: 0 0 0.65rem;
}

.acc-password-form {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	max-width: 380px;
}

.acc-field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.acc-field label {
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--text-gray);
}

.acc-field input {
	padding: 0.55rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 0.88rem;
	font-family: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
	background: var(--bg-white);
	color: var(--text-dark);
}

.acc-field input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.acc-form-msg {
	font-size: 0.82rem;
	padding: 0.45rem 0.7rem;
	border-radius: 6px;
	line-height: 1.4;
}

.acc-form-msg.hidden {
	display: none;
}

.acc-form-msg.is-error {
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

.acc-form-msg.is-success {
	background: #ecfdf5;
	color: #059669;
	border: 1px solid #a7f3d0;
}

.acc-submit-btn {
	align-self: flex-start;
	margin-top: 0.15rem;
	padding: 10px 14px;
	background: var(--primary-color, #0D9488);
	color: #fff;
	border: 1px solid transparent;
	border-radius: 9px;
	font-weight: 650;
	font-size: 0.8rem;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
	box-shadow: none;
}

.acc-submit-btn:hover {
	background: var(--primary-dark, #0F766E);
	border-color: rgba(15, 118, 110, 0.45);
}

.acc-submit-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Danger zone */
.acc-danger-zone {
	border: 1px solid rgba(252, 165, 165, 0.45) !important;
	margin-top: 0.35rem;
	margin-bottom: 0.25rem;
	padding: 1.5rem 1.4rem 1.55rem !important;
	border-radius: 12px;
	background: rgba(254, 226, 226, 0.28);
	box-shadow: none;
}

.acc-danger-text {
	font-size: 0.84rem;
	color: var(--text-light);
	margin: 0 0 1rem;
	line-height: 1.55;
	max-width: 36rem;
}

.acc-danger-btn {
	padding: 0.55rem 1.15rem;
	background: #fff;
	color: #dc2626;
	border: 1px solid #fecaca;
	border-radius: 7px;
	font-weight: 600;
	font-size: 0.86rem;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.acc-danger-btn:hover {
	background: #dc2626;
	color: #fff;
}

.acc-delete-confirm {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #fecaca;
}

.acc-delete-confirm.hidden {
	display: none;
}

.acc-delete-confirm-text {
	font-size: 0.86rem;
	color: var(--text-gray);
	margin: 0 0 0.6rem;
}

.acc-delete-confirm-btns {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.65rem;
}

.acc-cancel-btn {
	padding: 0.55rem 1.15rem;
	background: var(--bg-white);
	color: var(--text-gray);
	border: 1px solid #d1d5db;
	border-radius: 7px;
	font-weight: 600;
	font-size: 0.86rem;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s;
}

.acc-cancel-btn:hover {
	background: #f3f4f6;
}

/* Responsive */
@media (max-width: 640px) {
	.acc-page {
		padding: 1.25rem 12px 3rem;
	}

	.acc-header {
		padding: 1rem;
	}

	.acc-deal-row {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}

	.acc-deal-cta {
		width: 100%;
	}

	.acc-deal-copy-label {
		display: none;
	}

	.acc-tab {
		padding: 0.55rem 0.6rem;
		font-size: 0.8rem;
	}

	.acc-delete-confirm-btns {
		flex-direction: column;
	}
}

/* Dark theme ownership */
:root[data-theme="dark"] .acc-page .acc-shell {
	background: var(--bg-light) !important;
	border-color: var(--border-color) !important;
	color: var(--text-dark);
}

:root[data-theme="dark"] .acc-page .acc-header,
:root[data-theme="dark"] .acc-page .acc-tabs,
:root[data-theme="dark"] .acc-page .acc-deals-list {
	background: transparent !important;
	box-shadow: none !important;
}

:root[data-theme="dark"] .acc-page .acc-tabs {
	border-bottom-color: var(--border-color) !important;
}

:root[data-theme="dark"] .acc-page .acc-deals-disclaimer {
	border-top-color: var(--border-color);
	color: var(--text-light);
}

:root[data-theme="dark"] .acc-page .acc-tab.is-active {
	color: var(--primary-color) !important;
	border-bottom-color: var(--primary-color) !important;
	background: transparent !important;
}

:root[data-theme="dark"] .acc-page .acc-tab.is-active svg {
	color: var(--primary-color);
}

:root[data-theme="dark"] .acc-page .acc-tab[data-tab="deals"].is-active {
	color: var(--text-dark) !important;
	border-bottom-color: #e8c56a !important;
}

:root[data-theme="dark"] .acc-page .acc-tab[data-tab="deals"].is-active svg {
	color: #e8c56a;
}

:root[data-theme="dark"] .acc-page .acc-collection-card {
	border-color: var(--border-color) !important;
	background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .acc-page .acc-collection-logo-placeholder {
	background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .acc-page .acc-collection-card-main:hover .acc-collection-name {
	color: #5eead4;
}

:root[data-theme="dark"] .acc-page .acc-collection-remove:hover,
:root[data-theme="dark"] .acc-page .acc-collection-remove:focus,
:root[data-theme="dark"] .acc-page .acc-collection-remove:active {
	color: #fca5a5;
	background: rgba(248, 113, 113, 0.12);
}

:root[data-theme="dark"] .acc-page .acc-deal-row {
	border-bottom-color: var(--border-color) !important;
}

:root[data-theme="dark"] .acc-page .acc-deals-group + .acc-deals-group {
	border-top-color: var(--border-color);
}

:root[data-theme="dark"] .acc-page .acc-deal-logo-placeholder {
	background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .acc-deal-product:hover .acc-deal-name {
	color: #e8c56a;
}

:root[data-theme="dark"] .acc-deal-code-row {
	background: rgba(255, 255, 255, 0.05);
	border: none;
}

:root[data-theme="dark"] .acc-deal-code-row:hover {
	background: rgba(255, 255, 255, 0.08);
	box-shadow: none;
}

:root[data-theme="dark"] .acc-deal-copy-code {
	background: transparent;
	border-left-color: rgba(255, 255, 255, 0.08);
	color: var(--text-gray);
}

:root[data-theme="dark"] .acc-deal-copy-code:hover,
:root[data-theme="dark"] .acc-deal-copy-code:focus,
:root[data-theme="dark"] .acc-deal-copy-code.is-copied {
	background: rgba(232, 197, 106, 0.12);
	color: #e8c56a;
}

:root[data-theme="dark"] .acc-deal-promo-code.is-copied,
:root[data-theme="dark"] .acc-deal-promo-code.is-copied:hover {
	color: #e8c56a;
}

:root[data-theme="dark"] .acc-page .acc-avatar {
	background: #2f7f8b !important;
	color: #ffffff !important;
}

:root[data-theme="dark"] .acc-page .acc-deal-cta {
	color: #1c1408 !important;
	background: linear-gradient(135deg, #e8c56a 0%, #d4a84b 55%, #b8892a 100%) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
}

:root[data-theme="dark"] .acc-page .acc-deal-cta:hover {
	background: linear-gradient(135deg, #f0d280 0%, #dfb45a 55%, #c49632 100%) !important;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4) !important;
}

:root[data-theme="dark"] .acc-page .acc-submit-btn {
	background: #0f766e !important;
	border: 1px solid #0f8a81 !important;
	color: #ffffff !important;
	box-shadow: none !important;
}

:root[data-theme="dark"] .acc-page .acc-submit-btn:hover {
	background: #0d665f !important;
	border-color: #14b8a6 !important;
	box-shadow: none !important;
}

:root[data-theme="dark"] .acc-danger-zone {
	background: rgba(127, 29, 29, 0.1) !important;
	border-color: rgba(248, 113, 113, 0.22) !important;
}

:root[data-theme="dark"] .acc-danger-text {
	color: var(--text-gray) !important;
}

:root[data-theme="dark"] .acc-danger-btn {
	background: rgba(127, 29, 29, 0.2) !important;
	color: #fecaca !important;
	border-color: rgba(248, 113, 113, 0.45) !important;
}

:root[data-theme="dark"] .acc-danger-btn:hover {
	background: #b91c1c !important;
	color: #fff !important;
}

:root[data-theme="dark"] .acc-delete-confirm {
	border-top-color: rgba(248, 113, 113, 0.35) !important;
}

:root[data-theme="dark"] .acc-delete-confirm-text {
	color: var(--text-gray) !important;
}

:root[data-theme="dark"] .acc-cancel-btn {
	background: var(--bg-lighter) !important;
	color: var(--text-dark) !important;
	border-color: var(--border-color) !important;
}

:root[data-theme="dark"] .acc-cancel-btn:hover {
	background: var(--bg-light) !important;
}

:root[data-theme="dark"] .acc-form-msg.is-error {
	background: rgba(127, 29, 29, 0.35) !important;
	border-color: rgba(248, 113, 113, 0.45) !important;
	color: #fecaca !important;
}
