:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --panel-soft: #f9fafb;
    --text: #17202a;
    --muted: #657487;
    --line: #dbe1e8;
    --primary: #1665d8;
    --primary-dark: #0f4fa9;
    --danger: #c2410c;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --radius: 8px;
}

/*
 * WHMCS2 Licencias
 * UI desarrollada por CodigoWeb.dev y HostingSupremo.com.
 */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

small {
    color: var(--muted);
    display: block;
    font-size: 12px;
}

code {
    background: #eef2f7;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #0f172a;
    display: inline-block;
    font-family: Consolas, monospace;
    font-size: 12px;
    padding: 3px 6px;
    word-break: break-all;
}

.shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #101827;
    color: #e7edf6;
    padding: 24px 18px;
}

.brand,
.auth-brand {
    align-items: center;
    display: flex;
    gap: 12px;
}

.brand {
    margin-bottom: 28px;
}

.brand-mark {
    align-items: center;
    background: var(--primary);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.brand strong,
.auth-brand h1 {
    display: block;
    font-size: 18px;
    margin: 0;
}

.brand small,
.auth-brand p {
    color: #93a4b8;
    margin: 0;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav a {
    border-radius: 6px;
    color: #bfccdc;
    padding: 10px 12px;
}

.nav a:hover,
.nav a.active {
    background: #1f2d42;
    color: #fff;
}

.nav-heading {
    color: #718096;
    font-size: 11px;
    font-weight: 800;
    margin: 12px 12px 2px;
    text-transform: uppercase;
}

.main {
    min-width: 0;
    padding: 26px;
}

.topbar {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.eyebrow {
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 4px;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin: 0;
}

h1 {
    font-size: 26px;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 17px;
}

.userbox,
.quick-actions,
.form-actions,
.table-actions,
.card-actions,
.ticket-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notice {
    border-radius: var(--radius);
    margin-bottom: 16px;
    padding: 12px 14px;
}

.notice-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.notice-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.panel,
.stat-card,
.product-card,
.auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.panel {
    padding: 20px;
    min-width: 0;
}

.panel + .panel {
    margin-top: 18px;
}

.panel-narrow {
    max-width: 920px;
}

.panel-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-header p {
    color: var(--muted);
    margin: 6px 0 0;
}

.stats-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 18px;
}

.stat-card {
    padding: 18px;
}

.stat-card span {
    color: var(--muted);
}

.stat-card strong {
    display: block;
    font-size: 30px;
    margin-top: 8px;
}

.button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #1f2937;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 600;
    min-height: 38px;
    justify-content: center;
    padding: 8px 12px;
}

.button:hover {
    border-color: #b7c2d0;
}

.button-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.button-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.button-muted {
    background: var(--panel-soft);
}

.button-danger {
    background: #fff7ed;
    border-color: #fed7aa;
    color: var(--danger);
}

.button-small {
    font-size: 13px;
    min-height: 32px;
    padding: 5px 9px;
}

.auth-page {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 18px;
}

.auth-card {
    max-width: 430px;
    padding: 28px;
    width: 100%;
}

.auth-card-wide {
    max-width: 860px;
}

.auth-brand {
    margin-bottom: 22px;
}

.auth-brand h1 {
    color: var(--text);
}

.form-stack,
.reply-form,
.close-form {
    display: grid;
    gap: 14px;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
    grid-column: span 2;
}

label {
    color: #334155;
    display: grid;
    font-weight: 700;
    gap: 6px;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: var(--text);
    font: inherit;
    min-height: 40px;
    padding: 9px 10px;
    width: 100%;
}

textarea {
    resize: vertical;
}

.rich-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rich-toolbar button {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    min-height: 30px;
    padding: 4px 8px;
}

.rich-toolbar button:hover {
    border-color: var(--primary);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(22, 101, 216, .16);
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.badge,
.status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
}

.badge {
    background: #eef2f7;
    color: #334155;
}

.status {
    background: #e7eef8;
    color: #1e3a5f;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-suspended,
.status-expired,
.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.toolbar-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.toolbar-wide select {
    max-width: 240px;
}

.toolbar-form input {
    max-width: 460px;
}

.product-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.product-card {
    display: grid;
    gap: 12px;
    grid-template-rows: auto 1fr auto;
    min-width: 0;
    overflow: hidden;
    padding: 14px;
}

.product-card img {
    aspect-ratio: 16 / 9;
    background: #eef2f7;
    border-radius: 6px;
    object-fit: cover;
    width: 100%;
}

.product-card p {
    color: var(--muted);
    margin: 8px 0;
    overflow-wrap: anywhere;
}

.card-title-row,
.price-row,
.ticket-heading {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.price-row {
    color: #334155;
    flex-wrap: wrap;
    font-weight: 700;
}

.message-list {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.message {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
}

.message-staff {
    border-left: 4px solid var(--primary);
}

.message header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.message time {
    color: var(--muted);
    font-size: 12px;
}

.message p {
    margin-bottom: 0;
    white-space: normal;
}

.attachment {
    background: #eef2f7;
    border-radius: 6px;
    display: inline-block;
    font-size: 13px;
    margin: 10px 6px 0 0;
    padding: 6px 8px;
}

.close-form {
    margin-top: 14px;
}

.status-ticket-open,
.status-ticket-customerreply {
    background: #dcfce7;
    color: #166534;
}

.status-ticket-answered {
    background: #dbeafe;
    color: #1e40af;
}

.status-ticket-closed {
    background: #e5e7eb;
    color: #374151;
}

.subpanel {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 14px;
    padding: 16px;
}

.subpanel p {
    color: var(--muted);
    margin: -6px 0 0;
}

.pricing-admin-grid {
    display: grid;
    gap: 12px;
}

.pricing-admin-row {
    align-items: end;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 12px;
    grid-template-columns: 150px minmax(120px, 180px) minmax(220px, 1fr);
    padding: 12px;
}

.check-row {
    align-items: center;
    display: flex;
    flex-direction: row;
    font-weight: 700;
    gap: 8px;
}

.check-row input {
    min-height: auto;
    width: auto;
}

.file-list,
.download-grid {
    display: grid;
    gap: 10px;
}

.file-row,
.download-card {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

.download-card h3,
.download-card p {
    margin: 0;
}

.download-card p {
    color: var(--muted);
}

.public-page {
    background: var(--store-bg, #f7f8fb);
}

.store-dark {
    --store-bg: #0f172a;
    --store-card: #111827;
    --store-title: #f8fafc;
    color: #e5e7eb;
}

.store-header {
    align-items: center;
    background: var(--store-card, #fff);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 16px clamp(18px, 5vw, 64px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.public-brand {
    margin: 0;
}

.public-brand small {
    color: var(--muted);
}

.store-logo {
    border-radius: 6px;
    height: 42px;
    object-fit: contain;
    width: auto;
}

.store-nav {
    align-items: center;
    display: flex;
    gap: 14px;
}

.store-main {
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px clamp(18px, 5vw, 64px) 56px;
}

.store-footer {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin: 0 auto;
    max-width: 1180px;
    padding: 24px clamp(18px, 5vw, 64px);
}

.store-hero {
    align-items: center;
    background: #0f172a;
    border-radius: var(--radius);
    color: #fff;
    display: flex;
    margin-top: 8px;
    min-height: clamp(220px, 34vw, 330px);
    overflow: hidden;
    padding: clamp(24px, 5vw, 44px);
}

.store-hero h1 {
    font-size: clamp(30px, 4vw, 48px);
    max-width: 820px;
    color: #fff;
}

.store-hero p:not(.eyebrow) {
    color: #cbd5e1;
    font-size: 18px;
    max-width: 680px;
}

.store-products {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    margin-top: 22px;
}

.store-product-card {
    background: var(--store-card, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 14px;
    grid-template-rows: auto 1fr auto;
    min-width: 0;
    overflow: hidden;
    padding: 16px;
}

.store-card-actions {
    align-items: stretch;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
}

.store-card-actions form {
    display: grid;
}

.store-product-card img,
.product-media img {
    aspect-ratio: 16 / 10;
    background: #eef2f7;
    border-radius: 6px;
    object-fit: cover;
    width: 100%;
}

.store-product-body h2,
.store-product-body p {
    margin: 0;
}

.store-product-body h2,
.product-purchase h1,
.public-content-page h1 {
    color: var(--store-title, var(--text));
}

.store-product-body p {
    color: var(--muted);
    margin-top: 8px;
}

.cycle-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.cycle-list span {
    background: #eef2f7;
    border-radius: 6px;
    color: #334155;
    font-size: 13px;
    padding: 7px 9px;
}

.cycle-list strong {
    margin-left: 4px;
}

.product-detail,
.checkout-grid {
    display: grid;
    gap: 26px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
}

.product-media,
.product-purchase,
.order-summary {
    background: var(--store-card, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.product-placeholder {
    align-items: center;
    aspect-ratio: 16 / 10;
    background: #e2e8f0;
    border-radius: 6px;
    color: #475569;
    display: flex;
    font-size: 42px;
    font-weight: 700;
    justify-content: center;
    text-transform: uppercase;
}

.product-purchase {
    display: grid;
    gap: 16px;
}

.product-purchase p {
    color: var(--muted);
    margin: 0;
}

.pricing-options {
    display: grid;
    gap: 10px;
}

.price-option {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 12px;
}

.gateway-options {
    display: grid;
    gap: 10px;
}

.price-option input {
    min-height: auto;
    width: auto;
}

.price-cta {
    display: none;
}

.price-cta.active {
    display: inline-flex;
}

.public-download-note {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.public-download-note h2 {
    font-size: 16px;
}

.public-download-note p {
    margin-top: 8px;
}

.order-summary {
    align-self: start;
    display: grid;
    gap: 8px;
}

.order-summary p {
    color: var(--muted);
    margin: 0;
}

.order-summary strong {
    font-size: 32px;
}

.module-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}

.module-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 14px;
    grid-template-rows: 1fr auto;
    min-width: 0;
    overflow: hidden;
    padding: 14px;
}

.module-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    margin-top: auto;
}

.module-actions form {
    display: inline-grid;
}

.translation-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
}

.translation-pane {
    display: none;
}

.translation-pane.active {
    display: grid;
}

.locale-tabs {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 8px;
}

.locale-tabs a,
.locale-tabs button {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    min-height: 34px;
    padding: 6px 12px;
}

.locale-tabs a.active,
.locale-tabs button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.app-dark .translation-box,
.store-dark .translation-box {
    background: #0f172a;
}

.floating-contacts {
    bottom: 24px;
    display: grid;
    gap: 10px;
    position: fixed;
    z-index: 50;
}

.floating-right {
    right: 18px;
}

.floating-left {
    left: 18px;
}

.floating-contacts a {
    align-items: center;
    background: var(--float-color, var(--primary));
    border-radius: 999px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .2);
    color: #fff;
    display: flex;
    gap: 8px;
    min-height: 46px;
    padding: 8px 14px 8px 8px;
}

.floating-contacts span {
    align-items: center;
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
    display: inline-flex;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.module-card p {
    color: var(--muted);
    margin: 6px 0;
    overflow-wrap: anywhere;
}

.invoice-summary {
    display: grid;
    gap: 8px;
    justify-content: end;
    margin-top: 18px;
}

.invoice-summary span {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
}

.public-content-page {
    background: var(--store-card, #fff);
}

.rich-content {
    color: var(--muted);
    margin-top: 14px;
}

.rich-content img {
    border-radius: 6px;
    height: auto;
    max-width: 100%;
}

.rich-content a {
    color: var(--primary);
    font-weight: 700;
}

.rich-content table {
    min-width: 0;
}

input[type="color"] {
    min-height: 44px;
    padding: 4px;
}

.app-dark {
    --bg: #0f172a;
    --panel: #111827;
    --panel-soft: #172033;
    --text: #e5edf7;
    --muted: #9fb0c5;
    --line: #2a3850;
}

.app-dark .sidebar {
    background: #080d16;
}

.app-dark input,
.app-dark select,
.app-dark textarea,
.app-dark .button,
.app-dark .rich-toolbar button,
.app-dark .pricing-admin-row,
.app-dark .file-row,
.app-dark .download-card,
.app-dark .locale-tabs a,
.app-dark .locale-tabs button {
    background: #0f172a;
    color: var(--text);
}

.app-dark code,
.app-dark .badge {
    background: #172033;
    color: #dbeafe;
}

.language-switcher {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: inline-flex;
    gap: 2px;
    padding: 2px;
}

.language-switcher a {
    border-radius: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 7px;
}

.language-switcher a.active {
    background: var(--primary);
    color: #fff;
}

.manager-tabs {
    align-items: center;
    border-bottom: 2px solid #55a630;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 16px;
}

.manager-tabs a {
    background: var(--panel);
    border: 1px solid var(--line);
    border-bottom: 0;
    color: var(--text);
    font-weight: 600;
    min-height: 42px;
    padding: 10px 16px;
}

.manager-tabs a.active {
    background: #2f80c7;
    border-color: #2f80c7;
    color: #fff;
}

.manager-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 320px;
}

.manager-stat-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.manager-stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    border-top: 3px solid #2f80c7;
    display: grid;
    gap: 18px;
    min-height: 132px;
    padding: 16px;
    text-align: center;
}

.manager-stat:nth-child(2) {
    border-top-color: #ef4444;
}

.manager-stat:nth-child(3) {
    border-top-color: #64748b;
}

.manager-stat:nth-child(4) {
    border-top-color: #f59e0b;
}

.manager-stat:nth-child(5) {
    border-top-color: #22c55e;
}

.manager-stat span {
    color: var(--text);
    font-size: 15px;
    text-align: left;
}

.manager-stat strong {
    font-size: 38px;
}

.manager-search,
.manager-filter-grid {
    align-self: start;
}

.manager-filter-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.manager-search-button {
    align-self: end;
}

.license-detail-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 260px minmax(0, 1fr);
}

.side-actions {
    display: grid;
    gap: 8px;
    margin: 12px 0 24px;
}

.side-actions a {
    color: var(--primary);
    font-weight: 700;
}

.license-download-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    color: #9a3412;
    margin-bottom: 18px;
    padding: 18px;
    text-align: center;
}

.license-data-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.license-metadata {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 20px 0;
}

.license-metadata span {
    display: grid;
    gap: 4px;
}

.inner-panel {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}

.product-gallery {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-gallery img:first-child {
    grid-column: span 2;
}

.client-dashboard {
    display: grid;
    gap: 26px;
    grid-template-columns: 280px minmax(0, 1fr);
}

.client-profile-card {
    background: #2fb365;
    border-radius: var(--radius);
    color: #fff;
    min-height: 340px;
    padding: 24px;
}

.client-profile-card h2,
.client-profile-card p {
    margin: 0 0 10px;
}

.client-profile-card small {
    color: rgba(255, 255, 255, .82);
    margin: 18px 0;
}

.client-avatar {
    align-items: center;
    background: #fff;
    border-radius: 999px;
    color: #166534;
    display: flex;
    font-size: 24px;
    font-weight: 800;
    height: 72px;
    justify-content: center;
    margin-bottom: 18px;
    width: 72px;
}

.client-main {
    min-width: 0;
}

.client-stats .stat-card {
    min-height: 150px;
    text-align: center;
}

.client-stats .stat-card strong {
    color: #20a35a;
    font-size: 48px;
    margin: 18px 0 4px;
}

.service-list {
    display: grid;
}

.service-row {
    align-items: center;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 16px 0;
}

.service-row:first-child {
    border-top: 0;
}

.account-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.account-mode-tabs label {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    padding: 10px 12px;
}

.account-mode-tabs input {
    min-height: auto;
    width: auto;
}

.account-login {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.integration-banner {
    align-items: center;
    background: linear-gradient(135deg, #eef6ff, #ffffff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 16px;
}

.integration-banner p {
    color: var(--muted);
    margin: 6px 0;
}

.app-dark .integration-banner {
    background: #172033;
}

.doc-block {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: auto;
    padding: 16px;
    white-space: pre-wrap;
}

/* Modernizacion UI 2026: claridad SaaS, acciones visibles y dark mode con capas. */
.main {
    background:
        radial-gradient(circle at 80% 0%, rgba(37, 99, 235, .08), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, .56), rgba(255, 255, 255, 0));
}

.sidebar {
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
    position: sticky;
    top: 0;
    height: 100vh;
}

.nav a {
    align-items: center;
    display: flex;
    gap: 10px;
    min-height: 42px;
}

.nav a i {
    color: #7dd3fc;
    font-size: 14px;
    text-align: center;
    width: 18px;
}

.panel,
.stat-card,
.product-card,
.auth-card,
.store-product-card,
.product-media,
.product-purchase,
.order-summary,
.module-card {
    box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
}

.panel {
    border-color: rgba(148, 163, 184, .42);
}

.button {
    gap: 8px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
    white-space: nowrap;
}

.button:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 22px rgba(37, 99, 235, .18);
}

.button-warning {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.product-card,
.store-product-card,
.module-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.product-card:hover,
.store-product-card:hover,
.module-card:hover {
    border-color: rgba(37, 99, 235, .32);
    box-shadow: 0 22px 48px rgba(15, 23, 42, .1);
    transform: translateY(-2px);
}

.product-card,
.store-product-card {
    min-height: 100%;
}

.store-header {
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .04);
}

.store-nav a {
    align-items: center;
    display: inline-flex;
    gap: 7px;
    font-weight: 700;
}

.store-hero {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 64, 175, .82)),
        linear-gradient(90deg, #0f172a, #1e40af);
    box-shadow: 0 26px 70px rgba(15, 23, 42, .18);
}

.store-card-actions .button,
.store-card-actions button {
    width: 100%;
}

.store-footer {
    align-items: start;
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) minmax(160px, .8fr) minmax(220px, 1fr);
    justify-content: stretch;
}

.footer-brand-block,
.footer-links,
.footer-contact {
    display: grid;
    gap: 8px;
}

.footer-brand-block strong,
.footer-links strong,
.footer-contact strong {
    color: var(--store-title, var(--text));
    font-size: 15px;
}

.footer-brand-block p,
.footer-contact span {
    margin: 0;
}

.footer-links a,
.footer-contact span {
    color: var(--muted);
    font-size: 14px;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    grid-column: 1 / -1;
    padding-top: 16px;
    text-align: center;
}

.app-dark {
    --bg: #0b1120;
    --panel: #111827;
    --panel-soft: #182235;
    --text: #e8eef8;
    --muted: #a6b3c7;
    --line: #2b3952;
}

.app-dark .main {
    background:
        radial-gradient(circle at 80% 0%, rgba(14, 165, 233, .09), transparent 28%),
        linear-gradient(180deg, rgba(17, 24, 39, .64), rgba(17, 24, 39, 0));
}

.app-dark .panel,
.app-dark .stat-card,
.app-dark .product-card,
.app-dark .auth-card,
.app-dark .module-card {
    box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}

.app-dark .button-muted,
.app-dark .button-danger,
.app-dark .button-warning {
    background: #182235;
}

.store-dark {
    --store-bg: #0b1120;
    --store-card: #111827;
    --store-title: #f8fafc;
    --line: #2b3952;
    --muted: #a6b3c7;
}

.store-dark .store-header,
.store-dark .store-footer,
.store-dark .store-product-card,
.store-dark .product-media,
.store-dark .product-purchase,
.store-dark .order-summary,
.store-dark .panel {
    box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}

.store-dark .cycle-list span,
.store-dark .price-option,
.store-dark .language-switcher {
    background: #182235;
    color: #dbeafe;
}

@media (max-width: 860px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        padding: 16px;
        position: static;
    }

    .nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main {
        padding: 18px;
    }

    .topbar,
    .panel-header,
    .ticket-heading {
        display: grid;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .toolbar-form {
        display: grid;
    }

    .pricing-admin-row,
    .product-detail,
    .checkout-grid,
    .manager-layout,
    .license-detail-grid,
    .client-dashboard {
        grid-template-columns: 1fr;
    }

    .manager-stat-grid,
    .manager-filter-grid,
    .license-data-grid,
    .license-metadata,
    .account-login,
    .product-gallery {
        grid-template-columns: 1fr;
    }

    .product-gallery img:first-child {
        grid-column: span 1;
    }

    .service-row {
        grid-template-columns: 1fr;
    }

    .store-header {
        align-items: flex-start;
        display: grid;
        gap: 12px;
    }

    .store-nav {
        flex-wrap: wrap;
    }

    .store-hero {
        min-height: 220px;
    }

    .store-card-actions {
        grid-template-columns: 1fr;
    }

    .store-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .main {
        padding: 14px;
    }

    .panel {
        padding: 14px;
    }

    .topbar,
    .userbox {
        align-items: flex-start;
        display: grid;
        width: 100%;
    }

    .store-main {
        padding: 18px 14px 42px;
    }

    .store-nav,
    .store-footer {
        align-items: stretch;
        display: grid;
        width: 100%;
    }

    .store-nav .button,
    .store-nav a,
    .store-card-actions .button {
        justify-content: center;
        width: 100%;
    }
}

/* Lagom-inspired polish by CodigoWeb.dev and HostingSupremo.com */
body {
    background: var(--app-bg, var(--store-bg, var(--bg)));
    color: var(--title, var(--text));
}

.shell {
    grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--sidebar-bg, #101827), var(--primary) 8%), var(--sidebar-bg, #101827));
    color: var(--sidebar-text, #dbe7f3);
    min-width: 0;
}

.brand {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.brand-mark {
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary), #000 18%));
    border-radius: 11px;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--primary), transparent 70%);
}

.brand small {
    color: color-mix(in srgb, var(--sidebar-text, #dbe7f3), transparent 28%);
}

.nav {
    gap: 7px;
}

.nav a {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: color-mix(in srgb, var(--sidebar-text, #dbe7f3), transparent 10%);
    display: flex;
    gap: 10px;
    min-height: 42px;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.nav a i {
    color: color-mix(in srgb, var(--primary), #ffffff 20%);
    width: 18px;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, .09);
    border-color: rgba(255, 255, 255, .08);
    color: #ffffff;
    transform: translateX(2px);
}

.nav a.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-heading {
    color: color-mix(in srgb, var(--sidebar-text, #dbe7f3), transparent 38%);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 18px 10px 4px;
    text-transform: uppercase;
}

.main {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, 0) 220px),
        var(--app-bg, #f5f7fb);
}

.topbar {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(219, 225, 232, .8);
    border-radius: 8px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .06);
    margin-bottom: 18px;
    padding: 16px 18px;
}

.topbar h1 {
    color: var(--title, #122033);
    font-size: clamp(22px, 2vw, 28px);
}

.eyebrow {
    color: color-mix(in srgb, var(--primary), #0f172a 35%);
    font-weight: 800;
}

.panel,
.stat-card,
.download-card,
.product-card,
.module-card,
.auth-card,
.store-product-card,
.product-purchase,
.order-summary {
    border: 1px solid rgba(203, 213, 225, .86);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .06);
}

.panel-header h2,
.download-card h3,
.product-card h3,
.module-card h3,
.store-product-card h2,
.store-product-card h3 {
    color: var(--title, #122033);
}

.button {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    min-height: 38px;
}

.button-primary {
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary), #fff 8%), var(--primary));
    border-color: var(--primary);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--primary), transparent 76%);
}

.button-primary:hover {
    background: color-mix(in srgb, var(--primary), #000 14%);
    border-color: color-mix(in srgb, var(--primary), #000 14%);
}

.status-active,
.status-paid,
.status-ticket-answered {
    background: color-mix(in srgb, var(--success, var(--primary)), #ffffff 84%);
    color: color-mix(in srgb, var(--success, var(--primary)), #000 36%);
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.stat-card {
    min-height: 112px;
    overflow: hidden;
    position: relative;
}

.stat-card::after {
    background: color-mix(in srgb, var(--primary), transparent 88%);
    border-radius: 999px;
    content: "";
    height: 66px;
    position: absolute;
    right: -18px;
    top: -18px;
    width: 66px;
}

.stat-card strong {
    color: var(--primary);
}

.client-dashboard {
    align-items: start;
}

.client-profile-card {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--primary), #ffffff 12%), color-mix(in srgb, var(--primary), #000 18%));
    border-radius: 8px;
    box-shadow: 0 18px 44px color-mix(in srgb, var(--primary), transparent 72%);
}

.service-row,
.activity-item,
.notification-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    min-width: 0;
}

.modules-grid,
.product-grid,
.store-products-grid,
.download-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.module-card,
.store-product-card {
    min-width: 0;
    overflow: hidden;
}

.module-card .action-row,
.module-card form,
.store-card-actions {
    flex-wrap: wrap;
}

.table-wrap {
    overflow-x: auto;
}

.store-header {
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(203, 213, 225, .78);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .05);
}

.store-main {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, 0) 260px),
        var(--store-bg, #f5f7fb);
}

.store-hero {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary), #0f172a 72%), color-mix(in srgb, var(--primary), #0f172a 48%));
    border-radius: 8px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .14);
    overflow: hidden;
    position: relative;
}

.store-hero::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .13));
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.store-product-card {
    background: var(--store-card, var(--panel));
}

.store-card-actions {
    margin-top: auto;
}

.store-footer {
    background: #ffffff;
    border-top: 1px solid rgba(203, 213, 225, .82);
    box-shadow: 0 -12px 36px rgba(15, 23, 42, .04);
}

.footer-bottom {
    color: var(--muted);
}

.color-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.color-grid input[type="color"] {
    min-height: 42px;
    padding: 4px;
}

.app-dark .main,
.app-dark .store-main {
    background:
        linear-gradient(180deg, rgba(17, 24, 39, .82), rgba(17, 24, 39, 0) 260px),
        #0b1120;
}

.app-dark .topbar,
.app-dark .store-header {
    background: rgba(17, 24, 39, .82);
    border-color: #26344d;
}

.app-dark .panel,
.app-dark .stat-card,
.app-dark .download-card,
.app-dark .module-card,
.app-dark .product-card,
.app-dark .auth-card,
.app-dark .store-product-card,
.app-dark .product-purchase,
.app-dark .order-summary {
    border-color: #26344d;
}

.store-dark .store-footer {
    background: #111827;
}

@media (max-width: 860px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .nav {
        grid-template-columns: 1fr;
    }

    .topbar {
        border-radius: 8px;
    }

    .store-header {
        padding-inline: 18px;
    }
}

/* Lagom-inspired UI by CodigoWeb.dev and HostingSupremo.com */
.lagom-public-shell {
    background: var(--store-bg, #f5f7fb);
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    min-height: 100vh;
}

.lagom-public-content {
    min-width: 0;
}

.lagom-rail {
    align-items: center;
    background: #ffffff;
    border-right: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 18px 0 44px rgba(15, 23, 42, .05);
    display: flex;
    flex-direction: column;
    gap: 36px;
    min-height: 100vh;
    padding: 28px 18px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.lagom-rail-logo {
    align-items: center;
    display: flex;
    height: 52px;
    justify-content: center;
    text-decoration: none;
    width: 52px;
}

.lagom-rail-logo span,
.lagom-rail-logo img {
    align-items: center;
    background: var(--store-primary, var(--primary));
    border-radius: 8px;
    color: #fff;
    display: flex;
    font-weight: 900;
    height: 46px;
    justify-content: center;
    object-fit: contain;
    width: 46px;
}

.lagom-rail nav {
    display: grid;
    gap: 26px;
    width: 100%;
}

.lagom-rail nav a {
    align-items: center;
    color: #17202a;
    display: grid;
    font-size: 16px;
    font-weight: 700;
    gap: 10px;
    justify-items: center;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
}

.lagom-rail nav i {
    align-items: center;
    background: color-mix(in srgb, var(--store-primary, var(--primary)), #ffffff 88%);
    border: 1px solid color-mix(in srgb, var(--store-primary, var(--primary)), #000 12%);
    border-radius: 8px;
    color: color-mix(in srgb, var(--store-primary, var(--primary)), #000 20%);
    display: flex;
    font-size: 22px;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.lagom-rail nav a:hover i {
    background: var(--store-primary, var(--primary));
    color: #fff;
}

.public-page .store-header {
    align-items: center;
    background: rgba(255, 255, 255, .88);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: 70px;
    padding: 14px 44px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.public-page .store-main {
    margin: 0 auto;
    max-width: 1280px;
    min-height: 64vh;
    padding: 0 44px 48px;
}

.store-hero {
    align-items: center;
    display: grid;
    gap: 36px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    margin: 0 auto 56px;
    min-height: 420px;
    padding: 76px 72px;
}

.store-hero h1 {
    color: #ffffff;
    font-size: clamp(34px, 4vw, 58px);
    font-weight: 900;
    line-height: 1.12;
    margin: 8px 0 20px;
    max-width: 740px;
}

.store-hero p {
    color: rgba(255, 255, 255, .88);
    font-size: 20px;
    line-height: 1.55;
    max-width: 650px;
}

.lagom-hero-art {
    aspect-ratio: 1.15;
    min-height: 300px;
    position: relative;
}

.lagom-hero-art::before {
    background: color-mix(in srgb, var(--primary), #ffffff 12%);
    clip-path: polygon(18% 0, 100% 20%, 86% 100%, 0 78%);
    content: "";
    inset: 0;
    position: absolute;
}

.art-screen,
.art-card,
.art-key {
    position: absolute;
}

.art-screen {
    align-items: center;
    background: #ffffff;
    border: 12px solid #334155;
    border-radius: 8px;
    box-shadow: 0 22px 42px rgba(15, 23, 42, .18);
    color: var(--primary);
    display: flex;
    font-size: 78px;
    height: 182px;
    justify-content: center;
    right: 38px;
    top: 70px;
    width: 226px;
}

.art-card {
    background: rgba(255, 255, 255, .82);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
    height: 74px;
    width: 118px;
}

.art-card-one {
    left: 46px;
    top: 54px;
}

.art-card-two {
    left: 116px;
    top: 172px;
}

.art-key {
    align-items: center;
    background: #fbbf24;
    border-radius: 8px;
    bottom: 54px;
    color: #111827;
    display: flex;
    font-size: 34px;
    height: 70px;
    justify-content: center;
    left: 96px;
    transform: rotate(-18deg);
    width: 94px;
}

.store-products {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin: 0 auto 56px;
}

.store-product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0;
    transition: transform .18s ease, box-shadow .18s ease;
}

.store-product-card:hover {
    box-shadow: 0 26px 62px rgba(15, 23, 42, .11);
    transform: translateY(-3px);
}

.store-product-card > img {
    aspect-ratio: 16 / 9;
    border-radius: 8px 8px 0 0;
    object-fit: cover;
    width: 100%;
}

.store-product-body {
    display: grid;
    gap: 14px;
    padding: 28px;
}

.store-product-body h2 {
    font-size: 22px;
    line-height: 1.25;
    margin: 0;
}

.cycle-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cycle-list span {
    background: color-mix(in srgb, var(--primary), #ffffff 90%);
    border-radius: 8px;
    color: #17202a;
    display: inline-flex;
    gap: 8px;
    padding: 8px 10px;
}

.store-card-actions {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding: 0 28px 28px;
}

.store-card-actions .button,
.store-card-actions form,
.store-card-actions button {
    width: 100%;
}

.store-footer {
    display: grid;
    gap: 34px;
    grid-template-columns: minmax(260px, 1.4fr) 1fr 1fr;
    padding: 56px 44px 24px;
}

.footer-brand-block,
.footer-links,
.footer-contact {
    display: grid;
    gap: 12px;
}

.footer-bottom {
    border-top: 1px solid rgba(203, 213, 225, .82);
    grid-column: 1 / -1;
    padding-top: 18px;
    text-align: center;
}

.shell {
    background: var(--app-bg, #f5f7fb);
}

.sidebar {
    box-shadow: 18px 0 44px rgba(15, 23, 42, .07);
}

.nav a {
    border-radius: 8px;
    min-height: 44px;
}

.nav a i,
.top-icon-link i {
    color: color-mix(in srgb, var(--primary), #ffffff 12%);
}

.topbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    position: sticky;
    top: 18px;
    z-index: 15;
}

.userbox {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.top-icon-link {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    position: relative;
    text-decoration: none;
    width: 42px;
}

.top-icon-link span {
    align-items: center;
    background: #ef4444;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    display: flex;
    font-size: 11px;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    min-width: 22px;
    padding: 0 5px;
    position: absolute;
    right: -8px;
    top: -8px;
}

.manager-tabs,
.locale-tabs {
    background: color-mix(in srgb, var(--primary), #ffffff 94%);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
}

.manager-tabs button,
.locale-tabs button {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #334155;
    cursor: pointer;
    font-weight: 800;
    min-height: 34px;
    padding: 8px 12px;
}

.manager-tabs button.active,
.locale-tabs button.active {
    background: var(--primary);
    color: #fff;
}

.translation-pane {
    display: none;
}

.translation-pane.active {
    display: block;
}

.template-studio {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

.template-preview,
.template-editor {
    min-width: 0;
}

.template-preview {
    position: sticky;
    top: 118px;
}

.studio-tabs {
    margin-bottom: 22px;
}

.mini-store-preview {
    background: var(--preview-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 74px 1fr;
    min-height: 560px;
    overflow: hidden;
}

.mini-rail {
    align-items: center;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 20px 10px;
}

.mini-rail span,
.mini-rail img {
    align-items: center;
    background: var(--preview-primary);
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    object-fit: contain;
    width: 42px;
}

.mini-rail i {
    align-items: center;
    background: color-mix(in srgb, var(--preview-primary), #ffffff 86%);
    border-radius: 8px;
    color: var(--preview-primary);
    display: flex;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.mini-content {
    display: grid;
    gap: 16px;
    grid-template-rows: auto auto 1fr auto;
    padding: 20px;
}

.mini-topbar,
.mini-footer,
.mini-products article {
    background: var(--preview-card);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.mini-topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 12px;
}

.mini-hero {
    background: var(--preview-primary);
    border-radius: 8px;
    color: #fff;
    min-height: 160px;
    padding: 24px;
}

.mini-hero h3 {
    color: #fff;
    font-size: 24px;
    margin: 0 0 10px;
}

.mini-products {
    display: grid;
    gap: 12px;
}

.mini-products article {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.mini-products i {
    color: var(--preview-primary);
    font-size: 24px;
}

.mini-footer {
    color: var(--muted);
    padding: 12px;
    text-align: center;
}

.upload-drop {
    align-items: center;
    border: 1px dashed color-mix(in srgb, var(--primary), #94a3b8 45%);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 24px;
    text-align: center;
}

.upload-drop i {
    color: var(--primary);
    font-size: 28px;
}

.color-studio-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.color-token {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 14px;
}

.color-token input[type="color"] {
    border: 0;
    height: 48px;
    padding: 0;
    width: 100%;
}

.cart-layout,
.client-detail-grid {
    align-items: start;
}

.lagom-page-head {
    margin: 38px auto 24px;
    max-width: 1180px;
}

.lagom-page-head h1 {
    color: var(--store-title, var(--title));
    font-size: clamp(30px, 4vw, 48px);
    margin: 8px 0 10px;
}

.cart-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr auto;
    padding: 18px;
}

.cart-line {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 16px;
    grid-template-columns: 52px minmax(0, 1fr) auto auto auto;
    padding: 18px;
}

.cart-items {
    display: grid;
    gap: 14px;
}

.cart-line-icon {
    align-items: center;
    background: color-mix(in srgb, var(--primary), #ffffff 88%);
    border-radius: 8px;
    color: var(--primary);
    display: flex;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.cart-line h2 {
    font-size: 18px;
    margin: 0 0 6px;
}

.cart-line p {
    margin: 0;
}

.cart-line-total {
    white-space: nowrap;
}

.cart-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.quantity-control {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.quantity-control button,
.quantity-control input {
    height: 36px;
    text-align: center;
    width: 42px;
}

.cart-checkout-form {
    display: grid;
    gap: 12px;
}

.account-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.summary-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
}

.ticket-admin-tools {
    background: color-mix(in srgb, var(--primary), #ffffff 95%);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 16px;
}

.rich-content {
    line-height: 1.65;
}

.rich-content pre,
.rich-content code {
    background: #0f172a;
    border-radius: 8px;
    color: #e2e8f0;
    display: block;
    overflow-x: auto;
    padding: 12px;
    white-space: pre-wrap;
}

.rich-toolbar {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
}

.rich-toolbar button {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
    font-weight: 800;
    min-height: 32px;
    padding: 6px 10px;
}

.rich-toolbar + textarea {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.app-dark .top-icon-link,
.app-dark .manager-tabs,
.app-dark .locale-tabs,
.app-dark .mini-rail,
.app-dark .color-token,
.app-dark .rich-toolbar,
.app-dark .mini-topbar,
.app-dark .mini-footer,
.app-dark .mini-products article {
    background: #111827;
    border-color: #26344d;
}

.app-dark .manager-tabs button,
.app-dark .locale-tabs button {
    color: #dbe7f3;
}

.store-dark .lagom-rail,
.store-dark .store-header,
.store-dark .store-footer {
    background: #111827;
}

.store-dark .lagom-rail nav a,
.store-dark .store-nav a,
.store-dark .public-brand {
    color: #e2e8f0;
}

@media (max-width: 1100px) {
    .template-studio {
        grid-template-columns: 1fr;
    }

    .template-preview {
        position: static;
    }
}

@media (max-width: 900px) {
    .lagom-public-shell {
        grid-template-columns: 1fr;
    }

    .lagom-rail {
        border-bottom: 1px solid rgba(226, 232, 240, .9);
        border-right: 0;
        flex-direction: row;
        gap: 14px;
        min-height: auto;
        overflow-x: auto;
        padding: 12px 16px;
    }

    .lagom-rail nav {
        display: flex;
        gap: 12px;
        width: auto;
    }

    .lagom-rail nav a {
        font-size: 13px;
        min-width: 78px;
    }

    .lagom-rail nav i {
        height: 42px;
        width: 42px;
    }

    .public-page .store-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 18px;
        position: static;
    }

    .store-nav {
        justify-content: flex-start;
        overflow-x: auto;
        width: 100%;
    }

    .public-page .store-main {
        padding: 0 18px 36px;
    }

    .store-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 42px 28px;
    }

    .lagom-hero-art {
        min-height: 240px;
    }

    .store-footer {
        grid-template-columns: 1fr;
        padding-inline: 22px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        position: static;
    }
}

@media (max-width: 640px) {
    .store-hero h1 {
        font-size: 34px;
    }

    .store-hero p {
        font-size: 16px;
    }

    .cart-item {
        grid-template-columns: 1fr;
    }

    .cart-line {
        grid-template-columns: 1fr;
    }

    .cart-actions {
        justify-content: flex-start;
    }

    .mini-store-preview {
        grid-template-columns: 1fr;
    }

    .mini-rail {
        flex-direction: row;
        justify-content: center;
    }
}

.auth-page {
    background: #ffffff;
    display: grid;
    grid-template-columns: minmax(360px, 45vw) minmax(0, 1fr);
    min-height: 100vh;
    overflow-x: hidden;
    padding: 0;
    position: relative;
}

.auth-page::before {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--primary, #138a48), #000 6%), color-mix(in srgb, var(--primary, #138a48), #000 24%));
    content: "";
    grid-column: 2;
    grid-row: 1;
    min-height: 100vh;
}

.auth-page::after {
    align-items: center;
    color: rgba(255, 255, 255, .9);
    content: "\f084";
    display: flex;
    font-family: "Font Awesome 6 Free";
    font-size: clamp(120px, 20vw, 260px);
    font-weight: 900;
    grid-column: 2;
    grid-row: 1;
    justify-content: center;
    opacity: .22;
    pointer-events: none;
}

.auth-page .auth-card {
    align-self: center;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 8px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .12);
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    margin: 48px;
    max-width: 440px;
    padding: 34px;
    width: min(440px, calc(100% - 48px));
    z-index: 1;
}

.auth-page .auth-card-wide {
    max-width: 760px;
    width: min(760px, calc(100% - 48px));
}

.auth-page .auth-brand {
    justify-content: center;
    text-align: center;
}

.auth-page .auth-brand .brand-mark {
    height: 54px;
    width: 54px;
}

.auth-page .form-actions {
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .auth-page {
        background: color-mix(in srgb, var(--primary, #138a48), #ffffff 92%);
        grid-template-columns: 1fr;
    }

    .auth-page::before,
    .auth-page::after {
        display: none;
    }

    .auth-page .auth-card,
    .auth-page .auth-card-wide {
        margin: 24px auto;
        width: min(720px, calc(100% - 28px));
    }
}

/* Final polish for Lagom-style dark mode and responsive commerce. */
.notice-warning {
    background: #fff7ed;
    color: #9a3412;
}

.hero-actions,
.section-heading-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.button-ghost {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .48);
    color: #fff;
}

.section-heading-row {
    justify-content: space-between;
    margin: 42px auto 22px;
    max-width: 1180px;
}

.section-heading-row h2 {
    color: var(--store-title, var(--title));
    font-size: 28px;
}

.product-category-chip {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    gap: 6px;
    margin: 0 0 10px;
}

.store-card-actions {
    grid-template-columns: 1fr 1fr;
}

.catalog-toolbar,
.kb-search {
    margin: 0 auto 18px;
    max-width: 1180px;
    padding: 18px;
}

.catalog-search {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 1fr) minmax(190px, 260px) auto auto;
}

.catalog-search label {
    display: grid;
    gap: 6px;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 26px;
    max-width: 1180px;
}

.category-pills a {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    font-weight: 800;
    padding: 8px 14px;
}

.category-pills a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.catalog-products {
    margin-top: 0;
}

.empty-state {
    margin: 0 auto;
    max-width: 760px;
    text-align: center;
}

.empty-state i {
    color: var(--primary);
    font-size: 34px;
    margin-bottom: 12px;
}

.kb-head,
.catalog-head {
    text-align: left;
}

.kb-search {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.kb-search i {
    color: var(--primary);
}

.kb-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    margin: 0 auto 50px;
    max-width: 1180px;
}

.kb-categories {
    display: grid;
    gap: 12px;
}

.kb-category-card {
    align-items: center;
    display: flex;
    gap: 14px;
    padding: 18px;
}

.kb-category-card i {
    align-items: center;
    background: color-mix(in srgb, var(--primary), #ffffff 86%);
    border-radius: 8px;
    color: var(--primary);
    display: flex;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.kb-articles {
    padding: 22px;
}

.kb-wide,
.kb-article {
    margin: 0 auto 50px;
    max-width: 920px;
}

.article-list {
    display: grid;
    gap: 10px;
}

.article-row {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) auto;
    padding: 16px;
}

.article-row p {
    color: var(--muted);
    margin: 0;
}

.breadcrumb {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.kb-article {
    padding: 34px;
}

.kb-article h1 {
    font-size: clamp(30px, 4vw, 48px);
    margin-bottom: 16px;
}

.article-summary {
    color: var(--muted);
    font-size: 18px;
    margin: 0 0 24px;
}

.admin-two-col {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
    margin-top: 18px;
}

.compact-form {
    align-items: end;
}

.invoice-edit {
    display: grid;
    gap: 18px;
}

.invoice-item-editor {
    display: grid;
    gap: 12px;
}

.invoice-item-row {
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) 88px 120px 120px 120px auto;
    padding: 14px;
}

.delete-check {
    align-items: center;
    display: flex;
    gap: 8px;
    min-height: 42px;
}

.store-main {
    background: var(--store-bg, #f5f7fb) !important;
}

.store-dark {
    --store-bg: #0b1120;
    --store-card: #111827;
    --store-title: #f8fafc;
    --text: #e5edf8;
    --muted: #b6c4d8;
    --line: #334155;
    color: #e5edf8;
}

.store-dark .lagom-public-shell,
.store-dark .lagom-public-content,
.store-dark .store-main {
    background: #0b1120 !important;
}

.store-dark .lagom-rail,
.store-dark .store-header,
.store-dark .store-footer,
.store-dark .lagom-card,
.store-dark .panel,
.store-dark .store-product-card,
.store-dark .product-media,
.store-dark .product-purchase,
.store-dark .order-summary,
.store-dark .cart-line,
.store-dark .kb-category-card,
.store-dark .kb-articles,
.store-dark .kb-article,
.store-dark .catalog-toolbar,
.store-dark .kb-search {
    background: #111827;
    border-color: #334155;
    color: #e5edf8;
}

.store-dark .store-product-card h2,
.store-dark .store-product-card h3,
.store-dark .store-product-body h2,
.store-dark .lagom-page-head h1,
.store-dark .section-heading-row h2,
.store-dark .order-summary h2,
.store-dark .cart-line h2,
.store-dark .kb-article h1,
.store-dark .kb-articles h2,
.store-dark .article-row strong,
.store-dark .kb-category-card strong {
    color: #f8fafc;
}

.store-dark .store-product-body p,
.store-dark .cart-line p,
.store-dark .order-summary p,
.store-dark .lagom-page-head p,
.store-dark .article-row p,
.store-dark .article-summary,
.store-dark small,
.store-dark .muted {
    color: #b6c4d8;
}

.store-dark .cycle-list span {
    background: #182235;
    border: 1px solid #3d4f6b;
    color: #dbeafe;
}

.store-dark .cycle-list strong {
    color: #ffffff;
}

.store-dark .button,
.store-dark .button-muted,
.store-dark .store-nav .button,
.store-dark .category-pills a,
.store-dark .article-row {
    background: #172033;
    border-color: #3d4f6b;
    color: #f8fafc;
}

.store-dark .button-primary,
.store-dark .category-pills a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.store-dark input,
.store-dark select,
.store-dark textarea {
    background: #0b1120;
    border-color: #3d4f6b;
    color: #f8fafc;
}

.store-dark input::placeholder,
.store-dark textarea::placeholder {
    color: #7f90aa;
}

.store-dark .notice-error {
    background: #3b1717;
    color: #fecaca;
}

.store-dark .notice-warning {
    background: #3a2412;
    color: #fed7aa;
}

.store-dark .notice-success {
    background: #10351f;
    color: #bbf7d0;
}

.quantity-control input {
    min-width: 64px;
    width: 64px;
}

.cart-line {
    min-width: 0;
}

.cart-line > div {
    min-width: 0;
}

.cart-line h2,
.cart-line p,
.cart-line small {
    overflow-wrap: anywhere;
}

.app-dark h1,
.app-dark h2,
.app-dark h3,
.app-dark .panel-header h2,
.app-dark .stat-card span,
.app-dark .service-row strong,
.app-dark .table-wrap th,
.app-dark .table-wrap td {
    color: #f8fafc;
}

.app-dark small,
.app-dark .panel-header p,
.app-dark .eyebrow,
.app-dark .muted {
    color: #b6c4d8;
}

.app-dark .panel,
.app-dark .stat-card,
.app-dark .product-card,
.app-dark .module-card,
.app-dark .download-card,
.app-dark .subpanel,
.app-dark .cart-line,
.app-dark .invoice-item-row {
    background: #111827;
    border-color: #334155;
    color: #e5edf8;
}

.app-dark .nav a {
    color: #dbe7f3;
    opacity: 1;
}

.app-dark .nav a.active {
    background: rgba(31, 181, 109, .16);
    border: 1px solid rgba(31, 181, 109, .5);
    color: #ffffff;
}

.nav a.active {
    border: 1px solid rgba(31, 181, 109, .42);
    box-shadow: inset 3px 0 0 var(--primary);
}

.client-profile-grid {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.client-profile-grid .client-profile-card {
    align-self: start;
    min-height: auto;
}

.client-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.client-profile-actions form {
    margin: 0;
}

.client-facts {
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr);
    margin: 18px 0 0;
}

.client-facts dt {
    font-weight: 800;
}

.client-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.client-records {
    display: grid;
    gap: 18px;
    min-width: 0;
}

@media (max-width: 1180px) {
    .catalog-search,
    .invoice-item-row {
        grid-template-columns: 1fr 1fr;
    }

    .admin-two-col,
    .kb-grid,
    .client-profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .catalog-search,
    .kb-search,
    .article-row,
    .cart-line {
        grid-template-columns: 1fr;
    }

    .store-card-actions {
        grid-template-columns: 1fr;
    }

    .invoice-item-row {
        grid-template-columns: 1fr;
    }

    .quantity-control {
        justify-content: flex-start;
    }
}

/* Responsive navigation, banners and mobile overflow fixes by CodigoWeb.dev and HostingSupremo.com */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.main,
.panel,
.subpanel,
.topbar,
.store-header,
.store-main,
.lagom-public-content,
.checkout-grid,
.manager-layout,
.template-editor {
    min-width: 0;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

input,
select,
textarea {
    width: 100%;
}

input[type="checkbox"],
input[type="radio"],
input[type="color"] {
    width: auto;
}

input[type="file"] {
    font-size: 13px;
    min-width: 0;
}

.sidebar-close,
.mobile-menu-close {
    align-items: center;
    background: color-mix(in srgb, var(--primary), #ffffff 88%);
    border: 1px solid color-mix(in srgb, var(--primary), #000 12%);
    border-radius: 10px;
    color: var(--primary);
    cursor: pointer;
    display: none;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.sidebar-overlay {
    background: rgba(15, 23, 42, .44);
    bottom: 0;
    display: none;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 70;
}

.hero-slider {
    margin: 0 auto 56px;
    position: relative;
}

.hero-slide {
    display: none;
    margin-bottom: 0;
}

.hero-slide.active {
    display: grid;
}

.hero-rich {
    color: #fff;
    max-width: 720px;
}

.hero-rich h1,
.hero-rich h2,
.hero-rich h3 {
    color: #fff;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1.12;
    margin: 8px 0 20px;
}

.hero-rich p {
    color: rgba(255, 255, 255, .9);
}

.lagom-hero-image {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 300px;
}

.lagom-hero-image img {
    border-radius: 12px;
    box-shadow: 0 28px 64px rgba(15, 23, 42, .22);
    max-height: 340px;
    max-width: 100%;
    object-fit: contain;
}

.hero-slider-controls {
    bottom: 18px;
    display: flex;
    gap: 8px;
    left: 72px;
    position: absolute;
    z-index: 2;
}

.hero-slider-controls button {
    background: rgba(255, 255, 255, .45);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    height: 9px;
    padding: 0;
    width: 28px;
}

.hero-slider-controls button.active {
    background: #fff;
}

.banner-builder-list {
    display: grid;
    gap: 16px;
}

.banner-builder-item {
    overflow: hidden;
}

.compact-check {
    margin: 0;
    min-width: 130px;
}

.cart-line form:last-child {
    justify-self: end;
    min-width: 44px;
}

.cart-line form:last-child .button-danger {
    align-items: center;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    min-width: 42px;
    padding: 0;
    width: 42px;
}

.manager-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

.manager-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.manager-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.manager-tabs {
    max-width: 100%;
}

@media (max-width: 1100px) {
    .cart-line {
        grid-template-columns: 48px minmax(0, 1fr) minmax(210px, auto);
    }

    .cart-line-total,
    .cart-line form:last-child {
        grid-column: 3;
    }

    .cart-line form:last-child {
        grid-row: 2;
    }

    .cart-line-total {
        grid-row: 1;
    }
}

@media (max-width: 900px) {
    body.panel-menu-open .sidebar-overlay {
        display: block;
    }

    .sidebar-close {
        display: inline-flex;
        position: absolute;
        right: 14px;
        top: 14px;
        z-index: 2;
    }

    .sidebar {
        padding-top: 58px;
    }

    .lagom-rail {
        display: none !important;
    }

    .public-page .store-header {
        position: sticky;
        top: 0;
        z-index: 80;
    }

    .store-nav {
        max-height: calc(100vh - 104px);
        overflow-y: auto;
        position: relative;
    }

    .mobile-menu-close {
        display: inline-flex;
        justify-self: end;
    }

    .store-nav-controls {
        align-items: stretch;
    }

    .hero-slider {
        margin-bottom: 34px;
    }

    .hero-slider-controls {
        bottom: 14px;
        left: 28px;
    }

    .manager-layout {
        grid-template-columns: 1fr;
    }

    .manager-search {
        order: -1;
    }

    .manager-tabs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        width: 100%;
    }

    .manager-tabs a,
    .manager-tabs button {
        justify-content: center;
        text-align: center;
        white-space: normal;
    }
}

@media (max-width: 760px) {
    .public-brand {
        max-width: min(100%, 260px);
    }

    .public-brand span {
        min-width: 0;
    }

    .public-brand strong,
    .public-brand small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .store-logo-rect,
    .footer-logo {
        max-width: 210px;
    }

    .store-hero {
        border-radius: 10px;
        gap: 22px;
        padding: 34px 22px 54px;
    }

    .lagom-hero-image {
        min-height: auto;
    }

    .lagom-hero-image img {
        max-height: 220px;
    }

    .cart-line {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .cart-line-total,
    .cart-line form:last-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .cart-line form:last-child {
        justify-self: stretch;
    }

    .cart-line form:last-child .button-danger {
        width: 100%;
    }

    .quantity-control {
        display: grid;
        grid-template-columns: 42px minmax(74px, 1fr) 42px 42px;
        width: 100%;
    }

    .quantity-control input[type="number"] {
        min-width: 0;
        width: 100%;
    }

    .panel-header,
    .action-row,
    .userbox {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        grid-template-columns: 1fr;
    }

    .mobile-panel-toggle {
        justify-self: start;
    }
}

/* Navigation and pagination fixes by CodigoWeb.dev and HostingSupremo.com */
.sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
    scrollbar-width: thin;
}

.sidebar .brand {
    flex: 0 0 auto;
}

.sidebar .nav {
    flex: 1 1 auto;
    min-height: 0;
    padding-bottom: 24px;
}

body:not(.app-dark) .nav a.active {
    background: color-mix(in srgb, var(--primary), #ffffff 88%);
    border-color: color-mix(in srgb, var(--primary), #ffffff 38%);
    box-shadow: inset 4px 0 0 var(--primary), 0 12px 28px rgba(15, 23, 42, .05);
    color: #122033 !important;
}

body:not(.app-dark) .nav a.active *,
body:not(.app-dark) .nav a.active i {
    color: var(--primary);
}

body:not(.app-dark) .nav a.active span,
body:not(.app-dark) .nav a.active strong {
    color: #122033 !important;
}

body:not(.app-dark) .nav a:hover {
    background: color-mix(in srgb, var(--primary), #ffffff 93%);
    color: #122033;
}

.panel-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.pager-wrap {
    display: flex;
    justify-content: center;
    margin-top: 22px;
    width: 100%;
}

.pager-wrap ul,
.pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pager-wrap a,
.pager-wrap span,
.pagination a,
.pagination span {
    align-items: center;
    background: var(--panel, #fff);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--title, #122033);
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 38px;
    min-width: 38px;
    padding: 8px 12px;
}

.pager-wrap .active a,
.pager-wrap .active span,
.pagination .active a,
.pagination .active span {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pager-wrap .disabled a,
.pager-wrap .disabled span,
.pagination .disabled a,
.pagination .disabled span {
    cursor: not-allowed;
    opacity: .5;
}

.toolbar-form input[type="search"] {
    min-width: min(100%, 280px);
}

.toolbar-wide {
    grid-template-columns: minmax(240px, 1fr) repeat(auto-fit, minmax(180px, auto));
}

.settings-check-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.settings-check-grid .check-row,
.subpanel .check-row {
    align-items: center;
    background: color-mix(in srgb, var(--panel, #fff), var(--primary) 3%);
    border: 1px solid var(--line);
    border-radius: 10px;
    min-height: 48px;
    padding: 12px 14px;
}

.app-dark .settings-check-grid .check-row,
.app-dark .subpanel .check-row {
    background: #101827;
    border-color: #334155;
    color: #e5edf8;
}

.app-dark .pager-wrap a,
.app-dark .pager-wrap span,
.app-dark .pagination a,
.app-dark .pagination span {
    background: #101827;
    border-color: #334155;
    color: #e5edf8;
}

.app-dark .pager-wrap .active a,
.app-dark .pager-wrap .active span,
.app-dark .pagination .active a,
.app-dark .pagination .active span {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

@media (max-width: 860px) {
    .sidebar {
        height: auto;
        max-height: none;
        position: static;
        overflow: visible;
    }

    .panel-actions {
        justify-content: stretch;
    }

    .panel-actions .button {
        justify-content: center;
        width: 100%;
    }
}

/* Final responsive/template pass by CodigoWeb.dev and HostingSupremo.com */
input,
select,
textarea {
    max-width: 100%;
}

select {
    min-width: 0;
}

.sidebar-logo,
.lagom-rail-logo img {
    border-radius: 10px;
    display: block;
    height: 44px;
    object-fit: contain;
    width: 44px;
}

.store-logo-rect,
.footer-logo {
    display: block;
    max-height: 54px;
    max-width: 260px;
    object-fit: contain;
}

.footer-logo {
    margin-bottom: 12px;
}

.store-main {
    background: var(--store-bg, #f5f7fb);
}

.store-dark .store-main {
    background: #0b1220;
}

.store-dark .store-card h2,
.store-dark .cart-line h2,
.store-dark .lagom-card h2,
.store-dark .order-summary h2 {
    color: #f8fafc;
}

.store-dark .store-card p,
.store-dark .cart-line p,
.store-dark .cart-line small,
.store-dark .order-summary p {
    color: #cbd5e1;
}

.store-dark .cart-line,
.store-dark .lagom-card,
.store-dark .order-summary {
    background: #111827;
    border-color: #334155;
    color: #f8fafc;
}

.store-nav {
    align-items: center;
    display: flex;
    gap: 16px;
}

.store-nav-links,
.mobile-menu-links,
.store-nav-controls {
    align-items: center;
    display: flex;
    gap: 14px;
}

.mobile-menu-links,
.mobile-menu-toggle,
.mobile-panel-toggle {
    display: none;
}

.cw-dropdown {
    position: relative;
}

.cw-dropdown-toggle,
.theme-switcher,
.language-switcher {
    align-items: center;
    background: var(--panel, #fff);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--title, #122033);
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
}

.store-dark .cw-dropdown-toggle,
.store-dark .theme-switcher,
.app-dark .cw-dropdown-toggle {
    background: #101827;
    border-color: #334155;
    color: #f8fafc;
}

.cw-dropdown-menu {
    background: var(--panel, #fff);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .14);
    display: none;
    min-width: 190px;
    padding: 8px;
    position: absolute;
    right: auto;
    top: calc(100% + 8px);
    z-index: 50;
}

.cw-dropdown-menu-right {
    right: 0;
}

.cw-dropdown.is-open .cw-dropdown-menu {
    display: grid;
    gap: 4px;
}

.cw-dropdown-menu a {
    align-items: center;
    border-radius: 8px;
    color: var(--title, #122033);
    display: flex;
    font-weight: 800;
    gap: 8px;
    padding: 9px 10px;
    text-decoration: none;
}

.cw-dropdown-menu a.active,
.cw-dropdown-menu a:hover {
    background: color-mix(in srgb, var(--primary), #ffffff 86%);
    color: #0b5f3a;
}

.store-dark .cw-dropdown-menu,
.app-dark .cw-dropdown-menu {
    background: #101827;
    border-color: #334155;
}

.store-dark .cw-dropdown-menu a,
.app-dark .cw-dropdown-menu a {
    color: #e5edf8;
}

.store-dark .cw-dropdown-menu a.active,
.store-dark .cw-dropdown-menu a:hover,
.app-dark .cw-dropdown-menu a.active,
.app-dark .cw-dropdown-menu a:hover {
    background: rgba(31, 181, 109, .15);
    color: #86efac;
}

.theme-switcher {
    padding: 3px;
}

.theme-switcher a {
    border-radius: 6px;
    color: inherit;
    padding: 6px 9px;
    text-decoration: none;
}

.theme-switcher a.active {
    background: var(--primary);
    color: #fff;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.footer-socials a {
    align-items: center;
    background: #eefcf4;
    border-radius: 9px;
    color: var(--primary);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.store-dark .footer-socials a {
    background: rgba(31, 181, 109, .14);
    color: #86efac;
}

.logo-admin-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.logo-admin-card,
.menu-builder-item {
    background: color-mix(in srgb, var(--panel, #fff), var(--primary) 2%);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 10px;
    padding: 14px;
}

.logo-admin-card img,
.empty-logo {
    align-items: center;
    background: #eefcf4;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    height: 72px;
    justify-content: center;
    max-width: 100%;
    object-fit: contain;
    padding: 8px;
}

.menu-builder-list {
    display: grid;
    gap: 14px;
}

.footer-social-row {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(120px, .8fr) minmax(170px, 1fr) minmax(220px, 1.4fr);
    margin-bottom: 10px;
}

.quantity-control {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.quantity-control input[type="number"] {
    min-width: 68px;
    text-align: center;
    width: 78px;
}

.cart-line {
    align-items: center;
    gap: 18px;
    grid-template-columns: 48px minmax(180px, 1fr) auto minmax(110px, auto) auto;
}

.cart-line-total {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .store-header {
        align-items: center;
        display: grid;
        gap: 12px;
        grid-template-columns: 1fr auto;
    }

    .mobile-menu-toggle,
    .mobile-panel-toggle {
        align-items: center;
        background: var(--primary);
        border: 0;
        border-radius: 10px;
        color: #fff;
        display: inline-flex;
        font-weight: 900;
        gap: 8px;
        justify-content: center;
        min-height: 42px;
        padding: 10px 14px;
    }

    .store-nav {
        background: var(--panel, #fff);
        border: 1px solid var(--line);
        border-radius: 14px;
        box-shadow: 0 18px 50px rgba(15, 23, 42, .12);
        display: none;
        grid-column: 1 / -1;
        padding: 14px;
    }

    .store-nav.is-open {
        display: grid;
        gap: 14px;
    }

    .store-nav-links {
        display: none;
    }

    .mobile-menu-links,
    .store-nav-controls {
        align-items: stretch;
        display: grid;
        gap: 8px;
    }

    .mobile-menu-links a,
    .store-nav-controls > a,
    .cw-dropdown-toggle,
    .theme-switcher {
        justify-content: center;
        width: 100%;
    }

    .cw-dropdown-menu {
        position: static;
        width: 100%;
    }

    .lagom-public-shell {
        display: block;
    }

    .lagom-rail {
        align-items: center;
        border-bottom: 1px solid var(--line);
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding: 10px 14px;
        position: sticky;
        top: 0;
        z-index: 60;
    }

    .lagom-rail nav {
        display: flex;
        gap: 10px;
        min-width: max-content;
    }

    .lagom-rail nav a {
        min-width: 88px;
    }

    .lagom-public-content {
        min-width: 0;
    }

    .store-logo-rect {
        max-width: 190px;
    }

    .shell {
        display: block;
    }

    .sidebar {
        background: var(--sidebar-bg);
        bottom: 0;
        box-shadow: 24px 0 70px rgba(15, 23, 42, .25);
        left: 0;
        max-width: 320px;
        overflow-y: auto;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform .22s ease;
        width: 82vw;
        z-index: 80;
    }

    body.panel-menu-open .sidebar {
        transform: translateX(0);
    }

    .main {
        min-width: 0;
        padding: 14px;
    }

    .topbar {
        align-items: flex-start;
        display: grid;
        gap: 12px;
        grid-template-columns: auto 1fr;
    }

    .topbar .userbox {
        grid-column: 1 / -1;
        justify-content: flex-start;
        overflow: visible;
    }

    .toolbar-form,
    .toolbar-wide,
    .form-grid,
    .footer-social-row {
        grid-template-columns: 1fr !important;
    }

    .span-2 {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .table-wrap {
        overflow: visible;
    }

    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap td {
        display: block;
        width: 100%;
    }

    .table-wrap thead {
        display: none;
    }

    .table-wrap tr {
        background: var(--panel, #fff);
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
        margin-bottom: 12px;
        padding: 10px;
    }

    .table-wrap td {
        align-items: flex-start;
        border: 0;
        display: grid;
        gap: 8px;
        grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
        padding: 8px 4px;
        text-align: left !important;
    }

    .table-wrap td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .app-dark .table-wrap tr {
        background: #101827;
        border-color: #334155;
    }

    .cart-line {
        align-items: stretch;
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .cart-line .quantity-control,
    .cart-line-total,
    .cart-line form:last-child {
        grid-column: 1 / -1;
    }

    .cart-line .quantity-control {
        justify-content: space-between;
    }

    .cart-line form:last-child .button {
        width: 100%;
    }

    .checkout-grid,
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

/* Final cascade guard for mobile Lagom fixes by CodigoWeb.dev and HostingSupremo.com */
@media (max-width: 900px) {
    .lagom-rail {
        display: none !important;
    }

    .lagom-public-shell {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    .store-nav.is-open {
        display: grid !important;
    }

    .sidebar-close {
        display: inline-flex !important;
    }

    body.panel-menu-open .sidebar-overlay {
        display: block !important;
    }
}

@media (max-width: 760px) {
    .cart-line form:last-child {
        justify-self: stretch !important;
    }

    .cart-line form:last-child .button,
    .cart-line form:last-child .button-danger {
        width: 100% !important;
    }

    .manager-layout,
    .checkout-grid,
    .cart-layout,
    .template-studio,
    .client-detail-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Checkout, responsive cards and email-ready UI polish by CodigoWeb.dev and HostingSupremo.com */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.sidebar {
    max-height: 100vh;
    overflow-y: auto;
}

body:not(.app-dark) .sidebar nav a.active,
body:not(.app-dark) .sidebar nav a[aria-current="page"] {
    color: var(--text) !important;
}

.app-dark .sidebar nav a.active,
.app-dark .sidebar nav a[aria-current="page"] {
    color: #fff !important;
}

.panel,
.lagom-card,
.subpanel,
.order-summary,
.table-wrap,
.toolbar-form,
.toolbar-wide,
.form-grid,
.checkout-grid,
.cart-layout {
    min-width: 0;
    max-width: 100%;
}

input,
select,
textarea {
    max-width: 100%;
    min-width: 0;
}

.account-panel {
    display: grid;
    gap: 10px;
}

.account-panel[hidden],
[data-account-panel][hidden] {
    display: none !important;
}

.tiny-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.cart-line {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    overflow: hidden;
    padding-right: 78px !important;
    position: relative;
}

.cart-line > * {
    min-width: 0;
}

.cart-line h2,
.cart-line p,
.cart-line small,
.cart-line strong {
    overflow-wrap: anywhere;
}

.cart-line .quantity-control {
    grid-column: 2;
    justify-content: flex-start;
    max-width: 100%;
}

.cart-line-total {
    grid-column: 2;
    justify-self: start;
}

.cart-line .cart-remove-form {
    display: flex;
    inset-inline-end: 16px;
    margin: 0;
    min-width: 0 !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.cart-line .cart-remove-form .button,
.cart-line .cart-remove-form .button-danger {
    min-width: 44px;
    width: 44px;
}

.table-wrap td,
.table-wrap td *,
.ticket-card,
.module-card,
.product-card,
.client-card,
.license-card {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.badge,
.status,
code {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
}

@media (max-width: 900px) {
    .toolbar-form,
    .toolbar-wide {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr !important;
        width: 100%;
    }

    .toolbar-form .button,
    .toolbar-wide .button {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .cart-line {
        padding-right: 16px !important;
    }

    .cart-line .quantity-control,
    .cart-line-total,
    .cart-line .cart-remove-form {
        grid-column: 1 / -1 !important;
    }

    .cart-line .quantity-control {
        display: grid;
        grid-template-columns: 44px minmax(72px, 1fr) 44px 44px;
        justify-content: stretch;
    }

    .cart-line .quantity-control input[type="number"] {
        width: 100%;
    }

    .cart-line .cart-remove-form {
        inset-inline-end: auto;
        justify-self: stretch !important;
        position: static;
        top: auto;
        transform: none;
        width: 100%;
    }

    .cart-line .cart-remove-form .button,
    .cart-line .cart-remove-form .button-danger {
        width: 100% !important;
    }

    .table-wrap tr {
        overflow: hidden;
    }

    .table-wrap td {
        grid-template-columns: 1fr !important;
        width: 100%;
    }

    .table-wrap td::before {
        display: block;
        margin-bottom: 2px;
    }
}

/* Mobile navigation and overflow hardening by CodigoWeb.dev and HostingSupremo.com */
.cart-line {
    align-items: center !important;
    display: grid !important;
    gap: 16px !important;
    grid-template-columns: 52px minmax(180px, 1fr) minmax(176px, auto) max-content 44px !important;
    overflow: visible !important;
    padding-right: 20px !important;
}

.cart-line .quantity-control,
.cart-line-total,
.cart-line .cart-remove-form {
    grid-column: auto !important;
}

.cart-line .cart-remove-form {
    inset-inline-end: auto !important;
    justify-self: end !important;
    position: static !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
}

.cart-line .cart-remove-form .button,
.cart-line .cart-remove-form .button-danger {
    align-items: center;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    min-width: 44px !important;
    width: 44px !important;
}

.cart-line .quantity-control {
    align-items: center;
    display: grid;
    grid-template-columns: 44px minmax(64px, 82px) 44px 44px;
}

.cart-line .quantity-control input[type="number"] {
    text-align: center;
    width: 100%;
}

@media (max-width: 1180px) {
    .cart-line {
        align-items: stretch !important;
        grid-template-columns: 52px minmax(0, 1fr) !important;
    }

    .cart-line .quantity-control,
    .cart-line-total,
    .cart-line .cart-remove-form {
        grid-column: 2 !important;
    }

    .cart-line .cart-remove-form {
        justify-self: start !important;
    }
}

@media (max-width: 900px) {
    .store-nav {
        background: rgba(15, 23, 42, .52);
        display: none;
        inset: 0;
        max-height: 100dvh;
        overflow-y: auto;
        padding: 18px;
        position: fixed;
        z-index: 120;
    }

    .store-nav.is-open {
        align-content: start;
        display: grid !important;
        gap: 14px;
    }

    .store-nav.is-open > .mobile-menu-close,
    .store-nav.is-open > .mobile-menu-links,
    .store-nav.is-open > .store-nav-controls {
        background: var(--panel, #fff);
        border: 1px solid var(--line);
        box-shadow: 0 24px 80px rgba(15, 23, 42, .20);
        margin-inline: auto;
        max-width: 390px;
        width: min(100%, 390px);
    }

    .store-nav.is-open > .mobile-menu-close {
        border-radius: 18px 18px 0 0;
        justify-self: center;
        margin-bottom: -14px;
        min-height: 54px;
    }

    .store-nav.is-open > .mobile-menu-links {
        border-radius: 0;
        display: grid;
        gap: 8px;
        padding: 18px;
    }

    .store-nav.is-open > .store-nav-controls {
        border-radius: 0 0 18px 18px;
        display: grid;
        gap: 10px;
        padding: 0 18px 18px;
    }

    .store-nav .mobile-menu-links a,
    .store-nav .cw-dropdown-toggle,
    .store-nav .theme-switcher {
        border-radius: 12px;
        min-height: 46px;
    }

    .store-nav .mobile-menu-links a {
        align-items: center;
        background: color-mix(in srgb, var(--primary), transparent 92%);
        border: 1px solid color-mix(in srgb, var(--primary), transparent 74%);
        color: var(--text);
        display: flex;
        font-weight: 900;
        gap: 10px;
        justify-content: flex-start;
        padding: 12px 14px;
    }

    .store-nav .mobile-menu-links a i {
        color: var(--primary);
        min-width: 18px;
        text-align: center;
    }

    .store-dark .store-nav.is-open > .mobile-menu-close,
    .store-dark .store-nav.is-open > .mobile-menu-links,
    .store-dark .store-nav.is-open > .store-nav-controls {
        background: #101827;
        border-color: #334155;
        color: #e5edf7;
    }

    .store-dark .store-nav .mobile-menu-links a {
        color: #f8fafc;
    }
}

@media (max-width: 760px) {
    .cart-line {
        grid-template-columns: 44px minmax(0, 1fr) !important;
        padding: 14px !important;
    }

    .cart-line .quantity-control,
    .cart-line-total,
    .cart-line .cart-remove-form {
        grid-column: 1 / -1 !important;
    }

    .cart-line .cart-remove-form .button,
    .cart-line .cart-remove-form .button-danger {
        width: 100% !important;
    }

    .table-wrap,
    .table-wrap table,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap td {
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .table-wrap tr {
        box-sizing: border-box;
        display: grid !important;
        gap: 6px;
        overflow: hidden !important;
    }

    .table-wrap td {
        box-sizing: border-box;
        display: grid !important;
        gap: 6px;
        grid-template-columns: 1fr !important;
        overflow: hidden !important;
    }

    .table-wrap td > *,
    .table-actions,
    .action-row,
    .quick-actions,
    .form-actions,
    .client-profile-actions,
    .locale-tabs {
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-wrap: anywhere !important;
        white-space: normal !important;
    }

    .table-actions,
    .action-row,
    .quick-actions,
    .form-actions,
    .client-profile-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100%;
    }

    .table-actions .button,
    .table-actions button,
    .table-actions form,
    .action-row .button,
    .quick-actions .button,
    .form-actions .button,
    .client-profile-actions .button,
    .client-profile-actions form {
        width: 100%;
    }

    .client-profile-grid,
    .client-dashboard,
    .dashboard-columns,
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

.email-template-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.email-template-card {
    display: grid;
    gap: 14px;
}

.compact-header {
    align-items: start;
    gap: 12px;
}

.badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-grid code {
    background: color-mix(in srgb, var(--primary), transparent 90%);
    border: 1px solid color-mix(in srgb, var(--primary), transparent 74%);
    border-radius: 10px;
    padding: 7px 9px;
}

.switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.switch-row label,
.checkbox-card {
    align-items: center;
    background: color-mix(in srgb, var(--primary), transparent 94%);
    border: 1px solid color-mix(in srgb, var(--primary), transparent 78%);
    border-radius: 12px;
    display: flex;
    gap: 8px;
    padding: 10px 12px;
}

@media (max-width: 560px) {
    .store-nav {
        padding: 12px;
    }

    .store-nav.is-open > .mobile-menu-close,
    .store-nav.is-open > .mobile-menu-links,
    .store-nav.is-open > .store-nav-controls {
        max-width: 100%;
    }

    .email-template-grid,
    .invoice-item-editor,
    .invoice-item-row {
        grid-template-columns: 1fr !important;
    }
}

/* WHMCS-style checkout and mobile menu correction by CodigoWeb.dev and HostingSupremo.com */
.checkout-steps {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-bottom: 16px;
    width: 100%;
}

.checkout-steps span {
    align-items: center;
    background: color-mix(in srgb, var(--panel, #fff), var(--primary) 3%);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    display: inline-flex;
    font-weight: 900;
    gap: 8px;
    justify-content: center;
    min-height: 46px;
    padding: 10px 12px;
    text-align: center;
}

.checkout-steps span.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 16px 32px rgba(22, 163, 74, .18);
}

.checkout-section-title {
    display: grid;
    gap: 3px;
    margin: 14px 0 10px;
}

.checkout-section-title strong {
    color: var(--title);
    font-size: 16px;
}

.checkout-section-title small {
    color: var(--muted);
}

.account-mode-tabs,
.account-switch {
    background: color-mix(in srgb, var(--panel, #fff), var(--primary) 2%);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
}

.account-mode-tabs label,
.account-switch label {
    align-items: center;
    border-radius: 11px;
    color: var(--title);
    cursor: pointer;
    display: inline-flex;
    font-weight: 900;
    gap: 8px;
    justify-content: center;
    min-height: 46px;
    padding: 9px 10px;
}

.account-mode-tabs label:has(input:checked),
.account-switch label:has(input:checked) {
    background: var(--primary);
    color: #fff;
}

.account-mode-tabs input,
.account-switch input {
    accent-color: var(--primary);
    width: auto;
}

.app-dark .checkout-steps span,
.store-dark .checkout-steps span,
.app-dark .account-mode-tabs,
.store-dark .account-mode-tabs,
.app-dark .account-switch,
.store-dark .account-switch {
    background: #101827;
    border-color: #334155;
}

.app-dark .checkout-section-title strong,
.store-dark .checkout-section-title strong,
.app-dark .account-mode-tabs label,
.store-dark .account-mode-tabs label,
.app-dark .account-switch label,
.store-dark .account-switch label {
    color: #e5edf8;
}

@media (max-width: 900px) {
    body.public-menu-open {
        overflow: hidden !important;
        touch-action: none;
    }

    .store-header {
        z-index: 900 !important;
    }

    .store-nav {
        align-content: start !important;
        background: rgba(15, 23, 42, .62) !important;
        display: none !important;
        inset: 0 !important;
        max-height: 100dvh !important;
        overflow-y: auto !important;
        padding: 20px 14px !important;
        position: fixed !important;
        z-index: 10000 !important;
    }

    .store-nav.is-open {
        display: grid !important;
        gap: 0 !important;
    }

    .store-nav.is-open > .mobile-menu-close,
    .store-nav.is-open > .mobile-menu-links,
    .store-nav.is-open > .store-nav-controls {
        background: var(--panel, #fff) !important;
        border-color: var(--line) !important;
        max-width: 390px !important;
        position: relative !important;
        width: min(100%, 390px) !important;
        z-index: 10001 !important;
    }

    .store-nav.is-open > .mobile-menu-close {
        border-bottom: 0 !important;
        border-radius: 18px 18px 0 0 !important;
        display: inline-flex !important;
        height: 56px !important;
        justify-self: center !important;
        margin: 0 auto !important;
        width: min(100%, 390px) !important;
    }

    .store-nav.is-open > .mobile-menu-links {
        border-bottom: 0 !important;
        border-radius: 0 !important;
        max-height: min(58dvh, 520px) !important;
        overflow-y: auto !important;
        padding: 18px !important;
    }

    .store-nav.is-open > .store-nav-controls {
        border-radius: 0 0 18px 18px !important;
        padding: 0 18px 18px !important;
    }

    .store-nav-links {
        display: none !important;
    }

    .store-main,
    .store-hero,
    .hero-slider {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 760px) {
    .checkout-steps {
        grid-template-columns: 1fr !important;
    }

    .cart-line {
        align-items: stretch !important;
        grid-template-columns: 46px minmax(0, 1fr) !important;
        overflow: hidden !important;
        padding: 16px !important;
    }

    .cart-line .quantity-control,
    .cart-line-total,
    .cart-line .cart-remove-form {
        grid-column: 1 / -1 !important;
        justify-self: stretch !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .cart-line .cart-remove-form .button,
    .cart-line .cart-remove-form .button-danger {
        display: inline-flex !important;
        justify-content: center !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .account-mode-tabs,
    .account-switch {
        grid-template-columns: 1fr !important;
    }

    .panel,
    .lagom-card,
    .subpanel,
    .ticket-card,
    .license-card,
    .product-card,
    .module-card,
    .client-card,
    .invoice-edit,
    .invoice-item-row {
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden;
    }
}
