/* assets/css/account.css - The customer dashboard (account.php, /account). Base: quote-accept.css */

/* Hero when logged in */
.ac-hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ac-logout { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: 0.86rem; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); display: inline-flex; gap: 8px; align-items: center; }
.ac-logout:hover { background: rgba(255, 255, 255, 0.1); color: #ffd700; }

/* Log in */
.ac-login { max-width: 460px; margin: 0 auto; text-align: center; }
.ac-login h2 { margin: 10px 0 6px !important; font-size: 1.3rem !important; }
.ac-login .qa-form { text-align: left; margin-top: 18px; }
.ac-login-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: linear-gradient(135deg, #1a3c34, #2a5c50); color: #ffd700; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 10px 24px rgba(26, 60, 52, 0.25); }
.ac-muted { color: #64748b; }
.ac-small { font-size: 0.82rem; }
.ac-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #94a3b8; font-size: 0.8rem; }
.ac-or::before, .ac-or::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.ac-switch { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 16px; border-radius: 12px; border: 1.5px solid #dfe7e4; background: #fff; color: #1a3c34; font: inherit; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.ac-switch:hover { border-color: #1a3c34; background: #f6faf8; }
.ac-code { display: block; width: 100%; padding: 14px 10px; border: 2px solid #e2e8f0; border-radius: 14px; text-align: center; font: inherit; font-size: 1.8rem; font-weight: 700; letter-spacing: 0.5em; text-indent: 0.5em; color: #1a3c34; margin-bottom: 12px; }
.ac-code::placeholder { color: #d5dce4; }
.ac-code:focus { outline: none; border-color: #ffd700; box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2); }
.ac-code.is-full { border-color: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); }
.ac-restart { margin-top: 12px; }
.ac-restart button { background: none; border: none; color: #2a5c50; font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.ac-help { margin: 20px 0 0; padding-top: 16px; border-top: 1px dashed #e2eae7; font-size: 0.86rem; color: #64748b; }
.ac-help i { color: #25d366; }
.ac-help a { color: #1a3c34; font-weight: 700; }

/* Summary cards */
.ac-cards { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.ac-card { background: #fff; border-radius: 18px; padding: 20px 22px; box-shadow: 0 14px 40px rgba(19, 42, 36, 0.12); display: flex; flex-direction: column; gap: 4px; }
.ac-card span { font-size: 0.74rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #64748b; }
.ac-card strong { font-size: 1.6rem; color: #1a3c34; line-height: 1.2; }
.ac-card small { color: #64748b; font-size: 0.84rem; }
.ac-card small .fa-check-circle { color: #16a34a; }
.ac-card-owing { background: linear-gradient(135deg, #1a3c34, #2a5c50); }
.ac-card-owing span { color: rgba(255, 255, 255, 0.7); }
.ac-card-owing strong { color: #fff; font-size: 2rem; }
.ac-card-owing small { color: rgba(255, 255, 255, 0.85); }
.ac-card-owing.has-owing strong { color: #ffd700; }
.ac-pay { align-self: flex-start; margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: #ffd700; color: #1a3c34; font-weight: 700; text-decoration: none; font-size: 0.9rem; transition: transform 0.2s ease; }
.ac-pay:hover { transform: translateY(-2px); }

/* Sections */
.ac-section { background: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 10px 30px rgba(19, 42, 36, 0.08); margin-bottom: 18px; }
.ac-section h2 { margin: 0 0 16px; font-size: 1.08rem; color: #1a3c34; display: flex; gap: 10px; align-items: center; }
.ac-section h2 i { color: #b8960c; }

/* Invoices to pay */
.ac-invoices { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 12px; }
.ac-invoice { border: 1.5px solid #e2eae7; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.ac-invoice:hover { box-shadow: 0 10px 24px rgba(19, 42, 36, 0.1); transform: translateY(-2px); }
.ac-invoice.is-overdue { border-color: #fecaca; background: #fffafa; }
.ac-invoice-top { display: flex; justify-content: space-between; align-items: center; }
.ac-number { font-size: 0.78rem; font-weight: 700; color: #64748b; letter-spacing: 0.5px; }
.ac-pill { padding: 3px 10px; border-radius: 20px; background: var(--b); color: var(--c); font-size: 0.72rem; font-weight: 700; }
.ac-invoice-title { font-weight: 600; color: #1f2a27; margin-top: 6px; }
.ac-invoice-amount { font-size: 1.5rem; font-weight: 700; color: #1a3c34; margin: 6px 0 2px; }
.ac-due { font-size: 0.84rem; color: #475569; }
.ac-invoice.is-overdue .ac-due { color: #b91c1c; font-weight: 600; }
.ac-due i { margin-right: 4px; }
.ac-invoice-actions { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
.ac-invoice-actions .qa-btn { flex: 1; margin: 0; padding: 11px 14px; }
.ac-ghost { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #e2eae7; color: #1a3c34; font-weight: 600; font-size: 0.88rem; text-decoration: none; background: #fff; }
.ac-ghost:hover { border-color: #1a3c34; }
.ac-ghost .fa-file-pdf { color: #c0392b; }

/* Services and projects */
.ac-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ac-service { display: flex; gap: 14px; padding: 14px; border-radius: 14px; background: #f6faf8; border: 1px solid #e6efeb; text-decoration: none; color: inherit; }
.ac-service.is-paused { opacity: 0.6; }
.ac-service-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; background: #1a3c34; color: #ffd700; display: flex; align-items: center; justify-content: center; }
.ac-service-body { min-width: 0; flex: 1; }
.ac-service-body strong { display: block; color: #1a3c34; }
.ac-service-body small { display: block; color: #64748b; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-service-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 0.8rem; color: #334155; }
.ac-project { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.ac-project:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(19, 42, 36, 0.1); }
.ac-project .ac-service-meta span:last-child { color: #2a5c50; font-weight: 600; }

/* Receipts */
.ac-receipts { display: flex; flex-direction: column; gap: 8px; }
.ac-receipt { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid #e6efeb; text-decoration: none; color: inherit; transition: background 0.2s ease; }
.ac-receipt:hover { background: #f6faf8; }
.ac-receipt > i { color: #c0392b; font-size: 1.3rem; }
.ac-receipt span { display: flex; flex-direction: column; min-width: 0; }
.ac-receipt span strong { color: #1a3c34; font-size: 0.92rem; }
.ac-receipt span small { color: #64748b; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-receipt-right { margin-left: auto; text-align: right; flex: none; }

/* Help */
.ac-helpbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 22px; border-radius: 18px; background: linear-gradient(135deg, #fff8d6, #fff); border: 1px solid #fde68a; }
.ac-helpbar > div { flex: 1; min-width: 200px; }
.ac-helpbar strong { display: block; color: #1a3c34; }
.ac-helpbar small { color: #64748b; }
.ac-wa { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: #25d366; color: #fff; font-weight: 700; text-decoration: none; }

@media (max-width: 860px) { .ac-cards { grid-template-columns: 1fr 1fr; } .ac-card-owing { grid-column: 1 / -1; } }
@media (max-width: 520px) {
    .ac-cards { grid-template-columns: 1fr; }
    .ac-section { padding: 18px 16px; }
    .ac-invoices, .ac-services { grid-template-columns: 1fr; }
    .ac-code { font-size: 1.5rem; letter-spacing: 0.4em; text-indent: 0.4em; }
}

/* The receipt / invoice page (account/invoice/<token>): details and downloads beside the preview */
.rc-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; align-items: start; }
.rc-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 10px; }
.rc-genuine { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: #dcfce7; color: #166534; }
.rc-genuine > i { font-size: 1.6rem; }
.rc-genuine strong { display: block; font-size: 1rem; }
.rc-genuine small { color: #166534; opacity: 0.85; }
.rc-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 6px 0; font-size: 0.9rem; }
.rc-facts dt { color: #64748b; }
.rc-facts dd { margin: 0; color: #1f2a27; text-align: right; }
.rc-btn { background: #fff; color: #1a3c34; border: 1.5px solid #dfe7e4; }
.rc-btn .fa-file-pdf { color: #c0392b; }
.rc-btn .fa-image { color: #2563eb; }
.rc-btn:disabled { opacity: 0.5; cursor: wait; }
.rc-account { color: #2a5c50; font-weight: 600; font-size: 0.86rem; text-decoration: none; text-align: center; margin-top: 4px; }
.rc-preview { position: relative; background: #fff; border-radius: 14px; box-shadow: 0 18px 48px rgba(19, 42, 36, 0.14); overflow: hidden; min-height: 300px; }
.rc-preview canvas { display: block; width: 100%; height: auto; }
.rc-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #2a5c50; }
@media (max-width: 860px) { .rc-layout { grid-template-columns: 1fr; } .rc-side { position: static; } }

/* Create an account (customer/register.php, /register) */
.rg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.rg-steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.rg-steps span { flex: 1; min-width: 90px; padding: 8px 10px; border-radius: 10px; background: #f1f5f4; color: #94a3b8; font-size: 0.78rem; font-weight: 700; text-align: center; }
.rg-steps span.on { background: #1a3c34; color: #ffd700; }
.rg-steps span.done { background: #dcfce7; color: #15803d; }
.rg-form label { display: block; }
.rg-form label:not(.qa-agree) > input, .rg-form label > select { display: block; width: 100%; margin-top: 6px; }
.rg-form label.qa-agree { display: flex; }
.rg-form input[type="password"] { padding: 12px 14px; border: 1.5px solid #dfe7e4; border-radius: 12px; font: inherit; background: #fff; }
.rg-form input[type="password"]:focus, .rg-form select:focus { outline: none; border-color: #ffd700; box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2); }
.rg-form em { color: #dc2626; font-style: normal; }
.rg-form select { padding: 12px 14px; border: 1.5px solid #dfe7e4; border-radius: 12px; font: inherit; background: #fff; }
.rg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rg-package { margin: -4px 0 4px; font-size: 0.86rem; color: #475569; }
.rg-package i { color: #b8960c; margin-right: 4px; }
.rg-login { text-align: center; margin: 16px 0 0; color: #64748b; font-size: 0.9rem; }
.rg-login a { color: #1a3c34; font-weight: 700; }
.rg-notice { padding: 10px 14px; border-radius: 10px; background: #dcfce7; color: #166534; margin-bottom: 14px; font-size: 0.9rem; }
.rg-code-head { text-align: center; margin-bottom: 14px; }
.rg-code-head h2 { margin: 12px 0 4px !important; }
.rg-code-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.rg-code-actions button { background: none; border: none; color: #2a5c50; font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.rg-side h2 { margin-top: 0 !important; }
.rg-next { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.rg-next li { display: flex; gap: 12px; align-items: flex-start; }
.rg-next li > i { width: 38px; height: 38px; flex: none; border-radius: 11px; background: #1a3c34; color: #ffd700; display: flex; align-items: center; justify-content: center; }
.rg-next strong { display: block; color: #1a3c34; font-size: 0.92rem; }
.rg-next small { color: #64748b; font-size: 0.82rem; }
@media (max-width: 900px) { .rg-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .rg-two { grid-template-columns: 1fr; } }
.rg-form label > .pt-pw { margin-top: 6px; }

/* "Continue with Google" (includes/google-auth.php) */
.pt-google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: 12px; border: 1.5px solid #dadce0; background: #fff; color: #1f1f1f; font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.pt-google-btn:hover { background: #f8faf9; border-color: #1a3c34; box-shadow: 0 4px 14px rgba(26, 60, 52, 0.12); color: #1f1f1f; }
.pt-google-btn svg { flex-shrink: 0; }
.pt-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #94a3b8; font-size: 0.8rem; }
.pt-or::before, .pt-or::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.rg-google-who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid #c8e6c9; background: #f1f8f2; border-radius: 12px; margin-bottom: 10px; }
.rg-google-g { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); flex-shrink: 0; }
.rg-google-who div { flex: 1; min-width: 0; line-height: 1.3; }
.rg-google-who small { display: block; color: #2e7d32; font-size: 0.75rem; font-weight: 600; }
.rg-google-who strong { color: #1e293b; font-size: 0.92rem; word-break: break-all; }
.rg-google-who > i { color: #2e7d32; font-size: 1.15rem; }
.rg-google-note { margin: 0 0 14px; color: #475569; font-size: 0.9rem; }
.rg-google-cancel { text-align: center; margin-top: 12px; }
.rg-google-cancel button { background: none; border: 0; color: #64748b; font: inherit; font-size: 0.85rem; cursor: pointer; text-decoration: underline; }
