/* RK ® Royal Fashion - Light Theme stylesheet */

:root {
    --bg-dark: #f8fafc;
    --bg-panel: #ffffff;
    --bg-panel-dark: #f1f5f9;
    --border-color: #cbd5e1;
    --border-color-hover: #94a3b8;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --gold: #b45309;
    --gold-hover: #d97706;
    --gold-glow: rgba(180, 83, 9, 0.12);
    --gold-light: rgba(180, 83, 9, 0.06);
    --green: #15803d;
    --green-light: rgba(21, 128, 61, 0.08);
    --red: #b91c1c;
    --red-light: rgba(185, 28, 28, 0.08);
    --blue: #1d4ed8;
    --blue-light: rgba(29, 78, 216, 0.08);
    --orange-light: rgba(217, 119, 6, 0.08);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease-in-out;
}

/* General Resets & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Firefox custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(180, 83, 9, 0.2) transparent;
}

/* Chrome, Edge, and Safari custom scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(180, 83, 9, 0.12);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(180, 83, 9, 0.35);
}


body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    height: 100vh;
}

h1, h2, h3, h4, .brand h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--text-main);
}

/* App Container Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling - Clean Light Sidebar */
.sidebar {
    width: 280px;
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 0;
    overflow: hidden;
}

.brand-logo-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: contain;
    background: #f1f5f9;
    object-position: center center;
    border: 2px solid var(--gold);
    box-shadow: 0 0 10px rgba(180, 83, 9, 0.35), 0 0 0 3px rgba(180, 83, 9, 0.12);
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-logo-img:hover {
    transform: scale(1.06);
    box-shadow: 0 0 18px rgba(180, 83, 9, 0.5), 0 0 0 4px rgba(180, 83, 9, 0.2);
}

/* Invoice print logo */
.invoice-logo-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: contain;
    background: transparent;
    object-position: center center;
    border: 2px solid #b45309;
    display: block;
    margin: 0 auto 0.5rem auto;
    padding: 3px;
}

.brand-details h1 {
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 4px;
}

.brand-details h1 span {
    font-size: 0.75rem;
    color: var(--gold);
    vertical-align: super;
}

.brand-details p {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    font-weight: 600;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    transition: var(--transition);
    width: 100%;
}

.nav-item:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.nav-item.active {
    background: var(--gold-light);
    border-left: 4px solid var(--gold);
    color: var(--gold);
    font-weight: 600;
}

.nav-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: var(--transition);
}

.badge {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    font-weight: bold;
}

.danger-bg {
    background-color: var(--red);
    color: white;
}

.hide {
    display: none !important;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background-color: var(--green);
    box-shadow: 0 0 4px var(--green);
}

.status-dot.offline {
    background-color: var(--red);
    box-shadow: 0 0 4px var(--red);
}

/* Main Content Area */
.content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.header-title h2 {
    font-size: 1.5rem;
    color: var(--text-main);
}

.text-muted {
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ledger-check-badge {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.ledger-check-badge.success {
    background-color: var(--green-light);
    color: var(--green);
    border: 1px solid rgba(21, 128, 61, 0.2);
}

.ledger-check-badge.mismatch {
    background-color: var(--red-light);
    color: var(--red);
    border: 1px solid rgba(185, 28, 28, 0.2);
    animation: pulse 2s infinite;
}

.datetime {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Mismatch Warning Banner */
.mismatch-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--red);
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
}

.blink {
    animation: blinker 1.2s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Tab Views management */
.tab-view {
    display: none;
    animation: fadeIn 0.35s ease;
}

.tab-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Panel Containers - Clean Light Cards */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.panel:hover {
    border-color: var(--border-color-hover);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-header h2 {
    font-size: 1.25rem;
    color: var(--text-main);
}

.bg-panel-dark {
    background: var(--bg-panel-dark);
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-grow {
    flex-grow: 1;
}

/* Grid Utilities */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-3-1 { grid-template-columns: 3fr 1fr; }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.my-4 { margin: 1rem 0; }
.p-0 { padding: 0 !important; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-bold { font-weight: 600; }
.text-success { color: var(--green); }
.text-warning { color: var(--gold); }
.text-red { color: var(--red); }
.gold-text { color: var(--gold); }

/* Stat Cards - White backgrounds with light borders */
.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-color-hover);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.bg-gold-light { background: var(--gold-light); }
.bg-green-light { background: var(--green-light); }
.bg-red-light { background: var(--red-light); }
.bg-blue-light { background: var(--blue-light); }
.bg-orange-light { background: var(--orange-light); }

.success-text { color: var(--green); }
.danger-text { color: var(--red); }
.info-text { color: var(--blue); }
.warning-text { color: var(--gold); }

.stat-details h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.15rem 0;
}

.stat-trend {
    font-size: 0.75rem;
}

/* Partner Cards Container */
.partner-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.partner-mini-card {
    background: var(--bg-panel-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
}

.partner-mini-card h4 {
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
}

.partner-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin: 0.35rem 0;
}

.partner-stat-row span {
    color: var(--text-muted);
}

.partner-stat-row strong {
    color: var(--text-main);
}

/* Double-entry Reconciliation flow list */
.flow-list {
    background: var(--bg-panel-dark);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 0.75rem;
    border: 1px solid var(--border-color);
}

.flow-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.flow-item span {
    color: var(--text-muted);
}

.flow-item.divider {
    border-bottom: 1px solid var(--border-color);
    margin: 0.25rem 0;
}

.flow-item.highlight {
    font-size: 0.95rem;
}

.flow-item.highlight span {
    color: var(--text-main);
}

.flow-item.final-check {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
}

.success-bg {
    background-color: var(--green-light);
    color: var(--green);
    border: 1px solid rgba(21, 128, 61, 0.15);
}

.danger-bg-alert {
    background-color: var(--red-light);
    color: var(--red);
    border: 1px solid rgba(185, 28, 28, 0.15);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea,
.form-select {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    padding: 0.65rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

input:focus,
textarea:focus,
.form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(180, 83, 9, 0.15);
}

.input-suffix-group {
    display: flex;
    align-items: center;
}

.input-suffix-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-suffix-group span {
    background: #e2e8f0;
    border: 1px solid var(--border-color);
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 0.65rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* POS Screen Elements */
.pos-search-bar {
    display: flex;
    gap: 0.75rem;
}

.input-icon-group {
    position: relative;
}

.input-icon-group input {
    padding-left: 2.5rem;
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    stroke-width: 2;
    fill: none;
}

.invoice-summary-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.95rem;
    color: var(--text-main);
}

.summary-row.divider {
    border-bottom: 1px solid var(--border-color);
    margin: 0.5rem 0;
}

.summary-row.grand-total-row {
    font-size: 1.25rem;
    font-weight: 700;
}

.inline-price-input {
    width: 80px !important;
    text-align: right;
    padding: 0.25rem 0.5rem !important;
    background: #ffffff !important;
}

.payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.due-calculation-row {
    margin-top: 0.5rem;
}

.due-pill {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* Tables Styling */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.pos-cart-table {
    max-height: 690px;
    height: auto;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

th {
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    background-color: #f1f5f9;
}

td {
    border-bottom: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-main);
}

tr:hover td {
    background-color: #f8fafc;
}

.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-20 { width: 20%; }

/* Buttons styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn-gold {
    background-color: var(--gold);
    color: #fff;
    box-shadow: 0 4px 10px var(--gold-glow);
}

.btn-gold:hover {
    background-color: var(--gold-hover);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--border-color-hover);
    background: #f1f5f9;
}

.btn-outline.text-red {
    border-color: rgba(185, 28, 28, 0.3);
    color: var(--red);
}

.btn-outline.text-red:hover {
    background-color: var(--red-light);
}

.border-b {
    border-bottom: 1px solid var(--border-color);
}

.pb-2 { padding-bottom: 0.5rem; }

/* Drag and Drop Area */
.drag-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
    background-color: #ffffff;
}

.drag-drop-area:hover {
    border-color: var(--gold);
    background: var(--gold-light);
}

.sample-import-box {
    background: #ffffff;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

/* OCR Progress Container */
.ocr-progress-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    border: 1px solid var(--border-color);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--gold);
    border-radius: 3px;
    transition: width 0.1s ease;
}

/* Popups & Modals styling - Light theme */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.45);
    z-index: 1000;
    backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-content {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    animation: modalSlide 0.2s ease-out;
    margin: auto;
}

@keyframes modalSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--text-main);
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text-main);
}

/* Dual Pin Verification Modal special */
.pin-modal .modal-content {
    max-width: 420px;
}

.pin-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.pin-digit-input {
    font-size: 1.5rem !important;
    text-align: center;
    letter-spacing: 0.5rem;
    padding: 0.75rem !important;
    background-color: #f8fafc !important;
}

.status-indicator {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.status-indicator.ready {
    color: var(--green);
}

.error-text {
    color: var(--red);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Partner Profile Cards */
.partner-profile-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.partner-profile-card h3 {
    color: var(--gold);
    font-size: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Printable Bill styling */
.printable-invoice {
    background-color: #fff;
    color: #000;
    padding: 2rem;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.printable-invoice h2 {
    font-family: 'Space Grotesk', sans-serif;
    text-align: center;
    font-size: 1.5rem;
}

.invoice-header {
    text-align: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.invoice-header p {
    margin: 0.15rem 0;
    font-size: 0.85rem;
}

.invoice-header .tagline {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #444;
}

.invoice-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.invoice-table th {
    border-bottom: 2px solid #333;
    color: #000;
    font-weight: 600;
    background-color: #fff;
}

.invoice-table td {
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0.25rem;
    font-size: 0.85rem;
    background-color: #fff;
}

.invoice-summary-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid #333;
    padding-top: 0.5rem;
    margin-top: 0.8rem;
}

.savings-badge {
    background-color: #f0fdf4;
    border: 1.5px dashed #15803d;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    color: #166534;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.savings-badge .savings-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.savings-badge .savings-val {
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 1px;
}

.invoice-total-section {
    width: 200px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin: 0.25rem 0;
}

.total-row.highlight {
    font-size: 1.05rem;
    font-weight: 700;
    border-top: 1px double #333;
    padding-top: 0.25rem;
}

.invoice-payment-breakdown {
    border-top: 1px dashed #ddd;
    padding-top: 0.5rem;
    font-size: 0.8rem;
}

.invoice-footer {
    text-align: center;
    border-top: 1px solid #ddd;
    margin-top: 2rem;
    padding-top: 1rem;
    font-size: 0.8rem;
}

.invoice-footer .legal {
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.25rem;
}

.print-modal-layout {
    background-color: rgba(15, 23, 42, 0.45);
    overflow-y: auto;
    align-items: flex-start !important;
    padding: 2rem 1rem;
}

.invoice-print-box {
    max-width: 550px;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.invoice-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* Barcode Sticker Print Sheet */
.barcode-print-box {
    max-width: 800px;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.barcode-sticker-sheet {
    background: #fff;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.barcode-label-container,
.barcode-sticker {
    border: 1px solid #ccc;
    text-align: center;
    color: #000;
    font-family: 'Outfit', sans-serif;
    border-radius: 4px;
    background: #fff;
    width: 48mm;
    height: 25mm;
    max-height: 25mm;
    margin: 0 auto;
    padding: 1mm 0 0 0;
    display: block;
    overflow: hidden;
    box-sizing: border-box;
}

.barcode-label-container *,
.barcode-sticker * {
    margin: 0;
    padding: 0;
}

.barcode-label-container.company-name, 
.barcode-label-container .company-name,
.barcode-label-container.item-name,
.barcode-label-container .item-name,
.barcode-label-container.sticker-name,
.barcode-label-container .sticker-name,
.barcode-sticker.sticker-brand,
.barcode-sticker .sticker-brand,
.barcode-sticker.sticker-name,
.barcode-sticker .sticker-name {
    display: block;
    font-size: 10px;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.barcode-label-container svg, 
.barcode-label-container img,
.barcode-sticker svg,
.barcode-sticker img {
    display: inline-block;
    max-width: 40mm;
    height: 9mm;
    margin: 1mm auto;
}

.barcode-label-container.sticker-barcode-visual,
.barcode-label-container .sticker-barcode-visual,
.barcode-sticker .sticker-barcode-visual {
    display: block;
    font-family: 'Libre Barcode 39', cursive;
    font-size: 24px;
    line-height: 1;
    margin: 0;
    font-weight: normal;
    letter-spacing: 0;
    text-align: center;
}

.barcode-label-container .sticker-barcode-text,
.barcode-sticker .sticker-barcode-text {
    display: block;
    font-size: 8px;
    line-height: 1;
    margin-bottom: 1px;
    text-align: center;
}

.barcode-label-container.price,
.barcode-label-container .price,
.barcode-sticker.sticker-price,
.barcode-sticker .sticker-price {
    display: block;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.2;
}

.barcode-sticker .sticker-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 0px;
    line-height: 1;
}

.barcode-sticker .sticker-logo-img {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    object-fit: contain;
    background: #f1f5f9;
    object-position: center center;
    border: 1px solid #b45309;
    flex-shrink: 0;
}

/* Printing Specific styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .printable-invoice, .printable-invoice * {
        visibility: visible;
    }
    
    .printable-invoice {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
        box-shadow: none;
    }
    
    /* Main invoice (not pos-bill) print sizing optimized for A4 portrait top-half */
    .printable-invoice:not(.pos-bill) {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        min-height: 138.5mm; /* span exactly the top half (148.5mm minus 10mm top margin) */
        padding: 0;
        margin: 0;
        box-shadow: none;
    }

    
    .printable-invoice:not(.pos-bill) .invoice-logo-img {
        width: 48px;
        height: 48px;
        border-width: 1px;
        margin: 0 auto 0.15rem auto;
        padding: 2px;
    }
    
    .printable-invoice:not(.pos-bill) h2 {
        font-size: 1.15rem !important;
        margin: 0 !important;
        line-height: 1.2;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-header {
        padding-bottom: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-header p {
        font-size: 0.7rem !important;
        margin: 0.05rem 0 !important;
        line-height: 1.2;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-header .tagline {
        font-size: 0.725rem !important;
        letter-spacing: 0.5px;
    }
    
    .printable-invoice:not(.pos-bill) #print-invoice-title {
        font-size: 0.85rem !important;
        margin-top: 0.2rem !important;
        padding-top: 0.2rem !important;
        line-height: 1.2;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-meta {
        font-size: 0.725rem !important;
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-meta p {
        margin: 0.08rem 0;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-table {
        margin-bottom: 0.4rem;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-table th {
        font-size: 0.725rem !important;
        padding: 0.25rem 0.2rem;
        border-bottom-width: 1.5px;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-table td {
        font-size: 0.725rem !important;
        padding: 0.25rem 0.2rem;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-total-section {
        width: 180px;
        padding-top: 0.25rem;
        margin-top: 0;
    }
    
    .printable-invoice:not(.pos-bill) .total-row {
        font-size: 0.725rem !important;
        margin: 0.08rem 0;
    }
    
    .printable-invoice:not(.pos-bill) .total-row.highlight {
        font-size: 0.85rem !important;
        padding-top: 0.1rem;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-payment-breakdown {
        font-size: 0.7rem !important;
        margin-top: 0.35rem !important;
        padding-top: 0.25rem;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-footer {
        margin-top: 0.5rem !important;
        padding-top: 0.25rem;
        font-size: 0.7rem !important;
    }
    
    .printable-invoice:not(.pos-bill) .invoice-footer .legal {
        font-size: 0.625rem !important;
    }
    
    .barcode-sticker-sheet, .barcode-sticker-sheet * {
        visibility: visible;
    }
    
    .barcode-sticker-sheet {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        grid-template-columns: repeat(4, 1fr);
        padding: 0;
        gap: 0.5rem;
    }
    
    /* When printing a detail modal (sales/profit/stock/expenses/returns) */
    body.printing-modal .modal-printable,
    body.printing-modal .modal-printable * {
        visibility: visible !important;
    }
    body.printing-modal .modal-printable {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 1.5rem !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: #fff !important;
    }
    body.printing-modal .modal-printable .table-container {
        max-height: none !important;
        overflow: visible !important;
    }
    body.printing-modal .modal-printable .print-only {
        display: block !important;
        visibility: visible !important;
    }
    
    .no-print {
        display: none !important;
    }
}

/* POS Bill Thermal receipt styling */
.printable-invoice.pos-bill {
    max-width: 80mm;
    padding: 0.5rem;
    font-size: 0.8rem;
    margin: 0 auto;
    border: 1px dashed #ccc;
}
.printable-invoice.pos-bill .invoice-logo-img {
    display: none !important;
}
.printable-invoice.pos-bill h2 {
    font-size: 1.1rem !important;
}
.printable-invoice.pos-bill p,
.printable-invoice.pos-bill td,
.printable-invoice.pos-bill th {
    font-size: 0.75rem !important;
}
.printable-invoice.pos-bill .invoice-summary-container {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.5rem;
}
.printable-invoice.pos-bill .savings-badge {
    align-items: center;
    text-align: center;
    padding: 0.4rem;
}
.printable-invoice.pos-bill .invoice-total-section {
    width: 100% !important;
    margin-left: 0 !important;
}
.printable-invoice.pos-bill .invoice-meta {
    flex-direction: column;
    gap: 0.25rem;
}
.printable-invoice.pos-bill .invoice-meta div {
    text-align: left !important;
}

@media print {
    .printable-invoice.pos-bill {
        width: 80mm !important;
        max-width: 80mm !important;
        margin: 0 !important;
        padding: 0.25rem !important;
        border: none !important;
    }
}

/* Clickable Stat Cards */
.stat-card.clickable {
    cursor: pointer;
    user-select: none;
}
.stat-card.clickable:active {
    transform: scale(0.97);
}

/* Modal filter bar */
.modal-filter-bar {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    margin-bottom: 1rem;
}

.modal-filter-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-filter-bar .filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.modal-filter-bar .custom-date-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-filter-bar .custom-date-inputs.hide {
    display: none !important;
}

.modal-filter-bar .filter-preset-select {
    padding: 0.25rem 2rem 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border-color: #cbd5e1;
    background-color: #ffffff;
    height: auto;
    width: auto;
}

.modal-filter-bar .filter-start-date,
.modal-filter-bar .filter-end-date {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #ffffff;
}

.modal-filter-bar .btn-filter-apply {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

/* Reports layout styling */
.report-section-group {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.report-group-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.report-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.25rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.report-card:hover {
    background: #ffffff;
    border-color: #b45309;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transform: translateY(-2px);
}

.report-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.report-card p {
    font-size: 0.825rem;
    line-height: 1.4;
    color: #64748b;
    margin-bottom: 1rem;
}

.report-card .arrow-icon {
    position: absolute;
    right: 1.25rem;
    bottom: 1rem;
    font-size: 1.25rem;
    color: #64748b;
    transition: transform 0.2s ease;
}

.report-card:hover .arrow-icon {
    color: #b45309;
    transform: translateX(4px);
}

.report-filter-bar {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
}

.report-filter-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-filter-bar .filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.report-content-body {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    min-height: 350px;
}

.report-custom-dates.hide {
    display: none !important;
}

/* Financial statement tables (P&L and Balance Sheet) */
.financial-statement-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-family: 'Outfit', sans-serif;
}

.financial-statement-table th, 
.financial-statement-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.financial-statement-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.financial-statement-table tr.header-row {
    background: #f8fafc;
}

.financial-statement-table tr.header-row td {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95rem;
    border-top: 1.5px solid #cbd5e1;
    border-bottom: 1.5px solid #cbd5e1;
}

.financial-statement-table tr.indent-1 td:first-child {
    padding-left: 2rem;
}

.financial-statement-table tr.indent-2 td:first-child {
    padding-left: 3rem;
}

.financial-statement-table tr.table-total-row td {
    font-weight: 700;
    color: #0f172a;
    background: #f8fafc;
    border-top: 1.5px solid #cbd5e1;
    border-bottom: 2px double #475569;
}

.financial-statement-table tr.table-grand-total-row td {
    font-weight: 800;
    font-size: 1.05rem;
    color: #b45309;
    background: #fef3c7;
    border-top: 2px solid #b45309;
    border-bottom: 3px double #b45309;
}

/* Print-only elements (hidden normally, shown on print) */
.print-only {
    display: none;
}

/* Printing GSTR / Reports */
@media print {
    .report-content-body, .report-content-body * {
        visibility: visible;
    }
    .report-content-body {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
        border: none;
        box-shadow: none;
    }
}



.table-responsive {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Biometric Fingerprint Scanner Overlay & Animations */
.biometric-overlay {
    display: none;
    position: fixed;
    z-index: 1200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.biometric-overlay.active {
    display: flex;
}

.biometric-overlay .modal-content {
    max-width: 350px;
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.fingerprint-scanner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-color);
    border: 2px dashed var(--gold-color);
    border-radius: 50%;
    padding: 10px;
    background: #fffbeb;
    transition: all 0.3s ease;
}

.fingerprint-scanner.scanning {
    border-color: #b45309;
    background: #fef3c7;
}

.fingerprint-scanner.success {
    color: #10b981;
    border-color: #10b981;
    background: #ecfdf5;
}

.fingerprint-scanner.error {
    color: #ef4444;
    border-color: #ef4444;
    background: #fef2f2;
}

.fingerprint-svg {
    width: 80px;
    height: 80px;
    transition: all 0.3s ease;
}

.fingerprint-scanner.scanning .fingerprint-svg {
    animation: fingerprint-pulse 1.5s infinite ease-in-out;
}

.scan-laser {
    display: none;
    position: absolute;
    left: 15%;
    width: 70%;
    height: 3px;
    background: #b45309;
    box-shadow: 0 0 10px #b45309;
    border-radius: 50%;
}

.fingerprint-scanner.scanning .scan-laser {
    display: block;
    animation: laser-scan 2s infinite ease-in-out;
}

@keyframes laser-scan {
    0% { top: 15%; }
    50% { top: 85%; }
    100% { top: 15%; }
}

@keyframes fingerprint-pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

.btn-biometric-verify {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    margin-top: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    border-color: var(--gold-color);
    color: var(--gold-text);
}

.btn-biometric-verify:hover {
    background-color: var(--gold-light);
}

/* 🔐 Read-Only Monitor & Cloud Sync UI Styles */
.read-only-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: #92400e;
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(146, 64, 14, 0.2);
}

body.read-only-active .read-only-disabled {
    pointer-events: none !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

body.read-only-active .read-only-hide {
    display: none !important;
}

body.read-only-active button[onclick^="triggerDeleteTransaction"],
body.read-only-active button[onclick^="openEditItemModal"],
body.read-only-active button[onclick^="triggerDeleteInventoryItem"],
body.read-only-active button[onclick^="openSettleDueModal"] {
    display: none !important;
}

/* 📷 Webcam & Camera Modal Styles - Light Theme */
.camera-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.camera-modal.active {
    display: flex;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    margin: 1rem;
    padding: 1.5rem;
}

.camera-viewscreen {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    margin-bottom: 1.5rem;
}

#camera-video, #camera-preview {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Keep 4:3 aspect ratio without cropping/stretching */
    background: #f1f5f9;
}

#camera-preview {
    display: none;
    cursor: zoom-in;
    transform-origin: center center;
}

.camera-controls {
    width: 100%;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.camera-controls .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
}

.camera-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.camera-close-btn:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.1);
}

/* Photo Thumbnail Placeholders & Containers */
.product-img-container {
    transition: transform 0.2s ease;
}
.product-img-container:hover {
    transform: scale(1.05);
}

.product-img-placeholder {
    transition: all 0.2s ease;
}
.product-img-placeholder:hover {
    border-color: #b45309 !important;
    background: #fef3c7 !important;
    color: #b45309 !important;
}

/* Print styles for full transaction log ledger */
@media print {
    body.printing-transactions {
        background-color: #ffffff !important;
        color: #000000 !important;
    }

    body.printing-transactions .app-container {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }
    body.printing-transactions .sidebar,
    body.printing-transactions .top-header,
    body.printing-transactions .filter-row,
    body.printing-transactions .actions,
    body.printing-transactions .btn-biometric-verify,
    body.printing-transactions #btn-clear-all-data,
    body.printing-transactions th:last-child,
    body.printing-transactions td:last-child {
        display: none !important;
    }
    body.printing-transactions .content {
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        display: block !important;
    }
    body.printing-transactions .panel {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
    }
    body.printing-transactions * {
        visibility: hidden;
    }
    body.printing-transactions #view-transactions,
    body.printing-transactions #view-transactions * {
        visibility: visible;
    }
    body.printing-transactions #view-transactions {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }
    body.printing-transactions table {
        width: 100% !important;
        border: 1px solid #000 !important;
        border-collapse: collapse !important;
    }
    body.printing-transactions th, 
    body.printing-transactions td {
        border: 1px solid #000 !important;
        padding: 6px !important;
        background-color: transparent !important;
        color: #000 !important;
    }
}

/* --- JEWELLERY BARCODE TAG STYLES (3-Up 15mm x 100mm on 50mm x 100mm Roll) --- */

/* Screen View Grid styling */
.barcode-sticker-sheet.jewelry-tag-mode {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2rem !important;
    justify-content: center !important;
    background: #e2e8f0 !important;
    padding: 2.5rem !important;
    border-radius: 8px;
    grid-template-columns: none !important;
}

/* 3-Up Row container representing a single physical 50mm x 100mm page */
.barcode-sticker-row {
    width: 50mm !important;
    height: 100mm !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 2mm !important;
    align-items: flex-start !important;
    background: #ffffff !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    position: relative !important;
    background-image: radial-gradient(#f1f5f9 1px, transparent 0) !important;
    background-size: 8px 8px !important;
    transform: scale(2.2) !important;
    transform-origin: top center !important;
    margin: 10px auto 130px auto !important;
}

/* Each single Jewellery Tag */
.barcode-sticker.format-jewelry {
    width: 15mm !important;
    height: 100mm !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: relative !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
    transform-origin: center center;
}

/* Horizontal physical label alignment offsets */
.barcode-sticker.format-jewelry:nth-child(1) {
    position: relative !important;
    left: -8mm !important;
}
.barcode-sticker.format-jewelry:nth-child(3) {
    position: relative !important;
    left: 7mm !important;
}

.barcode-sticker.format-jewelry:not(.empty):hover {
    transform: scale(1.6);
    z-index: 100;
}

/* Grab cursor & drop target styling for Drag and Drop */
.barcode-sticker.format-jewelry {
    cursor: grab !important;
    user-select: none !important;
}
.barcode-sticker.format-jewelry:active {
    cursor: grabbing !important;
}
.barcode-sticker.format-jewelry.drag-over {
    border: 2px dashed #3b82f6 !important;
    background-color: #f0f9ff !important;
    box-sizing: border-box !important;
}

/* Flaps - Top flap (0-32mm) & Middle flap (32-64mm) */
.barcode-sticker.format-jewelry .flap {
    width: 15mm !important;
    height: 32mm !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    position: relative !important;
    box-sizing: border-box !important;
    display: block !important;
    overflow: hidden !important;
}

/* Top flap has rounded top corners */
.barcode-sticker.format-jewelry .flap.top-flap {
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
    border-bottom: none !important;
}

/* Middle flap has rounded bottom corners */
.barcode-sticker.format-jewelry .flap.middle-flap {
    border-bottom-left-radius: 5px !important;
    border-bottom-right-radius: 5px !important;
    border-top: 1px dashed #e2e8f0 !important; /* Visual fold line */
    overflow: visible !important; /* Allow large barcode to render completely */
}

.barcode-sticker.format-jewelry:not(.empty):hover .flap {
    border-color: var(--gold) !important;
    box-shadow: 0 4px 10px rgba(180, 83, 9, 0.15) !important;
}

/* Bottom narrow non-adhesive loop tail (64-100mm -> 36mm height) */
.barcode-sticker.format-jewelry .bottom-tail {
    width: 3.5mm !important;
    height: 36mm !important;
    background: #f1f5f9 !important;
    border-left: 1px dashed #cbd5e1 !important;
    border-right: 1px dashed #cbd5e1 !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    border-bottom-left-radius: 2px !important;
    border-bottom-right-radius: 2px !important;
    box-sizing: border-box !important;
    position: relative;
}

/* Empty tag slots on screen (placeholders for incomplete rows) */
.barcode-sticker.format-jewelry.empty {
    opacity: 0.35 !important;
}

.barcode-sticker.format-jewelry.empty .flap {
    background: #f8fafc !important;
    border: 1px dashed #cbd5e1 !important;
}

.barcode-sticker.format-jewelry.empty .bottom-tail {
    background: transparent !important;
    border-color: #cbd5e1 !important;
}

/* Rotated content by 90 degrees to fit the vertical flaps */
.barcode-sticker.format-jewelry .rotated-content {
    width: 32mm !important; /* height becomes width when rotated */
    height: 15mm !important; /* width becomes height when rotated */
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
    text-align: center !important;
    line-height: 1.15 !important;
}

/* Align top-flap content to start from the top of the tag */
.barcode-sticker.format-jewelry .top-flap .rotated-content {
    align-items: flex-start !important;
    padding-left: 4mm !important;
}

/* Align middle-flap content to the bottom/outer edge (away from the fold line) using flex alignment */
.barcode-sticker.format-jewelry .middle-flap .rotated-content {
    width: 45mm !important; /* Expand rotation box width to allow 45mm barcode span */
    align-items: flex-start !important;
    padding-left: 15mm !important;
}

.barcode-sticker.format-jewelry .sticker-name {
    font-size: 11px !important;
    color: #334155 !important;
    font-weight: bold !important;
    line-height: 1.1 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: hidden !important;
    width: auto !important;
    max-width: 100% !important;
    text-align: left !important;
    margin-bottom: 2px !important;
}

.barcode-sticker.format-jewelry .sticker-price {
    font-size: 14px !important;
    font-weight: bold !important;
    color: #0f172a !important;
    text-align: left !important;
}

/* Barcode visual inside middle flap */
.barcode-sticker.format-jewelry .sticker-barcode-visual {
    width: 45mm !important;
    height: 8mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.barcode-sticker.format-jewelry .sticker-barcode-text {
    font-size: 10px !important;
    font-weight: bold !important;
    color: #334155 !important;
    margin-top: 5px !important;
    width: 100% !important;
    text-align: center !important;
}

@media print {
    .barcode-sticker-row {
        transform: none !important;
        margin: 0 auto !important;
        box-shadow: none !important;
        border: none !important;
    }
}
