/* File: assets/css/style.css */
:root {
    --primary-color: #126c6a;
    --primary-strong: #0d4f4d;
    --accent-color: #b84a2f;
    --warning-color: #b7791f;
    --success-color: #2f7d4f;
    --danger-color: #b42318;
    --bg-color: #f4f6f3;
    --surface-color: #ffffff;
    --surface-muted: #edf1ef;
    --text-color: #1f2a28;
    --muted-color: #697773;
    --border-color: #dce4e1;
    --shadow: 0 10px 24px rgba(31, 42, 40, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    padding-bottom: 76px;
    letter-spacing: 0;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary-color); text-decoration: none; }
button, input, select, textarea { font: inherit; }
textarea { resize: vertical; }

header {
    background: var(--surface-color);
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
}

.header-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(18, 108, 106, 0.18);
}

.app-brand {
    display: block;
    font-size: 0.76rem;
    color: var(--muted-color);
    font-weight: 700;
    text-transform: uppercase;
}

header h1 {
    margin: 0.1rem 0 0;
    font-size: 1.35rem;
    line-height: 1.1;
}

.store-context {
    display: block;
    margin-top: 0.2rem;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
    word-break: break-word;
}

.store-context.muted {
    color: var(--muted-color);
}

main {
    width: min(1160px, 100%);
    margin: 0 auto;
    padding: 1rem;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background-color: rgba(255,255,255,0.96);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -10px 30px rgba(31, 42, 40, 0.08);
    height: 68px;
    z-index: 10;
    backdrop-filter: blur(14px);
}

.nav-item {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0.9rem 0.25rem;
    color: var(--muted-color);
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
}

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

.nav-badge {
    display: none;
    min-width: 18px;
    height: 18px;
    margin-left: 0.25rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--danger-color);
    color: #fff;
    font-size: 0.68rem;
    line-height: 18px;
    vertical-align: top;
}

.nav-badge.visible { display: inline-block; }

.admin-only { display: none !important; }
body.is-admin .admin-only { display: block !important; }
body.is-admin .bottom-nav .admin-only { display: block !important; }

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: center;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: var(--shadow);
}

.filter-container input,
.filter-container select,
.filter-container button,
.form-group input,
.form-group select,
.form-group textarea,
.admin-editor-grid input,
.admin-editor-grid select {
    width: 100%;
    padding: 0.72rem 0.82rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-color);
    outline: none;
}

.filter-container input:focus,
.filter-container select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.admin-editor-grid input:focus,
.admin-editor-grid select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(18,108,106,0.12);
}

.filter-container input[type="text"] { flex: 1 1 220px; }
.filter-container select { flex: 0 1 190px; }

.filter-container button,
.form-button,
.compact-button {
    border: 0;
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    border-radius: 8px;
}

.filter-container button,
.compact-button {
    min-height: 42px;
    padding: 0.65rem 0.9rem;
}

.form-button {
    width: 100%;
    padding: 0.82rem 1rem;
}

.form-button.compact-button {
    width: auto;
}

.form-button:hover,
.compact-button:hover,
.filter-container button:hover {
    background: var(--primary-strong);
}

.danger-button,
.danger-link {
    background: var(--danger-color) !important;
    color: #fff !important;
}

.danger-link {
    border: 0;
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    cursor: pointer;
}

.period-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.period-buttons button { background-color: var(--accent-color); }

.period-buttons button.active-period {
    background: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(18,108,106,0.18);
    outline: 2px solid rgba(18,108,106,0.36);
}

.active-filter-label {
    flex-basis: 100%;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: #eef7f4;
    color: var(--primary-strong);
    font-size: 0.88rem;
    font-weight: 800;
}

.order-status-widgets {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.order-status-widget {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.2rem 0.45rem;
    align-items: center;
    min-height: 72px;
    padding: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-color);
    box-shadow: var(--shadow);
    cursor: pointer;
    text-align: left;
}

.order-status-widget.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(18,108,106,0.12), var(--shadow);
}

.order-status-widget strong,
.order-status-widget small {
    grid-column: 2;
}

.order-status-widget strong {
    font-size: 1.1rem;
}

.order-status-widget small {
    color: var(--muted-color);
    font-weight: 700;
}

.order-widget-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.order-widget-label {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.announcement-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.9rem;
    border: 1px solid rgba(18,108,106,0.24);
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
    background: #f5fbf8;
    box-shadow: var(--shadow);
}

.push-optin-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.9rem;
    border: 1px solid rgba(0, 123, 255, 0.22);
    border-left: 5px solid #007bff;
    border-radius: 8px;
    background: #f3f8ff;
    box-shadow: var(--shadow);
}

.maintenance-alert-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.9rem;
    border: 1px solid rgba(199, 65, 43, 0.25);
    border-left: 5px solid var(--danger-color);
    border-radius: 8px;
    background: #fff5f4;
    box-shadow: var(--shadow);
}

.maintenance-alert-banner h2 {
    margin: 0.12rem 0 0.22rem;
    color: var(--text-color);
    font-size: 1rem;
}

.maintenance-alert-banner p {
    margin: 0;
    color: var(--muted-color);
    font-size: 0.88rem;
    line-height: 1.35;
}

.push-optin-banner h2 {
    margin: 0.12rem 0 0.22rem;
    color: var(--text-color);
    font-size: 1rem;
}

.push-optin-banner p {
    margin: 0;
    color: var(--muted-color);
    font-size: 0.88rem;
    line-height: 1.35;
}

.push-optin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.announcement-banner.priority-important {
    border-left-color: var(--accent-color);
    background: #fff7ed;
}

.announcement-banner.priority-maintenance {
    border-left-color: var(--danger-color);
    background: #fff5f4;
}

.announcement-banner-content {
    min-width: 0;
    cursor: pointer;
}

.announcement-banner h2 {
    margin: 0.12rem 0 0.22rem;
    color: var(--text-color);
    font-size: 1rem;
}

.announcement-banner p,
.announcement-admin-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.announcement-banner p {
    margin: 0;
    color: var(--muted-color);
    font-size: 0.88rem;
    line-height: 1.35;
}

.announcement-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.announcement-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.announcement-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 25, 24, 0.72);
}

.announcement-modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    max-height: min(86vh, 780px);
    overflow: auto;
    padding: 1rem;
    border-radius: 8px;
    background: var(--surface-color);
    box-shadow: var(--shadow);
}

.announcement-modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 900;
}

.announcement-modal-panel h2 {
    margin: 0 3rem 1rem 0;
}

.announcement-modal-list {
    display: grid;
    gap: 0.8rem;
}

.announcement-full {
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
}

.announcement-full.highlight {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(18,108,106,0.12);
}

.announcement-full-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted-color);
    font-size: 0.78rem;
}

.announcement-full h3 {
    margin: 0.35rem 0 0.5rem;
}

.announcement-full p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.5;
}

.announcement-admin-row {
    gap: 0.75rem;
}

.announcement-admin-excerpt {
    margin: 0.75rem 0;
    color: var(--muted-color);
    line-height: 1.4;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-field {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.date-field span {
    color: var(--muted-color);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}

.filter-container .date-field input[type="date"] {
    min-width: 0;
    color: var(--text-color);
    background-color: #fff;
    -webkit-text-fill-color: var(--text-color);
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.pagination-controls button {
    border: 0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: var(--surface-muted);
    color: var(--text-color);
    font-weight: 800;
}

.pagination-controls button:not(:disabled) {
    background: var(--primary-color);
    color: #fff;
}

.loading-message,
.empty-state {
    text-align: center;
    padding: 1.5rem;
    color: var(--muted-color);
}

.error-message {
    text-align: center;
    color: var(--danger-color);
    background: #fff4f2;
    padding: 1rem;
    border-radius: 8px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.detail-card,
.kpi-card,
.product-card,
.order-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.detail-card,
.kpi-card {
    padding: 1rem;
    margin-bottom: 1rem;
}

.detail-card h2 {
    margin: 0 0 0.9rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.12rem;
}

.kpi-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.kpi-card.success { border-color: rgba(47,125,79,0.3); }
.kpi-card.warning { border-color: rgba(183,121,31,0.3); }
.kpi-card.danger { border-color: rgba(180,35,24,0.3); }

.kpi-value {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--text-color);
}

.kpi-label {
    font-size: 0.82rem;
    color: var(--muted-color);
    font-weight: 700;
}

.product-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: stretch;
    padding: 0.65rem;
    overflow: hidden;
    margin-bottom: 0.85rem;
    border-left: 4px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.product-card:hover,
.order-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(31,42,40,0.1);
}

.product-card-link {
    display: block;
    color: inherit;
}

.product-card-link:hover .product-card {
    border-left-color: var(--primary-color);
}

.product-card-media {
    display: grid;
    place-items: center;
    width: 118px;
    min-height: 118px;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8faf9 0%, #edf3f1 100%);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.1rem 0.1rem 0.1rem 0;
    width: 100%;
    min-width: 0;
}

.product-info h4 {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info p {
    margin: 0.18rem 0;
    color: var(--muted-color);
    font-size: 0.88rem;
}

.product-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.55rem;
}

.product-id-chip,
.stock-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 900;
    white-space: nowrap;
}

.product-id-chip {
    background: var(--surface-muted);
    color: var(--muted-color);
}

.product-card-price {
    color: var(--primary-strong);
    font-size: 1.03rem;
    font-weight: 900;
}

.product-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: var(--muted-color);
    font-size: 0.78rem;
}

.product-card-meta > span:not(.stock-chip) {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    gap: 0.22rem;
    padding: 0.22rem 0.48rem;
    border-radius: 8px;
    background: #f4f7f6;
}

.product-card-meta strong {
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-chip.in-stock {
    background: #e4f5eb;
    color: var(--success-color);
}

.stock-chip.out-stock {
    background: #fff0ed;
    color: var(--danger-color);
}

.order-item {
    padding: 1rem;
    margin-bottom: 0.85rem;
    border-left: 5px solid var(--primary-color);
    cursor: pointer;
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.order-status {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
}

.order-details {
    margin-top: 0.35rem;
    line-height: 1.45;
}

.order-payment-line {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0.35rem 0 0.15rem;
    padding: 0.28rem 0.55rem;
    border-radius: 8px;
    background: #eef7f4;
    color: var(--primary-strong);
    font-size: 0.86rem;
    font-weight: 700;
}

.order-payment-line strong {
    color: var(--text-color);
}

.order-payment-line small {
    display: block;
    margin-top: 0.1rem;
    color: var(--muted-color);
    font-weight: 700;
}

.detail-grid,
.admin-editor-grid,
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-editor-grid.compact {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
}

.wide { grid-column: 1 / -1; }

.back-button {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.65rem 0.9rem;
    background: var(--surface-muted);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    border: 0;
    font-weight: 800;
}

.product-gallery {
    display: grid;
    gap: 0.75rem;
    width: min(100%, 860px);
    margin: 0 auto;
}

.main-image-container {
    position: relative;
    display: grid;
    place-items: center;
    height: clamp(340px, 52vh, 520px);
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8faf9;
    cursor: zoom-in;
}

.main-image-container img {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-empty {
    color: var(--muted-color);
    font-weight: 800;
}

.gallery-nav,
.gallery-open-button,
.gallery-lightbox-close,
.gallery-lightbox-nav {
    border: 0;
    cursor: pointer;
    font-weight: 900;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    width: 42px;
    height: 54px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-strong);
    font-size: 2rem;
    box-shadow: var(--shadow-soft);
}

.gallery-nav-prev { left: 0.5rem; border-radius: 8px; }
.gallery-nav-next { right: 0.5rem; border-radius: 8px; }

.gallery-open-button {
    position: absolute;
    right: 0.6rem;
    bottom: 0.6rem;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: rgba(18, 108, 106, 0.94);
    color: #fff;
    font-size: 0.78rem;
}

.gallery-counter {
    justify-self: center;
    color: var(--muted-color);
    font-size: 0.82rem;
    font-weight: 800;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, 58px);
    justify-content: center;
    gap: 0.5rem;
}

.thumbnail {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(18, 108, 106, 0.16);
}

.gallery-lightbox.hidden { display: none; }

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 25, 24, 0.82);
}

.gallery-lightbox-panel {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: min(100%, 980px);
    height: min(88vh, 760px);
}

.gallery-lightbox-panel img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.gallery-lightbox-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-color);
    font-size: 1.6rem;
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 64px;
    transform: translateY(-50%);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--primary-strong);
    font-size: 2.4rem;
}

.gallery-lightbox-prev { left: 0; }
.gallery-lightbox-next { right: 0; }

body.gallery-open {
    overflow: hidden;
}

.features-table,
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    background: #fff;
}

.features-table th,
.features-table td,
.admin-table th,
.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

.features-table th,
.admin-table th {
    color: var(--muted-color);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0 0.5rem;
    color: var(--muted-color);
    font-size: 0.9rem;
    font-weight: 700;
}

.presence-online {
    color: var(--success-color);
    font-weight: 800;
}

.presence-idle {
    color: var(--muted-color);
    font-weight: 800;
}

.admin-status-stack {
    display: inline-flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.monitor-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    color: #fff;
    background: var(--muted-color);
}

.monitor-online { background: var(--success-color); }
.monitor-slow { background: var(--accent-color); }
.monitor-offline,
.monitor-module_error,
.monitor-auth_error { background: var(--danger-color); }

.cron-guide h3 {
    margin-top: 1.4rem;
    margin-bottom: 0.45rem;
}

.cron-guide pre {
    overflow-x: auto;
    margin: 0.75rem 0;
    padding: 0.85rem;
    border-radius: 8px;
    background: #10201f;
    color: #effaf7;
    font-size: 0.84rem;
}

.cron-guide ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

body.maintenance-mode header,
body.maintenance-mode .bottom-nav {
    display: none;
}

body.maintenance-mode {
    background: linear-gradient(180deg, #eef7f4 0%, #ffffff 54%, #f5f8f7 100%);
}

.maintenance-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.4rem;
}

.maintenance-panel {
    width: min(540px, 100%);
    text-align: center;
    padding: 2rem 1.4rem;
    border: 1px solid rgba(18,108,106,0.18);
    border-radius: 8px;
    background: rgba(255,255,255,0.94);
    box-shadow: var(--shadow);
}

.maintenance-panel img {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(18,108,106,0.18);
}

.maintenance-panel h1 {
    margin: 1rem 0 0.6rem;
    color: var(--text-color);
    font-size: 1.65rem;
}

.maintenance-panel p {
    color: var(--muted-color);
    line-height: 1.55;
}

.maintenance-actions {
    display: grid;
    gap: 0.75rem;
    margin: 1.2rem 0;
}

.maintenance-author {
    margin-top: 1.4rem;
    font-size: 0.84rem;
    color: var(--muted-color);
}

.usage-error-cell {
    min-width: 220px;
    max-width: 360px;
    white-space: normal;
    color: var(--danger-color);
    font-size: 0.82rem;
    line-height: 1.35;
}

.features-table td:first-child { font-weight: 800; width: 40%; }

.product-previews {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--muted-color);
    width: 100%;
}

.product-preview-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.product-preview-info { display: flex; flex-direction: column; min-width: 0; }
.preview-name { font-weight: 800; color: var(--text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.preview-details { display: flex; gap: 0.75rem; color: var(--muted-color); margin-top: 0.25rem; }
.preview-loc { font-weight: 900; color: var(--primary-color); }

.auth-card {
    max-width: 460px;
    margin: 2rem auto;
}

.login-logo-container {
    text-align: center;
    margin-bottom: 1rem;
}

.login-logo-container img {
    width: 92px;
    height: 92px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.45rem; font-weight: 800; color: var(--text-color); }
.form-group-inline { display: flex; align-items: center; gap: 0.5rem; margin: 0.8rem 0; }
.form-link { text-align: center; margin-top: 1rem; font-size: 0.9rem; }

#stores-list ul { list-style: none; padding: 0; margin: 0; }
#stores-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.65rem;
}
#stores-list span { word-break: break-all; }
.delete-store-btn {
    background-color: var(--danger-color);
    color: #fff;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-weight: 800;
}

.menu-link {
    display: block;
    padding: 1rem;
    background-color: var(--surface-muted);
    margin-bottom: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 900;
    color: var(--text-color);
}

#logout-button { background-color: #fff1d8; color: #6f3d00; }

.push-card p {
    margin: 0 0 0.85rem;
}

.push-note {
    padding: 0.7rem 0.8rem;
    border-radius: 8px;
    background: #eef7f4;
    color: var(--primary-strong);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.4;
}

.muted-text {
    color: var(--muted-color);
    font-size: 0.9rem;
}

.push-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.push-actions .form-button {
    flex: 1 1 170px;
}

.secondary-button {
    background: var(--surface-muted) !important;
    color: var(--text-color) !important;
}

.contact-links a { display: inline-block; margin-top: 0.5rem; }
.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #1f8f4d;
    color: #fff !important;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
}
.whatsapp-button svg { width: 16px; height: 16px; fill: #fff; }

.support-card p {
    margin: 0 0 0.85rem;
}

.support-context {
    margin: 0 0 0.85rem;
    padding: 0.75rem 0.8rem;
    border-radius: 8px;
    background: #f5f8f7;
    color: var(--muted-color);
    font-size: 0.86rem;
    line-height: 1.4;
}

.support-whatsapp-button {
    justify-content: center;
    width: 100%;
}

.install-guide h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}
.install-guide ul { list-style: none; padding-left: 0; margin: 0; }
.install-guide li { padding: 0.5rem 0; }
.app-footer { text-align: center; margin-top: 2rem; padding: 1rem; font-size: 0.82rem; color: var(--muted-color); }
.app-footer p { margin: 0.25rem 0; }
.reset-button { background-color: var(--muted-color) !important; }
#copy-link-button.copied { background-color: var(--success-color); }

.admin-shell { display: flex; flex-direction: column; gap: 1rem; }
.admin-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow);
}
.admin-hero h2 { margin: 0.15rem 0 0; font-size: 1.35rem; }
.section-kicker { color: var(--primary-color); font-weight: 900; font-size: 0.78rem; text-transform: uppercase; }
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
}
.admin-tab {
    border: 0;
    background: transparent;
    color: var(--muted-color);
    font-weight: 900;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}
.admin-tab.active { background: var(--primary-color); color: #fff; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-list { display: flex; flex-direction: column; gap: 0.75rem; }
.admin-user-row {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.admin-shop-row.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(18,108,106,0.12);
}
.admin-user-main,
.admin-user-secondary,
.admin-actions,
.store-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.admin-user-secondary {
    justify-content: flex-start;
    flex-wrap: wrap;
    color: var(--muted-color);
    font-size: 0.84rem;
    margin-top: 0.45rem;
}
.admin-actions {
    justify-content: flex-start;
    margin-top: 0.75rem;
}
.admin-meta {
    display: block;
    color: var(--muted-color);
    font-size: 0.82rem;
    margin-top: 0.2rem;
}
.status-pill {
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 900;
    background: var(--surface-muted);
    color: var(--text-color);
}
.status-active { background: #e4f5eb; color: var(--success-color); }
.status-blocked { background: #fff0ed; color: var(--danger-color); }
.status-suspended { background: #fff5df; color: var(--warning-color); }
.admin-user-editor {
    margin-top: 1rem;
}
.admin-store-list {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}
.admin-store-list h3 { margin: 0 0 0.65rem; }
.store-chip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-muted);
    padding: 0.65rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.store-chip span {
    flex: 1 1 260px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.shop-check-result {
    margin: -0.2rem 0 0.75rem;
}

.shop-check-card {
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    background: #fff;
    padding: 0.75rem;
    box-shadow: var(--shadow);
}

.shop-check-head,
.shop-check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.shop-check-head {
    justify-content: space-between;
    margin-bottom: 0.55rem;
}

.shop-check-grid span {
    flex: 1 1 150px;
    color: var(--muted-color);
    font-size: 0.86rem;
}

.shop-check-grid strong {
    color: var(--text-color);
}

.shop-check-url,
.shop-check-message {
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
    font-size: 0.86rem;
}

.shop-check-url {
    color: var(--primary-strong);
    font-weight: 700;
}

.shop-check-message {
    color: var(--danger-color);
    font-weight: 800;
}

.shop-check-preview {
    max-height: 120px;
    overflow: auto;
    margin: 0.6rem 0 0;
    padding: 0.6rem;
    border-radius: 8px;
    background: #f6f8f7;
    white-space: pre-wrap;
}

.notification-toast {
    position: fixed;
    right: 1rem;
    bottom: 86px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    max-width: min(340px, calc(100vw - 2rem));
    padding: 0.9rem 1rem;
    background: var(--text-color);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(31,42,40,0.25);
    cursor: pointer;
}

.notification-toast span {
    color: rgba(255,255,255,0.78);
    font-size: 0.88rem;
}

@media (max-width: 820px) {
    main { padding: 0.85rem; }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid,
    .admin-editor-grid,
    .admin-form-grid,
    .admin-editor-grid.compact {
        grid-template-columns: 1fr;
    }
    .filter-container > input[type="text"],
    .filter-container > select,
    .filter-container button {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 130px;
    }
    .date-range { flex-basis: 100%; }
    .announcement-banner,
    .maintenance-alert-banner,
    .push-optin-banner {
        grid-template-columns: 1fr;
    }
    .order-status-widgets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .announcement-banner-actions,
    .push-optin-actions {
        justify-content: stretch;
    }
    .announcement-banner-actions button,
    .push-optin-actions button {
        flex: 1 1 120px;
    }
    .admin-hero,
    .admin-user-main {
        align-items: flex-start;
        flex-direction: column;
    }
    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .main-image-container {
        height: auto;
        min-height: 230px;
        aspect-ratio: 1 / 1;
    }
    .main-image-container img {
        width: 100%;
        height: 100%;
    }
    .gallery-lightbox {
        padding: 0.6rem;
    }
    .gallery-lightbox-panel {
        height: 84vh;
    }
    .gallery-lightbox-nav {
        width: 42px;
        height: 58px;
    }
}

@media (max-width: 420px) {
    body { padding-bottom: 72px; }
    .nav-item { font-size: 0.76rem; padding: 0.85rem 0.1rem; }
    header h1 { font-size: 1.1rem; }
    .header-logo { width: 38px; height: 38px; }
    .kpi-value { font-size: 1.2rem; }
    .product-card {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.55rem;
    }
    .product-card-media {
        width: 96px;
        min-height: 96px;
    }
    .product-info h4 { font-size: 0.92rem; }
    .product-card-meta {
        gap: 0.28rem;
        font-size: 0.74rem;
    }
    .thumbnails {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .gallery-nav {
        width: 36px;
        height: 48px;
        font-size: 1.7rem;
    }
}

/* Diggio Presta Mobile 32 · struttura comune al telefono e alla scrivania */
:root {
    --primary-color:#145c4c; --primary-strong:#103f36; --accent-color:#7c4826;
    --bg-color:#f5f6f1; --surface-muted:#eaf1ea; --text-color:#172c25; --muted-color:#52675e;
    --border-color:#d6dfd6; --shadow:none; --radius:14px;
}
body {font-family:Inter,"Segoe UI",sans-serif;font-size:16px;line-height:1.45;padding:0}
[hidden],body.is-admin .bottom-nav[hidden] {display:none!important}
:focus-visible {outline:3px solid #b35d1d!important;outline-offset:3px}
.skip-link {position:fixed;left:1rem;top:-8rem;z-index:90;background:#fff;padding:.7rem}
.skip-link:focus {top:0}
.app-header {background:#123b35;color:#fff;border:0}
.header-inner {max-width:1480px;padding:12px clamp(14px,3vw,42px);justify-content:space-between;gap:12px}
.identity {display:flex;align-items:center;gap:11px}
.identity strong,.identity span {display:block}
.identity strong {letter-spacing:.13em;font-size:.94rem}
.identity span {font-size:.84rem;color:#c7e0d4}
.header-logo {width:44px;height:44px;box-shadow:none;border-radius:10px}
.shop-context {display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;text-align:right}
.store-context,.store-context.muted {color:#dcf4e7;font-weight:550;margin:0;font-size:.87rem}
#leave-shop {background:#e5f4e8;color:#184d3d;border:0;border-radius:8px;padding:6px 12px;min-height:40px}
.workspace {display:grid;grid-template-columns:172px minmax(0,1fr);max-width:1480px;margin:auto;align-items:start}
main {max-width:1180px;width:100%;padding:clamp(18px,3vw,42px);min-width:0;margin:0 auto}
#page-title {font-size:clamp(1.7rem,3.8vw,2.65rem);letter-spacing:-.05em;line-height:1.1;margin:0 0 1.35rem}
.bottom-nav {position:sticky;top:69px;display:grid;gap:5px;align-content:start;justify-content:stretch;min-height:calc(100vh - 69px);background:#eef1e9;border:0;border-right:1px solid var(--border-color);box-shadow:none;padding:26px 10px}
.bottom-nav .nav-item,body.is-admin .bottom-nav .admin-only {position:relative;display:flex!important;align-items:center;justify-content:flex-start;gap:10px;text-align:left;flex:none;color:#40584b;background:transparent;border:0;border-radius:9px;padding:11px 12px;line-height:1.25;min-height:44px;font-size:.94rem}
body:not(.is-admin) .bottom-nav .admin-only {display:none!important}
.nav-item::before {content:"";width:20px;height:20px;background:currentColor;mask:var(--nav-icon) center/contain no-repeat;flex:none}
.bottom-nav .nav-item.active {color:#f6fff8;background:#195243}
.nav-badge {position:absolute;right:4px;top:0}
body.guest .app-header,body.guest #page-title,body.maintenance-mode .bottom-nav {display:none!important}
body.guest .workspace,body.maintenance-mode .workspace {display:block}
body.guest main {max-width:470px;padding:clamp(20px,7vh,84px) 16px}
.auth-card {width:100%;max-width:100%;margin:0;padding:clamp(24px,5vw,44px);border:1px solid var(--border-color);border-radius:20px;background:white;box-shadow:0 14px 42px #20352c12;border-top:5px solid var(--primary-strong)}
.auth-logo {width:64px;height:64px;border-radius:13px}
.auth-heading {margin:20px 0 24px}
.auth-heading h2 {margin:5px 0;font-size:1.8rem;letter-spacing:-.045em;border:0;padding:0}
.password-field {display:flex;align-items:stretch}
.password-field input {min-width:0;flex:1}
.password-field button {border:1px solid var(--border-color);border-radius:8px;background:var(--surface-muted);color:var(--primary-strong);padding:0 10px}
#login-error,.request-error {padding:12px;border-radius:10px;background:#fff1df;color:#603d18}
.request-error p {margin:0 0 8px}
.today-layout,.today-orders {display:grid;gap:16px}
.today-layout>div:empty {display:none}
.today-band {background:#123f36;color:#fff;padding:clamp(20px,4vw,36px);border-radius:18px}
#today-summary {display:grid;grid-template-columns:1.5fr 1fr;gap:20px}
#today-summary>div:nth-child(2) {border-left:1px solid #548276;padding-left:22px}
#today-summary span,#today-summary strong {display:block}
#today-summary span {color:#c6e4d3;font-size:.9rem}
#today-summary strong {font-variant-numeric:tabular-nums;font-weight:650;font-size:clamp(1.85rem,4vw,3rem);letter-spacing:-.06em}
.today-band>a {color:white;display:block;margin-top:16px;padding-top:12px;border-top:1px solid #548276;font-weight:600}
.section-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.section-heading h2 {margin:0;font-size:1.3rem;letter-spacing:-.03em}
.quick-queues,.admin-groups {display:flex;gap:8px;flex-wrap:wrap}
.quick-queues button,.admin-groups button,.admin-tabs button {background:white;color:var(--primary-strong);border:1px solid var(--border-color);border-radius:9px;font-weight:600;padding:8px 13px;min-height:44px}
.quick-queues button:first-child {background:#e1eee2;border-color:#bed6c1}
.order-line {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 14px;padding:14px 17px;border-bottom:1px solid var(--border-color);color:var(--text-color);background:white}
.order-line:first-child {border-radius:12px 12px 0 0}
.order-line:last-child {border-radius:0 0 12px 12px}
.order-line:hover {background:#edf4ed}
.order-line strong,.order-line small {display:block}
.order-line small,.order-items {color:var(--muted-color);font-size:.84rem}
.order-items {grid-column:1/-1}
.order-amount {text-align:right;font-variant-numeric:tabular-nums}
.state-label {display:inline-block;background:var(--surface-muted);font-size:.76rem;padding:2px 7px;border-radius:5px;color:#24533b}
.detail-card,.filter-container,.kpi-card,.product-card,.admin-user-row,.admin-hero {border-radius:var(--radius);box-shadow:none}
.detail-card,.filter-container {padding:clamp(14px,2.25vw,24px)}
.detail-card h2 {font-size:1.15rem;letter-spacing:-.025em}
.detail-card,.admin-panel {overflow-wrap:anywhere;min-width:0}
.product-grid {gap:12px}
.admin-hero {background:#153e35;color:white;border:0}
.admin-hero .section-kicker {color:#c5e1cd}
.admin-hero h2 {color:white}
.admin-hero button {background:#ecf6ec;color:#153e35}
.admin-navigation {margin:14px 0 20px}
.admin-groups button[aria-pressed=true] {background:var(--primary-strong);color:white}
.admin-tabs {margin:10px 0 0;display:flex;gap:6px;flex-wrap:wrap;background:transparent;border:0;padding:0}
.admin-tabs .admin-tab {flex:none;font-size:.88rem}
.admin-tabs .active {background:#dcebdd;color:var(--primary-strong);border-color:#94b79d}
.admin-kpis .kpi-value {font-size:clamp(1.35rem,3vw,2rem)}
.kpi-value {font-variant-numeric:tabular-nums}
.sales-series {display:grid;gap:8px;max-height:350px;overflow:auto}
.sales-series>div {display:grid;grid-template-columns:5ch minmax(40px,1fr) auto;align-items:center;gap:12px;font-variant-numeric:tabular-nums}
.sales-series meter {width:100%;height:18px;accent-color:var(--primary-color)}
.chart-wrapper {height:auto}
.form-button,.compact-button,.secondary-button,.admin-actions button,.menu-link,.back-button {min-height:44px}
.guest .form-button {width:100%}
.filter-container input,.filter-container select,.admin-form-grid input {min-width:0;max-width:100%}
.features-table {width:100%}
@media (max-width:760px) {
    body:not(.guest) {padding-bottom:calc(72px + env(safe-area-inset-bottom))}
    .workspace {display:block}
    .header-inner {padding:9px 14px}
    .shop-context {display:grid;gap:2px;max-width:58%}
    #leave-shop {font-size:.78rem;min-height:32px}
    main {padding:20px 12px}
    .bottom-nav {position:fixed;top:auto;bottom:0;left:0;right:0;z-index:20;display:flex;min-height:0;gap:2px;padding:5px 4px calc(5px + env(safe-area-inset-bottom));background:#fff;border:0;border-top:1px solid var(--border-color)}
    .bottom-nav .nav-item,body.is-admin .bottom-nav .admin-only {display:flex!important;flex:1 1 0;flex-direction:column;justify-content:center;gap:3px;padding:5px 1px;font-size:.75rem;min-width:0}
    .bottom-nav .nav-item.active {color:var(--primary-strong);background:#e1eee2}
    .filter-container {gap:8px}
    .filter-container input[type=text],.filter-container select {flex:1 1 135px}
    .admin-groups {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
    .admin-groups button {font-size:.85rem;padding:8px 4px}
    .admin-table {display:block;overflow-x:auto}
    .admin-actions,.admin-user-main {flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

.nav-item[data-page="dashboard"] {--nav-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203h7v7H3z%20M14%203h7v7h-7z%20M3%2014h7v7H3z%20M14%2014h7v7h-7z%22%2F%3E%3C%2Fsvg%3E")}

.nav-item[data-page="orders"] {--nav-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%203h12v18l-3-2-3%202-3-2-3%202z%20M9%208h6%20M9%2012h6%22%2F%3E%3C%2Fsvg%3E")}

.nav-item[data-page="products"] {--nav-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207l9-5%209%205v10l-9%205-9-5z%20M3%207l9%205%209-5%20M12%2012v10%22%2F%3E%3C%2Fsvg%3E")}

.nav-item[data-page="menu"] {--nav-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2010l2-6h14l2%206%20M4%2010v10h16V10%20M3%2010c1%203%204%203%206%200%202%203%204%203%206%200%202%203%204%203%206%200%20M9%2020v-6h6v6%22%2F%3E%3C%2Fsvg%3E")}

.nav-item[data-page="admin"] {--nav-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%202l8%203v6c0%205-3%208-8%2011-5-3-8-6-8-11V5z%20M8%2012l3%203%205-7%22%2F%3E%3C%2Fsvg%3E")}

.identity {flex:none}
.identity span {white-space:nowrap}
.shop-context {min-width:0}
.store-context {overflow-wrap:anywhere}
.admin-toolbar {margin-bottom:12px}
.admin-toolbar h2 {font-size:1.15rem}
.admin-navigation {scroll-margin-top:95px}
.admin-kpis {gap:8px;margin-bottom:12px}
.admin-metric {position:relative;display:grid;align-content:space-between;gap:12px;padding:14px 16px;text-align:left;background:white;color:var(--text-color);border:1px solid var(--border-color);border-radius:12px;min-width:0}
.admin-metric:first-child {background:#153f35;color:#fff}
.admin-metric>span:first-child {font-size:.87rem;font-weight:600}
.admin-metric strong {font-size:1.8rem;line-height:1;font-variant-numeric:tabular-nums}
.admin-metric>span:last-child {position:absolute;right:12px;bottom:10px;color:inherit}
.admin-summary-line {grid-column:1/-1;color:var(--muted-color);font-size:.85rem;padding:3px 1px}
body.is-admin .bottom-nav .admin-only.active {background:#195243;color:white}
.bottom-nav .nav-item.active {box-shadow:none}
@media(max-width:760px){body.is-admin .bottom-nav .admin-only.active {background:#e1eee2;color:var(--primary-strong)}}

#open-personal-shop {background:#dcf4e7;color:#103f36;border:0;border-radius:8px;padding:8px 13px;min-height:44px;font:inherit;font-weight:650;cursor:pointer}
#open-personal-shop:disabled,#leave-shop:disabled {opacity:.65}
@media (max-width:760px) {
    #open-personal-shop {min-height:37px;font-size:.82rem;padding:5px 9px}
    .shop-context:has(#open-personal-shop:not([hidden])) {gap:4px}
}

/* Avvio PWA e firma dell'autore. */
#launch-screen {position:fixed;inset:0;box-sizing:border-box;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;color:#fffae9;background:#02151f url("../brand/avvio.webp") center / 100% 100% no-repeat;overflow:auto}
#launch-screen:not([open]) {display:none}
#launch-screen::backdrop {background:#012336}
.launch-layout {box-sizing:border-box;min-height:100%;display:grid;grid-template-rows:auto 1fr auto;padding:max(18px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) max(26px,env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left))}
.launch-controls {justify-self:end;margin:0}
.launch-controls button {display:inline-flex;align-items:center;gap:12px;min-height:44px;padding:8px 18px;font:inherit;font-weight:650;color:#fff9e6;background:#062330ed;border:1px solid #769996;border-radius:30px;cursor:pointer}
.launch-controls button span {color:#58f6e1}
.launch-brand {align-self:center;justify-self:center;min-height:0;padding:12px}
.launch-brand img {display:block;width:clamp(125px,min(53vw,38vh),310px);height:auto;border-radius:22%;box-shadow:0 20px 70px #0005,0 0 0 1px #5adfd82e;animation:diggio-launch-in .42s ease-out both}
.launch-credit {justify-self:center;display:grid;justify-items:center;gap:4px;text-align:center;padding:8px 24px;color:#fff5da;text-shadow:0 2px 6px #001017;background:radial-gradient(ellipse,#02141ee8 20%,#02141eab 55%,transparent 73%)}
.launch-credit span {font:600 .68rem/1.3 system-ui,sans-serif;letter-spacing:.23em;text-transform:uppercase;color:#a6e5df}
.launch-credit strong {font:italic 500 clamp(1.7rem,5vw,2.4rem)/1.2 Georgia,serif}
.launch-credit a {display:inline-flex;align-items:center;min-height:44px;font:550 .9rem/1.15 system-ui,sans-serif;color:#f5fcff;letter-spacing:.04em;text-decoration:underline;text-underline-offset:4px;text-decoration-color:#53d9ce}
#launch-screen :focus-visible {outline:3px solid #ffbd71;outline-offset:3px}
.launch-replay {min-height:44px;margin:12px 0 0;padding:5px 0;background:transparent;color:var(--primary-strong);font:inherit;font-size:.88rem;text-decoration:underline;text-underline-offset:3px;border:0;cursor:pointer}
@keyframes diggio-launch-in {from {opacity:0;transform:translateY(7px)} to {opacity:1;transform:translateY(0)}}
@media (max-height:440px) {.launch-layout {padding:8px 16px}.launch-brand {padding:2px}.launch-brand img {width:min(35vh,145px)}.launch-credit {gap:0;padding:2px 16px}.launch-credit strong {font-size:1.45rem}}
@media (prefers-reduced-motion:reduce) {.launch-brand img {animation:none}}
