/* ======================================================
   Ashrafi Customer Dashboard — Luxury Minimal Theme
   ====================================================== */

.ashrafi-dashboard,
.ashrafi-dashboard *{box-sizing:border-box;font-family:inherit}

.ashrafi-dashboard{
	display:flex;min-height:80vh;max-width:1400px;width:100%;
	margin:28px auto;padding:0;
	background:#fff;border:1px solid #e8dcc8;border-radius:24px;
	box-shadow:0 12px 50px rgba(0,0,0,.07);
	overflow:hidden;direction:rtl;color:#3e3630
}

/* ---------- Sidebar ---------- */
.sidebar{
	width:250px;
	background:linear-gradient(180deg,#f5e6d3 0%,#e8dcc8 100%);
	border-left:1px solid #dfd2bc;
	display:flex;flex-direction:column;gap:14px;
	padding:26px 22px;
	flex-shrink:0
}
.brand{font-weight:700;font-size:20px;color:#6d5238;margin-bottom:8px;letter-spacing:-.3px}
.sidebar nav{display:flex;flex-direction:column;gap:6px}
.nav-item{
	border:none;text-align:right;padding:13px 16px;border-radius:12px;
	background:transparent;color:#6d5238;font-weight:600;font-size:14px;
	cursor:pointer;transition:all .2s ease;white-space:nowrap
}
.nav-item:hover{background:rgba(212,175,55,.12);color:#5a4020}
.nav-item.active{background:#d4af37;color:#fff;box-shadow:0 4px 12px rgba(212,175,55,.3)}

/* Logout */
.nav-logout{color:#9b4d4d !important;margin-top:auto;opacity:.75;font-size:13px;transition:all .2s}
.nav-logout:hover{opacity:1;background:rgba(155,77,77,.08) !important;color:#7a2e2e !important}

/* ---------- Content ---------- */
.content{flex:1;padding:36px 34px;display:flex;flex-direction:column;gap:22px;background:#faf8f5;min-width:0}

.section{display:none}
.section.active{display:block;animation:sectionFadeIn .35s ease both}

@keyframes sectionFadeIn{
	from{opacity:0;transform:translateY(6px)}
	to{opacity:1;transform:translateY(0)}
}

/* ---------- AI Token Bar ---------- */
.ai-token-bar{
	background:linear-gradient(135deg,#d4af37 0%,#b8942e 100%);
	border-radius:14px;padding:16px 24px;color:#fff;
	display:flex;align-items:center;justify-content:space-between;
	margin-bottom:18px;
	box-shadow:0 4px 18px rgba(212,175,55,.25)
}
.ai-token-info{display:flex;align-items:center;gap:12px}
.ai-token-icon{font-size:28px}
.ai-token-bar strong{font-size:15px}
.ai-token-bar small{opacity:.85;font-size:12px}
.ai-token-value{
	font-size:32px;font-weight:700;
	background:rgba(255,255,255,.18);
	padding:8px 22px;border-radius:10px;
	line-height:1
}

/* ---------- Welcome Card ---------- */
.welcome-card{
	background:#fff3e6;border:1px solid #f0dfc5;border-radius:16px;
	padding:22px 24px;
	box-shadow:0 6px 20px rgba(212,175,55,.08);
	transition:box-shadow .25s ease
}
.welcome-card:hover{box-shadow:0 8px 28px rgba(212,175,55,.14)}
.welcome-card h2{margin:0 0 6px;font-size:20px;color:#3e3630}
.welcome-card p{margin:0;color:#6d5238;font-size:14px}

/* ---------- Stats ---------- */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px}

.stat{
	background:#fff;border:1px solid #e8dcc8;border-radius:16px;padding:18px;
	box-shadow:0 4px 16px rgba(0,0,0,.04);
	transition:transform .2s ease,box-shadow .2s ease
}
.stat:hover{transform:translateY(-3px);box-shadow:0 8px 26px rgba(0,0,0,.08)}
.stat-title{color:#6d5238;font-size:13px;margin-bottom:6px;font-weight:600}
.stat-value{font-weight:700;font-size:24px;margin-bottom:4px;color:#3e3630}
.stat-desc{color:#8b6845;font-size:12px}

/* ---------- Cards ---------- */
.card{
	background:#fff;border:1px solid #e8dcc8;border-radius:18px;padding:20px;
	box-shadow:0 6px 22px rgba(0,0,0,.05);
	transition:transform .2s ease,box-shadow .2s ease
}
.card:hover{transform:translateY(-2px);box-shadow:0 10px 32px rgba(0,0,0,.08)}
.card-header{font-weight:700;margin-bottom:14px;color:#6d5238;font-size:15px}
.card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}

/* ---------- Tables ---------- */
.table-wrap{overflow-x:auto;scrollbar-width:thin;scrollbar-color:#d4af37 #f5f0e8}
.table-wrap::-webkit-scrollbar{height:5px}
.table-wrap::-webkit-scrollbar-track{background:#f5f0e8;border-radius:3px}
.table-wrap::-webkit-scrollbar-thumb{background:#d4af37;border-radius:3px}

.table-wrap table{width:100%;border-collapse:collapse}
.table-wrap th,.table-wrap td{text-align:right;padding:12px 14px;border-bottom:1px solid #f1e6d7;font-size:14px}
.table-wrap th{background:#faf3e6;color:#6d5238;font-weight:600;font-size:13px;white-space:nowrap}
.table-wrap tbody tr{transition:background .15s ease}
.table-wrap tbody tr:hover{background:#fdf8f0}
.table-wrap tbody td:first-child{font-weight:600;color:#6d5238}

/* ---------- Badges ---------- */
.badge{padding:5px 12px;border-radius:8px;font-size:12px;font-weight:600;display:inline-block;white-space:nowrap}
.status-processing,.status-on-hold{background:#e8f0fe;color:#1a56db}
.status-completed{background:#def7ec;color:#057a55}
.status-pending{background:#fef3cd;color:#92710c}
.status-cancelled,.status-failed{background:#fde8e8;color:#c81e1e}
.status-refunded{background:#e5e7eb;color:#4b5563}

/* ---------- Links / Buttons ---------- */
.btn-link{color:#a67c52;font-weight:600;text-decoration:none;transition:color .15s}
.btn-link:hover{color:#7d5a33;text-decoration:underline}

.btn-primary{
	display:inline-flex;align-items:center;justify-content:center;
	padding:11px 22px;background:#d4af37;color:#fff;border:none;
	border-radius:12px;text-decoration:none;font-weight:700;font-size:14px;
	cursor:pointer;transition:all .2s ease;
	box-shadow:0 4px 12px rgba(212,175,55,.25)
}
.btn-primary:hover{background:#bfa030;box-shadow:0 6px 18px rgba(212,175,55,.35);transform:translateY(-1px)}
.btn-primary:active{transform:translateY(0);box-shadow:0 2px 6px rgba(212,175,55,.2)}

/* ---------- Address ---------- */
.address-block{line-height:1.9;color:#3e3630;font-size:14px}

/* ---------- Account Form ---------- */
.account-info{display:flex;flex-direction:column;gap:10px}

.info-row{
	display:flex;justify-content:space-between;align-items:center;
	background:#faf3e6;padding:12px 16px;border-radius:10px;
	border:1px solid #f0e2cc;font-size:14px
}

.account-form{
	display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
	gap:16px 18px;align-items:flex-start
}
.form-row{display:flex;flex-direction:column;gap:6px}
.form-row.inline{
	display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
	gap:12px;grid-column:1/-1
}
.account-form .form-row > div{width:100%;display:flex;flex-direction:column}
.form-row.inline > div{display:flex;flex-direction:column}
.account-form .info-row{grid-column:1/-1}
.account-form button{margin-top:8px;grid-column:1/-1;align-self:flex-start}

.account-form label{
	font-weight:600;color:#6d5238;font-size:14px;
	text-align:right;margin-bottom:4px
}

.account-form input[type="text"],
.account-form input[type="email"],
.account-form input[type="password"],
.account-form select,
.account-form textarea{
	box-sizing:border-box;
	width:100%;max-width:100%;height:44px;
	padding:10px 14px;font:inherit;font-size:15px;line-height:1.2;
	border:1px solid #e4d6bf;border-radius:10px;
	background:#fff;color:inherit;
	transition:border-color .2s ease,box-shadow .2s ease
}
.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus{
	outline:none;border-color:#d4af37;
	box-shadow:0 0 0 3px rgba(212,175,55,.12)
}
.account-form textarea{height:auto;min-height:100px;padding:12px 14px}
.account-form .btn-primary{padding:10px 20px}

/* Defensive: ensure theme doesn't force tiny input sizes */
.account-form input[style],
.account-form input{min-width:0}

/* ---------- WC Notices inside Dashboard ---------- */
.ashrafi-dashboard .woocommerce-message,
.ashrafi-dashboard .woocommerce-info{
	background:#def7ec;color:#057a55;
	border-radius:12px;padding:14px 18px;margin-bottom:16px;
	border:1px solid #bcf0da;font-size:14px;font-weight:500
}
.ashrafi-dashboard .woocommerce-error{
	background:#fde8e8;color:#c81e1e;
	border-radius:12px;padding:14px 18px;margin-bottom:16px;
	border:1px solid #fbd5d5;font-size:14px;font-weight:500
}
.ashrafi-dashboard .woocommerce-message::before,
.ashrafi-dashboard .woocommerce-error::before,
.ashrafi-dashboard .woocommerce-info::before{display:none}

/* ---------- Guest Box ---------- */
.ashrafi-guest{
	max-width:520px;margin:40px auto;padding:36px;
	background:#fff;border:1px solid #e8dcc8;border-radius:18px;
	text-align:center;box-shadow:0 10px 30px rgba(0,0,0,.06)
}
.ashrafi-guest p{margin:0 0 16px;color:#6d5238;font-size:15px}

/* ---------- Custom Scrollbar ---------- */
.ashrafi-dashboard ::-webkit-scrollbar{width:5px;height:5px}
.ashrafi-dashboard ::-webkit-scrollbar-track{background:#f5f0e8;border-radius:3px}
.ashrafi-dashboard ::-webkit-scrollbar-thumb{background:#d4af37;border-radius:3px}
.ashrafi-dashboard ::-webkit-scrollbar-thumb:hover{background:#b8942e}

/* ---------- Responsive ---------- */
@media(max-width:900px){
	.ashrafi-dashboard{
		flex-direction:column;margin:12px auto;
		border-radius:18px;max-width:100%
	}
	.sidebar{
		width:100%;flex-direction:row;align-items:center;
		padding:12px;gap:8px;
		position:sticky;top:0;z-index:5;overflow-x:auto;
		background:linear-gradient(135deg,#f9f1e3,#e8dcc8)
	}
	.brand{margin-bottom:0;font-size:16px;flex-shrink:0}
	.sidebar nav{
		flex-direction:row;gap:6px;flex:1;
		overflow-x:auto;scrollbar-width:none;
		-ms-overflow-style:none
	}
	.sidebar nav::-webkit-scrollbar{display:none}
	.nav-item{flex:0 0 auto;padding:10px 14px;font-size:13px}
	.nav-logout{margin-top:0}
	.content{padding:16px 14px}
	.stats{grid-template-columns:repeat(2,1fr);gap:10px}
	.stat{padding:14px}
	.stat-value{font-size:20px}
	.table-wrap th,.table-wrap td{font-size:13px;padding:10px}
	.card{padding:16px}
	.account-form{grid-template-columns:1fr}
	.form-row.inline{grid-template-columns:1fr}
	.card-grid{grid-template-columns:1fr}
	.ai-token-bar{padding:14px 18px;border-radius:12px}
	.ai-token-value{font-size:26px;padding:6px 16px}
}

@media(max-width:480px){
	.stats{grid-template-columns:1fr}
	.welcome-card{padding:16px}
	.welcome-card h2{font-size:17px}
}
