/*!
 * CostPro Theme — account dashboard stylesheet
 * استایل داشبورد کاربر، ورود/OTP، فاکتور و چاپ — هماهنگ با توکن‌های main.css
 */

/* ---------------- Layout ---------------- */
.acc-wrap{ margin:0 auto; }
.acc-auth{ max-width:460px; }
.acc-topbar{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:16px; }
.acc-topbar--simple{ background:none; border:none; padding:0; }
.acc-who{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.acc-who b{ font-size:17px; color:var(--ink-900); }
.acc-who span{ font-size:14px; color:var(--ink-500); direction:ltr; }
.acc-exit{ font-size:14px; font-weight:600; color:var(--ink-500); border:1px solid var(--border); border-radius:999px; padding:7px 16px; transition:.2s; }
.acc-exit:hover{ color:#b91c1c; border-color:#fecaca; background:#fef2f2; }

/* ---------------- Tabs ---------------- */
.acc-tabs{ display:flex; gap:8px; flex-wrap:wrap; background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:8px; box-shadow:var(--shadow-sm); margin-bottom:20px; }
.acc-tab{ flex:1 1 130px; text-align:center; padding:11px 10px; border-radius:10px; font-size:14.5px; font-weight:600; color:var(--ink-600); transition:.18s; }
.acc-tab:hover{ background:var(--teal-50); color:var(--teal-700); }
.acc-tab.is-active{ background:var(--grad); color:#fff; box-shadow:0 6px 16px -6px rgba(13,148,136,.5); }

/* ---------------- Cards / alerts ---------------- */
.acc-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); padding:26px 28px; box-shadow:var(--shadow-sm); margin-bottom:18px; }
.acc-card h3{ font-size:18px; font-weight:800; color:var(--ink-900); margin-bottom:8px; }
.acc-card .cp-form{ margin-top:14px; }
.acc-hint{ font-size:14px; color:var(--ink-500); line-height:2; }
.acc-hint a{ color:var(--teal-700); font-weight:600; }
.acc-alert{ border-radius:12px; padding:13px 16px; font-size:14.5px; line-height:1.9; margin-bottom:16px; border:1px solid; }
.acc-alert.is-error{ background:#fef2f2; border-color:#fecaca; color:#b91c1c; }
.acc-alert.is-ok{ background:#f0fdf4; border-color:#bbf7d0; color:#15803d; }
.acc-alert.is-warn{ background:#fffbeb; border-color:#fde68a; color:#b45309; }
.acc-grid2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:560px){ .acc-grid2{ grid-template-columns:1fr; } .acc-card{ padding:20px 18px; } }
.acc-otp-input{ letter-spacing:8px; font-size:20px; text-align:center; direction:ltr; }
.acc-resend{ margin-top:12px; text-align:center; }
.field input.is-readonly{ background:var(--bg); color:var(--ink-500); cursor:not-allowed; }

/* ---------------- License box (after purchase) ---------------- */
.acc-license-box{ background:var(--grad); border-radius:var(--r-lg); padding:34px 30px; text-align:center; color:#fff; box-shadow:var(--shadow-md); margin-bottom:20px; }
.acc-license-tag{ display:inline-block; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.28); border-radius:999px; padding:6px 16px; font-size:13px; font-weight:700; margin-bottom:12px; }
.acc-license-box h3{ font-size:21px; font-weight:800; margin-bottom:8px; }
.acc-license-box .acc-hint{ color:rgba(255,255,255,.86); max-width:520px; margin:0 auto; }
.acc-serial{ display:flex; align-items:center; justify-content:center; gap:10px; margin:18px 0 6px; flex-wrap:wrap; }
.acc-serial code{ background:rgba(255,255,255,.14); border:1px dashed rgba(255,255,255,.4); border-radius:12px; padding:13px 22px; font-size:21px; font-weight:700; letter-spacing:1.5px; }
.acc-serial.is-inline{ margin:0; justify-content:flex-start; }
.acc-serial.is-inline code{ background:var(--bg); border:1px dashed var(--border); color:var(--ink-900); font-size:15px; padding:8px 12px; letter-spacing:.5px; }
.acc-copy{ background:var(--surface); color:var(--teal-700); border:1px solid var(--border); border-radius:10px; padding:9px 18px; font-weight:700; font-size:14px; cursor:pointer; transition:.18s; }
.acc-serial.is-inline .acc-copy{ padding:6px 12px; font-size:12.5px; }
.acc-copy:hover{ background:var(--teal-50); border-color:var(--teal-400); }
.acc-copy.is-done{ background:var(--teal-700); color:#fff; border-color:var(--teal-700); }
.acc-license-actions{ margin-top:16px; }
/* main.css sets .btn--primary{color:#fff!important} — override it so the label is visible on the white button */
.acc-license-actions .btn--primary{ background:#fff!important; color:var(--teal-800)!important; }
.acc-license-actions .btn--primary:hover{ background:var(--teal-50)!important; color:var(--teal-900)!important; }
.acc-kv{ margin-top:14px; font-size:13.5px; color:rgba(255,255,255,.92); }
.acc-kv span{ background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.3); border-radius:8px; padding:3px 10px; letter-spacing:.5px; }

/* ---------------- Checkout (computer code step) ---------------- */
.acc-planline{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; background:var(--bg); border:1px solid var(--border); border-radius:12px; padding:14px 18px; margin-top:14px; }
.acc-planline__name{ font-weight:800; color:var(--ink-900); }
.acc-planline__price{ font-weight:800; color:var(--teal-700); font-size:17px; }
.acc-pc-input{ font-family:ui-monospace,Consolas,monospace; letter-spacing:1px; }
.acc-pc{ font-size:12.5px; color:var(--ink-500); }

/* ---------------- Tables ---------------- */
.acc-table{ width:100%; border-collapse:collapse; margin-top:14px; }
.acc-table th{ text-align:right; font-size:12.5px; font-weight:700; color:var(--ink-500); background:var(--bg); padding:10px 12px; }
.acc-table th:first-child{ border-radius:0 10px 10px 0; }
.acc-table th:last-child{ border-radius:10px 0 0 10px; }
.acc-table td{ padding:13px 12px; border-bottom:1px solid var(--border); font-size:14px; color:var(--ink-700); }
.acc-badge{ display:inline-block; border-radius:999px; padding:4px 13px; font-size:12.5px; font-weight:700; }
.acc-badge.is-ok{ background:#f0fdf4; color:#15803d; border:1px solid #bbf7d0; }
.acc-badge.is-warn{ background:#fffbeb; color:#b45309; border:1px solid #fde68a; }
.acc-badge.is-err{ background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; }
.acc-badge.is-new{ background:var(--teal-50); color:var(--teal-700); border:1px solid var(--teal-100); }
.acc-badge.is-prog{ background:#fffbeb; color:#b45309; border:1px solid #fde68a; }
.acc-badge.is-ans{ background:#f0fdf4; color:#15803d; border:1px solid #bbf7d0; }
.acc-badge.is-closed{ background:var(--bg); color:var(--ink-500); border:1px solid var(--border); }
.acc-link{ color:var(--teal-700); font-weight:700; font-size:14px; }
.acc-link:hover{ color:var(--teal-900); }
@media (max-width:640px){
        .acc-table thead{ display:none; }
        .acc-table tr{ display:block; border:1px solid var(--border); border-radius:12px; margin-bottom:10px; padding:6px 4px; }
        .acc-table td{ display:flex; justify-content:space-between; align-items:center; gap:10px; border-bottom:1px dashed var(--border); }
        .acc-table td:last-child{ border-bottom:none; }
        .acc-table td::before{ content:attr(data-label); font-size:12px; font-weight:700; color:var(--ink-500); }
        .acc-serial.is-inline{ flex-wrap:wrap; }
}

/* ---------------- Resume payment («ادامه خرید») ---------------- */
.acc-paybtn{ display:inline-block; background:var(--grad); color:#fff !important; border-radius:999px; padding:8px 20px; font-size:13px; font-weight:700; text-decoration:none; box-shadow:0 5px 12px -5px rgba(13,148,136,.6); transition:.18s; white-space:nowrap; }
.acc-paybtn:hover{ transform:translateY(-1px); box-shadow:0 8px 16px -6px rgba(13,148,136,.65); }
.acc-paybtn--retry{ background:var(--surface); color:#b45309 !important; border:1px solid #fde68a; box-shadow:none; }
.acc-paybtn--retry:hover{ background:#fffbeb; box-shadow:none; }

/* ---------------- Ticket conversation ---------------- */
.acc-tickets{ display:flex; flex-direction:column; gap:14px; margin-top:14px; }
.acc-ticket{ border:1px solid var(--border); border-radius:14px; padding:18px 20px; background:var(--bg); }
.acc-tickethead{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.acc-tickethead h4{ margin:0; font-size:15.5px; font-weight:800; color:var(--ink-900); }
.acc-tickethead time{ font-size:12px; color:var(--ink-400); margin-inline-start:auto; }
.acc-thread{ display:flex; flex-direction:column; gap:10px; margin-top:14px; }
.acc-msg{ max-width:85%; border-radius:16px; padding:11px 15px; font-size:14px; line-height:2; border:1px solid var(--border); background:var(--surface); color:var(--ink-700); box-shadow:var(--shadow-sm); }
.acc-msg__who{ display:block; font-size:11.5px; margin-bottom:3px; color:var(--ink-500); font-weight:700; }
.acc-msg__time{ display:block; font-size:11px; color:var(--ink-400); margin-top:5px; }
.acc-msg--user{ align-self:flex-start; border-start-start-radius:4px; }
.acc-msg--admin{ align-self:flex-end; background:var(--teal-50); border-color:var(--teal-100); color:var(--teal-900); border-start-end-radius:4px; }
.acc-msg--admin .acc-msg__who{ color:var(--teal-700); }
.acc-ticketclosed{ margin-top:12px; font-size:13px; }
.acc-reply{ margin-top:14px; padding-top:14px; border-top:1px dashed var(--border); }
@media (max-width:640px){ .acc-msg{ max-width:100%; } .acc-tickethead time{ width:100%; margin-inline-start:0; } }

/* ---------------- Invoice ---------------- */
.invoice{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); padding:34px; box-shadow:var(--shadow-sm); max-width:720px; }
.invoice__head{ display:flex; justify-content:space-between; align-items:flex-start; gap:14px; flex-wrap:wrap; border-bottom:2px solid var(--teal-700); padding-bottom:16px; }
.invoice__site{ display:block; font-size:20px; font-weight:900; color:var(--teal-700); }
.invoice__head span{ font-size:13px; color:var(--ink-500); }
.invoice__num{ font-size:14px; color:var(--ink-600); }
.invoice__meta{ width:100%; border-collapse:collapse; margin-top:16px; }
.invoice__meta th{ text-align:right; width:130px; color:var(--ink-500); font-size:13.5px; padding:7px 0; }
.invoice__meta td{ font-size:14.5px; font-weight:600; color:var(--ink-900); padding:7px 0; }
.invoice__items{ width:100%; border-collapse:collapse; margin-top:18px; }
.invoice__items th, .invoice__items td{ border:1px solid var(--border); padding:11px 14px; font-size:14.5px; text-align:right; }
.invoice__items thead th{ background:var(--bg); color:var(--ink-500); font-size:12.5px; }
.invoice__items tfoot th{ color:var(--ink-900); font-weight:800; }
.invoice__items tfoot td{ font-weight:800; color:var(--teal-700); }
.invoice__ref{ margin-top:14px; font-size:13.5px; color:var(--ink-600); }
.invoice__note{ margin-top:18px; font-size:12.5px; color:var(--ink-400); border-top:1px dashed var(--border); padding-top:12px; }

/* ---------------- Print ---------------- */
@media print{
        body *{ visibility:hidden; }
        .invoice, .invoice *{ visibility:visible; }
        .acc-license-box, .acc-license-box *{ visibility:visible; }
        .invoice{ position:absolute; inset-inline-start:0; top:0; width:100%; border:none; box-shadow:none; }
        .acc-license-box{ position:absolute; inset-inline-start:50%; transform:translateX(50%); top:80px; width:640px; }
        .acc-license-box .btn, .acc-license-box .acc-copy{ display:none !important; }
        .site-header, .site-footer, .announce, .floaters, .acc-topbar, .acc-tabs, .page-hero{ display:none !important; }
        section{ padding:0 !important; }
}
