/* ==========================================================================
   NEXLIW EMBROIDERY ENTERPRISE ERP - SAAS & KHATA SUITE DESIGN SYSTEM
   ========================================================================== */

/* DARK MODE TOKENS */
[data-theme="dark"] {
    --bg-main: #0b0f19;
    --bg-sidebar: #0f172a;
    --bg-card: rgba(17, 24, 39, 0.88);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --bg-input: #111827;
    --border-color: #1f293d;
    --border-focus: #6366f1;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);
    
    --accent: #06b6d4;
    --accent-hover: #0891b2;
    --accent-glow: rgba(6, 182, 212, 0.35);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.35);
    
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    
    --table-header-bg: rgba(15, 23, 42, 0.95);
    --table-row-hover: rgba(99, 102, 241, 0.08);
    --table-row-active: rgba(99, 102, 241, 0.18);
}

/* LIGHT MODE TOKENS */
[data-theme="light"] {
    --bg-main: #f1f5f9;
    --bg-sidebar: #0f172a;
    --bg-card: #ffffff;
    --bg-card-border: #e2e8f0;
    --bg-input: #f8fafc;
    --border-color: #cbd5e1;
    --border-focus: #4f46e5;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.25);
    
    --accent: #0284c7;
    --accent-hover: #0369a1;
    --accent-glow: rgba(2, 132, 199, 0.2);
    
    --success: #059669;
    --success-hover: #047857;
    --success-glow: rgba(5, 150, 105, 0.2);
    
    --warning: #d97706;
    --danger: #dc2626;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;
    
    --table-header-bg: #f8fafc;
    --table-row-hover: rgba(79, 70, 229, 0.05);
    --table-row-active: rgba(79, 70, 229, 0.12);
}

:root {
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

/* AUTHENTICATION OVERLAY */
.auth-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(at 20% 20%, rgba(99, 102, 241, 0.25) 0px, transparent 50%),
                radial-gradient(at 80% 80%, rgba(6, 182, 212, 0.2) 0px, transparent 50%),
                #090d16;
    backdrop-filter: blur(25px); z-index: 999;
    display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}

.auth-card {
    background: rgba(17, 24, 39, 0.92); border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg); width: 100%; max-width: 440px;
    padding: 2.25rem; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
    display: flex; flex-direction: column; gap: 1.25rem;
}

.auth-brand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.auth-logo {
    width: 54px; height: 54px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: #fff; box-shadow: 0 0 30px var(--primary-glow); margin-bottom: 4px;
}

.auth-brand h2 { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 900; }
.auth-brand h2 span { color: var(--accent); }
.auth-brand p { font-size: 0.8rem; color: var(--text-muted); }

.auth-subdomain-badge {
    font-size: 0.72rem; font-weight: 700; padding: 4px 12px;
    background: rgba(99, 102, 241, 0.15); color: var(--primary);
    border: 1px solid var(--primary-glow); border-radius: 20px; margin-top: 4px;
}

.login-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-error-msg {
    background: rgba(239, 68, 68, 0.18); color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.35); padding: 10px;
    border-radius: var(--radius-md); font-size: 0.78rem; text-align: center;
}

.input-icon-wrapper { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; }
.input-icon-wrapper input { padding-left: 38px; }

.btn-toggle-pw {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 6px;
}

.form-options { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); }
.checkbox-label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.form-options a { color: var(--accent); text-decoration: none; }

.btn-auth-submit { width: 100%; padding: 12px; font-size: 1rem; border-radius: var(--radius-md); }

.demo-accounts-box { border-top: 1px solid var(--border-color); padding-top: 1rem; text-align: center; }
.demo-accounts-box span { font-size: 0.74rem; color: var(--text-muted); text-transform: uppercase; display: block; margin-bottom: 8px; }

.demo-pills { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.demo-pill {
    padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    background: var(--bg-input); color: var(--text-main); font-size: 0.74rem; cursor: pointer;
    display: flex; align-items: center; gap: 6px; transition: all 0.2s ease;
}
.demo-pill:hover { border-color: var(--primary); transform: translateY(-1px); }
.admin-pill { border-color: rgba(99, 102, 241, 0.4); color: var(--primary); }
.manager-pill { border-color: rgba(6, 182, 212, 0.4); color: var(--accent); }
.operator-pill { border-color: rgba(245, 158, 11, 0.4); color: var(--warning); }

/* USER PROFILE BADGE */
.user-profile-badge {
    display: flex; align-items: center; gap: 10px; padding: 5px 12px;
    background: var(--bg-input); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); margin-right: 6px;
}
.avatar-icon { font-size: 1.4rem; color: var(--accent); }
.user-meta { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.user-meta strong { font-size: 0.82rem; font-weight: 800; }
.user-meta span { font-size: 0.68rem; color: var(--text-muted); }

/* SIDEBAR */
.sidebar-drawer {
    width: 250px; background: var(--bg-sidebar); color: #fff;
    display: flex; flex-direction: column; justify-content: space-between;
    transition: width 0.3s ease; z-index: 120; flex-shrink: 0;
}
.sidebar-drawer.collapsed { width: 70px; }
.sidebar-drawer.collapsed .sidebar-brand-title,
.sidebar-drawer.collapsed .menu-item span,
.sidebar-drawer.collapsed .tenant-info div { display: none; }

.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar-logo {
    width: 38px; height: 38px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem; color: #fff;
}
.sidebar-brand-title h2 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 900; }
.sidebar-brand-title span { font-size: 0.65rem; color: var(--accent); letter-spacing: 1px; }

.sidebar-menu { display: flex; flex-direction: column; gap: 4px; padding: 1.25rem 0.85rem; flex: 1; }
.menu-item {
    display: flex; align-items: center; gap: 14px; padding: 11px 14px;
    color: #94a3b8; text-decoration: none; border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem;
}
.menu-item:hover, .menu-item.active { background: rgba(99, 102, 241, 0.15); color: #fff; }

.sidebar-footer { padding: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.tenant-info { display: flex; align-items: center; gap: 10px; color: #94a3b8; font-size: 0.8rem; }
.tenant-info strong { display: block; color: #fff; font-size: 0.85rem; }

/* MAIN WRAPPER & NAV */
.main-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.top-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1.75rem; background: var(--bg-card);
    backdrop-filter: blur(16px); border-bottom: 1px solid var(--bg-card-border);
    position: sticky; top: 0; z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: 1rem; }
.sidebar-toggle-btn {
    width: 38px; height: 38px; border-radius: var(--radius-md);
    background: var(--bg-input); border: 1px solid var(--border-color);
    color: var(--text-main); cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.page-title-group h1 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 800; }
.live-status-pill { font-size: 0.72rem; color: var(--success); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.live-status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

.nav-center-stats { display: flex; gap: 0.85rem; }
.stat-card {
    display: flex; align-items: center; gap: 12px; padding: 8px 16px;
    background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-md);
}
.stat-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.main-icon { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.sub-icon { background: rgba(6, 182, 212, 0.15); color: var(--accent); }
.fabric-icon { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.bill-icon { background: rgba(16, 185, 129, 0.15); color: var(--success); }

.stat-val { display: block; font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; }
.stat-lbl { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; }

.stat-card.highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.stat-card.highlight .stat-val { color: var(--success); font-size: 1.15rem; }
.stat-label-gold { font-size: 0.68rem; color: var(--success); font-weight: 700; text-transform: uppercase; }

.btn-outline-theme {
    width: 40px; height: 40px; border-radius: var(--radius-md);
    background: var(--bg-input); border: 1px solid var(--border-color);
    color: var(--text-main); cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* LAYOUT CONTAINER */
.app-container {
    max-width: 1600px; margin: 1.5rem auto; padding: 0 1.5rem;
    display: grid; grid-template-columns: 63% 35%; gap: 1.5rem; flex: 1;
}

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

.card {
    background: var(--bg-card); backdrop-filter: blur(20px);
    border: 1px solid var(--bg-card-border); border-radius: var(--radius-lg); padding: 1.5rem;
}

.card-title-bar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--bg-card-border); }
.title-with-badge { display: flex; align-items: center; gap: 12px; }
.section-icon-box {
    width: 42px; height: 42px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem; color: #fff;
}
.section-icon-box.secondary { background: linear-gradient(135deg, var(--accent), var(--accent-hover)); }
.card-title-bar h2 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 800; color: var(--text-main); }
.subtitle { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* FORM ELEMENTS */
.form-step-title { display: flex; align-items: center; gap: 10px; margin-top: 6px; margin-bottom: 10px; }
.step-num {
    width: 24px; height: 24px; border-radius: 50%; background: var(--primary);
    color: #fff; font-family: var(--font-heading); font-weight: 800; font-size: 0.78rem;
    display: flex; align-items: center; justify-content: center;
}
.form-step-title h3 { font-family: var(--font-heading); font-size: 0.98rem; font-weight: 700; color: var(--accent); }

.flex-between-header { display: flex; align-items: center; justify-content: space-between; }
.flex-title { display: flex; align-items: center; gap: 10px; }

.form-grid { display: grid; gap: 0.85rem; }
.two-col { grid-template-columns: 1fr 1fr; }
.three-col { grid-template-columns: 1fr 1fr 1fr; }
.four-col { grid-template-columns: 1fr 1fr 1fr 1fr; }

.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group label { font-size: 0.74rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }

input, select {
    width: 100%; padding: 9px 12px; background: var(--bg-input);
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    color: var(--text-main); font-family: var(--font-body); font-size: 0.88rem;
}
input:focus, select:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-glow); }

.input-accent-highlight { font-family: var(--font-heading); font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.input-action-group { display: flex; gap: 6px; }

.btn-action-icon {
    width: 38px; height: 38px; border-radius: var(--radius-md);
    background: var(--bg-input); border: 1px solid var(--border-color);
    color: var(--text-main); cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* SUB-JOB TICKET CARDS */
.subjobs-scroll-container {
    display: flex; flex-direction: column; gap: 14px;
    max-height: 490px; overflow-y: auto; padding-right: 6px; margin-top: 8px;
}

.subjob-ticket-card {
    background: var(--bg-input); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 1.1rem; position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); transition: border-color 0.2s ease;
}
.subjob-ticket-card:hover { border-color: var(--primary); }

.ticket-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--border-color);
}
.ticket-tag {
    font-family: var(--font-heading); font-weight: 800; font-size: 0.95rem;
    color: var(--warning); background: rgba(245, 158, 11, 0.14);
    padding: 3px 12px; border-radius: var(--radius-sm); border: 1px solid rgba(245, 158, 11, 0.3);
}

.ticket-actions { display: flex; align-items: center; gap: 10px; }

.optional-costing-box {
    margin-top: 8px; background: rgba(99, 102, 241, 0.06); padding: 8px;
    border-radius: var(--radius-sm); border: 1px dashed rgba(99, 102, 241, 0.25);
}

/* GRAND TOTALS SUMMARY */
.grand-totals-bar {
    display: flex; justify-content: space-around; align-items: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(16, 185, 129, 0.16));
    border: 1px solid var(--primary-glow); border-radius: var(--radius-md); padding: 14px; margin-top: 10px;
}
.total-metric { display: flex; flex-direction: column; align-items: center; }
.metric-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; }
.metric-value { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; color: var(--text-main); }
.rupees-accent { background: rgba(16, 185, 129, 0.2); padding: 6px 16px; border-radius: var(--radius-md); border: 1px solid rgba(16, 185, 129, 0.4); }
.metric-value-rupees { font-family: var(--font-heading); font-weight: 900; font-size: 1.3rem; color: var(--success); }

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius-md); font-family: var(--font-heading);
    font-weight: 700; font-size: 0.9rem; cursor: pointer; border: none; transition: all 0.2s ease;
}
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg-glow { padding: 14px 26px; font-size: 1.02rem; box-shadow: 0 0 25px var(--success-glow); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent-glow { background: var(--accent); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: rgba(239, 68, 68, 0.18); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.35); }
.btn-secondary { background: var(--bg-input); color: var(--text-main); border: 1px solid var(--border-color); }

.form-action-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 12px; }

/* REGISTER TABLE */
.search-filter-box { position: relative; margin-bottom: 1rem; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.88rem; }
.search-filter-box input { padding-left: 38px; }

.table-scroll-wrapper { max-height: 330px; overflow-y: auto; border: 1px solid var(--bg-card-border); border-radius: var(--radius-md); margin-bottom: 1.25rem; }
.enterprise-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; text-align: left; }
.enterprise-table th { background: var(--table-header-bg); padding: 11px 14px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; position: sticky; top: 0; z-index: 10; }
.enterprise-table td { padding: 11px 14px; border-top: 1px solid var(--bg-card-border); }
.enterprise-table tbody tr { cursor: pointer; transition: background 0.15s ease; }
.enterprise-table tbody tr:hover { background: var(--table-row-hover); }
.enterprise-table tbody tr.active-row { background: var(--table-row-active); border-left: 4px solid var(--primary); }

.chip { font-size: 0.74rem; font-weight: 700; padding: 2px 8px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-color); border-radius: var(--radius-sm); }

/* --------------------------------------------------------------------------
   ENTERPRISE KHATA SUITE SPLIT LAYOUT
   -------------------------------------------------------------------------- */
.modal-window.extra-large { max-width: 1240px; }

.khata-suite-layout {
    display: grid; grid-template-columns: 320px 1fr; gap: 1.25rem; height: 540px; padding: 1rem; overflow: hidden;
}

/* SIDEBAR ACCOUNTS DIRECTORY */
.khata-accounts-sidebar {
    background: var(--bg-input); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); display: flex; flex-direction: column; padding: 10px; gap: 10px;
}

.sidebar-search-box { position: relative; }
.sidebar-search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.8rem; }
.sidebar-search-box input { padding-left: 32px; font-size: 0.8rem; }

.accounts-cards-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; padding-right: 4px; }

.account-card-item {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md);
    padding: 12px; cursor: pointer; transition: all 0.2s ease; display: flex; flex-direction: column; gap: 6px;
}
.account-card-item:hover { border-color: var(--primary); transform: translateX(2px); }
.account-card-item.active-account {
    border-color: var(--primary); background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 0 15px var(--primary-glow);
}

.card-item-top { display: flex; align-items: center; justify-content: space-between; }
.card-item-title { font-family: var(--font-heading); font-weight: 800; font-size: 0.92rem; color: var(--text-main); }
.card-item-subtitle { font-size: 0.72rem; color: var(--text-muted); }
.card-item-balance {
    font-family: var(--font-heading); font-weight: 900; font-size: 0.95rem; color: var(--success); margin-top: 2px;
}

/* MAIN STATEMENT WORKSPACE */
.khata-statement-workspace {
    display: flex; flex-direction: column; gap: 1rem; overflow: hidden;
}

.khata-active-account-header {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-input); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 12px 16px;
}

.active-account-info { display: flex; align-items: center; gap: 14px; }
.account-avatar-glow {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent), var(--primary));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #fff; box-shadow: 0 0 20px var(--accent-glow);
}

.active-account-info h3 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 800; }
.active-account-info p { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

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

.khata-metrics-banner {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}

.khata-banner-card {
    background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-md);
    padding: 10px 14px; display: flex; flex-direction: column; gap: 2px;
}
.khata-banner-card span { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; }
.khata-banner-card strong { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; color: var(--text-main); }
.khata-banner-card.highlight strong { color: var(--success); font-size: 1.2rem; }

/* RECEIPT PREVIEW */
.receipt-preview-wrapper { background: #ffffff; color: #0f172a; border-radius: var(--radius-md); padding: 1.25rem; box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3); }
.receipt-preview-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 2px dashed #cbd5e1; }
.preview-title { font-family: var(--font-heading); font-weight: 800; font-size: 1rem; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.action-buttons-group { display: flex; gap: 8px; }

/* CLEAN MINIMAL RECEIPT SLIP FOR FACTORY PRINTING */
.receipt-slip { font-family: 'JetBrains Mono', Courier, monospace; color: #000; background: #fff; padding: 10px; }
.slip-title-box { text-align: center; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 12px; }
.slip-title-box h2 { font-size: 1.2rem; text-transform: uppercase; font-weight: 900; }
.slip-title-box p { font-size: 0.74rem; color: #333; }

.slip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 0.82rem; margin-bottom: 12px; }
.slip-row { display: flex; justify-content: space-between; border-bottom: 1px dotted #ccc; padding-bottom: 2px; }
.slip-row label { font-weight: bold; }

.subjobs-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.76rem; }
.subjobs-table th, .subjobs-table td { border: 1px solid #000; padding: 6px 8px; text-align: left; }
.subjobs-table th { background: #f1f5f9; text-align: center; font-weight: bold; }

.slip-footer { margin-top: 20px; display: flex; justify-content: space-between; font-size: 0.8rem; padding-top: 12px; border-top: 1px solid #000; }

/* MODALS */
.hidden { display: none !important; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-window { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); width: 100%; max-width: 860px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-window.large { max-width: 1040px; }

.modal-title-bar { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem; border-bottom: 1px solid var(--border-color); }
.modal-header-text { display: flex; align-items: center; gap: 12px; }
.modal-header-text i { font-size: 1.4rem; color: var(--primary); }
.modal-header-text h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; }
.btn-close-modal { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-main); cursor: pointer; display: flex; align-items: center; justify-content: center; }

.modal-content-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.needle-grid-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.needle-item-card { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 10px; }
.needle-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 700; font-size: 0.85rem; }

.modal-actions-footer { padding: 1rem; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 10px; }

/* PRINT STYLES */
.print-only { display: none; }
@media print {
    .no-print { display: none !important; }
    body { background: #fff !important; color: #000 !important; padding: 0 !important; }
    .print-only { display: block !important; width: 100% !important; }
    .printable-receipt-area { padding: 20px; font-family: 'JetBrains Mono', monospace; }
}
