/* AKBSTOCK Customer Portal - Components */
.akbstock-portal-brand { padding:4px 8px 26px; display:flex; flex-direction:column; gap:3px; }
.akbstock-portal-brand-name { font-size:24px; letter-spacing:.02em; font-weight:700; color:#7a8791; }
.akbstock-portal-brand-name span { color:var(--akb-blue-deep); }
.akbstock-portal-brand-subtitle { color:var(--akb-muted); font-size:10px; text-transform:uppercase; letter-spacing:.18em; }
.akbstock-portal-nav ul { list-style:none; padding:0; margin:0; display:grid; gap:6px; }
.akbstock-portal-nav-item a, .akbstock-portal-logout { display:block; padding:11px 13px; border-radius:11px; color:var(--akb-text); font-weight:600; }
.akbstock-portal-nav-item.is-active a { background:var(--akb-blue-soft); color:var(--akb-blue-deep); }
.akbstock-portal-nav-item a:hover, .akbstock-portal-logout:hover { background:#f4f7fa; }
.akbstock-portal-sidebar-footer { margin-top:auto; border-top:1px solid var(--akb-line); padding-top:16px; }
.akbstock-mobile-menu-toggle { display:none; border:1px solid var(--akb-line); background:#fff; border-radius:10px; padding:8px 10px; }
.akbstock-portal-notification-button { width:38px; height:38px; border:1px solid var(--akb-line); border-radius:50%; background:#fff; color:var(--akb-blue); opacity:.6; }
.akbstock-portal-user-chip { display:flex; align-items:center; gap:9px; font-weight:600; color:var(--akb-ink); }
.akbstock-portal-avatar { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; background:var(--akb-blue-soft); color:var(--akb-blue-deep); font-weight:700; }
.akbstock-section-kicker, .akbstock-panel-kicker { color:var(--akb-blue-deep); font-size:12px; text-transform:uppercase; letter-spacing:.12em; font-weight:700; }
.akbstock-summary-card, .akbstock-dashboard-panel, .akbstock-future-card { background:var(--akb-card); border:1px solid var(--akb-line); border-radius:var(--akb-radius); box-shadow:0 5px 18px rgba(35,65,92,.05); }
.akbstock-summary-card { padding:20px; min-height:145px; display:flex; flex-direction:column; }
.akbstock-summary-label { font-size:12px; color:var(--akb-muted); text-transform:uppercase; letter-spacing:.08em; font-weight:700; }
.akbstock-summary-value { font-size:22px; color:var(--akb-ink); margin-top:14px; }
.akbstock-summary-meta { margin-top:auto; color:var(--akb-muted); font-size:12px; }
.akbstock-dashboard-panel { padding:24px; }
.akbstock-panel-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; }
.akbstock-panel-heading h2 { margin:0; font-size:21px; }
.akbstock-panel-status { background:var(--akb-blue-soft); color:var(--akb-blue-deep); padding:5px 9px; border-radius:999px; font-size:11px; font-weight:700; }
.akbstock-usage-track { height:10px; border-radius:999px; background:#edf1f4; overflow:hidden; }
.akbstock-usage-fill { display:block; height:100%; background:var(--akb-blue-deep); border-radius:inherit; }
.akbstock-usage-labels { margin-top:10px; display:flex; justify-content:space-between; color:var(--akb-muted); font-size:12px; }
.akbstock-table-wrap { overflow:auto; }
.akbstock-table { width:100%; border-collapse:collapse; min-width:600px; }
.akbstock-table th, .akbstock-table td { padding:13px 12px; text-align:left; border-bottom:1px solid var(--akb-line); vertical-align:middle; }
.akbstock-table th { color:var(--akb-muted); font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.akbstock-status-pill { display:inline-flex; border-radius:999px; background:#edf8f4; color:var(--akb-success); padding:4px 9px; font-size:12px; font-weight:700; }
.akbstock-download-list { display:grid; gap:10px; }
.akbstock-download-row { display:grid; grid-template-columns:54px minmax(0,1fr) auto; gap:14px; align-items:center; border:1px solid var(--akb-line); border-radius:12px; padding:12px; }
.akbstock-download-thumb img { width:54px; height:54px; object-fit:cover; border-radius:9px; }
.akbstock-download-copy { display:flex; flex-direction:column; min-width:0; }
.akbstock-download-copy strong { color:var(--akb-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.akbstock-download-copy span, .akbstock-download-copy small { color:var(--akb-muted); }
.akbstock-button, .akbstock-native-integration .button, .akbstock-native-integration button { display:inline-flex!important; align-items:center; justify-content:center; gap:6px; border:0!important; border-radius:10px!important; background:var(--akb-blue-deep)!important; color:#fff!important; padding:10px 16px!important; font-weight:700!important; box-shadow:none!important; }
.akbstock-button--small { padding:8px 12px!important; font-size:12px; }
.akbstock-text-link { font-weight:700; }
.akbstock-portal-empty-state, .akbstock-placeholder-detail { padding:22px; background:#f8fbfd; border:1px dashed #cfdce7; border-radius:12px; }
.akbstock-portal-empty-state h3 { margin-bottom:6px; }
.akbstock-future-card { padding:18px; }
.akbstock-future-card h3 { margin:10px 0 6px; }
.akbstock-credit-placeholder-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:18px 0; }
.akbstock-credit-placeholder-grid > div { background:#f8fbfd; border:1px solid var(--akb-line); border-radius:12px; padding:16px; }
.akbstock-credit-placeholder-grid span { display:block; color:var(--akb-muted); font-size:12px; }
.akbstock-credit-placeholder-grid strong, .akbstock-large-placeholder { font-size:28px; color:var(--akb-ink); }
.akbstock-native-integration .woocommerce-MyAccount-content { width:100%; float:none; }
.akbstock-native-integration input.input-text, .akbstock-native-integration select { border:1px solid var(--akb-line)!important; border-radius:10px!important; padding:10px 12px!important; }
.akbstock-native-integration fieldset { border:1px solid var(--akb-line); border-radius:12px; padding:18px; }


/* V0.3.1 - real logo + customer avatar */
.akbstock-portal-brand-link { display:block; line-height:0; }
.akbstock-portal-brand-logo { display:block; width:178px; max-width:100%; height:auto; object-fit:contain; }
.akbstock-portal-user-area { position:relative; }
.akbstock-avatar-upload-form { margin:0; line-height:1; }
.akbstock-avatar-file-input { position:absolute!important; width:1px!important; height:1px!important; opacity:0!important; pointer-events:none!important; overflow:hidden!important; }
.akbstock-portal-avatar-button { appearance:none; border:0; padding:0; margin:0; background:transparent; border-radius:50%; cursor:pointer; display:block; }
.akbstock-portal-avatar-button:focus-visible { outline:3px solid rgba(53,120,183,.25); outline-offset:3px; }
.akbstock-portal-avatar-button.is-uploading { opacity:.55; cursor:wait; }
.akbstock-portal-avatar { overflow:hidden; }
.akbstock-portal-avatar-image { display:block; width:100%; height:100%; object-fit:cover; border-radius:50%; }
.akbstock-portal-avatar-fallback { display:grid; width:100%; height:100%; place-items:center; }
.akbstock-avatar-feedback { grid-column:1 / -1; margin:10px 0 0 auto; padding:8px 12px; border-radius:10px; font-size:12px; font-weight:700; }
.akbstock-avatar-feedback.is-success { background:#edf8f4; color:#2c9a72; }
.akbstock-avatar-feedback.is-error { background:#fff1f1; color:#b64747; }
.akbstock-profile-photo-note { display:flex; flex-direction:column; gap:4px; margin:-2px 0 20px; padding:14px 16px; background:#f8fbfd; border:1px solid var(--akb-line); border-radius:12px; }
.akbstock-profile-photo-note strong { color:var(--akb-ink); }
.akbstock-profile-photo-note span { color:var(--akb-muted); font-size:13px; }

/* V0.3.2 brand alignment */
.akbstock-portal-brand { align-items:center; text-align:center; }
.akbstock-portal-brand-link { width:100%; display:flex; justify-content:center; }
.akbstock-portal-brand-subtitle { width:100%; text-align:center; }


/* V0.3.5 Counting Engine bridge + free-download QA */
.akbstock-free-download-badge {
    display:inline-flex;
    align-items:center;
    align-self:flex-start;
    margin-top:5px;
    padding:3px 7px;
    border-radius:999px;
    background:#f1f7fa;
    border:1px solid var(--akb-line);
    color:var(--akb-blue-deep);
    font-size:10px;
    line-height:1;
    font-weight:800;
    letter-spacing:.08em;
}
.akbstock-credit-history { margin-top:22px; }
.akbstock-credit-history h3 { margin:0 0 12px; font-size:16px; }
.akbstock-credit-history-list { display:grid; gap:8px; }
.akbstock-credit-history-row {
    display:grid;
    grid-template-columns:minmax(150px,1fr) minmax(150px,1.5fr) 70px 150px;
    gap:10px;
    align-items:center;
    padding:10px 12px;
    border:1px solid var(--akb-line);
    border-radius:10px;
    background:#fbfcfd;
}
.akbstock-credit-history-row span,
.akbstock-credit-history-row small { color:var(--akb-muted); }


/* V0.3.6 — official Free Downloads WooCommerce Pro user-history bridge */
.akbstock-free-download-history-panel .akbstock-panel-heading {
    align-items:center;
}
.akbstock-free-download-intro {
    margin:0 0 18px;
    color:var(--akb-muted);
}
.akbstock-free-download-history-source {
    width:100%;
    overflow-x:auto;
}
.akbstock-free-download-history-source table {
    width:100%;
    max-width:100%;
}
.akbstock-free-download-unavailable {
    padding:18px;
    border:1px dashed var(--akb-line);
    border-radius:12px;
    background:#fbfcfd;
}
.akbstock-free-download-unavailable p {
    margin:6px 0 0;
    color:var(--akb-muted);
}


/* V0.3.8 — Free Downloads vendor-history rendering fix */
.akbstock-free-download-history-source .somdn-account-downloads-search-wrap{margin:0 0 1em}
.akbstock-free-download-history-source .somdn-account-downloads-search-form{display:flex;flex-wrap:wrap;gap:.5em;align-items:center}
.akbstock-free-download-history-source .somdn-account-downloads-search-input{min-width:200px}
.akbstock-free-download-history-source .somdn-account-downloads-search-results-info{margin:.5em 0}
.akbstock-free-download-history-source .somdn-account-downloads-clear-search{white-space:nowrap}

/* V0.3.9 — dashboard daily free-download credit widget */
.akbstock-free-credit-panel .akbstock-panel-heading {
    align-items:center;
}
.akbstock-free-credit-layout {
    display:grid;
    grid-template-columns:minmax(260px, 330px) minmax(0, 1fr);
    gap:24px;
    align-items:center;
}
.akbstock-free-credit-visual {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:16px;
    text-align:center;
}
.akbstock-free-credit-ring {
    --akb-free-progress:100%;
    width:184px;
    height:184px;
    border-radius:50%;
    position:relative;
    display:grid;
    place-items:center;
    background:conic-gradient(var(--akb-free-color, var(--akb-blue-deep)) 0 var(--akb-free-progress), #e8edf2 var(--akb-free-progress) 100%);
    box-shadow:inset 0 0 0 1px rgba(38,55,70,.04);
}
.akbstock-free-credit-ring::before {
    content:"";
    position:absolute;
    inset:16px;
    border-radius:50%;
    background:#fff;
    border:1px solid var(--akb-line);
    box-shadow:0 6px 20px rgba(35,65,92,.07);
}
.akbstock-free-credit-ring-inner {
    position:relative;
    z-index:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    line-height:1.1;
}
.akbstock-free-credit-ring-inner strong {
    font-size:42px;
    color:var(--akb-ink);
}
.akbstock-free-credit-ring-inner span {
    margin-top:4px;
    font-size:13px;
    font-weight:700;
    color:var(--akb-muted);
    text-transform:uppercase;
    letter-spacing:.12em;
}
.akbstock-free-credit-visual-copy h3 {
    margin:0 0 6px;
    font-size:24px;
}
.akbstock-free-credit-visual-copy p {
    margin:0;
    color:var(--akb-muted);
}
.akbstock-free-credit-meta-grid {
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}
.akbstock-free-credit-meta-card {
    display:flex;
    flex-direction:column;
    gap:8px;
    min-height:120px;
    padding:18px;
    border-radius:14px;
    background:#fbfcfd;
    border:1px solid var(--akb-line);
}
.akbstock-free-credit-meta-card span {
    font-size:12px;
    color:var(--akb-muted);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:700;
}
.akbstock-free-credit-meta-card strong {
    font-size:28px;
    color:var(--akb-ink);
}
.akbstock-free-credit-meta-card small {
    color:var(--akb-muted);
    font-size:12px;
    line-height:1.45;
}
.akbstock-free-credit-ring--used-0 { --akb-free-color:#327692; }
.akbstock-free-credit-ring--used-1 { --akb-free-color:#9dad3d; }
.akbstock-free-credit-ring--used-2 { --akb-free-color:#2c9a72; }
.akbstock-free-credit-ring--used-3 { --akb-free-color:#d6b11f; }
.akbstock-free-credit-ring--used-4 { --akb-free-color:#d86a4d; }
.akbstock-free-credit-ring--used-5 { --akb-free-color:#a7b1bb; }

/* V0.3.12 — compact professional dashboard */
.akbstock-dashboard-hero-row {
    display:grid;
    grid-template-columns:repeat(3,minmax(150px,1fr)) minmax(180px,1.08fr);
    gap:12px;
    align-items:stretch;
}
.akbstock-dashboard-mini-card,
.akbstock-dashboard-free-card {
    min-width:0;
    background:var(--akb-card);
    border:1px solid var(--akb-line);
    border-radius:14px;
    box-shadow:0 5px 18px rgba(35,65,92,.045);
}
.akbstock-dashboard-mini-card {
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:15px 16px;
    min-height:108px;
}
.akbstock-dashboard-mini-card span,
.akbstock-dashboard-free-copy > span {
    font-size:10px;
    line-height:1.25;
    color:var(--akb-muted);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:700;
}
.akbstock-dashboard-mini-card strong {
    margin-top:10px;
    font-size:18px;
    line-height:1.2;
    color:var(--akb-ink);
    overflow-wrap:anywhere;
}
.akbstock-dashboard-free-card {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:12px 14px;
    min-height:108px;
}
.akbstock-dashboard-free-copy {
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:4px;
}
.akbstock-dashboard-free-copy small {
    font-size:11px;
    color:var(--akb-text);
    font-weight:600;
}
.akbstock-dashboard-free-ring {
    --akb-free-progress:100%;
    width:76px;
    height:76px;
    flex:0 0 76px;
    border-radius:50%;
    position:relative;
    display:grid;
    place-items:center;
    background:conic-gradient(var(--akb-free-color,var(--akb-blue-deep)) 0 var(--akb-free-progress),#e8edf2 var(--akb-free-progress) 100%);
}
.akbstock-dashboard-free-ring::before {
    content:"";
    position:absolute;
    inset:8px;
    border-radius:50%;
    background:#fff;
    border:1px solid var(--akb-line);
}
.akbstock-dashboard-free-ring-inner {
    position:relative;
    z-index:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    line-height:1;
}
.akbstock-dashboard-free-ring-inner strong {
    font-size:24px;
    color:var(--akb-ink);
}
.akbstock-dashboard-free-ring-inner span {
    margin-top:4px;
    font-size:8px;
    color:var(--akb-muted);
    text-transform:uppercase;
    letter-spacing:.11em;
    font-weight:700;
}
.akbstock-dashboard-usage-strip {
    padding:2px 2px 4px;
}
.akbstock-dashboard-usage-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:6px;
}
.akbstock-dashboard-usage-head > span {
    font-size:11px;
    color:var(--akb-blue-deep);
    text-transform:uppercase;
    letter-spacing:.1em;
    font-weight:700;
}
.akbstock-dashboard-usage-head small {
    font-size:11px;
    color:var(--akb-muted);
}
.akbstock-dashboard-usage-track {
    height:5px;
    overflow:hidden;
    border-radius:999px;
    background:#e8edf2;
}
.akbstock-dashboard-usage-fill {
    display:block;
    height:100%;
    min-width:0;
    border-radius:inherit;
    background:var(--akb-blue-deep);
    transition:width .2s ease;
}


/* V0.3.15 — paid credit circle + topbar cleanup */
.akbstock-portal-notification-button { display:none!important; }
.akbstock-dashboard-paid-card {
    min-width:0;
    background:var(--akb-card);
    border:1px solid var(--akb-line);
    border-radius:14px;
    box-shadow:0 5px 18px rgba(35,65,92,.045);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:12px 14px;
    min-height:108px;
}
.akbstock-dashboard-paid-copy {
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:4px;
}
.akbstock-dashboard-paid-copy > span {
    font-size:10px;
    line-height:1.25;
    color:var(--akb-muted);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:700;
}
.akbstock-dashboard-paid-copy small {
    font-size:11px;
    color:var(--akb-text);
    font-weight:600;
}
.akbstock-dashboard-paid-ring {
    --akb-paid-progress:0%;
    width:76px;
    height:76px;
    flex:0 0 76px;
    border-radius:50%;
    position:relative;
    display:grid;
    place-items:center;
    background:conic-gradient(var(--akb-blue-deep) 0 var(--akb-paid-progress),#e8edf2 var(--akb-paid-progress) 100%);
}
.akbstock-dashboard-paid-ring.is-inactive {
    background:#e8edf2;
}
.akbstock-dashboard-paid-ring::before {
    content:"";
    position:absolute;
    inset:8px;
    border-radius:50%;
    background:#fff;
    border:1px solid var(--akb-line);
}
.akbstock-dashboard-paid-ring-inner {
    position:relative;
    z-index:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    line-height:1;
}
.akbstock-dashboard-paid-ring-inner strong {
    font-size:24px;
    color:var(--akb-ink);
}
.akbstock-dashboard-paid-ring-inner span {
    margin-top:4px;
    font-size:8px;
    color:var(--akb-muted);
    text-transform:uppercase;
    letter-spacing:.11em;
    font-weight:700;
}
