/**
 * EggLedger Premium — classy UI layer (v1.7.1)
 * Loaded after style.css + polish.css
 */

:root {
    --premium-gold: #c9a227;
    --premium-gold-light: #f5e6b8;
    --premium-ink: #1a2e1b;
    --premium-surface: #ffffff;
    --premium-muted: #6b7c6c;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --shadow-premium: 0 1px 2px rgba(15, 45, 16, 0.04), 0 8px 24px rgba(15, 45, 16, 0.06);
    --shadow-premium-lg: 0 4px 6px rgba(15, 45, 16, 0.04), 0 20px 40px rgba(15, 45, 16, 0.08);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(180deg, #eef2ee 0%, #f5f7f5 120px, #f0f3f0 100%);
    background-attachment: fixed;
}

/* ——— Sidebar ——— */
.sidebar {
    background: linear-gradient(185deg, #0f2d10 0%, #1a3d1c 45%, #1e4620 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-brand {
    padding: 22px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.sidebar-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--premium-gold), transparent);
    opacity: 0.5;
}

.sidebar-brand .brand-text {
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 15px;
}

.nav-item {
    margin: 2px 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 500;
    transition: background 0.2s, transform 0.15s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.14);
    border-left: none;
    box-shadow: inset 3px 0 0 var(--premium-gold);
}

.nav-section {
    font-weight: 600;
    letter-spacing: 0.1em;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.38);
}

/* ——— Header ——— */
.top-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(30, 70, 32, 0.08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.page-title {
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--premium-ink);
}

.company-tag {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-dark);
    background: #eef5ee;
    border: 1px solid #d4e8d4;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.role-badge {
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, #1e4620, #2c5f2d);
    color: #fff;
    border-radius: 6px;
}

.role-badge--business {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
}

.role-badge--owner {
    background: linear-gradient(135deg, #a88620, #c9a227);
    color: #1a1510;
}

.role-badge--staff {
    background: #6b7280;
}

.profile-dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px 16px;
    margin: 0;
}
.profile-dl dt {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--premium-muted, #6b7280);
}
.profile-dl dd {
    margin: 0;
}
.profile-login-box {
    margin-top: 18px;
    padding: 12px;
    background: #f8f6f0;
    border-radius: 10px;
}
.profile-login-box label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--premium-muted);
}

.dash-admin-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.dash-admin-shortcut {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dash-admin-shortcut:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-premium);
}
.dash-admin-shortcut strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.dash-admin-shortcut span {
    font-size: 0.78rem;
    opacity: 0.85;
}
.dash-admin-shortcut--business {
    background: linear-gradient(135deg, #e8f0e8, #f4f8f4);
    border-color: #c5d9c5;
    color: #1a3d1c;
}
.dash-admin-shortcut--owner {
    background: linear-gradient(135deg, #1a1510, #2a2218);
    border-color: rgba(201, 162, 39, 0.35);
    color: #f5f0e6;
}
.dash-admin-shortcut--owner span {
    color: #c9b896;
}
.dash-admin-shortcuts--owner {
    grid-template-columns: 1fr;
    max-width: 420px;
}
.dash-admin-shortcut--solo {
    position: relative;
}
.dash-shortcut-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    background: rgba(201, 162, 39, 0.25);
    color: #f5d78e;
}
.dash-owner-alerts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.dash-owner-alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff8e6;
    border: 1px solid #f0d78a;
    font-size: 0.88rem;
}
.dash-owner-security {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fdecea;
    border: 1px solid #f5c6c2;
    font-size: 0.88rem;
}
.owner-platform-hint {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f0f4ff;
    border: 1px solid #c5d4f5;
    font-size: 0.88rem;
}
.owner-nav-link--platform {
    margin-left: auto;
    font-size: 0.78rem;
}
.owner-login-card .subscription-features,
.owner-login-card .subscription-upgrade-hint {
    display: none;
}

.content-area {
    padding: 24px 28px 40px;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* ——— Dashboard hero ——— */
.dash-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding: 22px 26px;
    background: linear-gradient(135deg, #0f2d10 0%, #1e4620 40%, #2a5c2c 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-premium-lg);
    position: relative;
    overflow: hidden;
}

.dash-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -5%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.dash-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--premium-gold), transparent);
    opacity: 0.7;
}

.dash-hero-greet {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.75;
}

.dash-hero h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dash-hero-meta {
    margin: 6px 0 0;
    font-size: 0.88rem;
    opacity: 0.88;
}

.dash-hero-badge {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    text-align: center;
    min-width: 100px;
}

.dash-hero-badge strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
}

.dash-hero-badge span {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.8;
}

/* Legacy page-welcome maps to dash-hero if used elsewhere */
.page-welcome {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-premium-lg);
}

/* ——— Stat cards premium ——— */
.stat-card {
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-lg);
    border-left: none;
    padding: 18px 18px 18px 56px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    background: var(--premium-surface);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

.stat-card.success::before { background: linear-gradient(90deg, #2e7d32, #66bb6a); }
.stat-card.danger::before { background: linear-gradient(90deg, #c62828, #ef5350); }
.stat-card.warning::before { background: linear-gradient(90deg, #f57c00, #ffb74d); }
.stat-card.info::before { background: linear-gradient(90deg, #1565c0, #42a5f5); }

.stat-card-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: #f4f8f4;
    border-radius: 10px;
    border: 1px solid #e8f0e8;
}

.stat-card.success .stat-card-icon { background: #e8f5e9; border-color: #c8e6c9; }
.stat-card.danger .stat-card-icon { background: #ffebee; border-color: #ffcdd2; }
.stat-card.warning .stat-card-icon { background: #fff8e1; border-color: #ffecb3; }
.stat-card.info .stat-card-icon { background: #e3f2fd; border-color: #bbdefb; }

.stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--premium-muted);
}

.stat-value {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--premium-ink);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-premium-lg);
}

/* ——— Cards ——— */
.card {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(180deg, #fafcfa 0%, #fff 100%);
    border-bottom: 1px solid #eef2ee;
    padding: 16px 20px;
}

.card-header h2,
.card-header h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--premium-ink);
}

/* ——— Tables ——— */
table thead th,
.data-table thead th {
    background: linear-gradient(180deg, #f6faf6, #eef4ee);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--premium-muted);
    border-bottom: 2px solid #d4e4d4;
    padding: 12px 14px;
}

table tbody td,
.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f4f0;
}

table tbody tr:hover,
.data-table tbody tr:hover {
    background: #f8fcf8;
}

/* ——— Buttons ——— */
.btn {
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
    background: linear-gradient(180deg, #2d6b2f 0%, #1e4620 100%);
    border: 1px solid #1a3d1c;
    box-shadow: 0 2px 6px rgba(30, 70, 32, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #357a38 0%, #245224 100%);
    box-shadow: 0 4px 12px rgba(30, 70, 32, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    border-color: #c8d8c8;
    background: #fff;
}

.btn-outline:hover {
    background: #f6faf6;
    border-color: var(--primary);
}

/* ——— Forms ——— */
.form-control {
    border-radius: 10px;
    border-color: #d8e4d8;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.12);
}

/* ——— Login premium ——— */
.login-page {
    background:
        linear-gradient(165deg, rgba(10, 35, 12, 0.94) 0%, rgba(20, 55, 22, 0.9) 50%, rgba(15, 45, 16, 0.92) 100%),
        url('https://images.unsplash.com/photo-1548550023-2bdb3c5beed7?w=1400&q=75&auto=format') center/cover no-repeat;
}

.login-box {
    max-width: 400px;
    padding: 36px 32px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.login-logo .icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(145deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.login-logo h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--premium-ink);
}

.btn-login-submit {
    background: linear-gradient(180deg, #2d6b2f, #1e4620);
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 14px rgba(30, 70, 32, 0.35);
}

/* ——— Slip toolbar ——— */
.slip-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e0ebe0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

.slip-toolbar .actions-left,
.slip-toolbar .actions-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ——— Admin hub premium ——— */
.admin-hub-nav {
    background: linear-gradient(180deg, #fff, #fafcfa);
    border-color: #dce8dc;
    box-shadow: var(--shadow-premium);
    padding: 8px;
}

.admin-hub-tab.active {
    background: linear-gradient(135deg, #1a3d1c, #2c5f2d);
    box-shadow: 0 2px 8px rgba(30, 70, 32, 0.25);
}

.subscription-card {
    background: linear-gradient(145deg, #fff 0%, #f8fcf8 100%);
    border: 1px solid #b8d4b8;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.subscription-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-dark), var(--premium-gold), var(--primary-dark));
}

.super-stat-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    border: 1px solid #e8f0e8;
}

/* ——— Platform ——— */
.platform-body {
    background: linear-gradient(180deg, #e8efe8 0%, #f0f3f0 100%);
}

.platform-hero {
    box-shadow: var(--shadow-premium-lg);
}

.platform-hero::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--premium-gold), transparent);
    opacity: 0.6;
}

.platform-hero {
    position: relative;
}

/* ——— Alerts ——— */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.alert-banner {
    border-radius: 12px;
    box-shadow: var(--shadow-premium);
}

/* ——— Stock hero ——— */
.stock-hero {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-premium-lg);
}

/* ——— Invite card ——— */
.invite-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

/* ——— Quick actions on dashboard ——— */
.dashboard-grid .card-body .btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .content-area {
        padding: 16px;
    }

    .dash-hero {
        padding: 18px 20px;
    }

    .stat-card {
        padding-left: 16px;
        padding-top: 48px;
    }

    .stat-card-icon {
        left: 14px;
        top: 14px;
        transform: none;
    }
}

@media print {
    .dash-hero,
    .stat-card::before {
        box-shadow: none;
    }
}

/* ——— Transaction view (purchase / sale detail pages) ——— */

.txn-view-page {
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 32px;
}

/* Toolbar */
.txn-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2ebe2;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

.txn-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.txn-toolbar-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f4f8f4;
    border: 1px solid #dce8dc;
    color: var(--premium-ink);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
}

.txn-toolbar-back:hover {
    background: #e8f0e8;
    border-color: #c5d9c5;
}

.txn-toolbar-eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--premium-muted);
}

.txn-toolbar-id {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--premium-ink);
    font-variant-numeric: tabular-nums;
}

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

.btn-toolbar {
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
}

.txn-view-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border-radius: var(--radius-xl);
    color: #fff;
    box-shadow: var(--shadow-premium-lg);
    position: relative;
    overflow: hidden;
}

.txn-view-hero--purchase {
    background: linear-gradient(135deg, #0f2d10 0%, #1a4d1c 45%, #256329 100%);
}

.txn-view-hero--sale {
    background: linear-gradient(135deg, #0d3d4a 0%, #1565c0 45%, #1976d2 100%);
}

.txn-view-hero--invoice-purchase,
.txn-view-hero--farm {
    background: linear-gradient(135deg, #0f2d10 0%, #1a4d1c 45%, #256329 100%);
}

.txn-view-hero--invoice-sale,
.txn-view-hero--customer {
    background: linear-gradient(135deg, #0d3d4a 0%, #1565c0 45%, #1976d2 100%);
}

.txn-view-hero--receipt {
    background: linear-gradient(135deg, #3e2723 0%, #6d4c41 40%, #8d6e63 100%);
}

.txn-view-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--premium-gold), transparent);
    opacity: 0.75;
}

.txn-view-hero-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.txn-view-hero-glow {
    position: absolute;
    top: -40%;
    right: -10%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.txn-view-hero-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    flex-shrink: 0;
}

.txn-view-hero-letter {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    opacity: 0.95;
}

.txn-view-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    margin-bottom: 6px;
}

.txn-view-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.txn-view-meta {
    margin: 8px 0 0;
    font-size: 0.88rem;
    opacity: 0.9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.txn-view-meta a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.txn-view-meta a:hover {
    border-bottom-color: #fff;
}

.txn-view-meta a.txn-view-phone {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.txn-view-meta a.txn-view-phone:hover {
    border-bottom-color: #fff;
}

.txn-view-dot {
    opacity: 0.5;
}

.txn-view-hero-amount {
    text-align: right;
    position: relative;
    z-index: 1;
}

.txn-view-amount-lbl {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-bottom: 4px;
}

.txn-view-amount-val {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.txn-pay-progress {
    margin-top: 10px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.txn-pay-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #a5d6a7, #fff);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.txn-pay-progress-labels {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.88;
}

.txn-pay-due {
    color: #fff3cd;
}

.txn-pay-clear {
    color: #c8e6c9;
}

.txn-inline-form {
    display: inline;
}

.txn-view-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.txn-view-body .txn-view-card {
    margin-bottom: 0;
}

.txn-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.txn-link-lbl {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--premium-muted);
    margin-bottom: 2px;
}

.txn-link-meta {
    display: block;
    font-size: 0.82rem;
    color: var(--premium-muted);
    margin-top: 2px;
}

.txn-view-card--link {
    border: 1px solid #dce8dc;
    background: linear-gradient(180deg, #fafcfa, #fff);
}

.txn-view-card--history {
    grid-column: 1 / -1;
}

.txn-empty-msg {
    margin: 0;
    padding: 24px 20px;
    text-align: center;
    color: var(--premium-muted);
    font-size: 0.92rem;
}

/* Memo document preview */
.txn-memo-document {
    margin-top: 8px;
}

.txn-memo-document-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 14px;
}

.txn-memo-document-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--premium-ink);
    letter-spacing: -0.02em;
}

.txn-memo-document-sub {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--premium-muted);
}

.txn-memo-document-tags {
    display: flex;
    gap: 8px;
}

.txn-memo-document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.txn-doc-tag {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2e5d30;
    background: #eef6ee;
    border: 1px solid #c8e6c9;
    border-radius: 20px;
}

.txn-memo-well {
    padding: 24px;
    background: linear-gradient(165deg, #e4ece4 0%, #f0f4f0 50%, #e8efe8 100%);
    border: 1px solid #d0ddd0;
    border-radius: var(--radius-xl);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), var(--shadow-premium-lg);
}

.txn-memo-well-inner {
    width: min(100%, 520px);
    margin: 0 auto;
    aspect-ratio: 210 / 148;
    position: relative;
    font-size: clamp(8.5px, 1.15vw, 10.5px);
}

.txn-memo-well-inner .txn-slip-wrap--fit {
    position: absolute;
    inset: 0;
    margin: 0;
    max-width: none;
    width: 100%;
    height: 100%;
}

.txn-memo-well-inner .txn-slip-fit {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
}

.txn-memo-well-inner .txn-slip-fit .slip-frame {
    height: 100%;
    box-sizing: border-box;
}

.txn-view-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.txn-chip {
    padding: 14px 12px;
    text-align: center;
    background: #fff;
    border: 1px solid #e0ebe0;
    border-radius: 12px;
    box-shadow: var(--shadow-premium);
}

.txn-chip-lbl {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--premium-muted);
    margin-bottom: 4px;
}

.txn-chip strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--premium-ink);
    font-variant-numeric: tabular-nums;
}

.txn-chip--rate {
    background: linear-gradient(180deg, #f0fdf4, #fff);
    border-color: #bbf7d0;
}

.txn-chip--due {
    background: linear-gradient(180deg, #fff5f5, #fff);
    border-color: #fecaca;
}

.txn-chip--pending {
    background: linear-gradient(180deg, #fffbeb, #fff);
    border-color: #fde68a;
}

.txn-view-grid {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 22px;
    align-items: start;
}

.txn-view-card {
    margin-bottom: 18px;
    border-radius: var(--radius-lg);
}

.txn-view-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.txn-view-card-count,
.txn-pending-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--premium-muted);
    padding: 4px 10px;
    background: #f4f8f4;
    border-radius: 20px;
}

.txn-pending-tag {
    background: #fff8e1;
    color: #b45309;
}

.txn-view-card-body-flush {
    padding: 0;
}

.txn-view-card-body-flush .table-responsive {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.txn-view-card--payment {
    border: 1px solid #c8e6c9;
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.08);
}

.txn-payment-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.txn-payment-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.txn-mode-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    background: #eef4ee;
    border-radius: 6px;
    color: #2e5d30;
}

@media (max-width: 960px) {
    .txn-view-hero-amount {
        text-align: left;
        width: 100%;
    }

    .txn-view-amount-val {
        font-size: 1.45rem;
    }

    .txn-toolbar {
        padding: 10px 12px;
    }

    .txn-memo-well {
        padding: 16px;
    }
}

@media (max-width: 520px) {
    .txn-view-chips {
        grid-template-columns: repeat(3, 1fr);
    }

    .txn-toolbar-actions {
        width: 100%;
    }

    .txn-toolbar-actions .btn-toolbar {
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    .txn-view-body {
        grid-template-columns: 1fr;
    }
}

/* ——— Super Admin national hub ——— */
.super-hub-hero {
    position: relative;
    margin-bottom: 22px;
    padding: 24px 26px;
    border-radius: var(--radius-xl);
    color: #fff;
    background: linear-gradient(135deg, #0a1f0b 0%, #1a4d1c 45%, #1e5a22 100%);
    box-shadow: var(--shadow-premium-lg);
    overflow: hidden;
}

.super-hub-hero-glow {
    position: absolute;
    top: -50%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.super-hub-hero-body {
    position: relative;
    z-index: 1;
}

.super-hub-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    margin-bottom: 10px;
}

.super-hub-title {
    margin: 0 0 8px;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.super-hub-sub {
    margin: 0 0 12px;
    font-size: 0.92rem;
    opacity: 0.9;
}

.super-hub-links {
    font-size: 0.82rem;
    opacity: 0.88;
}

.super-hub-links code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
}

.super-hub-dot {
    opacity: 0.5;
    margin: 0 6px;
}

.card-panel--muted {
    background: linear-gradient(180deg, #f8f9fa, #fff);
    border-color: #dee2e6;
}

.super-payment-soon {
    margin: 0;
    font-size: 0.92rem;
    color: var(--premium-muted);
    line-height: 1.55;
}

.super-reg-urls .register-url-box {
    margin-top: 8px;
}

.super-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 6px;
    background: #f4f8f4;
    border: 1px solid #dce8dc;
    border-radius: var(--radius-lg);
}

.super-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--premium-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
}

.super-tab:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--premium-ink);
}

.super-tab.active {
    background: #fff;
    color: var(--premium-ink);
    box-shadow: var(--shadow-premium);
}

.super-tab-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 6px;
    background: #e8f0e8;
    color: #2e5d30;
}

.super-tab.active .super-tab-icon {
    background: linear-gradient(135deg, #1a4d1c, #2e7d32);
    color: #fff;
}

.super-tab-badge {
    min-width: 20px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    background: #fff3cd;
    color: #b45309;
    border-radius: 10px;
}

.super-tab.active .super-tab-badge {
    background: #1a4d1c;
    color: #fff;
}

.super-tab-panels {
    animation: superFadeIn 0.2s ease;
}

@keyframes superFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

.super-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.super-inline-form {
    display: inline;
}

.super-trial-form {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.super-app-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #f8faf8;
    border: 1px solid #e0ebe0;
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--premium-muted);
}

.super-app-details strong {
    color: var(--premium-ink);
    font-weight: 600;
}

.super-app-remarks {
    flex: 1 1 100%;
}

/* ——— National Admin Command Center ——— */
.admin-national-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #0a1f0b, #1a4d1c 50%, #ff9933 50%, #138808);
    border-radius: var(--radius-lg);
    color: #fff;
    font-size: 0.82rem;
    box-shadow: var(--shadow-premium);
}

.admin-national-strip-label {
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 3px 10px;
    border-radius: 20px;
}

.admin-national-strip-name {
    font-weight: 700;
}

.admin-national-strip-code {
    margin-left: auto;
    font-family: ui-monospace, monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 10px;
    border-radius: 6px;
}

.admin-hub-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 6px;
    background: rgba(30, 70, 32, 0.1);
    color: #1a4d1c;
}

.admin-hub-tab.active .admin-hub-tab-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.national-hero {
    position: relative;
    margin-bottom: 20px;
    padding: 28px 30px;
    border-radius: var(--radius-xl);
    color: #fff;
    background: linear-gradient(135deg, #0a1f0b 0%, #1a4d1c 40%, #256329 70%, #1a3d5c 100%);
    box-shadow: var(--shadow-premium-lg);
    overflow: hidden;
}

.national-hero-glow {
    position: absolute;
    top: -40%;
    right: -8%;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(255, 153, 51, 0.15) 0%, transparent 65%);
    pointer-events: none;
}

.national-hero-body {
    position: relative;
    z-index: 1;
}

.national-hero-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.national-hero-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
}

.national-hero-plan {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    background: rgba(255, 153, 51, 0.25);
    border: 1px solid rgba(255, 153, 51, 0.4);
    border-radius: 20px;
}

.national-hero-title {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.national-hero-sub {
    margin: 0 0 14px;
    font-size: 0.95rem;
    opacity: 0.92;
    max-width: 720px;
}

.national-hero-meta {
    font-size: 0.82rem;
    opacity: 0.9;
}

.national-hero-url {
    background: rgba(0, 0, 0, 0.25);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
}

.national-hero-dot {
    opacity: 0.5;
    margin: 0 6px;
}

.national-hero-flag {
    position: absolute;
    top: 20px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 28px;
    opacity: 0.35;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.national-hero-flag span {
    display: block;
    height: 8px;
}

.national-hero-flag span:nth-child(1) { background: #ff9933; }
.national-hero-flag span:nth-child(2) { background: #fff; }
.national-hero-flag span:nth-child(3) { background: #138808; }

.national-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.national-stat-card {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e0ebe0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

.national-stat-card--wide {
    grid-column: span 2;
}

.national-stat-card--alert {
    border-color: #f0c674;
    background: linear-gradient(180deg, #fffdf5, #fff);
}

.national-stat-kicker {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--premium-muted);
    margin-bottom: 8px;
}

.national-stat-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.national-stat-divider {
    width: 1px;
    height: 36px;
    background: #e0ebe0;
}

.national-stat-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--premium-ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.national-stat-num--sale {
    color: #1a6b1e;
}

.national-stat-num.national-stat-ok {
    color: #1a6b1e;
}

.national-stat-num.national-stat-warn {
    color: #b45309;
}

.national-stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--premium-muted);
    margin-top: 4px;
}

.national-actions {
    margin-bottom: 22px;
}

.national-actions-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--premium-ink);
}

.national-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.national-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    text-decoration: none;
    color: var(--premium-ink);
    background: #fff;
    border: 1px solid #dce8dc;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.national-action-card:hover {
    transform: translateY(-2px);
    border-color: #1a4d1c;
    box-shadow: var(--shadow-premium-lg);
}

.national-action-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a4d1c, #2e7d32);
    color: #fff;
}

.national-action-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
}

.national-team-snapshot {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.national-snapshot-item {
    text-align: center;
}

.national-snapshot-item strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--premium-ink);
}

.national-snapshot-item span {
    font-size: 0.78rem;
    color: var(--premium-muted);
}

.national-command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.national-command-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.national-ops-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.national-ops-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eef4ee;
    font-size: 0.88rem;
}

.national-ops-list li:last-child {
    border-bottom: none;
}

.admin-team-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 20px;
    align-items: start;
}

.admin-access-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.national-pass-row {
    display: flex;
    gap: 8px;
}

.national-users-table td {
    vertical-align: top;
}

.national-user-actions {
    min-width: 200px;
}

.national-inline-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}

.card-panel--wide .card-header h2 {
    font-size: 1rem;
}

@media (max-width: 900px) {
    .national-stat-card--wide {
        grid-column: span 1;
    }

    .admin-team-grid {
        grid-template-columns: 1fr;
    }

    .national-hero-flag {
        display: none;
    }
}

/* ——— Business Admin vs Owner Control ——— */
.role-panel-guide {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid #dce8dc;
    background: #fff;
    box-shadow: var(--shadow-premium);
}

.role-panel-guide--owner {
    border-color: #c9a227;
    background: linear-gradient(135deg, #fffdf5 0%, #fff 100%);
}

.role-panel-guide--business {
    border-color: #b8d4b8;
    background: linear-gradient(135deg, #f8fcf8 0%, #fff 100%);
}

.role-panel-guide-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 10px;
    color: #fff;
    flex-shrink: 0;
}

.role-panel-guide--owner .role-panel-guide-icon {
    background: linear-gradient(135deg, #5c4a0f, #c9a227);
}

.role-panel-guide--business .role-panel-guide-icon {
    background: linear-gradient(135deg, #1a4d1c, #2e7d32);
}

.role-panel-guide-body {
    flex: 1;
    min-width: 200px;
}

.role-panel-guide-body strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.role-panel-guide-body p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--premium-muted);
    line-height: 1.5;
}

.role-panel-guide-link {
    flex-shrink: 0;
}

.national-hero--business {
    background: linear-gradient(135deg, #0f2a10 0%, #1a4d1c 50%, #2e6b32 100%);
}

.national-hero--owner {
    background: linear-gradient(135deg, #1a1408 0%, #3d2e0a 35%, #1a4d1c 100%);
}

.national-hero--owner .national-hero-badge {
    background: rgba(201, 162, 39, 0.25);
    border: 1px solid rgba(201, 162, 39, 0.35);
}

.national-actions--control .national-action-card--control .national-action-icon {
    background: linear-gradient(135deg, #5c4a0f, #c9a227);
}

.admin-hub-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.admin-hub-tab-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.admin-hub-tab-title {
    font-weight: 700;
    font-size: 0.88rem;
}

.admin-hub-tab-sub {
    font-size: 0.68rem;
    opacity: 0.75;
    font-weight: 500;
}

.admin-hub-tab.active .admin-hub-tab-sub {
    opacity: 0.9;
}

.admin-hub-tab--owner.active {
    background: linear-gradient(135deg, #3d2e0a, #6b5412);
}

.admin-hub-tab--business.active {
    background: linear-gradient(135deg, #1a3d1c, #2c5f2d);
}

/* ——— Business Admin team page (simple) ——— */
.business-admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px;
    background: #f4f8f4;
    border: 1px solid #dce8dc;
    border-radius: var(--radius-lg);
}

.business-admin-nav-link {
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--premium-muted);
    text-decoration: none;
    border-radius: 8px;
}

.business-admin-nav-link:hover {
    background: #fff;
    color: var(--premium-ink);
}

.business-admin-nav-link.active {
    background: #fff;
    color: var(--premium-ink);
    box-shadow: var(--shadow-premium);
}

.business-admin-nav-link--warn {
    color: #b45309;
}

.business-admin-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #e8f0e8, #f4f8f4);
    border: 1px solid #c5d9c5;
    border-radius: var(--radius-lg);
}
.business-admin-strip-label {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1a3d1c;
}
.business-admin-strip-sub {
    font-size: 0.82rem;
    color: var(--premium-muted);
}

.owner-nav-strip {
    background: linear-gradient(135deg, #1a1510, #2a2218);
    border-color: #c9a227;
}
.owner-nav-strip .admin-national-strip-label,
.owner-nav-strip .admin-national-strip-name {
    color: #f5f0e6;
}
.owner-nav-strip .admin-national-strip-code {
    color: #c9a227;
}

.owner-control-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px;
    background: linear-gradient(135deg, #1a1510, #252018);
    border: 1px solid rgba(201, 162, 39, 0.35);
    border-radius: var(--radius-lg);
}
.owner-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #c9b896;
    text-decoration: none;
    border-radius: 8px;
}
.owner-nav-link:hover {
    background: rgba(201, 162, 39, 0.12);
    color: #f5f0e6;
}
.owner-nav-link.active {
    background: linear-gradient(135deg, #c9a227, #a88620);
    color: #1a1510;
}
.owner-nav-link--primary.active {
    background: linear-gradient(135deg, #c9a227, #e8c547);
}
.owner-nav-link--muted {
    opacity: 0.75;
    margin-left: auto;
}
.owner-nav-link--exit {
    color: #f87171;
}
.owner-nav-icon {
    font-size: 0.72rem;
    font-weight: 800;
    opacity: 0.9;
}

.business-admin-page {
    max-width: 1200px;
}

.business-admin-head {
    margin-bottom: 20px;
}

.business-admin-head h1 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 800;
}

.business-admin-lead {
    margin: 0;
    font-size: 0.9rem;
    color: var(--premium-muted);
}

.business-admin-pending-banner {
    margin-bottom: 16px;
}

.business-admin-panels {
    margin-top: 8px;
}

@media (max-width: 768px) {
    .admin-hub-tab-sub {
        display: none;
    }
}

/* ——— Super Admin: Admin Control ——— */
.super-add-user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.super-trial-field .trial-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.trial-presets--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
}

.super-control-hint {
    margin: 0 0 14px;
}

.super-control-table td {
    vertical-align: top;
}

.super-control-actions {
    min-width: 260px;
}

.super-control-block {
    padding: 10px 0;
    border-bottom: 1px solid #eef4ee;
}

.super-control-block:last-child {
    border-bottom: none;
}

.super-control-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--premium-muted);
    margin-bottom: 6px;
}

.super-control-block--access {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.super-control-block--access .super-control-label {
    flex: 1 1 100%;
}

.super-extend-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}

.super-role-form select {
    min-width: 110px;
}

.row-disabled {
    opacity: 0.85;
    background: #fafafa;
}

.btn-xs {
    padding: 2px 8px;
    font-size: 0.72rem;
}

/* ——— National SaaS Platform ——— */
.platform-national-hero {
    position: relative;
    margin: 0 0 20px;
    padding: 26px 28px;
    border-radius: var(--radius-xl);
    color: #fff;
    background: linear-gradient(135deg, #0a1628 0%, #1a3d5c 40%, #1a4d1c 100%);
    box-shadow: var(--shadow-premium-lg);
    overflow: hidden;
}

.platform-national-glow {
    position: absolute;
    top: -40%;
    right: -5%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 153, 51, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.platform-national-body { position: relative; z-index: 1; }

.platform-national-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    margin-bottom: 10px;
}

.platform-national-hero h1 {
    margin: 0 0 8px;
    font-size: 1.6rem;
    font-weight: 800;
}

.platform-national-sub {
    margin: 0 0 12px;
    font-size: 0.92rem;
    opacity: 0.92;
    max-width: 720px;
}

.platform-national-meta {
    font-size: 0.85rem;
    opacity: 0.9;
}

.platform-national-dot {
    margin: 0 8px;
    opacity: 0.5;
}

.platform-national-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.platform-national-stat {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #dce8dc;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

.platform-national-stat--wide { grid-column: span 2; }
.platform-national-stat--warn { border-color: #f0c674; background: #fffdf5; }

.platform-national-stat-kicker {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--premium-muted);
    margin-bottom: 8px;
}

.platform-national-stat-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.platform-national-stat-divider {
    width: 1px;
    height: 36px;
    background: #e0ebe0;
}

.platform-national-stat-num {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--premium-ink);
}

.platform-national-stat-num--sale { color: #1a6b1e; }

.platform-national-stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--premium-muted);
    margin-top: 4px;
}

.platform-tenant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

.platform-tenant-card {
    padding: 16px;
    background: #fff;
    border: 1px solid #dce8dc;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

.platform-tenant-card--off {
    opacity: 0.85;
    border-color: #f0d4d4;
}

.platform-tenant-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.platform-tenant-card-head code {
    font-size: 0.75rem;
}

.platform-tenant-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.platform-tenant-card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--premium-muted);
    margin-bottom: 12px;
}

.platform-open-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.platform-open-btn {
    font-weight: 700;
}

.platform-saas-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: linear-gradient(90deg, #0a1628, #1a3d5c);
    border: 1px solid #2a5080;
    border-radius: var(--radius-lg);
    color: #fff;
    box-shadow: var(--shadow-premium);
}

.platform-saas-banner-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    min-width: 0;
}

.platform-saas-badge {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    background: rgba(255, 153, 51, 0.25);
    border-radius: 20px;
}

.platform-saas-viewing code {
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 4px;
}

.platform-saas-hint {
    font-size: 0.78rem;
    opacity: 0.85;
    flex: 1 1 100%;
}

.platform-saas-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

@media (max-width: 900px) {
    .platform-national-stat--wide { grid-column: span 1; }
    .platform-saas-banner { flex-direction: column; align-items: stretch; }
}

.platform-search-bar {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #dce8dc;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

.platform-search-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--premium-muted);
    margin-bottom: 8px;
}

.platform-tenant-card--recent {
    border-color: #b8d4b8;
    background: linear-gradient(180deg, #f8fcf8, #fff);
}

@media (max-width: 900px) {
    .super-control-actions {
        min-width: 0;
    }
}

.owner-setup-card .owner-setup-steps {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.owner-setup-card .owner-setup-steps a {
    font-weight: 600;
}

.dns-setup-hint summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--premium-accent, #b8860b);
}

.profile-login-box .brand-link-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.profile-login-box .brand-link-url {
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

.plan-upgrade-form {
    margin-top: 14px;
}

.plan-upgrade-btn {
    width: 100%;
}

.plan-upgrade-current {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--premium-muted, #64748b);
}

/* ——— Profit & Loss Report ——— */
.pl-report-page {
    max-width: 1140px;
    margin: 0 auto 40px;
}

.pl-report-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #0f2d10 0%, #1b5e20 45%, #2e7d32 100%);
    border-radius: var(--radius-xl, 16px);
    color: #fff;
    box-shadow: var(--shadow-premium-lg, 0 12px 40px rgba(15, 45, 16, 0.25));
}

.pl-report-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 6px;
}

.pl-report-hero-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.pl-report-hero-title strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    margin-top: 4px;
    letter-spacing: -0.02em;
}

.pl-report-hero-sub,
.pl-report-hero-trend {
    margin: 0;
    font-size: 0.88rem;
    opacity: 0.92;
    line-height: 1.5;
}

.pl-report-hero-trend {
    margin-top: 8px;
    font-weight: 600;
}

.pl-report-hero-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pl-report-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.pl-preset-chip {
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: #1b5e20;
    background: #f1f5f1;
    border: 1px solid #dce8dc;
    transition: background 0.15s, border-color 0.15s;
}

.pl-preset-chip:hover,
.pl-preset-chip.active {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #0d3d0f;
}

.pl-report-filter {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2ebe2;
    border-radius: var(--radius-lg, 12px);
}

.pl-report-filter-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.pl-report-filter .form-group {
    margin: 0;
    min-width: 140px;
}

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

.pl-kpi-card {
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e2ebe2;
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-premium, 0 2px 8px rgba(0, 0, 0, 0.04));
    border-top: 3px solid #c8e6c9;
}

.pl-kpi-card--purchase { border-top-color: #ef5350; }
.pl-kpi-card--sale { border-top-color: #43a047; }
.pl-kpi-card--profit { border-top-color: #2e7d32; }
.pl-kpi-card--loss { border-top-color: #c62828; }
.pl-kpi-card--spread { border-top-color: #c9a227; }
.pl-kpi-card--warning { border-top-color: #f9a825; }
.pl-kpi-card--info { border-top-color: #1976d2; }
.pl-kpi-card--inflow { border-top-color: #43a047; }
.pl-kpi-card--outflow { border-top-color: #ef5350; }

.pl-report-hero--teal {
    background: linear-gradient(135deg, #004d40 0%, #00695c 45%, #00897b 100%);
    box-shadow: 0 12px 40px rgba(0, 77, 64, 0.25);
}

.pl-report-hero--cash {
    background: linear-gradient(135deg, #0d2847 0%, #1565c0 45%, #1976d2 100%);
    box-shadow: 0 12px 40px rgba(13, 40, 71, 0.25);
}

.pl-report-hero--pending {
    background: linear-gradient(135deg, #3e2723 0%, #e65100 45%, #f57c00 100%);
    box-shadow: 0 12px 40px rgba(230, 81, 0, 0.25);
}

.pl-report-hero--balance {
    background: linear-gradient(135deg, #1a237e 0%, #283593 45%, #3949ab 100%);
    box-shadow: 0 12px 40px rgba(26, 35, 126, 0.25);
}

.pl-kpi-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 6px;
}

.pl-kpi-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.pl-kpi-meta,
.pl-kpi-sub {
    display: block;
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 6px;
}

.pl-text-profit { color: #2e7d32 !important; }
.pl-text-loss { color: #c62828 !important; }
.pl-text-sale { color: #2e7d32; }
.pl-text-purchase { color: #c62828; }

.pl-report-card {
    background: #fff;
    border: 1px solid #e2ebe2;
    border-radius: var(--radius-lg, 12px);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-premium, 0 2px 8px rgba(0, 0, 0, 0.04));
}

.pl-report-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2ee;
}

.pl-report-card-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1b5e20;
}

.pl-report-card-sub {
    font-size: 0.78rem;
    color: #6b7280;
}

.pl-report-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.pl-report-split--tops {
    margin-top: 0;
}

.pl-statement-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.pl-statement-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f0f4f0;
}

.pl-statement-table--compact td {
    padding: 8px 0;
}

.pl-statement-section td {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    padding-top: 4px;
    border-bottom: none;
}

.pl-statement-total td {
    border-top: 2px solid #1b5e20;
    border-bottom: none;
    padding-top: 14px;
    font-size: 1rem;
}

.pl-month-table .pl-month-bar {
    height: 8px;
    min-width: 4px;
    background: linear-gradient(90deg, #43a047, #2e7d32);
    border-radius: 4px;
}

.pl-daily-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 120px;
    padding: 8px 0;
    overflow-x: auto;
}

.pl-daily-col {
    flex: 1;
    min-width: 14px;
    max-width: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.pl-daily-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.pl-daily-bar {
    width: 80%;
    min-height: 4px;
    border-radius: 3px 3px 0 0;
    transition: height 0.2s;
}

.pl-bar--profit { background: linear-gradient(180deg, #66bb6a, #2e7d32); }
.pl-bar--loss { background: linear-gradient(180deg, #ef5350, #c62828); }

.pl-daily-lbl {
    font-size: 0.62rem;
    color: #9ca3af;
    margin-top: 4px;
}

.pl-top-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pl-top-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f4f0;
}

.pl-top-list li:last-child {
    border-bottom: none;
}

.pl-top-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f5e9;
    color: #1b5e20;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 8px;
    flex-shrink: 0;
}

.pl-top-body {
    flex: 1;
    min-width: 0;
}

.pl-top-body strong {
    display: block;
    font-size: 0.9rem;
    color: #111827;
}

.pl-top-body span {
    font-size: 0.75rem;
    color: #6b7280;
}

.pl-top-amt {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1b5e20;
    font-variant-numeric: tabular-nums;
}

.pl-top-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.pl-top-list li .pl-top-actions .btn {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.pl-empty {
    margin: 0;
    color: #9ca3af;
    font-size: 0.88rem;
}

.pl-report-print-head {
    display: none;
    text-align: center;
    margin-bottom: 20px;
}

.pl-report-print-head h1 {
    margin: 0 0 6px;
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .pl-report-split {
        grid-template-columns: 1fr;
    }

    .pl-report-hero-title strong {
        font-size: 1.6rem;
    }
}

@media print {
    .pl-report-print-head {
        display: block !important;
    }

    .pl-report-page {
        max-width: none;
    }

    .pl-report-card,
    .pl-kpi-card {
        box-shadow: none;
        break-inside: avoid;
    }

    .pl-daily-chart,
    .pl-month-table .no-print {
        display: none !important;
    }
}

/* ——— Transaction entry work brain ——— */
.txn-brain-page {
    max-width: 1100px;
    margin: 0 auto;
}

.txn-brain-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #0f2d10 0%, #1a4a1e 55%, #1e5630 100%);
    border-radius: var(--radius-xl);
    color: #f5f0e6;
    box-shadow: var(--shadow-premium-lg);
}

.txn-brain-hero--sale {
    background: linear-gradient(135deg, #0d3d2a 0%, #156b4a 55%, #1a7a55 100%);
}

.txn-brain-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 6px;
}

.txn-brain-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.txn-brain-sub {
    margin: 8px 0 0;
    font-size: 14px;
    opacity: 0.88;
    max-width: 520px;
}

.txn-brain-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.txn-brain-kpi {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 110px;
}

.txn-brain-kpi-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
}

.txn-brain-kpi-value {
    display: block;
    font-size: 1.15rem;
    margin-top: 2px;
}

.txn-brain-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

.txn-brain-card {
    background: var(--premium-surface);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(15, 45, 16, 0.06);
}

.txn-brain-section-title {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--premium-ink);
    letter-spacing: -0.01em;
}

.txn-brain-standard {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.txn-brain-standard-chip {
    font-size: 12px;
    padding: 6px 12px;
    background: #eef5ee;
    border-radius: 999px;
    color: #2d4a2f;
    border: 1px solid #d4e8d4;
}

.txn-brain-qty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.txn-brain-qty-field--boxes .form-control {
    border-color: #a8d4a8;
    font-size: 1.25rem;
    font-weight: 600;
}

.txn-qty-hint {
    display: block;
    font-size: 11px;
    color: var(--premium-muted);
    margin-top: 4px;
}

.txn-brain-section-hint {
    margin: -4px 0 12px;
    font-size: 13px;
    color: var(--premium-muted);
}

.txn-qty-total-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: #f0f7f0;
    border: 1px solid #c8e6c9;
    font-size: 13px;
}

.txn-qty-total-label {
    color: var(--premium-muted);
}

.txn-qty-total-sep {
    color: #9e9e9e;
}

.txn-eggs-to-trays {
    font-size: 11px;
    padding: 4px 10px;
}

.txn-chip-sub {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--premium-muted);
    margin-top: 2px;
}

.txn-brain-calc {
    position: sticky;
    top: 80px;
    background: linear-gradient(180deg, #f8fbf8 0%, #fff 100%);
    border: 2px solid #c8e6c9;
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-premium);
}

.txn-brain-calc-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #c8e6c9;
}

.txn-brain-calc-icon {
    font-size: 28px;
    line-height: 1;
}

.txn-brain-calc-head strong {
    display: block;
    font-size: 15px;
    color: var(--premium-ink);
}

.txn-brain-calc-head small {
    color: var(--premium-muted);
    font-size: 12px;
}

.txn-calc-panel {
    margin-top: 0;
}

.txn-brain-calc-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 11px;
    color: var(--premium-muted);
    gap: 8px;
}

.txn-payment-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.txn-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.txn-payment-card {
    border: 1px solid var(--premium-border, #e8e4dc);
    background: linear-gradient(180deg, #faf9f6 0%, #fff 100%);
}

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

.txn-payment-card-head .txn-brain-section-title {
    margin: 0;
}

.txn-payment-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 4px 10px;
    flex-shrink: 0;
}

.txn-policy-alert {
    display: block;
    line-height: 1.55;
    font-size: 13px;
}

.amount--none,
.amount--settled {
    color: var(--premium-muted, #9ca3af);
    font-weight: 400;
}

.txn-payment-opt-in {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid var(--premium-border, #e8e4dc);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.txn-payment-opt-in:has(input:checked) {
    border-color: #2d8a5e;
    box-shadow: 0 0 0 1px rgba(45, 138, 94, 0.15);
}

.txn-payment-opt-in-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.txn-payment-opt-in-text strong {
    font-size: 14px;
    color: var(--premium-text, #1a1a1a);
}

.txn-payment-opt-in-text small {
    font-size: 12px;
    color: var(--premium-muted);
    font-weight: 400;
}

.txn-payment-opt-in input {
    margin-top: 4px;
    flex-shrink: 0;
}

.txn-payment-fields {
    padding-top: 4px;
}

.txn-payment-row .form-control {
    flex: 1;
}

.txn-pending-line {
    margin-top: 8px;
    font-size: 13px;
    color: var(--premium-muted);
}

.txn-pending-line strong {
    color: #c45c00;
}

.txn-brain-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
}

.txn-brain-stock-warn {
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 13px;
}

.txn-brain-qty-presets {
    display: flex;
    flex-wrap: wrap;
}

/* ——— Easy payment entry (Collections) ——— */
.pay-easy-card {
    overflow: hidden;
}

.pay-easy-card .pay-easy-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--premium-border, #e8e4dc);
    background: var(--premium-surface, #fff);
    margin: 0;
}

.pay-easy-card .card-body {
    padding: 16px;
}

.pay-easy-tab {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--premium-muted, #6b6560);
    border-bottom: 3px solid transparent;
}

.pay-easy-tab.active {
    color: var(--premium-ink, #1a1612);
    border-bottom-color: #c9a227;
    background: rgba(201, 162, 39, 0.06);
}

.pay-clarity-box {
    background: linear-gradient(135deg, #faf8f4 0%, #f3efe6 100%);
    border: 1px solid var(--premium-border, #e8e4dc);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.pay-clarity-box[data-empty="1"] .pay-clarity-hero strong {
    opacity: 0.4;
}

.pay-clarity-hero {
    text-align: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed var(--premium-border, #ddd);
}

.pay-clarity-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--premium-muted);
}

.pay-clarity-outstanding {
    font-size: 1.75rem;
    color: #c45c00;
}

.pay-clarity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.pay-clarity-stat {
    text-align: center;
    font-size: 0.8rem;
    color: var(--premium-muted);
}

.pay-clarity-stat strong {
    display: block;
    font-size: 1rem;
    color: var(--premium-ink);
    margin-top: 4px;
}

.pay-clarity-stat--warn strong {
    color: #c62828;
}

.pay-clarity-entry label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.pay-clarity-amount-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pay-clarity-amount-row .form-control {
    flex: 1;
    min-width: 140px;
    font-size: 1.25rem;
    font-weight: 600;
}

.pay-quick-btns {
    display: flex;
    gap: 6px;
}

.pay-clarity-after {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--premium-border);
    font-weight: 600;
}

.pay-clarity-after-amt {
    font-size: 1.2rem;
}

.pay-easy-submit {
    width: 100%;
    margin-top: 8px;
}

.pay-history-details {
    margin-top: 16px;
    font-size: 0.9rem;
}

.pay-history-items {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.pay-history-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.pay-receipt-slip {
    max-width: 420px;
    margin: 0 auto;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.pay-receipt-head {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1a1612;
}

.pay-receipt-head h2 {
    margin: 0 0 4px;
    font-size: 1.2rem;
}

.pay-receipt-type {
    font-weight: 700;
    margin: 0;
}

.pay-receipt-no {
    font-size: 0.85rem;
    color: #666;
    margin: 4px 0 0;
}

.pay-clarity-box--receipt .pay-clarity-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
}

.pay-clarity-row--highlight {
    font-size: 1.1rem;
}

.pay-receipt-thanks {
    text-align: center;
    margin-top: 20px;
    font-style: italic;
    color: #666;
}

@media (max-width: 600px) {
    .pay-clarity-grid {
        grid-template-columns: 1fr;
    }
}

/* Party account (customer / farm amount management) */
.party-account-card .card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.party-account-actions {
    display: flex;
    gap: 8px;
}

.party-account-summary {
    background: linear-gradient(135deg, #faf8f4 0%, #f0ebe3 100%);
    border: 1px solid var(--premium-border, #e8e4dc);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.party-account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
    font-size: 0.95rem;
}

.party-account-row--main strong {
    font-size: 1.2rem;
    color: #1a1612;
}

.party-account-row--payable {
    border-bottom: none;
    padding-top: 12px;
    margin-top: 4px;
    font-weight: 700;
    font-size: 1.05rem;
}

.party-account-row--payable strong {
    font-size: 1.35rem;
}

.party-account-subhead {
    margin: 20px 0 10px;
    font-size: 0.95rem;
}

.party-account-totals td {
    background: #f8f6f2;
    border-top: 2px solid #ddd;
}

.party-account-hint {
    margin: 0 0 8px;
}

.party-account-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.party-account-stat {
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px solid var(--premium-border, #e8e4dc);
    background: linear-gradient(160deg, #fff 0%, #faf8f4 100%);
    text-align: center;
}

.party-account-stat-lbl {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--premium-muted);
    margin-bottom: 6px;
}

.party-account-stat strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--premium-ink);
}

.party-account-stat--payable {
    border-color: #f0d4a8;
    background: linear-gradient(160deg, #fffdf8 0%, #fff3e6 100%);
}

.party-account-stat--payable strong {
    font-size: 1.25rem;
}

.party-account-advance {
    margin: 0 0 10px;
    font-size: 0.9rem;
}

.party-invoice-row--unpaid td:first-child {
    box-shadow: inset 3px 0 0 #dc2626;
}

.party-invoice-row--partial {
    background: #fffdf8;
}

.party-invoice-row--settled {
    opacity: 0.92;
}

.bill-status-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.bill-pending-badge {
    font-size: 12px;
    font-weight: 700;
}

.party-voucher-code {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #374151;
}

.txn-view-card--payments .txn-view-card-count {
    font-size: 12px;
    color: var(--premium-muted);
    font-weight: 600;
}

.pl-hero-stat-strip {
    margin: -6px 0 18px;
}

.txn-chip--settled strong {
    color: var(--premium-muted);
}

.txn-payment-card-header {
    align-items: flex-start;
}

.txn-payment-card-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--premium-muted);
    font-weight: 400;
    max-width: 36ch;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .party-account-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .party-account-stat-grid {
        grid-template-columns: 1fr;
    }
}

.pay-account-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f8f6f2 0%, #eef5ee 100%);
    border: 1px solid #e0ddd6;
    border-radius: 10px;
}

.pay-account-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pay-account-bar-item span {
    font-size: 11px;
    font-weight: 600;
    color: var(--premium-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pay-account-bar-item strong {
    font-size: 16px;
}

.pay-account-bar-item--payable strong {
    font-size: 18px;
}

@media (max-width: 520px) {
    .pay-account-bar {
        grid-template-columns: 1fr;
    }
}

/* Trader / farm outstanding list */
.party-outstanding-page .pl-report-hero-title strong {
    font-size: 1.1em;
}

.party-outstanding-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.party-outstanding-tab {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    font-weight: 600;
    font-size: 14px;
    color: var(--premium-ink);
    text-decoration: none;
}

.party-outstanding-tab.active {
    background: var(--premium-teal, #0d6e6e);
    border-color: var(--premium-teal, #0d6e6e);
    color: #fff;
}

.party-outstanding-table .party-outstanding-col {
    background: #fff8f0;
    min-width: 110px;
}

.party-outstanding-table thead .party-outstanding-col {
    color: #b45309;
    font-weight: 700;
}

.party-outstanding-amt {
    font-size: 1.05rem;
}

.party-outstanding-name {
    font-weight: 700;
    color: var(--premium-ink);
    text-decoration: none;
}

.party-outstanding-name:hover {
    text-decoration: underline;
}

.party-outstanding-row--due {
    background: #fffdf8;
}

.party-outstanding-row--due .party-outstanding-col {
    background: #fff3e6;
}

.party-payable-badge {
    font-size: 13px;
}

.party-overdue-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    vertical-align: middle;
}

.party-outstanding-totals td {
    background: #f5f3ef;
    border-top: 2px solid #ddd;
    font-weight: 600;
}

.party-outstanding-actions {
    white-space: nowrap;
}

.party-outstanding-actions .btn {
    margin-left: 4px;
}

.txn-brain-qty-presets {
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.txn-brain-qty-presets-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--premium-muted);
    margin-right: 4px;
}

.txn-qty-preset {
    border: 1px solid #c8e6c9;
    background: #fff;
    color: var(--premium-ink);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.txn-qty-preset:hover {
    background: #eef5ee;
    border-color: #7cb87c;
}

.txn-qty-preset--clear {
    border-color: #e0e0e0;
    color: #666;
}

.txn-view-formula {
    margin: -8px 0 16px;
    padding: 10px 14px;
    background: #f0f7f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--premium-ink);
    border: 1px solid #d4e8d4;
}

.txn-view-breakdown {
    margin: -10px 0 16px;
    font-size: 13px;
    color: var(--premium-muted);
}

.txn-formula-warn {
    color: #c45c00;
    font-weight: 500;
}

.txn-chip--total {
    background: linear-gradient(135deg, #eef5ee, #fff);
    border: 1px solid #c8e6c9;
}

.txn-chip--eggs {
    background: #fafafa;
}

.txn-delete-zone {
    margin-top: 24px;
}

.txn-delete-details {
    border: 1px solid #f0d4d4;
    border-radius: 12px;
    background: #fffafa;
    overflow: hidden;
}

.txn-delete-summary {
    cursor: pointer;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #a33;
    list-style: none;
}

.txn-delete-summary::-webkit-details-marker {
    display: none;
}

.txn-delete-body {
    padding: 0 18px 18px;
    border-top: 1px solid #f5e0e0;
}

.txn-delete-hint {
    margin: 14px 0 10px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.txn-delete-record {
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px dashed #e8bcbc;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.txn-delete-blocked {
    margin: 12px 0 0;
    padding: 10px 12px;
    background: #fff8e6;
    border: 1px solid #f0d9a8;
    border-radius: 8px;
    color: #8a5a00;
    font-size: 13px;
}

.txn-delete-form {
    display: grid;
    gap: 10px;
    max-width: 360px;
}

.txn-delete-label kbd {
    padding: 2px 6px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
}

.txn-delete-input {
    max-width: 200px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.txn-delete-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.national-delete-form {
    flex-wrap: wrap;
    gap: 6px;
}

.national-delete-form .txn-delete-input {
    width: 76px;
    min-width: 76px;
    padding: 4px 8px;
    font-size: 12px;
}

@media (max-width: 960px) {
    .txn-brain-layout {
        grid-template-columns: 1fr;
    }

    .txn-brain-calc {
        position: static;
    }

    .txn-brain-qty-grid {
        grid-template-columns: 1fr;
    }
}

