:root {
    --bg: #f4f7fb;
    --bg-alt: #eef3fb;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --border: rgba(15, 23, 42, 0.08);
    --text: #10233f;
    --text-soft: #5c6b82;
    --primary: #1d9bf0;
    --primary-dark: #0f6bb3;
    --success: #1ec28b;
    --warning: #ffb020;
    --danger: #f65f7c;
    --sidebar: #0f1c2f;
    --sidebar-soft: #1a2a44;
    --dashboard-icon-gradient: linear-gradient(135deg, rgba(16, 35, 63, 0.9), rgba(29, 155, 240, 0.75));
    --shadow: 0 24px 60px rgba(16, 35, 63, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --sidebar-width: 300px;
    --page-gutter: clamp(14px, 2.2vw, 28px);
    --content-max-width: 1880px;
}

.module-chip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
}

.module-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(29, 155, 240, 0.12);
    color: #0f4f86;
    font-size: 0.78rem;
    font-weight: 800;
}

.module-chip-soft {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-soft);
}

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

.module-check-card,
.module-group-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    cursor: pointer;
}

.module-group-check {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin: 0 10px 10px 0;
}

.module-check-card input,
.module-group-check input {
    margin-top: 5px;
    flex: 0 0 auto;
}

.module-check-card strong,
.module-group-check strong {
    display: block;
    color: var(--text);
    font-size: 0.92rem;
}

.module-check-card small,
.module-group-check small {
    display: block;
    color: var(--text-soft);
    line-height: 1.45;
}

.module-group-card {
    position: relative;
    align-items: center;
    min-width: min(360px, 100%);
    padding: 20px 24px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 42px rgba(16, 35, 63, 0.1);
    overflow: hidden;
    isolation: isolate;
}

.module-group-card::after {
    content: "";
    position: absolute;
    top: -48px;
    right: -38px;
    width: 118px;
    height: 118px;
    border-radius: 999px;
    background: rgba(29, 155, 240, 0.34);
    box-shadow: -16px 12px 0 rgba(29, 155, 240, 0.18);
    z-index: -1;
}

.module-group-card:nth-of-type(2n)::after {
    background: rgba(30, 194, 139, 0.3);
    box-shadow: -16px 12px 0 rgba(30, 194, 139, 0.16);
}

.module-group-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.module-group-card-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #254162, #1d9bf0);
    box-shadow: 0 14px 28px rgba(29, 155, 240, 0.24);
}

.module-group-card-content {
    display: block;
    min-width: 0;
    padding-right: 42px;
}

.module-group-card-check {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: rgba(96, 112, 138, 0.62);
    background: rgba(248, 251, 255, 0.86);
    border: 1px solid rgba(96, 112, 138, 0.22);
    box-shadow: 0 10px 20px rgba(16, 35, 63, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.module-group-card-check i {
    font-size: 1rem;
    line-height: 1;
}

.module-group-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-group-card-number {
    color: var(--text);
    font-size: 1.7rem;
    line-height: 1;
}

.module-group-card-title {
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 800;
}

.module-group-card small {
    margin-top: 8px;
    color: #60708a;
    font-size: 0.95rem;
}

.module-group-card:has(input:checked) {
    border-color: rgba(29, 155, 240, 0.34);
    box-shadow: 0 20px 45px rgba(29, 155, 240, 0.16);
}

.module-group-card:has(input:checked) .module-group-card-icon {
    background: linear-gradient(135deg, #10233f, #1ec28b);
    box-shadow: 0 14px 28px rgba(30, 194, 139, 0.22);
}

.module-group-card:has(input:checked) .module-group-card-check {
    color: #ffffff;
    background: linear-gradient(135deg, #1ec28b, #1d9bf0);
    border-color: rgba(30, 194, 139, 0.38);
    box-shadow: 0 12px 24px rgba(30, 194, 139, 0.24);
    transform: scale(1.05);
}

.module-check-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, #10233f, #1d9bf0);
}

.module-check-card {
    position: relative;
    min-height: 86px;
    padding-right: 46px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.module-check-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.module-check-copy {
    min-width: 0;
}

.module-check-card-check {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: rgba(96, 112, 138, 0.58);
    background: rgba(248, 251, 255, 0.92);
    border: 1px solid rgba(96, 112, 138, 0.2);
    box-shadow: 0 8px 16px rgba(16, 35, 63, 0.07);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.module-check-card-check i {
    font-size: 0.86rem;
    line-height: 1;
}

.module-check-card:hover,
.module-check-card:focus-within {
    border-color: rgba(29, 155, 240, 0.24);
    box-shadow: 0 14px 28px rgba(16, 35, 63, 0.08);
}

.module-check-card:has(input:checked) {
    border-color: rgba(29, 155, 240, 0.34);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 32px rgba(29, 155, 240, 0.12);
}

.module-check-card:has(input:checked) .module-check-icon {
    background: linear-gradient(135deg, #10233f, #1ec28b);
    box-shadow: 0 12px 24px rgba(30, 194, 139, 0.18);
}

.module-check-card:has(input:checked) .module-check-card-check {
    color: #ffffff;
    background: linear-gradient(135deg, #1ec28b, #1d9bf0);
    border-color: rgba(30, 194, 139, 0.38);
    box-shadow: 0 10px 20px rgba(30, 194, 139, 0.22);
    transform: scale(1.05);
}

.module-section-box {
    height: 100%;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(248, 251, 255, 0.82);
}

.module-section-box h3 {
    margin: 4px 0 14px;
    font-size: 1.05rem;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(29, 155, 240, 0.15), transparent 34%),
        radial-gradient(circle at right, rgba(30, 194, 139, 0.13), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

h1, h2, h3, h4, h5 {
    font-family: "Sora", sans-serif;
    letter-spacing: -0.03em;
    color: #374151;
}

a {
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: minmax(260px, var(--sidebar-width)) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background:
        radial-gradient(circle at top left, rgba(29, 155, 240, 0.34), transparent 30%),
        radial-gradient(circle at bottom right, rgba(30, 194, 139, 0.18), transparent 34%),
        linear-gradient(180deg, #0b1626 0%, var(--sidebar) 34%, #16253b 68%, #1b3250 100%);
    color: #d9e5f6;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.app-sidebar-backdrop {
    display: none;
}

.sidebar-brand {
    display: flex;
    gap: 14px;
    align-items: center;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1d9bf0, #1ec28b);
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 18px 40px rgba(29, 155, 240, 0.25);
}

.brand-title {
    color: white;
    font-weight: 800;
    font-size: 1.05rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    color: #d9e5f6;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateX(4px);
}

.sidebar-card {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 18px;
}

.sidebar-card h3 {
    font-size: 1rem;
    color: #ffffff;
}

.sidebar-card p {
    margin: 0;
    color: #b8c5d8;
    font-size: 0.92rem;
}

.main-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.topbar {
    width: min(100%, var(--content-max-width));
    margin: 0 auto;
    padding: clamp(20px, 2vw, 24px) var(--page-gutter) 10px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.topbar > * {
    min-width: 0;
}

.topbar h1 {
    margin: 4px 0 0;
    font-size: clamp(1.3rem, 1.7vw, 1.85rem);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.topbar-actions > * {
    min-width: 0;
}

.topbar-chip,
.user-pill {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(18px);
    max-width: 100%;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1d9bf0, #7b61ff);
    color: white;
    font-weight: 800;
}

.user-pill small,
.topbar-chip {
    color: var(--text-soft);
}

.user-pill strong,
.user-pill small,
.topbar-chip {
    overflow-wrap: anywhere;
}

.content-panel {
    width: min(100%, var(--content-max-width));
    margin: 0 auto;
    padding: 10px var(--page-gutter) clamp(20px, 2.6vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-bar {
    width: min(calc(100% - (var(--page-gutter) * 2)), var(--content-max-width));
    margin: 0 auto clamp(20px, 2.6vw, 28px);
    padding: 16px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-soft);
}

.footer-bar small {
    display: block;
    text-align: center;
}

.footer-bar strong {
    color: var(--text);
    margin-right: 10px;
}

.eyebrow {
    display: inline-block;
    color: var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(29, 155, 240, 0.12);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.82rem;
}

.hero-panel,
.panel-card,
.metric-card,
.login-card,
.receipt-sheet {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.hero-panel {
    border-radius: var(--radius-xl);
    padding: 28px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    background:
        radial-gradient(circle at right top, rgba(29, 155, 240, 0.18), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(242, 248, 255, 0.96));
}

.hero-panel h2 {
    margin: 10px 0 10px;
    max-width: 760px;
    font-size: clamp(1.4rem, 1.75vw, 1.9rem);
}

.hero-panel p {
    margin: 0;
    max-width: 720px;
    color: var(--text-soft);
}

.hero-metrics {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-metrics div {
    flex: 1 1 180px;
    min-width: 180px;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.hero-metrics small,
.metric-card small,
.section-header p,
.panel-head span + h3 + p {
    color: var(--text-soft);
}

.hero-metrics strong,
.metric-card h3 {
    display: block;
    margin-top: 8px;
    font-size: 1.65rem;
}

.section-header,
.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.section-header > *,
.panel-head > * {
    min-width: 0;
}

.section-header h2,
.panel-head h3 {
    margin: 6px 0;
    font-size: clamp(1.25rem, 1.45vw, 1.6rem);
}

.section-header p,
.panel-head p {
    margin: 0;
}

.panel-head-gradient {
    background: var(--dashboard-icon-gradient);
    color: white;
    margin: -24px -24px 20px;
    padding: 12px 22px 10px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.panel-head-gradient .eyebrow,
.panel-head-gradient h3,
.panel-head-gradient p {
    color: white;
}

.panel-head-gradient .eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
}

.panel-head-gradient h3 {
    font-size: 1.2rem;
    margin: 2px 0 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stats-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    right: -20px;
    top: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    opacity: 0.12;
}

.metric-card p {
    margin: 8px 0 0;
    color: var(--text-soft);
}

.dashboard-stat-card {
    padding: 20px 24px 22px;
    border-radius: 24px;
    background:
        radial-gradient(circle 64px at top right, rgba(186, 230, 253, 0.7) 0 98%, transparent 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98));
    border-color: rgba(203, 213, 225, 0.82);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.dashboard-stat-card::after {
    right: -34px;
    top: -34px;
    width: 110px;
    height: 110px;
    opacity: 0.28;
}

.dashboard-stat-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.dashboard-stat-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.dashboard-stat-value {
    margin: 0;
    font-size: clamp(1.9rem, 2.3vw, 2.35rem);
    line-height: 1;
    color: #0f172a;
    flex: 0 0 auto;
}

.dashboard-stat-label {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.35;
}

.dashboard-stat-card p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #64748b;
    position: relative;
    z-index: 1;
}

.accent-blue::after { background: var(--primary); }
.accent-green::after { background: var(--success); }
.accent-amber::after { background: var(--warning); }
.accent-red::after { background: var(--danger); }

.metric-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    color: white;
    font-size: 1.15rem;
    background: var(--dashboard-icon-gradient);
}

.dashboard-stat-card .metric-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
    border-radius: 14px;
    font-size: 1rem;
    background: var(--dashboard-icon-gradient);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    align-items: start;
}

.content-grid > * {
    min-width: 0;
}

.panel-card {
    border-radius: var(--radius-xl);
    padding: 24px;
    min-width: 0;
}

.chart-card {
    min-height: 400px;
    min-width: 0;
    overflow: hidden;
    contain: layout paint;
    isolation: isolate;
}

.chart-card.compact {
    min-height: 400px;
}

.chart-stage {
    height: 310px;
    margin-top: 22px;
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    contain: layout paint;
    isolation: isolate;
}

.chart-stage.small {
    height: 300px;
}

.chart-stage canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    background: transparent;
}

.table-modern {
    --bs-table-bg: transparent;
    margin: 0;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
    min-width: 720px;
}

.table-modern thead th {
    color: var(--text-soft);
    font-size: 0.84rem;
    font-weight: 700;
    border-bottom-color: rgba(15, 23, 42, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.table-modern tbody td {
    border-bottom-color: rgba(15, 23, 42, 0.06);
    padding-top: 18px;
    padding-bottom: 18px;
}

.table-header-gradient {
    border-collapse: separate;
    border-spacing: 0;
}

.table-header-gradient thead tr {
    background: var(--dashboard-icon-gradient);
}

.table-header-gradient thead th {
    background: transparent;
    color: white;
    border-bottom-color: transparent;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.table-header-gradient thead th:first-child {
    border-top-left-radius: 14px;
}

.table-header-gradient thead th:last-child {
    border-top-right-radius: 14px;
}

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

.detail-list div {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--bg-alt);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.detail-list span {
    display: block;
    font-size: 0.82rem;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.detail-list strong {
    font-size: 0.98rem;
}

.insight-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.insight-item {
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.08), rgba(30, 194, 139, 0.08));
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.insight-item strong {
    display: block;
    font-size: 1.28rem;
}

.insight-item span {
    color: var(--text-soft);
}

.btn-gradient {
    border: none;
    color: white;
    background: var(--dashboard-icon-gradient);
    box-shadow: 0 12px 26px rgba(16, 35, 63, 0.22);
}

.btn-gradient:hover,
.btn-gradient:focus {
    color: white;
    background: linear-gradient(135deg, rgba(12, 28, 51, 0.96), rgba(24, 136, 211, 0.9));
}

.section-header .btn-gradient {
    padding: 0.9rem 1.4rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 18px;
}

.btn-edit-gradient {
    border: none;
    color: white;
    background: linear-gradient(135deg, rgba(109, 59, 3, 0.96), rgba(241, 131, 6, 0.94));
    box-shadow: 0 10px 20px rgba(194, 65, 12, 0.22);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    min-width: 46px;
    font-size: 0.95rem;
}

.btn-edit-gradient:hover,
.btn-edit-gradient:focus {
    color: white;
    background: linear-gradient(135deg, rgba(82, 38, 12, 0.98), rgba(234, 88, 12, 0.96));
}

.btn-detail-gradient {
    border: none;
    color: white;
    background: linear-gradient(135deg, rgba(57, 151, 206, 0.95), rgba(27, 73, 104, 0.9));
    box-shadow: 0 10px 20px rgba(16, 35, 63, 0.14);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    min-width: 46px;
    font-size: 0.95rem;
}

.btn-detail-gradient:hover,
.btn-detail-gradient:focus {
    color: white;
    background: linear-gradient(135deg, rgba(34, 120, 201, 0.98), rgba(32, 59, 82, 0.96));
}

@media (hover: hover) {
    .btn-detail-gradient,
    .btn-edit-gradient {
        overflow: hidden;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        height: 42px;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
        transition: min-width 0.18s ease, padding 0.18s ease, transform 0.18s ease;
    }

    .btn-detail-gradient i,
    .btn-edit-gradient i {
        transition: transform 0.18s ease;
    }

    .btn-detail-gradient::after,
    .btn-edit-gradient::after {
        content: attr(aria-label);
        display: inline-block;
        max-width: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateX(-4px);
        transition: max-width 0.18s ease, opacity 0.14s ease, transform 0.18s ease, margin-left 0.18s ease;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-size: 0.68rem;
        font-weight: 800;
        white-space: nowrap;
    }

    .btn-detail-gradient:hover,
    .btn-detail-gradient:focus-visible,
    .btn-edit-gradient:hover,
    .btn-edit-gradient:focus-visible {
        min-width: 92px;
        justify-content: flex-start;
    }

    .btn-detail-gradient:hover::after,
    .btn-detail-gradient:focus-visible::after,
    .btn-edit-gradient:hover::after,
    .btn-edit-gradient:focus-visible::after {
        opacity: 1;
        max-width: 72px;
        margin-left: 0.45rem;
        transform: translateX(0);
    }
}

.btn-pay-gradient {
    border: none;
    color: white;
    background: linear-gradient(135deg, rgba(109, 59, 3, 0.96), rgba(241, 131, 6, 0.94));
    box-shadow: 0 10px 20px rgba(194, 65, 12, 0.22);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    min-width: 46px;
    font-size: 0.95rem;
}

.btn-pay-gradient:hover,
.btn-pay-gradient:focus {
    color: white;
    background: linear-gradient(135deg, rgba(82, 38, 12, 0.98), rgba(234, 88, 12, 0.96));
}

.form-control,
.form-select,
.input-group-text,
.modal-content {
    border-radius: 16px;
}

.form-label {
    font-weight: 800;
    color: #374151;
}

.form-control,
.form-select {
    border-color: rgba(15, 23, 42, 0.1);
    padding: 0.82rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(29, 155, 240, 0.4);
    box-shadow: 0 0 0 0.25rem rgba(29, 155, 240, 0.12);
}

.input-group-soft .input-group-text {
    border-color: rgba(15, 23, 42, 0.1);
    background: #fff;
}

.modal-content {
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-dialog-scrollable .modal-content {
    max-height: calc(100dvh - 2rem);
}

.modal-dialog-scrollable .modal-content > form {
    display: flex;
    flex-direction: column;
    max-height: inherit;
    min-height: 0;
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    background: var(--dashboard-icon-gradient);
    color: white;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.modal-header .modal-title {
    color: white;
    font-weight: 700;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.modal-header .btn-close:hover,
.modal-header .btn-close:focus {
    opacity: 1;
}

.modal-footer .btn-outline-secondary {
    border: none;
    color: white;
    background: linear-gradient(135deg, rgba(190, 24, 93, 0.96), rgba(220, 38, 38, 0.94));
    box-shadow: 0 12px 24px rgba(185, 28, 28, 0.18);
    padding: 0.85rem 1.35rem;
    font-weight: 700;
    border-radius: 16px;
}

.modal-footer .btn-outline-secondary:hover,
.modal-footer .btn-outline-secondary:focus {
    color: white;
    background: linear-gradient(135deg, rgba(157, 23, 77, 0.98), rgba(185, 28, 28, 0.96));
}

.modal-footer .btn-gradient {
    padding: 0.85rem 1.45rem;
    font-weight: 700;
    border-radius: 16px;
}

.empty-state {
    min-height: 360px;
    border-radius: var(--radius-xl);
    border: 1px dashed rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.72);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 30px;
}

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

.login-shell {
    overflow-x: hidden;
    overflow-y: auto;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(16px, 3vw, 32px);
    position: relative;
}

.login-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(22px);
}

.login-glow-one {
    width: 280px;
    height: 280px;
    background: rgba(29, 155, 240, 0.18);
    top: 70px;
    left: 70px;
}

.login-glow-two {
    width: 260px;
    height: 260px;
    background: rgba(30, 194, 139, 0.16);
    bottom: 60px;
    right: 90px;
}

.login-card {
    width: min(1120px, 100%);
    border-radius: 32px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    overflow: hidden;
    position: relative;
    z-index: 1;
    align-items: stretch;
}

.login-card-wide {
    width: min(1320px, 100%);
    grid-template-columns: 0.92fr 1.08fr;
}

.login-brand {
    padding: 42px;
    background:
        radial-gradient(circle at top, rgba(29, 155, 240, 0.2), transparent 30%),
        linear-gradient(135deg, #0f1c2f, #172945);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    min-width: 0;
}

.login-brand p {
    color: rgba(255, 255, 255, 0.76);
}

.login-brand .brand-pill {
    color: #ffffff;
}

.login-brand h1 {
    color: #eeac31;
}

.trial-feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.trial-feature-list div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.trial-feature-list i {
    font-size: 1.1rem;
}

.login-form-panel {
    padding: 42px;
    background: rgba(255, 255, 255, 0.95);
    min-width: 0;
}

.login-form-panel .btn-gradient {
    padding: 1rem 1.45rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 18px;
}

.login-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(29, 155, 240, 0.12);
    color: var(--primary-dark);
    font-size: 1.3rem;
}

.soft-pills {
    gap: 10px;
    flex-wrap: wrap;
}

.soft-pills .nav-link {
    border-radius: 999px;
    padding: 0.75rem 1.1rem;
    color: var(--text-soft);
    background: rgba(16, 35, 63, 0.06);
    font-weight: 700;
}

.soft-pills .nav-link.active {
    background: var(--dashboard-icon-gradient);
    color: white;
}

.receipt-page {
    padding: clamp(18px, 2.2vw, 32px) clamp(12px, 2vw, 20px);
    background: linear-gradient(180deg, #eef4fb, #f8fbff);
}

.receipt-sheet {
    max-width: 920px;
    margin: 0 auto;
    border-radius: 32px;
    padding: 34px;
    background: #ffffff;
}

.receipt-head,
.receipt-total,
.receipt-actions {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.receipt-brand-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.receipt-logo-wrap {
    max-width: 260px;
    min-height: 72px;
    display: flex;
    align-items: center;
}

.receipt-logo {
    max-width: 100%;
    max-height: 74px;
    object-fit: contain;
}

.receipt-code {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.receipt-box,
.receipt-table {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f9fbfe;
    padding: 20px;
    height: 100%;
}

.receipt-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.receipt-table table {
    width: 100%;
    min-width: 560px;
}

.receipt-box h2 {
    font-size: 1rem;
    margin-bottom: 14px;
}

.receipt-box p {
    margin-bottom: 8px;
    color: var(--text-soft);
}

.receipt-total .amount {
    font-family: "Sora", sans-serif;
    font-size: 1.7rem;
}

.receipt-preview-modal .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

.receipt-preview-modal .modal-body {
    padding: 0;
}

.receipt-sheet-embedded {
    max-width: none;
    margin: 0;
}

.btn-receipt-close {
    border: none;
    color: white;
    background: linear-gradient(135deg, rgba(190, 24, 93, 0.96), rgba(220, 38, 38, 0.94));
    box-shadow: 0 12px 24px rgba(185, 28, 28, 0.18);
    padding: 0.95rem 1.45rem;
    font-weight: 700;
    border-radius: 16px;
}

.btn-receipt-close:hover,
.btn-receipt-close:focus {
    color: white;
    background: linear-gradient(135deg, rgba(157, 23, 77, 0.98), rgba(185, 28, 28, 0.96));
}

.btn-receipt-print {
    padding: 0.95rem 1.6rem;
    font-weight: 700;
    border-radius: 16px;
}

.receipt-preview-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.08), rgba(30, 194, 139, 0.1));
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.settings-logo-preview {
    max-width: 240px;
    max-height: 100px;
    object-fit: contain;
}

.settings-logo-empty {
    width: 220px;
    min-height: 96px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
    border-radius: 18px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-soft);
}

.settings-logo-empty i {
    font-size: 1.6rem;
    color: var(--primary);
}

.pagination-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.pagination-meta {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-link,
.pagination-ellipsis {
    min-width: 42px;
    height: 42px;
    padding: 0 0.95rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.92rem;
}

.pagination-link {
    color: #374151;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(16, 35, 63, 0.08);
    outline: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.pagination-link:hover,
.pagination-link:focus {
    color: white;
    border-color: transparent;
    background: var(--dashboard-icon-gradient);
    box-shadow: 0 12px 26px rgba(16, 35, 63, 0.18);
    transform: translateY(-1px);
}

.pagination-link:focus-visible {
    outline: none;
    box-shadow: 0 12px 26px rgba(16, 35, 63, 0.18), 0 0 0 3px rgba(29, 155, 240, 0.14);
}

.pagination-link.is-active {
    color: white;
    border-color: transparent;
    background: var(--dashboard-icon-gradient);
    box-shadow: 0 12px 26px rgba(16, 35, 63, 0.18);
}

.pagination-link.is-disabled {
    color: #6b7280;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: none;
    pointer-events: none;
}

.pagination-link-nav {
    padding: 0 1rem;
}

.pagination-ellipsis {
    color: var(--text-soft);
}

@media (max-width: 1200px) {
    .content-grid,
    .login-card {
        grid-template-columns: 1fr;
    }

    .login-form-panel {
        order: 1;
    }

    .login-brand {
        order: 2;
    }

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

    .trial-feature-list {
        grid-template-columns: 1fr;
    }

    .chart-card,
    .chart-card.compact {
        min-height: 330px;
    }

    .chart-stage,
    .chart-stage.small {
        height: 240px;
    }
}

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

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        width: min(320px, 86vw);
        z-index: 1050;
        transition: transform 0.22s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .app-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.42);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
        z-index: 1040;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .app-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .stats-grid,
    .stats-grid.compact,
    .detail-list {
        grid-template-columns: 1fr;
    }

    .content-panel {
        gap: 18px;
    }

    .chart-card,
    .chart-card.compact {
        min-height: 300px;
    }

    .chart-stage,
    .chart-stage.small {
        height: 210px;
        margin-top: 10px;
    }

    .hero-panel,
    .panel-card,
    .metric-card,
    .login-brand,
    .login-form-panel,
    .receipt-sheet {
        padding: 20px;
    }

    .section-header,
    .panel-head,
    .receipt-head,
    .receipt-total,
    .receipt-actions {
        align-items: flex-start;
    }

    .section-header .btn-gradient,
    .topbar .btn-outline-secondary {
        width: 100%;
    }

    .topbar-actions > * {
        width: 100%;
    }

    .topbar-chip,
    .topbar .btn-outline-secondary {
        justify-content: center;
    }

    .user-pill {
        justify-content: flex-start;
    }

    .pagination-shell,
    .pagination-nav {
        justify-content: center;
    }

    .modal-footer {
        gap: 10px;
    }

    .modal-footer > * {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 575px) {
    :root {
        --page-gutter: 14px;
    }

    .sidebar {
        width: min(320px, 90vw);
        padding: 22px 18px;
    }

    .topbar {
        gap: 14px;
    }

    .brand-mark,
    .login-icon {
        width: 46px;
        height: 46px;
    }

    .footer-bar {
        padding: 14px 16px;
        text-align: center;
    }

    .login-card {
        border-radius: 24px;
    }

    .login-page {
        display: block;
    }

    .login-brand h1 {
        font-size: clamp(1.45rem, 7vw, 1.95rem);
    }

    .soft-pills .nav-link {
        width: 100%;
        text-align: center;
    }

    .login-glow {
        display: none;
    }

    .receipt-sheet {
        padding: 18px;
        border-radius: 24px;
    }

    .receipt-code {
        font-size: clamp(1.1rem, 5.8vw, 1.35rem);
    }

    .receipt-total .amount {
        font-size: 1.35rem;
    }

    .receipt-actions > * {
        width: 100%;
    }

    .modal-dialog {
        margin: 0.75rem;
    }

    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        max-width: calc(100% - 1.5rem);
    }

    .modal-dialog-scrollable {
        height: calc(100dvh - 1.5rem);
    }

    .modal-dialog-scrollable .modal-content,
    .modal-dialog-scrollable .modal-content > form {
        max-height: 100%;
    }

    .modal-dialog-scrollable .modal-body {
        max-height: none;
    }

    .module-section-box {
        height: auto;
    }

    .module-check-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 2000px) {
    :root {
        --sidebar-width: 320px;
        --content-max-width: 2100px;
    }

    .chart-stage {
        height: 340px;
    }

    .chart-stage.small {
        height: 320px;
    }
}

@media (min-width: 3200px) {
    :root {
        --content-max-width: 2360px;
    }
}

@media print {
    body {
        background: #fff;
    }

    body * {
        visibility: hidden;
    }

    .receipt-preview-modal.show,
    .receipt-preview-modal.show * {
        visibility: visible;
    }

    .receipt-preview-modal.show {
        position: absolute;
        inset: 0;
        background: #fff;
    }

    .receipt-preview-modal .modal-dialog {
        max-width: 100%;
        margin: 0;
    }

    .receipt-preview-modal .modal-content,
    .receipt-preview-modal .modal-body {
        background: #fff;
        box-shadow: none;
    }

    .receipt-sheet {
        box-shadow: none;
        border: none;
    }
}
