:root {
    --primary:        #1e3a8a;   /* Indigo */
    --primary-hover:  #172554;
    --primary-light:  #e0f2fe;
    --success:        #16a34a;
    --danger:         #dc2626;
    --warning:        #d97706;

    --sidebar-bg:       #1e3a8a;   /* Slate 800 */
    --sidebar-section:  #1e40af;   /* Slate 700 */
    --sidebar-hover:    #1e40af;
    --sidebar-active:   #1e3a8a;   /* Indigo active */
    --sidebar-text:     #cbd5e1;
    --sidebar-active-text: #ffffff;
    --sidebar-width:    230px;

    --topbar-bg:    #ffffff;
    --bg-main:      #f1f5f9;
    --border-color: #e2e8f0;
    --card-bg:      #ffffff;
    --text-main:    #172554;
    --text-muted:   #64748b;
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    background: #dff0f0;
    color: var(--text-main);
    font-size: 13.5px;
    line-height: 1.5;
    zoom: 1;
}

/* ── LAYOUT ── */
.wrapper { display: flex; width: 100%; height: 100vh !important; max-height: 100vh !important; overflow: hidden !important; }

#content {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0 !important;
    background: #dff0f0;
    overflow-y: auto;
}

/* ── TOPBAR ── */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Shortcut bar below topbar */
.shortcut-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 5px 20px;
    flex-wrap: wrap;
}
.shortcut-bar .shortcut-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-main);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.shortcut-bar .shortcut-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.shortcut-bar .shortcut-btn .kbd {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-muted);
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    padding: 0 4px;
    line-height: 1.6;
}
.shortcut-bar .divider { width: 1px; height: 18px; background: var(--border-color); margin: 0 4px; }

/* main content padding */
main { padding: 16px 20px; flex: 1; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--text-main); margin: 0; }
.page-title { font-size: 15px; font-weight: 700; margin-bottom: 0; color: var(--text-main); }
.card-title, .modal-title { font-size: 13px; font-weight: 600; }
.section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #1e40af transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #1e40af; border-radius: 4px; }

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 52px;
    background: #172554; /* Slate 900 for brand */
    border-bottom: 1px solid #1e40af;
    flex-shrink: 0;
}
.sidebar .brand-name {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}
.sidebar .brand-tag {
    font-size: 9px;
    font-weight: 600;
    color: #0ea5e9;
    background: rgba(14,165,233,0.12);
    border: 1px solid rgba(14,165,233,0.25);
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Header */
.sidebar .nav-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ffffff;
    padding: 14px 14px 4px;
}

/* Nav Links */
.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 2px solid transparent;
    font-size: 12.5px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
}
.sidebar .nav-link i {
    font-size: 13px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.7;
}
.sidebar .nav-link .nav-kbd {
    margin-left: auto;
    font-size: 9.5px;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(255,255,255,0.1);
    border: 1px solid #3b82f6;
    border-radius: 3px;
    padding: 1px 5px;
    line-height: 1.5;
    opacity: 0.8;
    transition: opacity 0.15s;
}
.sidebar .nav-link:hover .nav-kbd { opacity: 1; background: rgba(255,255,255,0.2); }
.sidebar .nav-link:hover {
    background: var(--sidebar-hover);
    color: #e2e8f0;
    border-left-color: #3b82f6;
}
.sidebar .nav-link:hover i { opacity: 1; }
.sidebar .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    border-left-color: #7dd3fc;
    font-weight: 500;
}
.sidebar .nav-link.active i { opacity: 1; }
.sidebar .nav-link .badge-sidebar {
    margin-left: auto;
    font-size: 10px;
    background: var(--danger);
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* ── CARDS ── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 1rem;
}
.card-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-body { padding: 14px; }
.card-footer {
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 8px 14px;
}

/* ── TABLES ── */
.table { margin-bottom: 0; font-size: 13px; }
.table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    white-space: nowrap;
}
.table td {
    padding: 7px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
}
.table tbody tr:hover td { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }

/* ── BUTTONS ── */
.btn {
    font-weight: 500;
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 13px;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(30,58,138,0.25);
}
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-xs { padding: 2px 8px; font-size: 11px; }

/* ── FORMS ── */
.form-label {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 3px;
    display: block;
}
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    font-size: 13px;
    background: #fff;
    color: var(--text-main);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,58,138,0.12);
    outline: none;
}
.form-control-sm, .form-select-sm { font-size: 12px; padding: 4px 8px; }

/* ── BADGES ── */
.badge {
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.2px;
}

/* ── ALERTS ── */
.alert { border-radius: 6px; font-size: 12.5px; padding: 10px 14px; border: none; }

/* ── MODALS ── */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}
.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
}
.modal-body { padding: 16px; }
.modal-footer {
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 0 0 8px 8px;
}

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 36px 20px; }
.empty-state i { font-size: 32px; color: #cbd5e1; display: block; margin-bottom: 10px; }
.empty-state h5 { color: var(--text-main); font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.empty-state p { color: var(--text-muted); font-size: 12px; margin: 0; }

/* ── UTILITY ── */
.text-primary { color: var(--primary) !important; }
.bg-primary { background: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.fw-600 { font-weight: 600; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
/* BUSY UI CLASSES */
.busy-list-container {
    background-color: #f1f0fa;
    border: 2px solid #1e3a8a;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    width: 98%;
    margin: 20px auto;
    font-family: Arial, sans-serif;
}
.busy-list-header {
    background-color: #1e3a8a;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.busy-toolbar {
    background-color: #e6e6e6;
    border-bottom: 1px solid #999;
    padding: 5px 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    flex-wrap: wrap;
}
.busy-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.busy-list-table th, .busy-list-table td {
    border: 1px solid #999;
    padding: 4px 8px;
    background: #fff;
}
.busy-list-table th {
    background-color: #e6e6e6;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}
.busy-input-sm {
    padding: 2px 5px;
    border: 1px solid #999;
    font-size: 13px;
}
.busy-btn-sm {
    background-color: #e6e6e6;
    border: 1px solid #999;
    padding: 2px 10px;
    font-size: 13px;
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.busy-btn-sm:hover {
    background-color: #d9d9d9;
}

.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary h4, .bg-primary h5, .bg-primary h6 { color: white !important; }

/* ── BUSY CREATE / VOUCHER FORMS ── */
.busy-create-box {
    background-color: #f1f0fa;
    border: 2px solid #1e3a8a;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    max-width: 1140px;
    width: 98%;
    margin: 10px auto 20px;
    position: relative;
    padding-bottom: 10px;
    box-sizing: border-box;
    border-radius: 4px;
}
.busy-create-header {
    background-color: #1e3a8a;
    color: white;
    text-align: center;
    padding: 3px 15px;
    font-size: 13.5px;
    font-weight: bold;
    width: 45%;
    min-width: 250px;
    margin: 8px auto 12px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.busy-form-row {
    display: flex;
    margin: 4px 8px;
    align-items: center;
    min-width: 0;
}
.busy-label {
    width: 125px;
    min-width: 125px;
    flex-shrink: 0;
    font-size: 12.5px;
    color: #333;
    font-weight: bold;
}
.busy-input {
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
    padding: 3px 6px;
    border: 1px solid #999;
    background-color: #fff;
    font-size: 12.5px;
    font-weight: bold;
    box-sizing: border-box;
}
.busy-input:focus {
    background-color: #ffffcc;
    outline: none;
    border: 1px solid #1e3a8a;
}
.busy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin-top: 5px;
}
.busy-table th, .busy-table td {
    border: 1px solid #999;
    padding: 4px;
}
.busy-table th {
    background-color: #e6e6e6;
    text-align: left;
}
.busy-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 12px;
    margin-bottom: 8px;
}
.busy-btn-text {
    background-color: #e6e6e6;
    border: 1px solid #999;
    padding: 3px 18px;
    font-size: 12px;
    font-weight: bold;
    color: black;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    border-radius: 2px;
}
.busy-btn-text:hover {
    background-color: #d9d9d9;
}

/* ========================================================
   BUSY / ERP THEME - FLAT PICKR & TOM SELECT STYLING
   ======================================================== */

/* Flatpickr Datepicker Customization */
.flatpickr-calendar {
    font-family: inherit !important;
    font-size: 12px !important;
    border: 1px solid #1e3a8a !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    border-radius: 3px !important;
    z-index: 99999 !important;
}
.flatpickr-months {
    background: #1e3a8a !important;
    color: #ffffff !important;
    border-top-left-radius: 2px !important;
    border-top-right-radius: 2px !important;
}
.flatpickr-current-month {
    font-size: 13px !important;
    font-weight: bold !important;
    color: #ffffff !important;
    padding-top: 4px !important;
}
.flatpickr-current-month .numInputWrapper span.arrowUp:after {
    border-bottom-color: #ffffff !important;
}
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    border-top-color: #ffffff !important;
}
.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month {
    color: #ffffff !important;
    fill: #ffffff !important;
    padding: 6px !important;
}
.flatpickr-months .flatpickr-prev-month:hover svg, 
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #93c5fd !important;
}
span.flatpickr-weekday {
    background: #172554 !important;
    color: #bfdbfe !important;
    font-weight: bold !important;
    font-size: 11px !important;
}
.flatpickr-day {
    font-size: 12px !important;
    font-weight: 600 !important;
    height: 30px !important;
    line-height: 30px !important;
    border-radius: 2px !important;
}
.flatpickr-day.today {
    border-color: #1e3a8a !important;
    background: #eff6ff !important;
}
.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange {
    background: #1e3a8a !important;
    border-color: #1e3a8a !important;
    color: #ffffff !important;
}
.flatpickr-day:hover {
    background: #dbeafe !important;
}
.busy-date-alt {
    cursor: pointer !important;
}

/* TomSelect Dropdown Customization */
.ts-wrapper {
    width: 100% !important;
    min-width: 0 !important;
    display: block !important;
}
.ts-control {
    min-height: 25px !important;
    height: 26px !important;
    padding: 2px 6px !important;
    font-size: 12.5px !important;
    font-weight: bold !important;
    border: 1px solid #999 !important;
    border-radius: 1px !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
}
.ts-wrapper.focus .ts-control {
    background-color: #ffffcc !important;
    border-color: #1e3a8a !important;
    box-shadow: none !important;
    outline: none !important;
}
.ts-control > input {
    font-size: 12px !important;
    font-weight: 500 !important;
    height: 20px !important;
    line-height: 20px !important;
}
.ts-control .item {
    font-size: 12px !important;
    font-weight: bold !important;
    color: #111 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.ts-dropdown {
    font-size: 12px !important;
    border: 1px solid #1e3a8a !important;
    border-radius: 2px !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2) !important;
    z-index: 99999 !important;
}
.ts-dropdown .option {
    padding: 4px 8px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.ts-dropdown .active {
    background-color: #1e3a8a !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}
.ts-dropdown .optgroup-header {
    font-size: 11px !important;
    font-weight: bold !important;
    background: #f1f5f9 !important;
    color: #1e3a8a !important;
    padding: 3px 8px !important;
    text-transform: uppercase !important;
}
.busy-table .ts-control,
.busy-grid-table .ts-control {
    border: none !important;
    background: transparent !important;
    height: 100% !important;
    min-height: 22px !important;
    padding: 1px 4px !important;
}
.busy-table .ts-wrapper.focus .ts-control,
.busy-grid-table .ts-wrapper.focus .ts-control {
    background-color: #ffffcc !important;
}

/* TomSelect dropdown_input styling for quick ERP search */
.ts-dropdown .dropdown-input-wrap {
    padding: 5px 8px !important;
    background-color: #f8fafc !important;
    border-bottom: 1px solid #cbd5e1 !important;
}
.ts-dropdown .dropdown-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border: 1px solid #94a3b8 !important;
    border-radius: 2px !important;
    outline: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
}
.ts-dropdown .dropdown-input:focus {
    border-color: #1e3a8a !important;
    background: #ffffcc !important;
    box-shadow: 0 0 0 1px #1e3a8a !important;
}


/* ========================================================
   BUSY ERP FULL-SCREEN WORKSPACE & RIGHT KEYPAD BAR
   ======================================================== */

.busy-erp-root {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    max-height: 100vh !important;
    width: 100vw !important;
    max-width: 100% !important;
    background-color: #dff0f0;
    overflow: hidden !important;
}

.busy-erp-body {
    display: flex !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    background-color: #dff0f0;
    position: relative;
}

.busy-main-workspace {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    min-width: 0 !important;
    width: calc(100% - 140px) !important;
    height: 100% !important;
    max-height: 100% !important;
    background-color: #dff0f0;
    padding: 4px 8px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Right-side Vertical Shortcut Keypad */
.busy-right-keypad {
    width: 142px;
    min-width: 142px;
    max-width: 142px;
    background-color: #f0f2f5;
    border-left: 2px solid #8c9ba5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 2px;
    box-sizing: border-box;
    user-select: none;
    z-index: 1020;
    flex-shrink: 0;
}

.keypad-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.keypad-divider {
    height: 1px;
    background: #cbd5e1;
    margin: 4px 3px;
    border-bottom: 1px solid #ffffff;
}

.busy-key-btn {
    display: flex;
    align-items: center;
    height: 25px;
    background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%);
    border: 1px solid #7a8a99;
    border-radius: 2px;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #cccccc, 0 1px 2px rgba(0,0,0,0.12);
    padding: 0 6px;
    margin: 2px 2px;
    text-decoration: none !important;
    color: #111827 !important;
    cursor: pointer;
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.1s;
}

.busy-key-btn:hover {
    background: #ffffcc !important;
    border-color: #1e3a8a !important;
    color: #1e3a8a !important;
}

.busy-key-btn:active {
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.3) !important;
    background: #e2e8f0 !important;
}

.busy-key-btn .key-badge {
    width: 20px;
    min-width: 20px;
    height: 16px;
    border-right: 1px solid #94a3b8;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #0f172a;
}

.busy-key-btn .key-label {
    font-size: 10.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.keypad-bottom {
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid #cbd5e1;
}

.keypad-date {
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    color: #334155;
    padding: 4px 2px 2px;
    line-height: 1.2;
}

/* Bottom Dark Teal Keyboard Strip */
.busy-bottom-keys {
    background-color: #1e4745;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 500;
    padding: 3px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    border-top: 1px solid #143533;
    z-index: 1030;
}

.busy-bottom-keys span {
    white-space: nowrap;
}

.busy-bottom-keys b {
    color: #99f6e4;
}

/* Bottom Status Footer */
.busy-status-footer {
    background-color: #ffffff;
    border-top: 2px solid #1e4745;
    font-size: 11.5px;
    color: #1f2937;
    display: flex;
    align-items: center;
    padding: 3px 16px;
    gap: 20px;
    min-height: 25px;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.08);
    z-index: 1030;
}

.busy-status-footer .status-col {
    white-space: nowrap;
}

.busy-brand-text {
    font-size: 14px;
    font-weight: 900;
    color: #1e3a8a;
    letter-spacing: -0.5px;
}

.busy-brand-sub {
    font-size: 10px;
    font-weight: bold;
    color: #0284c7;
}

/* Centered Top Title Badge */
.busy-title-badge {
    background-color: #b91c1c;
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    padding: 2px 22px;
    border-radius: 2px;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    border: 1px solid #7f1d1d;
    margin: 4px auto 10px;
    text-align: center;
}

/* Full Width Screen Container for Vouchers */
.busy-screen-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 4px 6px !important;
    box-sizing: border-box;
}

/* Grid Table Authentic BUSY Desktop Styling */
.busy-grid-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #475569;
    font-size: 12.5px;
}

.busy-grid-table th {
    background: #e2e8f0;
    color: #0f172a;
    font-weight: bold;
    border: 1px solid #94a3b8;
    padding: 3px 6px;
    font-size: 12px;
}

.busy-grid-table td {
    border: 1px solid #cbd5e1;
    padding: 0 !important;
    height: 28px !important;
    vertical-align: middle;
    box-sizing: border-box;
}

.busy-grid-table td.cell-pad {
    padding: 2px 8px !important;
}

/* Authentic BUSY ERP Grid Table Inputs */
.busy-input-cell {
    display: block !important;
    width: 100% !important;
    height: 28px !important;
    line-height: 28px !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    color: #0f172a !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Hide number spinner buttons across all browsers */
.busy-input-cell::-webkit-inner-spin-button,
.busy-input-cell::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.busy-input-cell {
    -moz-appearance: textfield !important;
}

/* Active focus cell glow */
.busy-input-cell:focus {
    background-color: #ffffcc !important;
    box-shadow: inset 0 0 0 1.5px #1e3a8a !important;
}

/* Readonly cell styling */
.busy-input-cell:read-only,
.busy-input-cell[readonly] {
    background-color: #f8fafc !important;
    color: #1e3a8a !important;
    font-weight: 700 !important;
    cursor: default !important;
}

/* TomSelect inside grid table cell */
.busy-grid-table td .ts-wrapper {
    width: 100% !important;
    height: 28px !important;
    margin: 0 !important;
}
.busy-grid-table td .ts-control {
    border: none !important;
    background: transparent !important;
    height: 28px !important;
    min-height: 28px !important;
    line-height: 24px !important;
    padding: 2px 8px !important;
    font-size: 12px !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
}
.busy-grid-table td .ts-wrapper.focus .ts-control {
    background-color: #ffffcc !important;
    box-shadow: inset 0 0 0 1.5px #1e3a8a !important;
}

.busy-grid-table tr:hover {
    background-color: #f8fafc;
}

/* Voucher Info Fieldset Panel */
.busy-vch-info-panel {
    background: #e8f7f7;
    border: 1px solid #7ebaba;
    border-radius: 2px;
    height: 100%;
    min-height: 180px;
    padding: 6px 10px;
    box-sizing: border-box;
}

.busy-vch-info-panel legend {
    font-size: 11px;
    font-weight: bold;
    color: #0d9488;
    padding: 0 6px;
    width: auto;
    float: none;
    margin-bottom: 0;
}

/* Long Narration Bar */
.busy-long-narration-wrap {
    margin-top: 8px;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    border-radius: 4px !important;
    padding: 4px 8px 6px !important;
}

.busy-long-narration-wrap legend {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    padding: 0 6px !important;
    width: auto !important;
    float: none !important;
    margin-bottom: 2px !important;
}

.busy-long-narration-input,
.busy-narration-textarea {
    width: 100% !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 3px !important;
    padding: 6px 10px !important;
    font-size: 12.5px !important;
    font-family: inherit !important;
    outline: none !important;
    box-sizing: border-box !important;
    resize: vertical !important;
    line-height: 1.4 !important;
}

.busy-long-narration-input:focus,
.busy-narration-textarea:focus {
    background-color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
    color: #000000 !important;
}

.busy-long-narration-input::placeholder,
.busy-narration-textarea::placeholder {
    color: #94a3b8 !important;
    font-style: normal !important;
}

/* Master Screen / Form Container */
.busy-master-container {
    width: 100%;
    max-width: 960px;
    margin: 12px auto;
    background: #f8fafc;
    border: 2px solid #1e3a8a;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 16px 20px;
    box-sizing: border-box;
}

.busy-master-full {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px 15px;
    box-sizing: border-box;
}

/* Authentic BUSY Fieldset */
.busy-fieldset {
    border: 1px solid #7ebaba !important;
    background: #ffffff;
    border-radius: 3px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
    min-width: 0;
}

.busy-fieldset legend {
    font-size: 11.5px;
    font-weight: 700;
    color: #0d9488;
    padding: 0 8px;
    width: auto;
    float: none;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Master Form Row */
.busy-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.busy-form-row .busy-label {
    width: 130px;
    min-width: 130px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1e3a8a;
    margin: 0;
}

.busy-form-row .busy-input {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    height: 28px;
    padding: 2px 8px;
    border: 1px solid #94a3b8;
    background: #ffffff;
    font-size: 12.5px;
    color: #0f172a;
    border-radius: 2px;
}

.busy-form-row .busy-input:focus {
    background-color: #eff6ff;
    border-color: #0284c7;
    outline: none;
    box-shadow: 0 0 0 1px #0284c7;
}

.busy-form-row textarea.busy-input {
    height: auto;
    min-height: 58px;
    resize: vertical;
}

.busy-form-row .has-error {
    border-color: #dc2626 !important;
    background-color: #fff1f2 !important;
}

/* Action Footer */
.busy-form-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #cbd5e1;
}

.busy-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 18px;
    font-size: 12.5px;
    font-weight: 700;
    border: 1px solid #94a3b8;
    background: #e2e8f0;
    color: #0f172a;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.1s;
}

.busy-btn-action:hover {
    background: #cbd5e1;
    color: #000;
}

.busy-btn-action.btn-save {
    background: #1e3a8a;
    border-color: #172554;
    color: #ffffff;
}

.busy-btn-action.btn-save:hover {
    background: #1e40af;
    color: #ffffff;
}

.busy-btn-action.btn-quit {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.busy-btn-action.btn-quit:hover {
    background: #fecaca;
    color: #7f1d1d;
}
