:root {
    --gr-navy: #0f294a;
    --gr-navy-light: #153761;
    --gr-accent: #d97706;
    --gr-success: #059669;
    --gr-danger: #dc2626;
    --gr-border: #e2e8f0;
    --gr-bg-soft: #f8fafc;
}

/* Company-Wide Grand Total Banner Card */
.ganyrose-global-rollup-card {
    background: linear-gradient(135deg, #0b1f3a 0%, #153761 60%, #1e40af 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ganyrose-global-rollup-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.ganyrose-global-rollup-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ganyrose-global-scope-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.2);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ganyrose-global-rollup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.ganyrose-global-pillar {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 15px 18px;
}

.ganyrose-global-pillar-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #93c5fd;
    margin-bottom: 6px;
}

.ganyrose-global-pillar-val {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 8px;
}

.ganyrose-global-pillar-val small {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
}

.ganyrose-global-pillar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #e2e8f0;
}

.ganyrose-global-chip {
    background: rgba(15, 23, 42, 0.45);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11.5px;
}

/* Branch Switcher Strip */
.ganyrose-branch-switcher-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--gr-border);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.ganyrose-branch-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ganyrose-branch-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.15s ease;
}

.ganyrose-branch-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ganyrose-branch-pill.active {
    background: var(--gr-navy);
    color: #ffffff;
    border-color: var(--gr-navy);
    box-shadow: 0 2px 6px rgba(15, 41, 74, 0.2);
}

.ganyrose-branch-pill .code-tag {
    font-size: 10.5px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.18);
    font-family: monospace;
}

.ganyrose-branch-pill:not(.active) .code-tag {
    background: #e2e8f0;
    color: #475569;
}

.ganyrose-quick-actions-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Branch Overview Cards Grid */
.ganyrose-branch-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ganyrose-branch-card {
    background: #ffffff;
    border: 1px solid var(--gr-border);
    border-top: 4px solid var(--gr-navy-light);
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ganyrose-branch-card.is-hq {
    border-top-color: #d97706;
}

.ganyrose-branch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.ganyrose-branch-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.ganyrose-branch-code-badge {
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.ganyrose-branch-card.is-hq .ganyrose-branch-code-badge {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.ganyrose-branch-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: #475569;
    padding: 5px 0;
    border-bottom: 1px dashed #f1f5f9;
}

.ganyrose-branch-stat-row:last-child {
    border-bottom: none;
}

/* Transfer Line Item Row */
.ganyrose-transfer-line-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

@media (max-width: 780px) {
    .ganyrose-transfer-line-item {
        grid-template-columns: 1fr;
    }
}

/* Encrypted .gros Dropzone */
.ganyrose-gros-dropzone {
    border: 2px dashed #94a3b8;
    border-radius: 10px;
    background: #f8fafc;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ganyrose-gros-dropzone:hover,
.ganyrose-gros-dropzone.is-dragover {
    border-color: var(--gr-navy);
    background: #eff6ff;
}

.ganyrose-gros-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.ganyrose-gros-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 12px;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
}

/* Sync Source & UID Badges */
.ganyrose-uid-chip {
    display: inline-block;
    font-family: monospace;
    font-size: 11px;
    background: #f1f5f9;
    color: #334155;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.ganyrose-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.ganyrose-source-badge.android_sync {
    background: #dcfce7;
    color: #15803d;
}

.ganyrose-source-badge.encrypted_file {
    background: #ede9fe;
    color: #6d28d9;
}

.ganyrose-source-badge.woocommerce {
    background: #fef3c7;
    color: #92400e;
}

.ganyrose-source-badge.web_pos,
.ganyrose-source-badge.web_ledger {
    background: #e0f2fe;
    color: #0369a1;
}

/* Provisioning Payload Code Box */
.ganyrose-provision-box {
    background: #0f172a;
    color: #e2e8f0;
    font-family: monospace;
    font-size: 11.5px;
    padding: 14px;
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
    word-break: break-all;
    line-height: 1.5;
}

/* POS Branch Selector */
.ganyrose-pos-branch-select {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.ganyrose-pos-branch-select option {
    color: #0f172a;
    background: #ffffff;
}

/* Grand Total Footer Row */
.ganyrose-table tr.ganyrose-grand-total-row td {
    background: #f1f5f9 !important;
    border-top: 2px solid #0f294a !important;
    font-weight: 700;
    color: #0f172a;
}
