/* =====================================================================
   Tangsirkala Core — پنل کاربری و صفحهٔ ورود مستقل (templates/account.php)
   رنگ‌ها از tkc-front.css (--tkc-yellow, --tkc-ink, ...) می‌آیند.
   ===================================================================== */

/* زمینهٔ صفحه */
body.tkc-app-page { margin: 0; background: #F6F7F9 !important; }
body.tkc-login-page { margin: 0; background: #FFFFFF !important; }

/* نشان و نام فروشگاه (هر دو صفحه) */
.tkc-app__brand { display: flex; align-items: center; gap: 10px; color: inherit !important; font-size: 20px; font-weight: 900; text-decoration: none !important; }
.tkc-app__logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--tkc-yellow); color: var(--tkc-ink); font-size: 15px; font-weight: 900; }

/* =====================================================================
   پنل کاربری
   ===================================================================== */
.tkc-app { display: flex; min-height: 100vh; direction: rtl; }
/* منوی کناری تیره */
.tkc-app__side { position: sticky; top: 0; flex: 0 0 290px; height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; gap: 20px; padding: 24px 18px; background: var(--tkc-ink); color: #FFFFFF; overflow: auto; }
.tkc-app__me { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .07); }
.tkc-app__avatar { flex: 0 0 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--tkc-yellow); color: var(--tkc-ink); font-size: 20px; font-weight: 900; }
.tkc-app__who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tkc-app__who b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tkc-app__who bdi { color: #C9CED6; font-size: 12px; text-align: right; }
.tkc-app__nav { display: flex; flex-direction: column; gap: 4px; }
.tkc-app__nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: #FFFFFF !important; font-size: 14px; font-weight: 700; text-decoration: none !important; transition: background-color .2s ease; }
.tkc-app__nav a:hover { background: rgba(255, 255, 255, .07); }
.tkc-app__nav a.is-current { background: var(--tkc-yellow); color: var(--tkc-ink) !important; }
.tkc-app__nav a.is-logout { color: #FF9AA8 !important; }
.tkc-app__back { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .08); color: #FFFFFF !important; font-size: 13px; font-weight: 700; text-decoration: none !important; }
.tkc-app__back .tkc-i { color: var(--tkc-yellow); }
/* ستون محتوا */
.tkc-app__main { flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 28px 32px 40px; }
.tkc-app__top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.tkc-app__top h1 { flex: 1 1 auto; margin: 0 !important; color: var(--tkc-ink); font-size: 24px; font-weight: 900; }
.tkc-app__home { display: none; }                       /* فقط موبایل */
.tkc-app__cart { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 14px; background: var(--tkc-yellow); color: var(--tkc-ink) !important; font-size: 13px; font-weight: 800; text-decoration: none !important; }
/* محتوای ووکامرس داخل کارت سفید */
.tkc-app__main .woocommerce-MyAccount-content { float: none !important; width: auto !important; margin: 0 !important; padding: 22px !important; border-radius: 22px !important; background: #FFFFFF !important; box-shadow: 0 3px 15px rgba(0, 0, 0, .04) !important; box-sizing: border-box; }
/* بخش‌های قالب داخل محتوا شناور (float) هستند؛ flow-root باعث می‌شود کارت دورشان را بگیرد */
.tkc-app__main .woocommerce-MyAccount-content { display: flow-root !important; }
.tkc-app__main .woocommerce-MyAccount-content > [class] { max-width: 100%; }
.tkc-app__main .woocommerce-MyAccount-content table { width: 100%; }
/* نوار آیکون‌های قالب (خانه، سبد، علاقه‌مندی) تکراری است؛ همین پیوندها در منو و کاشی‌ها هست */
.tkc-app .user-mehrnoosh-my-account-bar { display: none !important; }
.tkc-app__tabbar { display: none; }                     /* فقط موبایل */

/* ---------- موبایل و تبلت کوچک ---------- */
@media (max-width: 1024px) {
	.tkc-app__side { flex-basis: 240px; }
	.tkc-app__main { padding: 22px 20px 32px; }
}
@media (max-width: 767px) {
	.tkc-app { display: block; }
	.tkc-app__side { display: none; }                   /* منو جایش را به نوار پایین و کاشی‌ها می‌دهد */
	.tkc-app__main { padding: 0 12px 100px; }
	/* نوار بالا: بازگشت، عنوان، سبد */
	.tkc-app__top { position: sticky; top: 0; z-index: 5; margin: 0 -12px 12px; padding: 12px 14px; background: #FFFFFF; border-bottom: 1px solid #EEF0F3; }
	.tkc-app__top h1 { font-size: 16px; text-align: center; }
	.tkc-app__home { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #F6F7F9; color: var(--tkc-ink) !important; }
	.tkc-app__cart { width: 42px; height: 42px; padding: 0; justify-content: center; }
	.tkc-app__cart span { display: none; }
	.tkc-app__main .woocommerce-MyAccount-content { padding: 14px !important; border-radius: 18px !important; }
	/* نوار پایین شناور */
	.tkc-app__tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 8px; border-radius: 20px; background: #FFFFFF; box-shadow: 0 10px 30px rgba(20, 29, 38, .14); }
	.tkc-app__tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; color: var(--tkc-ink) !important; font-size: 11px; font-weight: 700; text-decoration: none !important; }
	.tkc-app__tabbar a.is-current { background: var(--tkc-yellow); }
}

/* =====================================================================
   صفحهٔ ورود (مهمان)
   ===================================================================== */
.tkc-login { display: flex; min-height: 100vh; direction: rtl; }
.tkc-login__form { flex: 0 0 min(640px, 50%); display: flex; align-items: center; justify-content: center; padding: 40px; box-sizing: border-box; }
.tkc-login__inner { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.tkc-login__back { align-self: flex-start; display: flex; align-items: center; gap: 6px; color: var(--tkc-muted) !important; font-size: 13px; font-weight: 700; text-decoration: none !important; }
.tkc-login__inner h1 { margin: 16px 0 0 !important; color: var(--tkc-ink); font-size: 26px; font-weight: 900; }
.tkc-login__inner > p { margin: 0 !important; color: var(--tkc-muted); font-size: 14px; line-height: 2; }
/* فرم ورود قالب: قاب و سایهٔ خودش حذف؛ فیلد و دکمه هماهنگ با طرح */
.tkc-login__inner .woocommerce, .tkc-login__inner .userj, .tkc-login__inner .size-1, .tkc-login__inner .size-2, .tkc-login__inner .user-mehrnoosh-login-form, .tkc-login__inner .form--mehrnoosh-one { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; border: 0 !important; }
.tkc-login__inner input[type="tel"], .tkc-login__inner input[type="text"], .tkc-login__inner input[type="password"], .tkc-login__inner input[type="number"] { min-height: 54px; border: 2px solid var(--tkc-yellow) !important; border-radius: 16px !important; font-size: 16px !important; box-shadow: none !important; }
/* انتخابگر بلندتر تا از قاعدهٔ !important قالب قوی‌تر باشد؛ دکمه تمام‌عرض */
body.tkc-login-page .tkc-login__inner button.button[type="submit"], .tkc-login__inner button[type="submit"], .tkc-login__inner input[type="submit"], .tkc-login__inner .button { width: 100% !important; min-height: 54px; border: 0 !important; border-radius: 16px !important; background: var(--tkc-ink) !important; color: #FFFFFF !important; font-size: 16px !important; font-weight: 900 !important; box-shadow: none !important; }
/* ستون زرد معرفی */
.tkc-login__brand { position: relative; flex: 1 1 auto; margin: 16px; padding: 56px; border-radius: 32px; background: var(--tkc-yellow); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; }
.tkc-login__brand::before { content: ""; position: absolute; top: -120px; left: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.tkc-login__brand h2 { position: relative; margin: 0 !important; color: var(--tkc-ink); font-size: 34px; line-height: 1.6; font-weight: 900; }
.tkc-login__brand ul { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tkc-login__brand li { padding: 16px; border-radius: 18px; background: #FFFFFF; color: var(--tkc-ink); font-size: 14px; font-weight: 800; }
@media (max-width: 1024px) {
	.tkc-login__brand { padding: 36px; }
	.tkc-login__brand h2 { font-size: 26px; }
	.tkc-login__brand ul { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
	/* موبایل: بخش زرد بالا، فرم زیر آن */
	.tkc-login { flex-direction: column-reverse; justify-content: flex-end; }
	.tkc-login__form { flex: none; padding: 10px 20px 30px; }
	.tkc-login__brand { flex: none; margin: 12px; padding: 24px; border-radius: 26px; min-height: 180px; }
	.tkc-login__brand h2 { font-size: 20px; }
	.tkc-login__brand ul { display: none; }
	.tkc-login__inner h1 { margin-top: 4px !important; font-size: 22px; }
}
