/* ===================================================================
   Athath Dar Essalem — "Mon compte" Dashboard
   Brand tokens: teal #1A8592 / dark teal #073640, #173434, #1f4a47
   Type: Playfair Display (display) + Inter (body)
=================================================================== */

:root {
	--athath-teal: #1a8592;
	--athath-teal-dark: #073640;
	--athath-teal-darker: #0d2b2b;
	--athath-teal-panel: #173434;
	--athath-teal-panel-2: #1f4a47;
	--athath-teal-soft: #e6f2f2;
	--athath-gold: #d4a017;
	--athath-gold-soft: #fdf3dc;
	--athath-ink: #142524;
	--athath-body: #4a5a59;
	--athath-line: #e7ecec;
	--athath-bg: #f6f8f8;
	--athath-success: #1c8a4c;
	--athath-success-soft: #e6f7ed;
	--athath-warning: #b8720a;
	--athath-warning-soft: #fdf1de;
	--athath-info: #1c6fb8;
	--athath-info-soft: #e6f1fb;
	--athath-danger: #c0392b;
	--athath-danger-soft: #fbeae8;
	--athath-radius: 16px;
	--athath-shadow: 0 2px 10px rgba(15, 45, 45, 0.06);
}

/* Reset the Astra page chrome on the account page */
body.athath-account-page .ast-container,
body.athath-account-page .site-content .ast-container {
	max-width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}
body.athath-account-page .ast-page-builder-template .site-content,
body.athath-account-page .site-content {
	padding: 0 !important;
	margin: 0 !important;
}
body.athath-account-page .site,
body.athath-account-page #content { background: var(--athath-bg); }

.woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-content { all: unset; }

.athath-account * { box-sizing: border-box; }

.athath-account {
	font-family: 'Inter', -apple-system, sans-serif;
	color: var(--athath-ink);
	display: flex;
	align-items: stretch;
	min-height: 100vh;
	background: var(--athath-bg);
}

/* ---------------------------------------------------------------
   Sidebar
--------------------------------------------------------------- */
.athath-sidebar {
	width: 264px;
	flex: 0 0 264px;
	background: linear-gradient(180deg, var(--athath-teal-panel) 0%, var(--athath-teal-darker) 100%);
	color: #fff;
	display: flex;
	flex-direction: column;
	padding: 28px 18px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

.athath-sidebar-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 10px 26px;
	border-bottom: 1px solid rgba(255,255,255,.1);
	margin-bottom: 18px;
}
.athath-logo-mark {
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	border-radius: 50%;
	border: 1.5px solid rgba(255,255,255,.55);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Playfair Display', serif;
	font-size: 20px;
	font-weight: 700;
}
.athath-logo-text { display: flex; flex-direction: column; line-height: 1.35; }
.athath-logo-ar { font-size: 12px; color: rgba(255,255,255,.75); }
.athath-logo-text strong { font-family: 'Playfair Display', serif; font-size: 13px; letter-spacing: .04em; }
.athath-logo-sub { font-size: 10px; letter-spacing: .18em; color: rgba(255,255,255,.55); }

.athath-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.athath-nav-item a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 14px;
	border-radius: 10px;
	color: rgba(255,255,255,.75);
	text-decoration: none;
	font-size: 14.5px;
	font-weight: 500;
	transition: background .15s ease, color .15s ease;
}
.athath-nav-item a:hover { background: rgba(255,255,255,.08); color: #fff; }
.athath-nav-item.is-active a { background: var(--athath-teal); color: #fff; box-shadow: var(--athath-shadow); }
.athath-nav-item.is-logout { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.athath-nav-icon { width: 19px; height: 19px; flex: 0 0 19px; display: inline-flex; }
.athath-nav-icon svg { width: 100%; height: 100%; }

.athath-sidebar-help {
	margin-top: auto;
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 14px;
	padding: 18px;
	text-align: center;
}
.athath-sidebar-help strong { display: block; font-size: 14px; margin-bottom: 4px; }
.athath-sidebar-help p { font-size: 12.5px; color: rgba(255,255,255,.65); margin: 0 0 12px; }

/* ---------------------------------------------------------------
   Buttons
--------------------------------------------------------------- */
.athath-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border-radius: 9px;
	padding: 9px 16px;
	font-size: 13.5px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: transform .12s ease, opacity .12s ease, background .15s ease;
	font-family: inherit;
}
.athath-btn:hover { transform: translateY(-1px); }
.athath-btn-light { background: #fff; color: var(--athath-teal-panel); width: 100%; }
.athath-btn-primary { background: var(--athath-teal); color: #fff; }
.athath-btn-outline { background: transparent; border: 1px solid var(--athath-line); color: var(--athath-teal-panel); }
.athath-btn-outline:hover { background: var(--athath-teal-soft); }

/* ---------------------------------------------------------------
   Main / topbar
--------------------------------------------------------------- */
.athath-main { flex: 1 1 auto; min-width: 0; }

.athath-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 26px 36px;
	background: #fff;
	border-bottom: 1px solid var(--athath-line);
	flex-wrap: wrap;
}
.athath-topbar-title h1 {
	font-family: 'Playfair Display', serif;
	font-size: 27px;
	font-weight: 700;
	margin: 0 0 4px;
	color: var(--athath-ink);
}
.athath-topbar-title p { margin: 0; color: var(--athath-body); font-size: 14px; }

.athath-topbar-actions { display: flex; align-items: center; gap: 14px; }
.athath-icon-btn {
	width: 42px; height: 42px;
	border-radius: 50%;
	border: 1px solid var(--athath-line);
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--athath-ink);
	cursor: pointer;
	position: relative;
}
.athath-icon-btn svg { width: 19px; height: 19px; }
.athath-badge {
	position: absolute;
	top: -4px; right: -4px;
	background: var(--athath-danger);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	min-width: 17px; height: 17px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	border: 2px solid #fff;
}
.athath-user-chip { display: flex; align-items: center; gap: 10px; padding-left: 8px; border-left: 1px solid var(--athath-line); }
.athath-user-chip img { border-radius: 50%; width: 40px; height: 40px; }
.athath-user-chip-text { display: flex; flex-direction: column; line-height: 1.3; }
.athath-user-chip-text strong { font-size: 14px; }
.athath-gold-badge {
	display: inline-flex; align-items: center; gap: 4px;
	background: var(--athath-gold-soft); color: var(--athath-gold);
	font-size: 11px; font-weight: 700;
	padding: 2px 8px; border-radius: 20px; margin-top: 2px; width: fit-content;
}

.athath-content { padding: 28px 36px 60px; display: flex; flex-direction: column; gap: 22px; }

/* ---------------------------------------------------------------
   Stat cards
--------------------------------------------------------------- */
.athath-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.athath-stat-card {
	background: #fff; border-radius: var(--athath-radius); box-shadow: var(--athath-shadow);
	padding: 20px; display: flex; gap: 14px; align-items: flex-start;
}
.athath-stat-icon {
	width: 46px; height: 46px; border-radius: 12px; flex: 0 0 46px;
	display: flex; align-items: center; justify-content: center;
}
.athath-stat-icon svg { width: 22px; height: 22px; }
.athath-icon-blue { background: var(--athath-info-soft); color: var(--athath-info); }
.athath-icon-teal { background: var(--athath-teal-soft); color: var(--athath-teal); }
.athath-icon-gold { background: var(--athath-gold-soft); color: var(--athath-gold); }
.athath-icon-orange { background: #fdece1; color: #c56a1f; }
.athath-stat-label { display: block; font-size: 13px; color: var(--athath-body); margin-bottom: 4px; }
.athath-stat-value { display: block; font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.athath-stat-link { font-size: 12.5px; color: var(--athath-teal); text-decoration: none; font-weight: 600; }
.athath-stat-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   Generic card / rows
--------------------------------------------------------------- */
.athath-row { display: grid; gap: 20px; }
.athath-row-3 { grid-template-columns: 1.1fr 1fr 1fr; }
.athath-row-2 { grid-template-columns: 1.3fr 1fr; }

.athath-card { background: #fff; border-radius: var(--athath-radius); box-shadow: var(--athath-shadow); padding: 24px; }
.athath-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.athath-card-title { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.athath-card-header .athath-card-title { margin-bottom: 0; }
.athath-card-link { font-size: 13px; color: var(--athath-teal); text-decoration: none; font-weight: 600; }
.athath-card-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   Loyalty card
--------------------------------------------------------------- */
.athath-loyalty-card {
	background: linear-gradient(135deg, var(--athath-teal-panel) 0%, var(--athath-teal-darker) 100%);
	color: #fff;
	position: relative;
	overflow: hidden;
	display: flex; flex-direction: column;
}
.athath-loyalty-eyebrow { font-size: 12.5px; color: rgba(255,255,255,.65); }
.athath-loyalty-tier { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--athath-gold); margin: 4px 0 12px; }
.athath-loyalty-copy { font-size: 13.5px; color: rgba(255,255,255,.75); margin: 0 0 18px; max-width: 80%; }
.athath-progress { height: 8px; border-radius: 6px; background: rgba(255,255,255,.15); overflow: hidden; margin-bottom: 10px; }
.athath-progress-bar { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--athath-gold), #f3cf6a); }
.athath-loyalty-meta { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }
.athath-loyalty-meta strong { font-size: 14px; }
.athath-loyalty-meta span { font-size: 12.5px; color: rgba(255,255,255,.6); }
.athath-loyalty-card .athath-btn { align-self: flex-start; margin-top: auto; }
.athath-loyalty-medal { position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; color: var(--athath-gold); opacity: .9; }
.athath-loyalty-medal svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------------
   Tiers
--------------------------------------------------------------- */
.athath-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.athath-tier {
	border: 1px solid var(--athath-line); border-radius: 12px; padding: 16px 10px;
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
	color: var(--athath-body);
}
.athath-tier-medal { width: 34px; height: 34px; color: #b7c0c0; margin-bottom: 4px; }
.athath-tier-medal svg { width: 100%; height: 100%; }
.athath-tier strong { font-size: 14px; color: var(--athath-ink); }
.athath-tier span { font-size: 11.5px; }
.athath-tier.is-active { border-color: var(--athath-teal); background: var(--athath-teal-soft); }
.athath-tier.is-active .athath-tier-medal { color: var(--athath-gold); }

/* ---------------------------------------------------------------
   Coupons
--------------------------------------------------------------- */
.athath-coupons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.athath-coupon {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	border: 1px dashed var(--athath-line); border-radius: 12px; padding: 12px 14px;
}
.athath-coupon-code { display: block; font-size: 13.5px; color: var(--athath-teal-panel); }
.athath-coupon-desc { display: block; font-size: 12.5px; color: var(--athath-ink); margin-top: 2px; }
.athath-coupon-expiry { display: block; font-size: 11px; color: var(--athath-body); margin-top: 2px; }

.athath-empty-state {
	text-align: center;
	color: var(--athath-body);
	font-size: 13.5px;
	padding: 30px 10px;
}
li.athath-empty-state { border: none; }

/* ---------------------------------------------------------------
   Table
--------------------------------------------------------------- */
.athath-table-wrap { overflow-x: auto; }
.athath-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.athath-table th {
	text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
	color: var(--athath-body); font-weight: 600; padding: 0 10px 10px; border-bottom: 1px solid var(--athath-line);
}
.athath-table td { padding: 13px 10px; border-bottom: 1px solid var(--athath-line); }
.athath-table tr:last-child td { border-bottom: none; }
.athath-order-id { color: var(--athath-teal); font-weight: 600; }
.athath-table-action a { color: var(--athath-body); display: inline-flex; }
.athath-table-action svg { width: 18px; height: 18px; }

.athath-status {
	display: inline-flex; padding: 4px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 700;
}
.athath-status.is-success { background: var(--athath-success-soft); color: var(--athath-success); }
.athath-status.is-warning { background: var(--athath-warning-soft); color: var(--athath-warning); }
.athath-status.is-info { background: var(--athath-info-soft); color: var(--athath-info); }
.athath-status.is-danger { background: var(--athath-danger-soft); color: var(--athath-danger); }

/* ---------------------------------------------------------------
   Points history
--------------------------------------------------------------- */
.athath-points-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.athath-points-list li {
	display: grid; grid-template-columns: 16px auto 1fr auto; align-items: center; gap: 10px;
	padding: 11px 0; border-bottom: 1px solid var(--athath-line); font-size: 13px;
}
.athath-points-list li:last-child { border-bottom: none; }
.athath-points-dot { width: 8px; height: 8px; border-radius: 50%; }
.athath-points-dot svg { display: none; }
.athath-points-dot.is-positive { background: var(--athath-success); }
.athath-points-dot.is-negative { background: var(--athath-danger); }
.athath-points-value { font-weight: 700; }
.athath-points-value.is-positive { color: var(--athath-success); }
.athath-points-value.is-negative { color: var(--athath-danger); }
.athath-points-desc { color: var(--athath-ink); }
.athath-points-date { color: var(--athath-body); font-size: 12px; white-space: nowrap; }

/* ---------------------------------------------------------------
   Favorites
--------------------------------------------------------------- */
.athath-favorites-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.athath-favorite-card { display: flex; flex-direction: column; }
.athath-favorite-thumb {
	position: relative;
	background: var(--athath-teal-soft);
	border-radius: 14px;
	aspect-ratio: 1 / 0.85;
	display: flex; align-items: center; justify-content: center;
	color: var(--athath-teal);
	margin-bottom: 10px;
}
.athath-favorite-thumb svg { width: 44%; height: 44%; }
.athath-favorite-heart {
	position: absolute; top: 10px; right: 10px;
	width: 30px; height: 30px; border-radius: 50%; border: none;
	background: #fff; box-shadow: var(--athath-shadow);
	display: flex; align-items: center; justify-content: center;
	color: var(--athath-danger); cursor: pointer;
}
.athath-favorite-heart svg { width: 15px; height: 15px; }
.athath-favorite-heart.is-active svg { fill: var(--athath-danger); }
.athath-favorite-title { font-size: 13.5px; font-weight: 600; }
.athath-favorite-variant { font-size: 11.5px; color: var(--athath-teal); font-weight: 700; letter-spacing: .03em; margin: 2px 0 6px; }
.athath-favorite-price { font-size: 14px; }

/* ---------------------------------------------------------------
   Referral
--------------------------------------------------------------- */
.athath-referral-card { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.athath-referral-copy { flex: 1 1 auto; }
.athath-referral-copy p { color: var(--athath-body); margin: 0 0 16px; font-size: 14px; }
.athath-referral-input { display: flex; gap: 10px; max-width: 460px; margin-bottom: 14px; }
.athath-referral-input input {
	flex: 1 1 auto; border: 1px solid var(--athath-line); border-radius: 9px; padding: 10px 14px;
	font-size: 13px; color: var(--athath-body); background: var(--athath-bg);
}
.athath-referral-note { font-size: 13px; color: var(--athath-body); margin: 0; }
.athath-referral-illustration { width: 110px; height: 110px; flex: 0 0 110px; color: var(--athath-teal-soft); }
.athath-referral-illustration svg { width: 100%; height: 100%; color: var(--athath-teal); opacity: .85; }

/* ---------------------------------------------------------------
   Placeholder sections (new endpoints, phase 1)
--------------------------------------------------------------- */
.athath-placeholder-card { text-align: center; padding: 70px 30px; }
.athath-placeholder-icon { width: 52px; height: 52px; margin: 0 auto 16px; color: var(--athath-teal); }
.athath-placeholder-icon svg { width: 100%; height: 100%; }
.athath-placeholder-card h2 { font-family: 'Playfair Display', serif; margin: 0 0 8px; }
.athath-placeholder-card p { color: var(--athath-body); max-width: 420px; margin: 0 auto; }

/* ---------------------------------------------------------------
   Native WooCommerce forms/tables rendered inside our layout
   (orders list, addresses, edit-account) — light baseline styling
--------------------------------------------------------------- */
.athath-content .woocommerce-orders-table,
.athath-content table.shop_table {
	width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--athath-radius);
	overflow: hidden; box-shadow: var(--athath-shadow);
}
.athath-content .woocommerce-orders-table th,
.athath-content table.shop_table th {
	background: var(--athath-teal-soft); text-align: left; padding: 12px 16px; font-size: 12.5px;
}
.athath-content .woocommerce-orders-table td,
.athath-content table.shop_table td { padding: 12px 16px; border-bottom: 1px solid var(--athath-line); font-size: 13.5px; }
.athath-content .woocommerce-MyAccount-content > p:first-child { margin-top: 0; }
.athath-content .woocommerce-Address { background: #fff; border-radius: var(--athath-radius); padding: 20px; box-shadow: var(--athath-shadow); }
.athath-content .woocommerce-Button,
.athath-content button.button {
	background: var(--athath-teal); color: #fff; border: none; border-radius: 9px;
	padding: 10px 18px; font-weight: 600; cursor: pointer;
}
.athath-content input.input-text,
.athath-content select {
	border: 1px solid var(--athath-line); border-radius: 8px; padding: 9px 12px; width: 100%;
}
.athath-content fieldset { border: 1px solid var(--athath-line); border-radius: var(--athath-radius); padding: 20px; background: #fff; }

/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 1180px) {
	.athath-row-3 { grid-template-columns: 1fr 1fr; }
	.athath-row-3 .athath-card:last-child { grid-column: span 2; }
	.athath-stats-grid { grid-template-columns: repeat(2, 1fr); }
	.athath-favorites-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
	.athath-account { flex-direction: column; }
	.athath-sidebar { width: 100%; flex: none; height: auto; position: relative; padding: 18px; }
	.athath-nav ul { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
	.athath-nav-item a { white-space: nowrap; padding: 9px 12px; }
	.athath-nav-label { display: none; }
	.athath-sidebar-help { display: none; }
	.athath-row-2, .athath-row-3 { grid-template-columns: 1fr; }
	.athath-row-3 .athath-card:last-child { grid-column: auto; }
	.athath-topbar { padding: 20px; }
	.athath-content { padding: 20px 20px 40px; }
}

@media (max-width: 640px) {
	.athath-stats-grid { grid-template-columns: 1fr; }
	.athath-favorites-grid { grid-template-columns: repeat(2, 1fr); }
	.athath-tiers { grid-template-columns: 1fr; }
	.athath-referral-card { flex-direction: column; text-align: center; }
	.athath-topbar-actions { width: 100%; justify-content: space-between; }
	.athath-user-chip-text { display: none; }
}
