:root {
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

:root {
    --bg: #f3f6f8;
    --card: #ffffff;
    --border: #d8e0e5;
    --text: #16323b;
    --muted: #60727c;
    --primary: #1d9e98;
    --primary-dark: #137a75;
    --soft: #eaf6f5;
    --danger: #c65252;
    --success: #3b8d5c;
    --warning: #c28718;
    --sidebar: #14383d;
    --sidebar-text: #e9f7f7;
    --total-bg: #b9d7a8;
    --table-head: #22aaa4;
    --table-alt: #dce8e7;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
}

input,
select,
textarea,
button {
    font-family: var(--font-sans);
}

body.menu-open {
    overflow: hidden;
}

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

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(180deg, #dff3f1 0%, #f3f6f8 100%);
}

.login-shell {
    width: 100%;
    max-width: 420px;
}

.login-card,
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(14, 40, 48, 0.08);
}

.login-card {
    padding: 24px;
}

.brand-block,
.brand-mini {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-block {
    margin-bottom: 20px;
}

.brand-block h1 {
    margin: 0 0 6px;
    font-size: 24px;
}

.brand-block p,
.brand-mini small,
.page-subtitle,
.muted {
    margin: 0;
    color: var(--muted);
}

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

.brand-mark.small {
    width: 38px;
    height: 38px;
    font-size: 18px;
    border-radius: 12px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

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

.form-group {
    display: grid;
    gap: 7px;
}

label {
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 16px;
    background: #fff;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.btn-block {
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #e8eef0;
    color: var(--text);
}

.btn-secondary:hover {
    background: #dbe5e9;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-link {
    background: transparent;
    color: var(--primary-dark);
    padding-left: 0;
    padding-right: 0;
    min-height: auto;
}

.icon-btn {
    border: 0;
    background: #e8f3f3;
    color: var(--text);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 22px;
    cursor: pointer;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 228px;
    height: 100vh;
    height: 100dvh;
    background: var(--sidebar);
    color: var(--sidebar-text);
    padding: 10px 10px 12px;
    z-index: 30;
    transition: left 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.sidebar.open {
    left: 0;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2px;
}

.sidebar .brand-mini {
    gap: 10px;
    min-width: 0;
}

.sidebar .brand-mini strong {
    display: block;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.sidebar .brand-mini small {
    display: block;
    font-size: 11px;
    line-height: 1.2;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.sidebar .brand-mark.small {
    width: 32px;
    height: 32px;
    font-size: 15px;
    border-radius: 9px;
    flex-shrink: 0;
}

.close-sidebar {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
}

.sidebar .nav-link {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--sidebar-text);
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.14);
}

.nav-link {
    display: block;
    padding: 13px 14px;
    border-radius: 12px;
    color: var(--sidebar-text);
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
}

.nav-link.active,
.nav-link:hover {
    background: rgba(255, 255, 255, 0.16);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 16, 20, 0.45);
    z-index: 20;
    display: none;
}

.overlay.show {
    display: block;
}

.app-main {
    width: 100%;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(243, 246, 248, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
}

.container {
    padding: 14px;
    display: grid;
    gap: 16px;
}

.card {
    padding: 16px;
}

.card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.card-title {
    margin: 0;
    font-size: 18px;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--soft);
    border: 1px solid #cde7e4;
    font-weight: 700;
}

.info-list {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.flash {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.flash-danger {
    background: #fdeaea;
    color: #8e2f2f;
    border: 1px solid #f3c8c8;
}

.flash-success {
    background: #e9f8ef;
    color: #22683e;
    border: 1px solid #c8e9d3;
}

.flash-info {
    background: #ecf4fb;
    color: #285e85;
    border: 1px solid #cfe1f1;
}

.flash-warning {
    background: #fff5e7;
    color: #8b5b00;
    border: 1px solid #f2ddae;
}

.login-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

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

th, td {
    border: 1px solid #737373;
    padding: 8px 10px;
    vertical-align: middle;
    background: #fff;
}

.sales-report-table {
    min-width: 460px;
}

.sales-report-table thead th {
    text-align: left;
}

.sales-report-table .report-time th {
    background: var(--table-head);
    color: #000;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

.sales-report-table .header-row th {
    background: #fff;
    font-size: 15px;
}

.sales-report-table tbody tr:nth-child(odd) td {
    background: var(--table-alt);
}

.sales-report-table td.amount {
    font-weight: 700;
    white-space: nowrap;
}

.sales-report-table .total-row td {
    background: var(--total-bg) !important;
    font-weight: 700;
}

.data-table th {
    background: #eef3f5;
    font-size: 14px;
    text-align: left;
}

.data-table td {
    font-size: 14px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.chip-admin {
    background: #e3eefc;
    color: #295586;
}

.chip-user {
    background: #e7f7ef;
    color: #256644;
}

.chip-active {
    background: #e5f7ec;
    color: #287145;
}

.chip-passive {
    background: #fbecec;
    color: #8b3b3b;
}

.chip-store {
    background: #edf5f5;
    color: #295b5c;
    margin: 0 6px 6px 0;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.toolbar .form-group {
    min-width: 180px;
}

.grid-2 {
    display: grid;
    gap: 16px;
}

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

.summary-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.summary-card h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--muted);
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
}

.small-text {
    font-size: 13px;
    color: var(--muted);
}

.inline-note {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff8e8;
    border: 1px solid #efd8a4;
    color: #7b5b11;
    font-size: 13px;
}

@media (max-width: 720px) {
    .form-row,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 18px;
    }

    .container {
        padding: 12px;
    }

    .card {
        padding: 14px;
    }

    table {
        min-width: 540px;
    }

    .sales-report-table {
        min-width: 420px;
    }
}

@media (min-width: 992px) {
    .sidebar {
        left: 0;
    }

    .overlay {
        display: none !important;
    }

    .app-main {
        margin-left: 228px;
    }

    .close-sidebar,
    [data-menu-open] {
        display: none !important;
    }

    .container {
        padding: 20px;
    }
}


.btn-photo-share {
    background: #0f8f6f;
    color: #fff;
}

.btn-photo-share:hover {
    background: #0c765c;
}

.share-note {
    max-width: 520px;
}

.share-note-error {
    background: #fdeceb;
    color: #8d2d2d;
}

.is-hidden {
    display: none !important;
}

.editor-wrap {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.editor-wrap-summernote {
    overflow: visible;
}

.editor-wrap-summernote .note-editor {
    border-radius: 14px;
    overflow: visible;
}

.editor-wrap-summernote .note-toolbar {
    position: relative;
    z-index: 5;
}

.editor-wrap-summernote .dropdown-menu {
    z-index: 10050 !important;
}

.jodit-container {
    border: 0 !important;
    border-radius: 14px !important;
}

.jodit-workplace {
    border-radius: 14px !important;
}

.jodit-toolbar__box {
    border-bottom: 1px solid rgba(14, 40, 48, 0.10) !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

.jodit-wysiwyg {
    font-family: var(--font-sans) !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

.rich-editor {
    min-height: 220px;
}

.news-content {
    line-height: 1.6;
}

.news-content a {
    color: var(--primary-dark);
    text-decoration: underline;
}

.news-content img {
    max-width: 100%;
    height: auto;
}

.news-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(19, 122, 117, 0.16);
    background:
        radial-gradient(1200px 400px at 10% 0%, rgba(29, 158, 152, 0.22), transparent 60%),
        radial-gradient(900px 420px at 90% 10%, rgba(255, 125, 40, 0.18), transparent 60%),
        radial-gradient(700px 420px at 50% 110%, rgba(95, 70, 255, 0.18), transparent 60%),
        linear-gradient(180deg, #0f2d32 0%, #0b1f23 100%);
    color: #f1fbfb;
    padding: 18px 16px;
}

.news-hero::after {
    content: "";
    position: absolute;
    inset: -2px;
    background:
        linear-gradient(90deg, rgba(29, 158, 152, 0.85), rgba(255, 125, 40, 0.75), rgba(95, 70, 255, 0.75));
    opacity: 0.22;
    filter: blur(18px);
    pointer-events: none;
}

.news-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.news-hero-title {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.2px;
}

.news-hero-sub {
    margin: 0;
    color: rgba(241, 251, 251, 0.8);
    font-size: 13px;
    line-height: 1.4;
    max-width: 60ch;
}

.news-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 18px;
    border: 1px solid rgba(14, 40, 48, 0.12);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 34px rgba(14, 40, 48, 0.10);
    margin-bottom: 14px;
}

.news-search-icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(14, 40, 48, 0.10);
    background: linear-gradient(135deg, rgba(29, 158, 152, 0.18), rgba(255, 125, 40, 0.14));
    color: #06191c;
}

.news-search input {
    border: 0;
    outline: none;
    min-height: 42px;
    padding: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 850;
}

.news-search-clear {
    border: 0;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(14, 40, 48, 0.10);
    width: 42px;
    height: 42px;
    border-radius: 16px;
    cursor: pointer;
    visibility: hidden;
}

.news-search-clear:hover {
    border-color: rgba(29, 158, 152, 0.38);
    transform: translateY(-1px);
}

.news-list {
    display: grid;
    gap: 12px;
}

.news-item {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background:
        radial-gradient(800px 260px at 0% 0%, rgba(29, 158, 152, 0.18), transparent 55%),
        radial-gradient(700px 260px at 100% 0%, rgba(255, 125, 40, 0.16), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f6fbfc 100%);
    border: 1px solid rgba(14, 40, 48, 0.12);
    box-shadow:
        0 14px 38px rgba(14, 40, 48, 0.10),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.news-item:hover {
    transform: translateY(-2px);
    border-color: rgba(29, 158, 152, 0.35);
    box-shadow:
        0 18px 50px rgba(14, 40, 48, 0.14),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.admin-news-item:hover {
    transform: none;
}

.news-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(120deg, rgba(29, 158, 152, 0.70), rgba(255, 125, 40, 0.55), rgba(95, 70, 255, 0.55));
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.45;
    pointer-events: none;
}

.news-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 900;
    color: var(--muted);
    letter-spacing: 0.2px;
}

.news-time {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(29, 158, 152, 0.10);
    border: 1px solid rgba(29, 158, 152, 0.16);
    color: #0b5b57;
    font-size: 12px;
    font-weight: 900;
}

.news-cta {
    font-size: 13px;
    font-weight: 900;
    color: #06191c;
    background: linear-gradient(90deg, rgba(29, 158, 152, 0.32), rgba(255, 125, 40, 0.22));
    border: 1px solid rgba(14, 40, 48, 0.14);
    padding: 9px 12px;
    border-radius: 14px;
}

.news-title {
    font-size: 17px;
    font-weight: 950;
    line-height: 1.25;
}

.news-excerpt {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.45;
}

.admin-news-list .btn {
    min-height: 40px;
    padding: 10px 12px;
    font-size: 14px;
}

.entity-grid {
    display: grid;
    gap: 14px;
}

.entity-card {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background:
        radial-gradient(900px 260px at 0% 0%, rgba(29, 158, 152, 0.16), transparent 55%),
        radial-gradient(900px 260px at 100% 0%, rgba(255, 125, 40, 0.12), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f6fbfc 100%);
    border: 1px solid rgba(14, 40, 48, 0.12);
    box-shadow:
        0 14px 38px rgba(14, 40, 48, 0.10),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.entity-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(120deg, rgba(29, 158, 152, 0.65), rgba(255, 125, 40, 0.50), rgba(95, 70, 255, 0.50));
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.35;
    pointer-events: none;
}

.entity-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.entity-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    color: #06191c;
    border: 1px solid rgba(14, 40, 48, 0.14);
    background: linear-gradient(135deg, rgba(29, 158, 152, 0.35), rgba(255, 125, 40, 0.22));
}

.avatar-admin {
    background: linear-gradient(135deg, rgba(95, 70, 255, 0.35), rgba(29, 158, 152, 0.25));
}

.avatar-user {
    background: linear-gradient(135deg, rgba(29, 158, 152, 0.30), rgba(255, 125, 40, 0.18));
}

.avatar-store-retail {
    background: linear-gradient(135deg, rgba(255, 125, 40, 0.26), rgba(29, 158, 152, 0.26));
}

.avatar-store-wholesale {
    background: linear-gradient(135deg, rgba(95, 70, 255, 0.30), rgba(255, 125, 40, 0.20));
}

.entity-meta {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.entity-title {
    font-weight: 950;
    font-size: 16px;
    line-height: 1.2;
}

.entity-sub {
    font-size: 13px;
    color: var(--muted);
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.entity-kv {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(14, 40, 48, 0.10);
}

.kv-label {
    font-size: 12px;
    font-weight: 900;
    color: var(--muted);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.kv-value {
    font-size: 14px;
    font-weight: 850;
    line-height: 1.35;
    color: var(--text);
}

.entity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.entity-actions .btn {
    min-height: 40px;
    padding: 10px 12px;
}

@media (min-width: 720px) {
    .entity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .entity-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.history-grid {
    display: grid;
    gap: 14px;
}

.history-card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    background:
        radial-gradient(900px 260px at 0% 0%, rgba(29, 158, 152, 0.14), transparent 55%),
        radial-gradient(900px 260px at 100% 0%, rgba(255, 125, 40, 0.12), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f6fbfc 100%);
    border: 1px solid rgba(14, 40, 48, 0.12);
    box-shadow:
        0 14px 38px rgba(14, 40, 48, 0.10),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.history-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(120deg, rgba(29, 158, 152, 0.65), rgba(255, 125, 40, 0.48), rgba(95, 70, 255, 0.48));
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.28;
    pointer-events: none;
}

.history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.history-date {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 950;
    color: var(--muted);
    letter-spacing: 0.2px;
}

.history-time {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(29, 158, 152, 0.10);
    border: 1px solid rgba(29, 158, 152, 0.16);
    color: #0b5b57;
    font-size: 12px;
    font-weight: 900;
}

.history-badge {
    font-size: 12px;
    font-weight: 950;
    color: #06191c;
    background: linear-gradient(90deg, rgba(29, 158, 152, 0.28), rgba(255, 125, 40, 0.20));
    border: 1px solid rgba(14, 40, 48, 0.14);
    padding: 8px 10px;
    border-radius: 14px;
}

.history-store {
    font-size: 16px;
    font-weight: 950;
    line-height: 1.2;
}

.history-address {
    font-size: 13px;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.35;
}

.history-amounts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.amount-pill {
    border-radius: 16px;
    padding: 12px 12px;
    border: 1px solid rgba(14, 40, 48, 0.10);
    background: rgba(255, 255, 255, 0.72);
    display: grid;
    gap: 6px;
}

.amount-main {
    background: linear-gradient(180deg, rgba(29, 158, 152, 0.10), rgba(255, 255, 255, 0.82));
}

.amount-vatfree {
    background: linear-gradient(180deg, rgba(95, 70, 255, 0.10), rgba(255, 255, 255, 0.82));
}

.amount-label {
    font-size: 12px;
    font-weight: 950;
    color: var(--muted);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.amount-value {
    font-size: 15px;
    font-weight: 950;
    white-space: nowrap;
}

@media (min-width: 720px) {
    .history-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .history-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.link-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.link-list {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.link-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 16px;
    border-radius: 18px;
    border: 1px solid rgba(14, 40, 48, 0.12);
    background:
        radial-gradient(900px 320px at 0% 0%, rgba(29, 158, 152, 0.20), transparent 55%),
        radial-gradient(900px 320px at 100% 0%, rgba(255, 125, 40, 0.16), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f6fbfc 100%);
    box-shadow:
        0 16px 44px rgba(14, 40, 48, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.link-button:hover {
    transform: translateY(-2px);
    border-color: rgba(29, 158, 152, 0.38);
    box-shadow:
        0 20px 56px rgba(14, 40, 48, 0.16),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.link-button::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(120deg, rgba(29, 158, 152, 0.75), rgba(255, 125, 40, 0.55), rgba(95, 70, 255, 0.55));
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.38;
    pointer-events: none;
}

.link-button-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(14, 40, 48, 0.14);
    background: linear-gradient(135deg, rgba(95, 70, 255, 0.26), rgba(29, 158, 152, 0.22), rgba(255, 125, 40, 0.18));
    color: #06191c;
    font-size: 20px;
}

.link-button-label {
    font-size: 16px;
    font-weight: 950;
    line-height: 1.2;
}

.link-sort-list {
    display: grid;
    gap: 12px;
}

.link-sort-item.is-dragging {
    opacity: 0.65;
}

.link-button-admin {
    cursor: grab;
}

.link-button-admin:active {
    cursor: grabbing;
}

.link-admin-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(14, 40, 48, 0.14);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 28px rgba(14, 40, 48, 0.10);
    cursor: pointer;
    color: #06191c;
}

.icon-action:hover {
    border-color: rgba(29, 158, 152, 0.38);
    transform: translateY(-1px);
}

.icon-danger {
    background: rgba(198, 82, 82, 0.10);
    border-color: rgba(198, 82, 82, 0.25);
}

.icon-danger:hover {
    border-color: rgba(198, 82, 82, 0.50);
}

.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.bonus-tier-table .amount {
    font-weight: 700;
}

.link-card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 18px 16px;
    border-radius: 20px;
    border: 1px solid rgba(14, 40, 48, 0.12);
    background:
        radial-gradient(900px 320px at 0% 0%, rgba(29, 158, 152, 0.20), transparent 55%),
        radial-gradient(900px 320px at 100% 0%, rgba(255, 125, 40, 0.16), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f6fbfc 100%);
    box-shadow:
        0 16px 44px rgba(14, 40, 48, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(29, 158, 152, 0.38);
    box-shadow:
        0 20px 56px rgba(14, 40, 48, 0.16),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.link-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(120deg, rgba(29, 158, 152, 0.75), rgba(255, 125, 40, 0.55), rgba(95, 70, 255, 0.55));
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.38;
    pointer-events: none;
}

.link-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(14, 40, 48, 0.14);
    background: linear-gradient(135deg, rgba(95, 70, 255, 0.26), rgba(29, 158, 152, 0.22), rgba(255, 125, 40, 0.18));
    color: #06191c;
    font-size: 22px;
}

.link-card-label {
    font-size: 17px;
    font-weight: 950;
    line-height: 1.25;
}

.link-card-sub {
    font-size: 13px;
    font-weight: 850;
    color: var(--muted);
}

.icon-picker {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.icon-option {
    display: block;
    cursor: pointer;
}

.icon-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.icon-box {
    display: inline-flex;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(14, 40, 48, 0.12);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 10px 26px rgba(14, 40, 48, 0.10);
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
    font-size: 18px;
}

.icon-option:hover .icon-box {
    transform: translateY(-1px);
    border-color: rgba(29, 158, 152, 0.35);
}

.icon-option input:checked + .icon-box {
    background: linear-gradient(135deg, rgba(29, 158, 152, 0.26), rgba(255, 125, 40, 0.18));
    border-color: rgba(29, 158, 152, 0.45);
}

.selected-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(14, 40, 48, 0.10);
    background: rgba(255, 255, 255, 0.75);
}

.selected-icon i {
    font-size: 20px;
}

@media (min-width: 720px) {
    .link-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .icon-picker {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .link-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .icon-picker {
        grid-template-columns: repeat(10, minmax(0, 1fr));
    }
}

@media (min-width: 720px) {
    .news-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .news-hero {
        padding: 22px 20px;
    }

    .news-hero-title {
        font-size: 24px;
    }
}

@media (min-width: 1100px) {
    .news-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

.news-post {
    padding: 0;
    overflow: hidden;
}

.news-post-head {
    padding: 18px 16px;
    background:
        radial-gradient(900px 360px at 0% 0%, rgba(29, 158, 152, 0.20), transparent 60%),
        radial-gradient(900px 360px at 100% 0%, rgba(255, 125, 40, 0.16), transparent 60%),
        linear-gradient(180deg, #0f2d32 0%, #0b1f23 100%);
    color: #f1fbfb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.news-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: rgba(241, 251, 251, 0.8);
    font-weight: 800;
    font-size: 13px;
}

.news-post-body {
    padding: 16px;
}

.news-content {
    line-height: 1.75;
    font-size: 15px;
    max-width: 100%;
}

.news-content p {
    margin: 0 0 12px;
}

.news-content * {
    max-width: 100%;
}

/* If content has wide tables/code, scroll only that block (mobile-friendly) */
.news-content table,
.news-content pre,
.news-content .wp-block-table,
.news-content figure.wp-block-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.news-content table {
    border-collapse: collapse;
}

.news-content th,
.news-content td {
    white-space: nowrap;
}

.news-content pre {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(14, 40, 48, 0.10);
    background: rgba(255, 255, 255, 0.75);
}

.news-content iframe,
.news-content video {
    max-width: 100%;
}

.news-content h1, .news-content h2, .news-content h3 {
    margin: 18px 0 10px;
    line-height: 1.25;
}

.news-content blockquote {
    margin: 14px 0;
    padding: 12px 14px;
    border-left: 4px solid rgba(29, 158, 152, 0.55);
    background: rgba(29, 158, 152, 0.08);
    border-radius: 12px;
}

.news-content ul, .news-content ol {
    margin: 0 0 14px 18px;
}


.share-capture-stage {
    position: fixed;
    left: -100000px;
    top: 0;
    width: 760px;
    padding: 0;
    pointer-events: none;
    z-index: -1;
}

.share-report-card {
    width: 720px;
    margin: 0 0 20px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(14, 40, 48, 0.08);
}

.share-report-title-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.share-report-title {
    font-size: 24px;
    font-weight: 700;
}

.share-report-date {
    font-size: 16px;
    color: var(--muted);
    white-space: nowrap;
}

.entity-card-link {
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.entity-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(14, 40, 48, 0.12);
}

.input-with-action {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.input-with-action input {
    flex: 1;
    min-width: 0;
}

.loyalty-profile-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
}

.loyalty-stat-box {
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    min-width: 160px;
    text-align: right;
}

.loyalty-stat-label {
    font-size: 13px;
    color: var(--muted);
}

.loyalty-stat-value {
    font-size: 24px;
    font-weight: 800;
    margin-top: 4px;
}

.loyalty-stat-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.loyalty-card-code {
    font-size: 15px;
    letter-spacing: 0.04em;
}

.qr-reader-wrap {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
    min-height: 260px;
}

.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 30, 36, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1200;
}

.qr-modal.show {
    display: flex;
}

.qr-modal-dialog {
    width: 100%;
    max-width: 440px;
    background: var(--card);
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 16px;
    box-shadow: 0 20px 50px rgba(14, 40, 48, 0.2);
}

.qr-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .loyalty-profile-grid {
        grid-template-columns: 1fr;
    }

    .loyalty-stat-box {
        text-align: left;
    }
}
