/* Interfaz del producto. Se carga desde las vistas PHP y los paneles de herramientas. */
@font-face {
    font-family: "DM Sans";
    src: url("../fonts/dm-sans-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
}

.admin-theme {
    --pa-font: "DM Sans", system-ui, sans-serif;
    --pa-workspace-bg: #f5f7f8;
    --pa-text: #172f3b;
    --pa-muted: #586d76;
    --pa-border: #e0e7e9;
    --pa-sidebar: #132e3c;
    --pa-accent: #08765c;
    --pa-accent-hover: #055943;
    --pa-accent-soft: #edf7f2;
    --pa-card-radius: 18px;
    --pa-card-padding: clamp(1.1rem, 2vw, 1.6rem);
    --pa-card-shadow: 0 3px 16px rgba(23, 47, 59, .035);
    --pa-title-size: clamp(1.65rem, 1.2rem + 1.25vw, 2.35rem);
}

body:is(.admin-workspace, .product-auth, .product-public, .sf, .tool, .tool-landing) {
    font-family: "DM Sans", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.admin-workspace .admin-page-header,
.admin-workspace .admin-topbar {
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--pa-border);
}

.admin-workspace .main-content h1 {
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: -.045em;
}

.admin-workspace :is(.admin-lead, .admin-page-header p, .admin-topbar p) {
    line-height: 1.6;
}

.admin-workspace .admin-eyebrow {
    margin-bottom: .5rem;
    font-size: .72rem;
    letter-spacing: .1em;
}

.admin-workspace .card-header {
    padding-block: 1.1rem;
}

.admin-workspace .card-header :is(h2, h5) {
    font-size: 1.05rem;
    letter-spacing: -.015em;
}

.admin-workspace .btn,
.product-auth .btn,
.product-public .btn {
    min-height: 44px;
    padding: .65rem 1rem;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 650;
    letter-spacing: 0;
    box-shadow: none;
    transform: none;
}

.admin-workspace .btn-sm {
    min-height: 44px;
    padding: .4rem .75rem;
    font-size: .8rem;
}

.admin-workspace .btn:hover {
    transform: none;
}

.admin-workspace :is(.btn-primary, .btn-success) {
    box-shadow: 0 2px 3px rgba(5, 73, 54, .12);
}

.admin-workspace :is(.form-control, .form-select),
.product-auth :is(.form-control, .form-select),
.product-public :is(.form-control, .form-select) {
    min-height: 46px;
    padding-block: .65rem;
    border: 1px solid #c7d4d9;
    border-radius: 10px;
    background-color: #fff;
    font-size: .95rem;
}

.admin-workspace .form-label {
    font-size: .875rem;
    font-weight: 650;
}

.admin-workspace .form-text {
    color: var(--pa-muted);
    font-size: .8rem;
    line-height: 1.5;
}

.admin-workspace .table thead th,
.admin-workspace .customer-table thead th {
    padding-block: 1rem;
    background: #f7f9fa;
    font-size: .7rem;
    letter-spacing: .06em;
}

.admin-workspace .table tbody tr:hover,
.admin-workspace .customer-table tbody tr:hover {
    background: #f9fcfa;
}

.admin-workspace :is(.pa-tabs, .nav-tabs) {
    gap: .35rem;
    padding: .35rem;
    border: 1px solid var(--pa-border);
    border-radius: 12px;
    background: #eef2f3;
}

.admin-workspace :is(.pa-tabs, .nav-tabs) :is(a, .nav-link) {
    border-radius: 8px !important;
    font-size: .875rem;
}

.admin-workspace .stat-card {
    padding: 1.5rem;
    text-align: left;
}

.admin-workspace .stat-card::before {
    display: none;
}

.admin-workspace .stat-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 1.1rem;
    border-radius: 12px;
    background: var(--pa-accent-soft);
    font-size: 1.25rem !important;
}

.admin-workspace .stat-number {
    margin-bottom: .35rem;
    font-size: 2.1rem;
    font-weight: 750;
    letter-spacing: -.05em;
}

.admin-workspace .stat-label {
    font-size: .8rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.admin-workspace .quick-action {
    min-height: 80px;
    border-radius: 14px;
}

.admin-workspace .quick-action:hover {
    transform: none;
    box-shadow: var(--pa-card-shadow);
}

.admin-menu ~ .container-fluid #sidebar {
    padding: 1.1rem;
}

.admin-menu ~ .container-fluid #sidebar .admin-brand {
    gap: .7rem;
    padding: .2rem .35rem 1.2rem;
    border-color: rgba(255, 255, 255, .12);
}

.admin-menu ~ .container-fluid #sidebar .admin-brand strong {
    font-size: .92rem;
    letter-spacing: -.02em;
}

.admin-menu ~ .container-fluid #sidebar .nav-label {
    margin: 1.25rem .7rem .55rem;
    color: #a7bdc9 !important;
    font-size: .62rem;
    letter-spacing: .1em;
}

.admin-menu ~ .container-fluid #sidebar a {
    gap: .7rem;
    margin-bottom: 3px;
    padding: .65rem .75rem;
    border-radius: 9px;
    font-size: .86rem;
    color: #dce8ed;
}

.admin-menu ~ .container-fluid #sidebar a > i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

.admin-menu ~ .container-fluid #sidebar a.active {
    background: #d7f5e7;
    color: #103d31;
    box-shadow: none;
}

.admin-menu ~ .container-fluid #sidebar a.active:hover {
    background: #c3ebd8;
}

.admin-menu ~ .container-fluid #sidebar a.admin-sidebar-support {
    background: #d7f5e7;
    color: #103d31 !important;
}

.admin-workspace .admin-location {
    margin-block: .75rem 1rem;
    padding: .75rem;
    border-radius: 10px;
}

.admin-workspace .admin-location label {
    font-size: .63rem;
    letter-spacing: .04em;
}

.admin-workspace .admin-plan-badge {
    background: rgba(205, 244, 224, .12);
    color: #cff2df;
    border: 1px solid rgba(205, 244, 224, .18);
}

.admin-workspace .admin-sidebar-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #527080 transparent;
}

.admin-workspace .admin-sidebar-user {
    font-size: .75rem;
}

.admin-workspace .biz-act {
    min-height: 44px;
    padding: .55rem .8rem;
    border-radius: 10px;
}

.admin-workspace .customer-create {
    overflow: hidden;
}

.admin-workspace .customer-create summary {
    background: #fff;
}

.admin-workspace .customer-create[open] summary {
    background: var(--pa-accent-soft);
}

.admin-workspace .customer-filter[aria-current="page"] {
    color: #fff;
    background: var(--pa-accent);
}

.product-auth,
body.product-auth.auth-backdrop {
    color: #172f3b;
    background: radial-gradient(ellipse at 10% 10%, #e0f3e9, transparent 50%), #f3f6f7;
}

.product-auth .auth-center {
    padding: 5rem 1rem 3rem;
}

.product-auth :is(.auth-shell > .card, .login-card, .setup-card, .terms-dialog) {
    border: 1px solid #dbe5e6;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(23, 47, 59, .09);
    animation: none;
}

.product-auth .auth-shell {
    max-width: 500px;
}

.product-auth .login-card {
    max-width: 480px;
    padding: clamp(1.5rem, 5vw, 2.75rem);
}

.product-auth > main.container {
    max-width: 720px;
    margin: 6vh auto;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border: 1px solid #dbe5e6;
    border-radius: 22px;
    background: #fff;
}

.product-auth :is(h1, h2, h4) {
    color: #172f3b;
    font-weight: 750;
    letter-spacing: -.04em;
}

.product-auth :is(.auth-brand-mark, .platform-icon, .setup-icon) {
    color: #08765c !important;
    background: #edf7f2;
    border-radius: 16px;
    box-shadow: none;
}

.product-auth :is(.btn-primary, .btn-success, .btn-platform, .btn-setup, .btn-register),
.product-public .btn-gradient {
    border: 1px solid #08765c;
    background: #08765c;
    color: #fff;
    font-weight: 650;
    box-shadow: 0 2px 4px rgba(5, 73, 54, .12);
}

.product-auth :is(.btn-primary, .btn-success, .btn-platform, .btn-setup, .btn-register):hover,
.product-public .btn-gradient:hover {
    background: #055943;
    color: #fff;
    transform: none;
}

.product-auth .back-link {
    color: #305a53;
}

.product-auth .back-link:hover {
    color: #08765c;
}

.product-auth :is(a, button, input, select, textarea):focus-visible {
    outline: 2px solid #08765c;
    outline-offset: 3px;
}

.product-auth :is(.input-group-text, .form-control):focus-within {
    border-color: #08765c;
}

.product-public {
    background: #f5f7f8;
    color: #172f3b;
}

.product-public .topbar {
    padding-block: 1.25rem !important;
    border-bottom: 1px solid #e0e7e9;
    box-shadow: none;
}

.product-public :is(.panel, .legal-card) {
    border: 1px solid #e0e7e9;
    border-radius: 22px;
    box-shadow: 0 4px 24px rgba(23, 47, 59, .035);
}

.product-public h1 {
    font-size: clamp(1.7rem, 3.5vw, 2.7rem);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.045em;
}

.product-public .legal-card {
    padding: clamp(1.5rem, 5vw, 3.5rem);
}

.product-public .legal-card :is(p, li) {
    max-width: 76ch;
    line-height: 1.8;
}

.product-public .legal-card h2 {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid #edf0f2;
    font-size: 1.1rem;
}

.product-public .btn-wa {
    background: #08765c;
    color: #fff;
}

/* La marca del comercio sigue definiendo el color de la tienda. */
body.sf {
    --page: #f5f7f8;
}

.sf-storefront {
    --text: #182f38;
    --muted: #566d75;
    --border: #e0e7e9;
    --surface-shadow: 0 6px 28px rgba(23, 47, 59, .045);
    --radius: 20px;
}

.sf-storefront .sf-lookup,
.sf-storefront .sf-register {
    border-radius: 24px;
    box-shadow: 0 18px 56px rgba(23, 47, 59, .1);
}

.sf-storefront .sf-hello {
    flex-direction: column;
    gap: 1rem;
}

.sf-storefront .sf-card h2,
.sf-storefront .sf-card h1 {
    font-size: clamp(1.65rem, 4vw, 2rem);
    letter-spacing: -.05em;
}

.sf-storefront .sf-input {
    min-height: 54px;
    border-color: #b6c7cb;
    border-radius: 12px;
    background: #fff;
}

.sf-storefront .sf-btn {
    border-radius: 12px;
    border-color: transparent;
    font-weight: 700;
    letter-spacing: -.01em;
}

.sf-storefront .sf-btn.secondary {
    border-color: #c7d4d9;
    background: #fff;
}

.sf-storefront .sf-step {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: none;
}

.sf-storefront .sf-contact {
    border: 1px solid var(--border);
    background: #fff;
}

.sf-storefront .sf-account-nav {
    padding: .4rem;
    border-radius: 14px;
    background: #fff;
}

.sf-storefront .sf-account-nav a {
    border-radius: 9px;
    font-weight: 650;
}

.sf-storefront .sf-balance {
    padding: 2rem;
    border-radius: 22px;
    text-align: left;
}

.sf-storefront .sf-balance-num {
    margin-top: .5rem;
    font-size: clamp(3.2rem, 8vw, 4.7rem);
}

.sf-storefront .sf-balance .sf-progress {
    margin-left: 0;
    max-width: none;
}

.sf-storefront .sf-reward {
    padding: 1rem;
    border-radius: 18px;
    box-shadow: none;
}

.sf-storefront .sf-move {
    padding: 1.15rem;
}

.tool:not(.sf) .card {
    border-radius: 18px;
    box-shadow: 0 3px 18px rgba(23, 47, 59, .04);
}

.tool.tool-admin .topbar {
    padding-block: 1.1rem;
}

.tool.tool-admin .tool-tabs {
    border-radius: 12px;
    background: #edf1f2;
}

.tool.tool-admin .tool-tabs a {
    border-radius: 8px;
    font-weight: 650;
}

.tool.tool-admin .tool-tabs a[aria-current="page"] {
    color: #fff;
    background: var(--pa-accent);
}

.tool.sf .tool-section-intro,
.tool.sf .product,
.tool.sf .tool-store-contact {
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(23, 47, 59, .035);
}

.tool.sf {
    font-family: "DM Sans", system-ui, sans-serif;
}

.tool.sf :is(button, .button) {
    border-radius: 12px;
    min-height: 46px;
}

.tool-landing .tool-kicker {
    color: #08765c;
}

.tool-landing .hero {
    background: #f1f7f4;
}

.tool-landing .btn {
    border-radius: 12px;
}

@media screen and (min-width: 992px) {
    body.admin-workspace > .container-fluid > .row > #sidebar {
        width: auto;
        margin: 12px 0 12px 12px;
        top: 12px;
        height: calc(100dvh - 24px);
        border-radius: 20px;
    }

    .admin-menu ~ .container-fluid #sidebar:not(.admin-sidebar-shell) {
        overflow-y: auto;
    }

    body.admin-workspace > .container-fluid > .row > .main-content {
        padding: clamp(1.75rem, 3vw, 3.25rem) !important;
    }
}

@media screen and (max-width: 991.98px) {
    .admin-workspace .admin-menu {
        padding-block: .5rem;
        background: #fff;
    }

    .admin-workspace .admin-menu-support {
        background: #d7f5e7;
        color: #103d31 !important;
    }

    .admin-menu-ready .admin-menu ~ .container-fluid #sidebar.admin-sidebar-shell {
        overflow: hidden;
    }

    .admin-workspace .admin-page-header,
    .admin-workspace .admin-topbar {
        gap: 1rem;
        padding-bottom: 1.1rem;
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .sf-storefront .sf-balance {
        padding: 1.5rem;
    }

    .product-public .topbar .container {
        flex-wrap: wrap;
        gap: .75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(.admin-workspace, .product-auth, .product-public, .sf, .tool) *,
    :is(.admin-workspace, .product-auth, .product-public, .sf, .tool) *::before,
    :is(.admin-workspace, .product-auth, .product-public, .sf, .tool) *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
