/* =========================================================
   TARBIYA MINIMALISM ADMIN - app.css
   Design token, layout utama, dan komponen UI
   ========================================================= */

:root {
    --tm-primary: #112B3C;
    --tm-primary-soft: #E8F0F3;
    --tm-accent: #205375;
    --tm-accent-soft: #EAF2F6;
    --tm-background: #F5F7F8;
    --tm-surface: #FFFFFF;
    --tm-text: #1F2933;
    --tm-muted: #6B7280;
    --tm-border: #E5E7EB;
    --tm-success: #287D5A;
    --tm-warning: #B7791F;
    --tm-danger: #B54747;

    --tm-success-soft: #E6F2EC;
    --tm-warning-soft: #F7EEDD;
    --tm-danger-soft: #F6E7E7;

    --tm-radius: 10px;
    --tm-radius-sm: 8px;
    --tm-shadow: 0 1px 2px rgba(17, 43, 60, 0.05);
    --tm-shadow-md: 0 4px 12px rgba(17, 43, 60, 0.08);

    --tm-sidebar-w: 260px;
    --tm-topbar-h: 60px;

    --tm-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--tm-font);
    font-size: 14px;
    color: var(--tm-text);
    background: var(--tm-background);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--tm-text);
    font-weight: 600;
}

a {
    color: var(--tm-accent);
    text-decoration: none;
}

a:hover {
    color: var(--tm-primary);
}

:focus-visible {
    outline: 2px solid var(--tm-accent);
    outline-offset: 2px;
}

.tm-amount,
.tm-stat-value,
.tm-pos-display-value,
.tm-summary-value {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.tm-text-success { color: var(--tm-success); }
.tm-text-warning { color: var(--tm-warning); }
.tm-text-danger { color: var(--tm-danger); }
.tm-text-muted { color: var(--tm-muted); }

/* ---------- Layout utama ---------- */

.tm-app {
    min-height: 100vh;
}

.tm-main {
    min-height: 100vh;
    margin-left: var(--tm-sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tm-content {
    flex: 1;
    padding: 24px;
    min-width: 0;
}

.tm-content-flush {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--tm-topbar-h));
    overflow: hidden;
}

/* ---------- Sidebar ---------- */

.tm-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--tm-sidebar-w);
    background: var(--tm-surface);
    border-right: 1px solid var(--tm-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
}

.tm-sidebar-brand {
    height: var(--tm-topbar-h);
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--tm-border);
    flex-shrink: 0;
}

.tm-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tm-primary);
    min-width: 0;
}

.tm-brand-link:hover {
    color: var(--tm-primary);
}

.tm-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--tm-radius-sm);
    background: var(--tm-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.tm-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.tm-brand-text strong {
    font-size: 14px;
    letter-spacing: 0.06em;
}

.tm-brand-text small {
    font-size: 11px;
    color: var(--tm-muted);
    font-weight: 500;
}

.tm-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
}

.tm-nav-section {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tm-muted);
    padding: 14px 10px 6px;
}

.tm-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tm-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    margin-bottom: 2px;
    border-radius: var(--tm-radius-sm);
    color: var(--tm-muted);
    font-weight: 500;
    font-size: 13.5px;
    min-height: 40px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tm-nav-link i {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.tm-nav-link:hover {
    background: var(--tm-background);
    color: var(--tm-primary);
}

.tm-nav-link.active {
    background: var(--tm-primary-soft);
    color: var(--tm-accent);
    font-weight: 600;
}

.tm-nav-toggle {
    cursor: pointer;
}

.tm-nav-caret {
    width: auto !important;
    margin-left: auto;
    font-size: 13px !important;
    transition: transform 0.18s ease;
}

.tm-nav-toggle[aria-expanded="true"] .tm-nav-caret {
    transform: rotate(180deg);
}

.tm-nav-sub {
    padding-left: 22px;
}

.tm-nav-sublink {
    font-size: 13px;
    min-height: 34px;
    padding: 6px 10px;
}

.tm-nav-sublink i {
    font-size: 14px;
    width: 16px;
}

.tm-nav-sublink.active {
    background: transparent;
    color: var(--tm-accent);
    font-weight: 600;
}

.tm-sidebar-footer {
    border-top: 1px solid var(--tm-border);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tm-user-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.tm-user-mini-info {
    min-width: 0;
    line-height: 1.2;
}

.tm-user-mini-info strong {
    display: block;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-user-mini-info small {
    font-size: 11px;
    color: var(--tm-muted);
}

.tm-logout-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--tm-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tm-muted);
    flex-shrink: 0;
}

.tm-logout-btn:hover {
    background: var(--tm-danger-soft);
    color: var(--tm-danger);
}

.tm-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 43, 60, 0.45);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tm-sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* ---------- Avatar ---------- */

.tm-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--tm-primary-soft);
    color: var(--tm-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.tm-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 11.5px;
}

.tm-avatar-lg {
    width: 84px;
    height: 84px;
    font-size: 28px;
}

/* ---------- Topbar ---------- */

.tm-topbar {
    height: var(--tm-topbar-h);
    background: var(--tm-surface);
    border-bottom: 1px solid var(--tm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1020;
    flex-shrink: 0;
}

.tm-topbar-left,
.tm-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.tm-page-title {
    min-width: 0;
}

.tm-page-title h1 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-page-title small {
    font-size: 11.5px;
    color: var(--tm-muted);
}

.tm-icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-sm);
    background: var(--tm-surface);
    color: var(--tm-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.tm-icon-btn:hover {
    background: var(--tm-background);
    color: var(--tm-accent);
}

.tm-topbar-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--tm-muted);
    white-space: nowrap;
}

.tm-topbar-date strong {
    color: var(--tm-text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tm-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--tm-success-soft);
    color: var(--tm-success);
    white-space: nowrap;
}

.tm-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.tm-topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    padding: 4px;
    border-radius: var(--tm-radius-sm);
    color: var(--tm-text);
    font-size: 13px;
    font-weight: 500;
}

.tm-topbar-user:hover {
    background: var(--tm-background);
}

.tm-topbar-user .tm-user-label {
    line-height: 1.15;
    text-align: left;
}

.tm-topbar-user .tm-user-label small {
    display: block;
    font-size: 11px;
    color: var(--tm-muted);
    font-weight: 400;
}

.tm-dropdown-menu {
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow-md);
    padding: 6px;
    font-size: 13px;
}

.tm-dropdown-menu .dropdown-item {
    border-radius: 6px;
    padding: 8px 10px;
}

.tm-dropdown-menu .dropdown-item:hover,
.tm-dropdown-menu .dropdown-item:focus {
    background: var(--tm-accent-soft);
    color: var(--tm-accent);
}

.tm-dropdown-menu .dropdown-divider {
    border-color: var(--tm-border);
    margin: 6px 4px;
}

/* ---------- Page header ---------- */

.tm-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tm-page-header h2 {
    font-size: 20px;
    margin: 0 0 4px;
}

.tm-page-header p {
    margin: 0;
    color: var(--tm-muted);
    font-size: 13.5px;
}

.tm-page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- Panel / Card ---------- */

.tm-panel {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
}

.tm-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--tm-border);
    flex-wrap: wrap;
}

.tm-panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tm-panel-header h3 {
    font-size: 14.5px;
    margin: 0;
    font-weight: 600;
}

.tm-panel-header p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--tm-muted);
}

.tm-panel-body {
    padding: 18px;
}

.tm-panel-body-flush {
    padding: 0;
}

/* ---------- Stat cards ---------- */

.tm-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.tm-stat-card {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.tm-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tm-stat-label {
    font-size: 12.5px;
    color: var(--tm-muted);
    font-weight: 500;
}

.tm-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--tm-radius-sm);
    background: var(--tm-accent-soft);
    color: var(--tm-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.tm-stat-icon.is-primary {
    background: var(--tm-primary-soft);
    color: var(--tm-primary);
}

.tm-stat-icon.is-success {
    background: var(--tm-success-soft);
    color: var(--tm-success);
}

.tm-stat-icon.is-warning {
    background: var(--tm-warning-soft);
    color: var(--tm-warning);
}

.tm-stat-icon.is-danger {
    background: var(--tm-danger-soft);
    color: var(--tm-danger);
}

.tm-stat-value {
    font-size: 22px;
    line-height: 1.15;
    word-break: break-word;
}

.tm-stat-meta {
    font-size: 11.5px;
    color: var(--tm-muted);
}

/* ---------- Buttons ---------- */

.tm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--tm-radius-sm);
    padding: 9px 16px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    min-height: 40px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
}

.tm-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

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

.tm-btn-primary:hover:not(:disabled) {
    background: #0c1f2d;
    border-color: #0c1f2d;
    color: #fff;
}

.tm-btn-accent {
    background: var(--tm-accent);
    border-color: var(--tm-accent);
    color: #fff;
}

.tm-btn-accent:hover:not(:disabled) {
    background: #173f59;
    border-color: #173f59;
    color: #fff;
}

.tm-btn-outline {
    background: var(--tm-surface);
    border-color: var(--tm-border);
    color: var(--tm-text);
}

.tm-btn-outline:hover:not(:disabled) {
    background: var(--tm-background);
    border-color: var(--tm-muted);
    color: var(--tm-text);
}

.tm-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--tm-muted);
}

.tm-btn-ghost:hover:not(:disabled) {
    background: var(--tm-background);
    color: var(--tm-text);
}

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

.tm-btn-danger:hover:not(:disabled) {
    background: #9d3b3b;
    border-color: #9d3b3b;
    color: #fff;
}

.tm-btn-sm {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 12.5px;
}

.tm-btn-lg {
    min-height: 52px;
    padding: 14px 22px;
    font-size: 15.5px;
    border-radius: var(--tm-radius);
}

.tm-btn-block {
    width: 100%;
}

.tm-btn-pay {
    background: var(--tm-primary);
    border-color: var(--tm-primary);
    color: #fff;
    font-size: 16px;
    letter-spacing: 0.04em;
    min-height: 56px;
}

.tm-btn-pay:hover:not(:disabled) {
    background: var(--tm-accent);
    border-color: var(--tm-accent);
    color: #fff;
}

.tm-btn-icon {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 8px;
}

/* ---------- Badges ---------- */

.tm-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.tm-badge-success {
    background: var(--tm-success-soft);
    color: var(--tm-success);
}

.tm-badge-warning {
    background: var(--tm-warning-soft);
    color: var(--tm-warning);
}

.tm-badge-danger {
    background: var(--tm-danger-soft);
    color: var(--tm-danger);
}

.tm-badge-neutral {
    background: var(--tm-primary-soft);
    color: var(--tm-primary);
}

.tm-badge-accent {
    background: var(--tm-accent-soft);
    color: var(--tm-accent);
}

.tm-badge-muted {
    background: var(--tm-background);
    color: var(--tm-muted);
}

/* ---------- Toolbar / Form ---------- */

.tm-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--tm-border);
}

.tm-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 340px;
}

.tm-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tm-muted);
    pointer-events: none;
}

.tm-search .form-control {
    padding-left: 36px;
}

.tm-search-sm {
    max-width: 240px;
}

.tm-toolbar-plain {
    border-bottom: none;
    padding: 0;
}

.tm-filter-label {
    font-size: 12px;
    color: var(--tm-muted);
    margin-bottom: 4px;
}

.tm-select-md {
    max-width: 170px;
}

.tm-select-sm {
    max-width: 160px;
}

.form-control,
.form-select {
    border-color: var(--tm-border);
    border-radius: var(--tm-radius-sm);
    font-size: 13.5px;
    color: var(--tm-text);
    background-color: var(--tm-surface);
    min-height: 40px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tm-accent);
    box-shadow: 0 0 0 3px rgba(32, 83, 117, 0.15);
    color: var(--tm-text);
}

.form-control::placeholder {
    color: #9CA3AF;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--tm-text);
    margin-bottom: 6px;
}

.form-check-input {
    border-color: var(--tm-muted);
}

.form-check-input:checked {
    background-color: var(--tm-accent);
    border-color: var(--tm-accent);
}

.form-check-input:focus {
    border-color: var(--tm-accent);
    box-shadow: 0 0 0 3px rgba(32, 83, 117, 0.15);
}

/* ---------- Table ---------- */

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

.tm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 640px;
}

.tm-table th,
.tm-table td {
    padding: 12px 18px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--tm-border);
    white-space: nowrap;
}

.tm-table th {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tm-muted);
    background: #FAFBFC;
}

.tm-table tbody tr:last-child td {
    border-bottom: none;
}

.tm-table tbody tr:hover td {
    background: #FAFCFD;
}

.tm-table td.tm-amount,
.tm-table th.tm-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.tm-table-empty {
    display: none;
    padding: 40px 18px;
}

.tm-table-empty.show {
    display: block;
}

/* ---------- Pagination ---------- */

.tm-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid var(--tm-border);
    flex-wrap: wrap;
}

.tm-pagination-info {
    font-size: 12.5px;
    color: var(--tm-muted);
}

.tm-pagination-list {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tm-page-link {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--tm-border);
    border-radius: 8px;
    background: var(--tm-surface);
    color: var(--tm-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
}

.tm-page-link:hover {
    background: var(--tm-background);
    color: var(--tm-accent);
}

.tm-page-link.active {
    background: var(--tm-primary);
    border-color: var(--tm-primary);
    color: #fff;
}

/* ---------- Summary strips / chart ---------- */

.tm-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.tm-summary-item {
    background: var(--tm-background);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-sm);
    padding: 12px 14px;
}

.tm-summary-item span {
    display: block;
    font-size: 12px;
    color: var(--tm-muted);
    margin-bottom: 4px;
}

.tm-summary-item strong {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tm-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 180px;
    padding-top: 8px;
}

.tm-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    height: 100%;
    min-width: 0;
}

.tm-chart-bar {
    width: 100%;
    max-width: 42px;
    height: var(--h, 40%);
    background: var(--tm-accent-soft);
    border: 1px solid #D5E4EC;
    border-radius: 6px 6px 3px 3px;
    position: relative;
}

.tm-chart-bar.is-highlight {
    background: var(--tm-accent);
    border-color: var(--tm-accent);
}

.tm-chart-label {
    font-size: 11px;
    color: var(--tm-muted);
    white-space: nowrap;
}

.tm-chart-value {
    font-size: 10.5px;
    color: var(--tm-accent);
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Empty state ---------- */

.tm-empty-state {
    text-align: center;
    padding: 44px 20px;
    color: var(--tm-muted);
}

.tm-empty-state i {
    font-size: 34px;
    color: var(--tm-border);
    display: block;
    margin-bottom: 10px;
}

.tm-empty-state strong {
    display: block;
    color: var(--tm-text);
    font-size: 14.5px;
    margin-bottom: 4px;
}

.tm-empty-state p {
    margin: 0;
    font-size: 13px;
}

/* ---------- Tabs (custom) ---------- */

.tm-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--tm-border);
    padding: 0 18px;
}

.tm-tab {
    border: none;
    background: transparent;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tm-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    min-height: 44px;
}

.tm-tab:hover {
    color: var(--tm-primary);
}

.tm-tab.active {
    color: var(--tm-accent);
    border-bottom-color: var(--tm-accent);
}

/* =========================================================
   POS
   ========================================================= */

.tm-pos {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
    gap: 16px;
    padding: 16px;
    height: 100%;
    overflow: hidden;
}

.tm-pos-input,
.tm-pos-side {
    min-width: 0;
    min-height: 0;
}

.tm-pos-input {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.tm-pos-side {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.tm-pos-display {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    padding: 20px 22px;
    text-align: center;
}

.tm-pos-display-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tm-muted);
    margin-bottom: 8px;
}

.tm-pos-display-value {
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.1;
    color: var(--tm-primary);
    word-break: break-all;
}

.tm-pos-display-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--tm-muted);
    flex-wrap: wrap;
}

.tm-kbd {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid var(--tm-border);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--tm-background);
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--tm-muted);
}

.tm-numpad-card {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    overflow: hidden;
}

.tm-numpad-tabs {
    display: flex;
    border-bottom: 1px solid var(--tm-border);
}

.tm-numpad-tab {
    flex: 1;
    border: none;
    background: var(--tm-background);
    padding: 12px 10px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tm-muted);
    cursor: pointer;
    min-height: 46px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tm-numpad-tab + .tm-numpad-tab {
    border-left: 1px solid var(--tm-border);
}

.tm-numpad-tab:hover {
    color: var(--tm-primary);
}

.tm-numpad-tab.active {
    background: var(--tm-surface);
    color: var(--tm-accent);
    border-bottom-color: var(--tm-accent);
}

.tm-numpad-panel {
    padding: 12px;
}

.tm-numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tm-numpad-grid.tm-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.tm-numpad-key {
    border: 1px solid var(--tm-border);
    background: var(--tm-surface);
    border-radius: var(--tm-radius-sm);
    min-height: 58px;
    font-family: inherit;
    font-size: 20px;
    font-weight: 600;
    color: var(--tm-text);
    cursor: pointer;
    transition: background-color 0.1s ease, border-color 0.1s ease;
    font-variant-numeric: tabular-nums;
    padding: 8px;
}

.tm-numpad-key:hover {
    background: var(--tm-accent-soft);
    border-color: #C9DDE8;
    color: var(--tm-accent);
}

.tm-numpad-key:active {
    background: var(--tm-primary-soft);
}

.tm-numpad-key.is-util {
    background: var(--tm-background);
    font-size: 17px;
    color: var(--tm-muted);
}

.tm-numpad-key.is-util:hover {
    background: var(--tm-danger-soft);
    border-color: #E8CFCF;
    color: var(--tm-danger);
}

.tm-numpad-key.is-nominal {
    font-size: 16px;
    font-weight: 700;
}

/* Panel pembayaran */

.tm-pay-panel {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tm-pay-panel-sticky {
    position: sticky;
    top: 0;
}

.tm-pay-summary {
    background: var(--tm-background);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-sm);
    padding: 14px 16px;
}

.tm-pay-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13.5px;
    color: var(--tm-muted);
}

.tm-pay-summary-row + .tm-pay-summary-row {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed var(--tm-border);
}

.tm-pay-summary-row strong {
    color: var(--tm-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tm-pay-total {
    font-size: 24px;
    color: var(--tm-primary);
}

.tm-section-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tm-muted);
    margin-bottom: 10px;
    display: block;
}

.tm-pay-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tm-pay-method {
    margin: 0;
    cursor: pointer;
}

.tm-pay-method input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.tm-pay-method-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 84px;
    padding: 12px 8px;
    border: 1.5px solid var(--tm-border);
    border-radius: var(--tm-radius);
    background: var(--tm-surface);
    color: var(--tm-muted);
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.tm-pay-method-inner i {
    font-size: 24px;
}

.tm-pay-method:hover .tm-pay-method-inner {
    border-color: #C9DDE8;
    background: var(--tm-accent-soft);
    color: var(--tm-accent);
}

.tm-pay-method input:checked + .tm-pay-method-inner {
    border-color: var(--tm-accent);
    background: var(--tm-accent-soft);
    color: var(--tm-accent);
    box-shadow: inset 0 0 0 1px var(--tm-accent);
}

.tm-pay-method input:focus-visible + .tm-pay-method-inner {
    outline: 2px solid var(--tm-accent);
    outline-offset: 2px;
}

/* RFID box */

.tm-rfid {
    border: 1.5px dashed var(--tm-border);
    border-radius: var(--tm-radius);
    background: var(--tm-background);
    padding: 18px 14px;
    text-align: center;
}

.tm-rfid-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--tm-accent);
}

.tm-rfid-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--tm-text);
}

.tm-rfid-status {
    font-size: 12.5px;
    color: var(--tm-muted);
    margin-top: 4px;
    min-height: 18px;
}

.tm-rfid-cardno {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tm-accent);
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
    display: none;
}

.tm-rfid[data-state="reading"] {
    border-color: var(--tm-accent);
    background: var(--tm-accent-soft);
}

.tm-rfid[data-state="reading"] .tm-rfid-icon {
    border-color: var(--tm-accent);
    animation: tm-pulse 1s ease-in-out infinite;
}

.tm-rfid[data-state="reading"] .tm-rfid-status {
    color: var(--tm-accent);
    font-weight: 600;
}

.tm-rfid[data-state="success"] {
    border-style: solid;
    border-color: var(--tm-success);
    background: var(--tm-success-soft);
}

.tm-rfid[data-state="success"] .tm-rfid-icon {
    color: var(--tm-success);
    border-color: var(--tm-success);
}

.tm-rfid[data-state="success"] .tm-rfid-status {
    color: var(--tm-success);
    font-weight: 600;
}

.tm-rfid[data-state="success"] .tm-rfid-cardno {
    display: block;
}

.tm-rfid-balance {
    display: none;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tm-success);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

.tm-rfid[data-state="success"] .tm-rfid-balance {
    display: block;
}

.tm-rfid[data-state="failed"] {
    border-style: solid;
    border-color: var(--tm-danger);
    background: var(--tm-danger-soft);
}

.tm-rfid[data-state="failed"] .tm-rfid-icon {
    color: var(--tm-danger);
    border-color: var(--tm-danger);
}

.tm-rfid[data-state="failed"] .tm-rfid-status {
    color: var(--tm-danger);
    font-weight: 600;
}

@keyframes tm-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.tm-rfid-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.tm-rfid-scenario {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--tm-border);
    text-align: left;
}

.tm-rfid-scenario label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tm-muted);
    margin-bottom: 4px;
}

.tm-rfid-scenario .form-select {
    min-height: 34px;
    font-size: 12.5px;
    padding-top: 5px;
    padding-bottom: 5px;
}

/* =========================================================
   POS Advance: produk & cart
   ========================================================= */

.tm-pos-products {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    overflow: hidden;
}

.tm-product-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tm-chip {
    border: 1px solid var(--tm-border);
    background: var(--tm-surface);
    color: var(--tm-muted);
    border-radius: 999px;
    padding: 7px 14px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
}

.tm-chip:hover {
    background: var(--tm-accent-soft);
    border-color: #C9DDE8;
    color: var(--tm-accent);
}

.tm-chip.active {
    background: var(--tm-primary);
    border-color: var(--tm-primary);
    color: #fff;
}

.tm-product-grid-wrap {
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
}

.tm-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.tm-product-card {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    padding: 14px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 118px;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.tm-product-card:hover {
    border-color: var(--tm-accent);
    box-shadow: var(--tm-shadow-md);
}

.tm-product-card:active {
    background: var(--tm-accent-soft);
}

.tm-product-card .tm-product-cat {
    font-size: 11px;
    font-weight: 600;
    color: var(--tm-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tm-product-card .tm-product-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--tm-text);
    line-height: 1.3;
    flex: 1;
}

.tm-product-card .tm-product-price {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--tm-accent);
    font-variant-numeric: tabular-nums;
}

.tm-product-card .tm-product-stock {
    font-size: 11px;
    color: var(--tm-muted);
}

/* Cart */

.tm-cart {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    overflow-y: auto;
}

.tm-cart-list {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 160px;
    max-height: 34vh;
}

.tm-cart-items {
    overflow-y: auto;
    flex: 1;
}

.tm-cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--tm-border);
    align-items: center;
}

.tm-cart-item:last-child {
    border-bottom: none;
}

.tm-cart-item-name {
    font-size: 13.5px;
    font-weight: 600;
    margin: 0;
}

.tm-cart-item-price {
    font-size: 12px;
    color: var(--tm-muted);
    font-variant-numeric: tabular-nums;
}

.tm-cart-item-sub {
    font-size: 14px;
    font-weight: 700;
    color: var(--tm-primary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tm-qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    grid-column: 1 / -1;
    justify-content: space-between;
}

.tm-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--tm-background);
    border: 1px solid var(--tm-border);
    border-radius: 8px;
    padding: 3px;
}

.tm-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--tm-surface);
    color: var(--tm-primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tm-qty-btn:hover {
    background: var(--tm-accent-soft);
    color: var(--tm-accent);
}

.tm-qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tm-cart-item-remove {
    border: none;
    background: transparent;
    color: var(--tm-muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

.tm-cart-item-remove:hover {
    background: var(--tm-danger-soft);
    color: var(--tm-danger);
}

/* =========================================================
   Login
   ========================================================= */

.tm-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: var(--tm-surface);
}

.tm-login-brand {
    background: var(--tm-primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.tm-login-brand::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -80px;
    width: 280px;
    height: 280px;
    border: 40px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.tm-login-brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.tm-login-brand-top .tm-brand-icon {
    background: rgba(255, 255, 255, 0.12);
    width: 42px;
    height: 42px;
    font-size: 20px;
}

.tm-login-brand-top .tm-brand-text strong {
    font-size: 16px;
    color: #fff;
}

.tm-login-brand-top .tm-brand-text small {
    color: rgba(255, 255, 255, 0.65);
}

.tm-login-brand-body {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.tm-login-brand-body h1 {
    color: #fff;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.25;
}

.tm-login-brand-body p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0 0 24px;
}

.tm-login-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.tm-login-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.85);
}

.tm-login-features li i {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.tm-login-brand-footer {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.tm-login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: var(--tm-background);
}

.tm-login-card {
    width: 100%;
    max-width: 400px;
}

.tm-login-mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.tm-login-card h2 {
    font-size: 22px;
    margin: 0 0 6px;
}

.tm-login-card > p {
    color: var(--tm-muted);
    font-size: 13.5px;
    margin: 0 0 24px;
}

.tm-login-form .form-group {
    margin-bottom: 16px;
}

.tm-input-icon {
    position: relative;
}

.tm-input-icon i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tm-muted);
    font-size: 15px;
    pointer-events: none;
}

.tm-input-icon .form-control {
    padding-left: 40px;
    min-height: 46px;
}

.tm-login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    flex-wrap: wrap;
}

.tm-login-meta .form-check-input {
    margin-right: 6px;
}

.tm-login-note {
    margin-top: 18px;
    text-align: center;
    font-size: 12.5px;
    color: var(--tm-muted);
}

/* =========================================================
   Receipt modal
   ========================================================= */

.tm-receipt-dialog {
    max-width: 380px;
}

.tm-receipt {
    border: none;
    border-radius: var(--tm-radius);
    overflow: hidden;
}

.tm-receipt-success {
    background: var(--tm-success-soft);
    color: var(--tm-success);
    text-align: center;
    padding: 16px;
    font-weight: 700;
    font-size: 14.5px;
}

.tm-receipt-success i {
    display: block;
    font-size: 26px;
    margin-bottom: 4px;
}

.tm-receipt-body {
    padding: 20px 22px;
    font-size: 13px;
}

.tm-receipt-head {
    text-align: center;
    margin-bottom: 14px;
}

.tm-receipt-head strong {
    display: block;
    font-size: 15px;
    letter-spacing: 0.08em;
    color: var(--tm-primary);
}

.tm-receipt-head span {
    font-size: 12px;
    color: var(--tm-muted);
}

.tm-receipt-meta {
    display: grid;
    gap: 4px;
    font-size: 12.5px;
    margin-bottom: 12px;
}

.tm-receipt-meta div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.tm-receipt-meta span:first-child {
    color: var(--tm-muted);
}

.tm-receipt-meta span:last-child {
    font-weight: 600;
    text-align: right;
}

.tm-receipt-rule {
    border: none;
    border-top: 1px dashed var(--tm-border);
    margin: 10px 0;
}

.tm-receipt-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    margin-bottom: 8px;
    font-size: 12.5px;
}

.tm-receipt-item-name {
    font-weight: 600;
}

.tm-receipt-item-amount {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tm-receipt-item-qty {
    color: var(--tm-muted);
    font-size: 11.5px;
}

.tm-receipt-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tm-receipt-total span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.tm-receipt-total strong {
    font-size: 19px;
    color: var(--tm-primary);
    font-variant-numeric: tabular-nums;
}

.tm-receipt-method {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
}

.tm-receipt-method span:first-child {
    color: var(--tm-muted);
}

.tm-receipt-method span:last-child {
    font-weight: 700;
    color: var(--tm-accent);
}

.tm-receipt-thanks {
    text-align: center;
    font-size: 12.5px;
    color: var(--tm-muted);
    margin: 0;
}

.tm-receipt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 22px 20px;
}

/* =========================================================
   Modal PIN Kartu
   ========================================================= */

.tm-pin-dialog {
    max-width: 340px;
}

.tm-pin-head {
    text-align: center;
    padding: 22px 20px 0;
}

.tm-pin-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--tm-accent-soft);
    color: var(--tm-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 10px;
}

.tm-pin-title {
    font-size: 16px;
    margin: 0 0 4px;
}

.tm-pin-head p {
    font-size: 12.5px;
    color: var(--tm-muted);
    margin: 0;
}

.tm-pin-total {
    display: inline-block;
    margin-top: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tm-primary);
    font-variant-numeric: tabular-nums;
    background: var(--tm-background);
    border: 1px solid var(--tm-border);
    border-radius: 8px;
    padding: 5px 12px;
}

.tm-pin-body {
    padding: 16px 20px 4px;
}

.tm-pin-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.tm-pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--tm-border);
    background: var(--tm-surface);
}

.tm-pin-dot.is-filled {
    background: var(--tm-primary);
    border-color: var(--tm-primary);
}

.tm-pin-display.is-error .tm-pin-dot {
    border-color: var(--tm-danger);
    background: var(--tm-danger-soft);
    animation: tm-shake 0.3s ease;
}

.tm-pin-error {
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tm-danger);
    min-height: 18px;
    margin-bottom: 8px;
}

.tm-pin-pad {
    padding: 0;
}

.tm-pin-pad .tm-numpad-key {
    min-height: 50px;
    font-size: 18px;
}

.tm-pin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 20px 8px;
}

.tm-pin-actions.is-single {
    grid-template-columns: 1fr;
}

.tm-pin-hint {
    text-align: center;
    font-size: 11.5px;
    color: var(--tm-muted);
    padding-bottom: 18px;
}

@keyframes tm-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* =========================================================
   Profile
   ========================================================= */

.tm-profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    flex-wrap: wrap;
}

.tm-profile-hero-info h2 {
    font-size: 19px;
    margin: 0 0 6px;
}

.tm-profile-hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tm-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tm-info-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--tm-border);
    font-size: 13.5px;
}

.tm-info-list li:last-child {
    border-bottom: none;
}

.tm-info-list .tm-info-label {
    color: var(--tm-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tm-info-list .tm-info-value {
    font-weight: 600;
    text-align: right;
}

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

.tm-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-sm);
    background: var(--tm-surface);
}

.tm-settings-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tm-settings-item-left .tm-stat-icon {
    flex-shrink: 0;
}

.tm-settings-item-left strong {
    display: block;
    font-size: 13.5px;
}

.tm-settings-item-left small {
    color: var(--tm-muted);
    font-size: 12px;
}

/* ---------- Toast custom ---------- */

.tm-modal {
    border-radius: 12px;
}

.tm-toast-container {
    position: fixed;
    top: 74px;
    right: 16px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(360px, calc(100vw - 32px));
}

.tm-toast-item {
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-left: 4px solid var(--tm-accent);
    border-radius: var(--tm-radius-sm);
    box-shadow: var(--tm-shadow-md);
    padding: 12px 14px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: tm-toast-in 0.2s ease;
}

.tm-toast-item.is-success { border-left-color: var(--tm-success); }
.tm-toast-item.is-success i { color: var(--tm-success); }
.tm-toast-item.is-danger { border-left-color: var(--tm-danger); }
.tm-toast-item.is-danger i { color: var(--tm-danger); }
.tm-toast-item.is-warning { border-left-color: var(--tm-warning); }
.tm-toast-item.is-warning i { color: var(--tm-warning); }
.tm-toast-item.is-info i { color: var(--tm-accent); }

.tm-toast-item i {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.tm-toast-close {
    margin-left: auto;
    border: none;
    background: transparent;
    color: var(--tm-muted);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 0 0 0 6px;
}

@keyframes tm-toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Print struk ---------- */

@media print {
    body * {
        visibility: hidden;
    }

    #receiptModal,
    #receiptModal * {
        visibility: visible;
    }

    #receiptModal {
        position: absolute;
        inset: 0;
    }

    #receiptModal .tm-receipt-actions,
    #receiptModal .modal-backdrop {
        display: none !important;
    }
}

/* ---------- Cek Wallet ---------- */

.tm-search-md {
    max-width: 460px;
    flex: 1;
    min-width: 240px;
}

.tm-cek-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.tm-cek-form .tm-search {
    max-width: 460px;
}

.tm-cek-form .tm-btn {
    min-height: 40px;
}

.tm-cek-hint {
    margin: 12px 0 0;
    font-size: 12.5px;
    color: var(--tm-muted);
}

.tm-cek-hint code {
    background: var(--tm-background);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-sm);
    padding: 2px 7px;
    font-size: 12px;
    color: var(--tm-text);
    margin-right: 4px;
}

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

.tm-card-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.tm-card-head p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--tm-muted);
}

.tm-subtitle {
    margin: 22px 0 10px;
    font-size: 14px;
    font-weight: 700;
}

.tm-limit-block {
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--tm-background);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
}

.tm-limit-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--tm-muted);
    margin-bottom: 10px;
}

.tm-limit-head strong {
    color: var(--tm-text);
    font-weight: 600;
}

.tm-progress {
    height: 8px;
    background: var(--tm-border);
    border-radius: 999px;
    overflow: hidden;
}

.tm-progress-bar {
    height: 100%;
    background: var(--tm-accent);
    border-radius: 999px;
}


/* =========================================================
   Form pengaturan (switch & label)
   ========================================================= */

.tm-form .form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tm-muted);
    margin-bottom: 6px;
}

.tm-form .form-check-input:checked {
    background-color: var(--tm-accent);
    border-color: var(--tm-accent);
}

.tm-form .form-check-input:focus {
    border-color: var(--tm-accent);
    box-shadow: 0 0 0 0.2rem rgba(32, 83, 117, 0.18);
}

.tm-form .form-check-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tm-text);
}


/* =========================================================
   Progress bar scroll & tombol kembali ke atas
   ========================================================= */

.tm-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--tm-border);
    overflow: hidden;
    z-index: 2050;
}

.tm-scroll-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, var(--tm-primary), var(--tm-accent), var(--tm-success));
    background-size: 200% 100%;
    transition: width 0.15s ease-out;
    animation: tm-scroll-shimmer 2.4s linear infinite;
}

@keyframes tm-scroll-shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.tm-scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--tm-border);
    background: var(--tm-surface);
    color: var(--tm-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--tm-shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.9);
    transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.2s;
    z-index: 2040;
}

.tm-scroll-top:hover {
    background: var(--tm-accent);
    border-color: var(--tm-accent);
    color: var(--tm-surface);
}

.tm-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.tm-scroll-top:focus-visible {
    outline: 2px solid var(--tm-accent);
    outline-offset: 3px;
}


/* =========================================================
   Halaman detail blog (artikel + daftar isi)
   ========================================================= */

.tm-blog-cover {
    border-radius: var(--tm-radius);
    background: linear-gradient(135deg, var(--tm-primary) 0%, var(--tm-accent) 60%, var(--tm-success) 160%);
    color: #fff;
    padding: 36px 32px;
    margin-bottom: 24px;
    box-shadow: var(--tm-shadow-md);
}

.tm-blog-kicker {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 14px;
}

.tm-blog-cover h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 14px;
    line-height: 1.3;
}

.tm-blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.86);
}

.tm-blog-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tm-blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tm-blog-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--tm-accent);
    background: var(--tm-accent-soft);
    border: 1px solid var(--tm-border);
    border-radius: 999px;
    padding: 4px 12px;
}

.tm-blog-body {
    font-size: 15px;
    line-height: 1.75;
    color: var(--tm-text);
}

.tm-blog-body h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--tm-primary);
    margin: 34px 0 12px;
    scroll-margin-top: 76px;
}

.tm-blog-body h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: var(--tm-accent);
    margin: 26px 0 8px;
    scroll-margin-top: 76px;
}

.tm-blog-body p {
    margin-bottom: 14px;
    color: #374151;
}

.tm-blog-body ul,
.tm-blog-body ol {
    margin-bottom: 16px;
    padding-left: 22px;
}

.tm-blog-body li {
    margin-bottom: 6px;
}

.tm-blog-quote {
    border-left: 3px solid var(--tm-accent);
    background: var(--tm-accent-soft);
    border-radius: 0 var(--tm-radius-sm) var(--tm-radius-sm) 0;
    padding: 14px 18px;
    font-size: 14.5px;
    color: var(--tm-accent);
    margin: 18px 0;
}

.tm-blog-quote strong {
    display: block;
    margin-bottom: 4px;
}

.tm-blog-divider {
    height: 1px;
    background: var(--tm-border);
    border: 0;
    margin: 26px 0;
}

.tm-blog-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tm-blog-toc {
    position: sticky;
    top: calc(var(--tm-topbar-h) + 16px);
}

.tm-blog-toc-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--tm-muted);
    margin-bottom: 10px;
}

.tm-blog-toc-progress strong {
    color: var(--tm-accent);
    font-variant-numeric: tabular-nums;
}

.tm-blog-toc-link {
    display: block;
    font-size: 13.5px;
    color: var(--tm-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-left: 2px solid var(--tm-border);
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, padding 0.18s ease;
}

.tm-blog-toc-link:hover {
    color: var(--tm-accent);
    background: var(--tm-accent-soft);
}

.tm-blog-toc-link.is-active {
    color: var(--tm-accent);
    font-weight: 600;
    background: var(--tm-accent-soft);
    border-left-color: var(--tm-accent);
    padding-left: 16px;
}

.tm-blog-next {
    border: 1px dashed var(--tm-border);
    border-radius: var(--tm-radius);
    padding: 16px 18px;
    color: var(--tm-muted);
    font-size: 13.5px;
}

.tm-blog-next strong {
    display: block;
    color: var(--tm-text);
    font-size: 14.5px;
    margin-bottom: 4px;
}
/* =========================================================
   Resume Penerimaan POS
   ========================================================= */

.tm-resume-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 18px;
}

.tm-range-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--tm-background);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-sm);
}

.tm-range-btn {
    border: none;
    background: transparent;
    border-radius: 6px;
    padding: 7px 14px;
    min-height: 38px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--tm-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.tm-range-btn:hover {
    color: var(--tm-primary);
}

.tm-range-btn.active {
    background: var(--tm-surface);
    color: var(--tm-primary);
    box-shadow: var(--tm-shadow);
}

.tm-range-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--tm-muted);
}

.tm-range-label i {
    color: var(--tm-accent);
}

.tm-range-label[hidden] {
    display: none;
}

.tm-resume-date {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.tm-date-prefix {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tm-muted);
    white-space: nowrap;
}

.tm-resume-date .form-control {
    width: 158px;
    font-size: 13px;
    font-weight: 600;
}

.tm-resume-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.tm-resume-filters .form-select {
    width: auto;
    min-width: 150px;
    flex: 0 0 auto;
}

.tm-resume-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 16px;
    margin-bottom: 16px;
}

.tm-cashier-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tm-cashier-cell > div {
    min-width: 0;
}

.tm-cashier-cell-lg {
    gap: 14px;
}

.tm-cashier-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--tm-text);
    flex-wrap: wrap;
}

.tm-cashier-meta {
    font-size: 12px;
    color: var(--tm-muted);
    margin-top: 2px;
}

.tm-table tfoot td {
    background: #FAFBFC;
    font-weight: 700;
    font-size: 12.5px;
    border-top: 1px solid var(--tm-border);
    border-bottom: none;
    color: var(--tm-text);
}

.tm-method-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tm-method-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tm-method-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--tm-text);
}

.tm-method-name i {
    color: var(--tm-accent);
    font-size: 15px;
}

.tm-method-value {
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tm-method-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 7px;
}

.tm-method-sub .tm-progress {
    flex: 1;
}

.tm-method-share {
    min-width: 44px;
    text-align: right;
    font-size: 11.5px;
    color: var(--tm-muted);
    font-variant-numeric: tabular-nums;
}

.tm-progress-bar.is-cash {
    background: var(--tm-success);
}

.tm-progress-bar.is-qris {
    background: var(--tm-accent);
}

.tm-progress-bar.is-rfid {
    background: var(--tm-primary);
}

.tm-progress-bar.is-transfer {
    background: var(--tm-warning);
}

.tm-method-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--tm-border);
    font-size: 13px;
    color: var(--tm-muted);
}

.tm-method-total strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--tm-text);
    font-variant-numeric: tabular-nums;
}

.tm-resume-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    color: var(--tm-muted);
}

.tm-resume-note i {
    color: var(--tm-accent);
    margin-top: 1px;
}

.tm-detail-period {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--tm-muted);
}

.tm-detail-summary {
    margin: 18px 0 4px;
}

.tm-resume-table th,
.tm-resume-table td {
    padding-left: 12px;
    padding-right: 12px;
}

.tm-resume-table th:first-child,
.tm-resume-table td:first-child {
    padding-left: 18px;
}

.tm-resume-table th:last-child,
.tm-resume-table td:last-child {
    padding-right: 18px;
}

.tm-table-scroll-hint {
    display: none;
    margin: 0;
    padding: 10px 18px 0;
    font-size: 11.5px;
    color: var(--tm-muted);
}

.tm-table-scroll-hint i {
    margin-right: 4px;
}

/* =========================================================
   BERANDA / DASHBOARD
   ========================================================= */

.tm-welcome {
    position: relative;
    overflow: hidden;
    border-radius: var(--tm-radius);
    background: linear-gradient(120deg, var(--tm-primary) 0%, var(--tm-accent) 100%);
    color: #fff;
    padding: 22px 24px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tm-welcome::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.tm-welcome-body {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.tm-welcome-greeting {
    font-size: 22px;
    margin: 0 0 4px;
    color: #fff;
}

.tm-welcome-sub {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
}

.tm-welcome-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tm-welcome-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 11.5px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
}

.tm-welcome-meta {
    position: relative;
    z-index: 1;
    text-align: right;
}

.tm-welcome-clock {
    display: block;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

.tm-welcome-date {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.82);
}

.tm-section-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tm-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
}

.tm-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.tm-quick-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--tm-surface);
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius);
    padding: 14px 16px;
    color: var(--tm-text);
    box-shadow: var(--tm-shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.tm-quick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tm-shadow-md);
    border-color: var(--tm-accent);
    color: var(--tm-text);
}

.tm-quick-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--tm-radius-sm);
    background: var(--tm-accent-soft);
    color: var(--tm-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.tm-quick-icon.is-primary { background: var(--tm-primary-soft); color: var(--tm-primary); }
.tm-quick-icon.is-success { background: var(--tm-success-soft); color: var(--tm-success); }
.tm-quick-icon.is-warning { background: var(--tm-warning-soft); color: var(--tm-warning); }
.tm-quick-icon.is-danger  { background: var(--tm-danger-soft);  color: var(--tm-danger); }

.tm-quick-text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
}

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

@media (max-width: 575.98px) {
    .tm-welcome-meta {
        text-align: left;
    }
}

/* ---------- Struk POS: ukuran kertas & font ---------- */

.tm-receipt.is-paper-58 { max-width: 300px; }
.tm-receipt.is-paper-80 { max-width: 340px; }
.tm-receipt.is-font-small { font-size: 11px; }
.tm-receipt.is-font-normal { font-size: 13px; }
.tm-receipt.is-font-large { font-size: 15px; }
