/* Register View Styling */

/* Open Sans Font - Bulletproof @font-face */
@font-face {
    font-family: 'OpenSans';
    src: url('../fonts/OpenSans.eot');
    src: url('../fonts/OpenSans.eot?#iefix') format('embedded-opentype'),
         url('../fonts/OpenSans.woff2') format('woff2'),
         url('../fonts/OpenSans.woff') format('woff'),
         url('../fonts/OpenSans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    color: #333;
}

/* Open Sans Application - UI Elements Only (NOT print preview/checks) */
header,
h1,
.header-left,
.header-logo,
.logo-main,
.logo-tagline,
.user-info,
.credits-display,
.reader-bar,
.register-heading,
.register-table th,
.register-table td,
.btn,
.toolbar-btn,
.account-manager-btn,
.payor-modal-container,
.filter-panel,
.inline-view-header,
.print-modal-container,
#preferencesModal,
#multiSelectModal,
.modal-content {
    font-family: 'OpenSans', Arial, sans-serif;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 5px 10px 10px 10px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 2px solid #2D4492;
}

/* Reader Bar - Context-sensitive tooltip display */
.reader-bar {
    background: linear-gradient(to bottom, #f0f4ff, #e8eeff);
    border: 1px solid #2D4492;
    border-radius: 4px;
    padding: 8px 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #2D4492;
    min-height: 20px;
    font-weight: 500;
    text-align: center;
    transition: opacity 0.15s ease-in-out;
}

.reader-bar.message-mode {
    font-weight: 600;
}

.reader-bar.message-success {
    background: linear-gradient(to bottom, #d4edda, #c3e6cb);
    color: #155724;
    border-color: #28a745;
}

.reader-bar.message-error {
    background: linear-gradient(to bottom, #f8d7da, #f5c6cb);
    color: #721c24;
    border-color: #dc3545;
}

.reader-bar.message-info {
    background: linear-gradient(to bottom, #cce5ff, #b8daff);
    color: #004085;
    border-color: #007bff;
}

.reader-bar.flash {
    opacity: 0.3;
}

.header-title {
    display: flex;
    align-items: center;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

h1 {
    color: #2D4492;
    font-size: 22px;
}

.btn {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.1s ease;
}

.btn-primary {
    background-color: #2D4492;
    color: white;
    box-shadow: 
        0 4px 0 #1e2f5f,
        0 6px 10px rgba(0,0,0,0.3);
    transform: translateY(0);
}

.btn-primary:hover:not(:disabled) {
    background-color: #2D4492;
    box-shadow: 
        0 4px 0 #1e2f5f,
        0 8px 15px rgba(0,0,0,0.35);
}

.btn-primary:active:not(:disabled) {
    box-shadow: 
        0 1px 0 #1e2f5f,
        0 2px 5px rgba(0,0,0,0.2);
    transform: translateY(3px);
}

.btn-primary:hover:not(:disabled) {
    background-color: #1e2f5f;
}

.btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    margin: 0 2px;
    box-shadow: 
        0 3px 0 #545b62,
        0 4px 8px rgba(0,0,0,0.25);
    transform: translateY(0);
}

.btn-secondary:hover {
    background-color: #6c757d;
    box-shadow: 
        0 3px 0 #545b62,
        0 6px 12px rgba(0,0,0,0.3);
}

.btn-secondary:active {
    box-shadow: 
        0 1px 0 #545b62,
        0 2px 4px rgba(0,0,0,0.2);
    transform: translateY(2px);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    box-shadow: 
        0 3px 0 #a71d2a,
        0 4px 8px rgba(0,0,0,0.25);
    transform: translateY(0);
}

.btn-danger:hover {
    background-color: #dc3545;
    box-shadow: 
        0 3px 0 #a71d2a,
        0 6px 12px rgba(0,0,0,0.3);
}

.btn-danger:active {
    box-shadow:
        0 1px 0 #a71d2a,
        0 2px 4px rgba(0,0,0,0.2);
    transform: translateY(2px);
}

/* Check Form Container (inline in SPA mode) */
.check-form-container {
    background: white;
    padding: 10px;
}

.check-form-container .check-form-wrapper {
    /* Override check-form.css if needed for inline display */
    max-width: 100%;
}

/* Main Layout with Toolbar */
.main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.main-layout.toolbar-left {
    flex-direction: row-reverse;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.register-container {
    overflow-x: auto;
    position: relative;
}

.register-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.register-table thead {
    background-color: #2D4492;
    color: white;
}

.register-table th {
    padding: 6px 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #1e2f5f;
    font-size: 13px;
}

.register-table td {
    padding: 4px 12px;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
    line-height: 1.2;
}

.register-table tbody tr {
    transition: background-color 0.2s;
}

.register-table tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.register-table tbody tr.selected {
    background-color: #e7f3ff;
}

.col-select {
    width: 40px;
    text-align: center;
}

.col-select input[type="checkbox"] {
    cursor: pointer;
    width: 14px;
    height: 14px;
}

.col-print {
    width: 60px;
    text-align: center;
}

.col-payor {
    width: 25%;
    min-width: 200px;
}

.col-date {
    width: 120px;
}

.col-checknum {
    width: 100px;
}

.col-amount {
    width: 100px;
    text-align: right;
}

.col-memo {
    width: 150px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-demo-print {
    width: auto;
    min-width: 120px;
    text-align: right;
    padding-right: 10px;
}

.col-demo-print .btn {
    padding: 2px 10px;
    font-size: 11px;
    line-height: 1.2;
}

.col-actions {
    width: 220px;
    text-align: center;
}

.print-status {
    font-size: 18px;
    font-weight: bold;
    display: inline-block;
}

.print-status.printed {
    color: #28a745;
}

.print-status.not-printed {
    color: #dc3545;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 10px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.actions-cell {
    white-space: nowrap;
}

/* Print Modal Styles */
.print-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.print-modal-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    width: 900px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.print-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #2D4492;
    background-color: #f8f9fa;
}

.print-modal-header h2 {
    color: #2D4492;
    font-size: 20px;
    margin: 0;
}

.print-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: color 0.2s;
}

.print-modal-close:hover {
    color: #000;
}

.print-credit-info {
    padding: 15px 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border-bottom: 1px solid #ffc107;
    text-align: center;
}

.print-credit-info .credit-warning {
    font-size: 16px;
    color: #856404;
    margin: 0;
    font-weight: 500;
}

.print-credit-info .credit-details {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

.print-credit-info .credit-count {
    font-weight: bold;
    color: #2D4492;
}

.print-modal-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: #f5f5f5;
}

.print-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
}

/* Print styles - hide modal UI, show only check content */
@media print {
    .print-modal-overlay {
        background: white;
        position: static;
    }
    
    .print-modal-container {
        box-shadow: none;
        max-width: 100%;
        max-height: none;
        width: 100%;
    }
    
    .print-modal-header,
    .print-modal-actions,
    .print-modal-close,
    .print-credit-info {
        display: none !important;
    }
    
    .print-modal-content {
        padding: 0;
        background: white;
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
    }
    
    .print-checks-container {
        display: block;
    }
    
    .check {
        page-break-after: always;
        page-break-inside: avoid;
        margin: 0;
    }
    
    .check:last-child {
        page-break-after: auto;
    }
    
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        display: none;
    }
}

/* Welcome Modal Styles */
.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 50%, #5c6bc0 100%);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 15px;
}

.welcome-modal-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
    max-width: 380px;
    width: 100%;
    margin: auto;
}

.welcome-modal-header {
    background: linear-gradient(135deg, #2D4492 0%, #4a5db8 100%);
    color: white;
    padding: 14px;
    text-align: center;
}

.welcome-modal-header h1 {
    color: white;
    font-size: 18px;
    margin-bottom: 2px;
}

.welcome-subtitle {
    font-size: 11px;
    opacity: 0.9;
    margin: 0;
    font-weight: 300;
}

.welcome-modal-content {
    padding: 14px;
}

.welcome-modal-content h2 {
    color: #2D4492;
    font-size: 14px;
    margin-bottom: 4px;
    text-align: center;
}

.welcome-description {
    color: #666;
    text-align: center;
    margin-bottom: 12px;
    font-size: 11px;
}

.welcome-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.welcome-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.welcome-field label {
    font-weight: 600;
    color: #333;
    font-size: 11px;
}

.welcome-input {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.welcome-input:focus {
    outline: none;
    border-color: #2D4492;
    box-shadow: 0 0 0 2px rgba(45, 68, 146, 0.15);
}

.welcome-input::placeholder {
    color: #999;
}

.welcome-privacy {
    margin-top: 12px;
    padding: 8px;
    background: #f0f7ff;
    border-radius: 5px;
    border-left: 3px solid #2D4492;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.privacy-icon {
    font-size: 14px;
}

.welcome-privacy p {
    color: #333;
    font-size: 10px;
    line-height: 1.4;
    margin: 0;
}

.welcome-modal-actions {
    padding: 10px 14px 14px;
    text-align: center;
}

.btn-large {
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
}

/* Vertical Toolbar Styles */
.toolbar {
    width: 170px;
    flex-shrink: 0;
    background: #2D4492;
    border: 2px solid #2D4492;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.toolbar-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toolbar-divider {
    height: 1px;
    background: rgba(255,255,255,0.3);
    margin: 6px 0;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border: none;
    border-radius: 4px;
    background: white;
    color: #4a5568;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.1s ease;
    text-align: left;
    width: 100%;
    box-shadow: 
        0 3px 0 #c0c0c0,
        0 4px 6px rgba(0,0,0,0.15);
    transform: translateY(0);
}

.toolbar-btn.compact {
    padding: 2px 9px;
}

.toolbar-btn:hover:not(:disabled) {
    background: #e8f0fe;
    color: #2D4492;
    box-shadow: 
        0 3px 0 #c0c0c0,
        0 5px 10px rgba(0,0,0,0.2);
}

.toolbar-btn:active:not(:disabled) {
    box-shadow: 
        0 1px 0 #c0c0c0,
        0 2px 3px rgba(0,0,0,0.1);
    transform: translateY(2px);
}

.toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f0f0f0;
}

.toolbar-btn.active {
    background: #2D4492;
    color: white;
}

.toolbar-btn.toggle.active {
    background: #5cb85c;
    color: white;
}

.toolbar-btn.danger:hover:not(:disabled) {
    background: #ffebee;
    color: #c62828;
}

.toolbar-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.toolbar-label {
    flex: 1;
    white-space: nowrap;
}

/* Selected Row Highlighting */
.register-table tbody tr.highlighted {
    background-color: #e3f2fd !important;
    outline: 2px solid #2D4492;
    outline-offset: -2px;
}

.register-table tbody tr.highlighted:hover {
    background-color: #bbdefb !important;
}

/* Selection count badge */
.selection-count {
    background: #2D4492;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* Search/Filter Panel Styles */
.filter-panel {
    margin-bottom: 15px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.filter-toggle {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #2D4492;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.filter-toggle:hover {
    background-color: #e8f0fe;
}

.filter-toggle-icon {
    font-size: 10px;
    transition: transform 0.3s;
}

.filter-toggle.expanded .filter-toggle-icon {
    transform: rotate(180deg);
}

.filter-results {
    font-size: 13px;
    color: #666;
}

.filter-results strong {
    color: #2D4492;
}

.filter-body {
    padding: 15px;
    background: white;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-field label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
}

.filter-field input,
.filter-field select {
    padding: 8px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: #2D4492;
    box-shadow: 0 0 0 2px rgba(45, 68, 146, 0.15);
}

.filter-field input::placeholder {
    color: #a0aec0;
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.filter-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* Hide filter panel during print */
@media print {
    .filter-panel {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .main-layout {
        flex-direction: column;
    }
    
    .toolbar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .toolbar-section {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .toolbar-btn {
        flex: 1;
        min-width: 90px;
        justify-content: center;
    }
    
    .toolbar-divider {
        display: none;
    }

    .register-container {
        overflow-x: scroll;
    }

    .col-payor {
        min-width: 150px;
    }
    
    .print-modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .welcome-modal-header h1 {
        font-size: 18px;
    }
    
    .welcome-subtitle {
        font-size: 12px;
    }
    
    .welcome-modal-content {
        padding: 15px;
    }
    
    .welcome-modal-container {
        max-width: 95%;
    }
    
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
}

/* ============================================
   INLINE VIEWS (Account Manager, Settings, etc.)
   ============================================ */

.inline-view {
    background: white;
    border-radius: 8px;
    padding: 10px 20px 20px 20px;
    min-height: 400px;
}

.inline-view-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #2D4492 0%, #4a5db8 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.inline-view-header h2,
.inline-view-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.inline-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inline-view-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

.inline-view-header.admin-header-red {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
}

.inline-view-content {
    padding: 5px 0;
}

/* Transaction Log Styles */
.transaction-log-filters {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.transaction-log-filters .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.transaction-log-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-log-filters .filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
}

.transaction-log-filters .filter-group select,
.transaction-log-filters .filter-group input {
    padding: 6px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 13px;
    min-width: 120px;
}

.transaction-log-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.transaction-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.transaction-log-table th {
    background: #2D4492;
    color: white;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.transaction-log-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.transaction-log-table tr:hover {
    background: #f0f4ff;
    cursor: pointer;
}

.transaction-log-table tr.deleted-row {
    background: #fff5f5;
    color: #666;
}

.transaction-log-table tr.deleted-row:hover {
    background: #ffe0e0;
}

/* Action Badges */
.action-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.action-badge.action-created {
    background: #c6f6d5;
    color: #22543d;
}

.action-badge.action-edited {
    background: #bee3f8;
    color: #2a4365;
}

.action-badge.action-printed {
    background: #e9d5ff;
    color: #6b21a8;
}

.action-badge.action-deleted {
    background: #fed7d7;
    color: #742a2a;
}

/* Deleted Badge */
.deleted-badge {
    background: #e53e3e;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 10px;
}

/* Transaction Log Pagination */
.transaction-log-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-top: 10px;
}

.transaction-log-pagination .pagination-info {
    font-size: 12px;
    color: #666;
}

.transaction-log-pagination .pagination-buttons {
    display: flex;
    gap: 5px;
}

.transaction-log-pagination .btn {
    padding: 4px 10px;
    font-size: 11px;
}

/* Check History Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #2D4492;
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    opacity: 0.8;
}

.modal-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* History Timeline */
.history-timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-entry {
    position: relative;
    padding-bottom: 20px;
    border-left: 2px solid #e2e8f0;
    padding-left: 20px;
    margin-left: 10px;
}

.timeline-entry:last-child {
    border-left: none;
    padding-bottom: 0;
}

.timeline-entry.latest {
    border-left-color: #2D4492;
}

.timeline-marker {
    position: absolute;
    left: -8px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 2px solid white;
}

.timeline-marker.action-created {
    background: #48bb78;
}

.timeline-marker.action-edited {
    background: #4299e1;
}

.timeline-marker.action-printed {
    background: #9f7aea;
}

.timeline-marker.action-deleted {
    background: #f56565;
}

.timeline-content {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
}

.timeline-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-time {
    font-size: 12px;
    color: #666;
}

.timeline-user {
    font-size: 12px;
    color: #4a5568;
    font-style: italic;
}

.timeline-changes {
    font-size: 12px;
    color: #e53e3e;
    background: #fff5f5;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.timeline-snapshot {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: #4a5568;
}

.timeline-snapshot span strong {
    color: #2d3748;
}

/* Account Manager Grid */
.account-manager-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.account-manager-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.1s ease;
    color: white;
    font-weight: 600;
    box-shadow: 
        0 5px 0 rgba(0,0,0,0.3),
        0 7px 15px rgba(0,0,0,0.25);
    transform: translateY(0);
}

.account-manager-btn:hover {
    box-shadow: 
        0 5px 0 rgba(0,0,0,0.3),
        0 10px 20px rgba(0,0,0,0.3);
}

.account-manager-btn:active {
    box-shadow: 
        0 2px 0 rgba(0,0,0,0.3),
        0 3px 8px rgba(0,0,0,0.2);
    transform: translateY(3px);
}

.account-manager-btn.green { background: linear-gradient(135deg, #5cb85c 0%, #449d44 100%); }
.account-manager-btn.red { background: linear-gradient(135deg, #e53935 0%, #c62828 100%); }
.account-manager-btn.blue { background: linear-gradient(135deg, #2D4492 0%, #1e2f5f 100%); }
.account-manager-btn.gray { background: linear-gradient(135deg, #6c757d 0%, #545b62 100%); }

.am-btn-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.am-btn-label {
    font-size: 0.95rem;
}

/* Order Credits View */
.order-credits-header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 20px;
}

.order-credits-header p {
    margin: 0 0 10px 0;
}

.order-credits-header .highlight {
    font-weight: 600;
    color: #ffd700;
}

.package-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.package-section h3 {
    margin: 0 0 15px 0;
    color: #2d3748;
}

.package-group {
    margin-bottom: 20px;
}

.package-group h4 {
    margin: 0 0 12px 0;
    color: #4a5568;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.package-option {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.package-option:hover {
    background: #edf2f7;
}

.package-option.selected {
    background: #ebf8ff;
    border-color: #667eea;
}

.package-option input[type="radio"] {
    margin-right: 12px;
    margin-top: 3px;
}

.package-details {
    flex: 1;
}

.package-description {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 4px;
}

.package-price {
    font-weight: 700;
    color: #2e7d32;
}

.password-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.password-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.password-section input {
    width: 100%;
    max-width: 300px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
}

.action-section {
    text-align: center;
    padding: 20px;
}

.btn-order {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-order:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-order:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Compact Order Credits View */
.order-credits-compact {
    padding: 0 !important;
}

/* Old banner style removed - now using .package-column-banner in 3-column layout */

.package-section-compact {
    padding: 12px 20px;
}

.package-section-compact h3 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: #2d3748;
}

.package-group-compact {
    margin-bottom: 12px;
}

.package-group-compact h4 {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: #4a5568;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
}

.package-columns {
    display: flex;
    gap: 20px;
}

.package-columns-3 {
    display: flex;
    gap: 15px;
}

.package-column-banner {
    flex: 0 0 200px;
    background: linear-gradient(135deg, #5a6fd6 0%, #6b5b95 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1.5;
}

.package-column-banner p {
    margin: 0 0 10px 0;
}

.package-column-banner p:last-child {
    margin-bottom: 0;
}

.package-column-banner .highlight {
    font-weight: 600;
    color: #ffd700;
}

.package-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.package-column h4 {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: #4a5568;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    line-height: 1.3;
}

.package-column h4 small {
    font-weight: normal;
    font-size: 0.75rem;
    color: #718096;
}

.package-row {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.package-option-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9rem;
}

.package-option-compact:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.package-option-compact.selected {
    background: #ebf8ff;
    border-color: #667eea;
}

.package-option-compact input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}

.pkg-qty {
    font-weight: 700;
    color: #2d3748;
    flex: 1;
}

.pkg-desc {
    flex: 1;
    color: #4a5568;
    font-size: 0.8rem;
}

.pkg-price {
    font-weight: 700;
    color: #2e7d32;
    white-space: nowrap;
}

.password-section-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

.password-section-compact label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.85rem;
    white-space: nowrap;
}

.password-section-compact input {
    flex: 0 1 200px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.btn-order-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-order-compact:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-order-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.password-error-alert {
    background: #fed7d7;
    color: #c53030;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    border-top: 2px solid #fc8181;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Responsive adjustments for compact view */
@media (max-width: 900px) {
    .package-columns-3 {
        flex-direction: column;
        gap: 12px;
    }
    
    .package-column-banner {
        flex: none;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .package-columns {
        flex-direction: column;
        gap: 16px;
    }
    
    .package-row {
        flex-direction: column;
    }
    
    .password-section-compact {
        flex-direction: column;
        align-items: stretch;
    }
    
    .password-section-compact input {
        flex: 1;
    }
}

/* Order Payment View - Compact */
.payment-banner {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 12px 20px;
}

.payment-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.payment-title {
    font-weight: 700;
    font-size: 1rem;
}

.payment-amount {
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffd700;
    margin-left: auto;
}

.setup-warning-inline {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 10px 15px;
    margin: 10px 15px;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.setup-warning-inline strong {
    color: #e65100;
}

.btn-settings-link {
    background: #ff9800;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.payment-info-banner {
    background: #e8f4fd;
    border-left: 4px solid #3182ce;
    padding: 10px 15px;
    margin: 10px 15px;
    border-radius: 0 6px 6px 0;
    font-size: 0.85rem;
    color: #2b6cb0;
}

/* Scaled check form for payment (80% size) */
.check-form-scaled .check-form-wrapper {
    transform: scale(0.8);
    transform-origin: top center;
    margin-bottom: -80px; /* Compensate for scaling whitespace */
}

.payment-submit-section {
    padding: 12px 15px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.btn-submit-payment {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-submit-payment:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Responsive for payment form */
@media (max-width: 600px) {
    .payment-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .payment-amount {
        margin-left: 0;
    }
}

/* Orders Register Table */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.orders-table th,
.orders-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.orders-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.875rem;
}

.orders-table tbody tr:hover {
    background: #f7fafc;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending { background: #fff3e0; color: #e65100; }
.status-processed { background: #e3f2fd; color: #1565c0; }
.status-printed { background: #e8f5e9; color: #2e7d32; }
.status-shipped { background: #f3e5f5; color: #7b1fa2; }

.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    margin-right: 5px;
}

.btn-view { background: #e3f2fd; color: #1565c0; }
.btn-status { background: #fff3e0; color: #e65100; }

.order-count {
    margin-bottom: 15px;
    color: #718096;
}

/* Users View */
.users-list {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

.users-table th,
.users-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.users-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.8rem;
}

/* Settings View */
.settings-tabs-inline {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.settings-tab-inline {
    padding: 8px 16px;
    border: none;
    background: #f7fafc;
    color: #4a5568;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.settings-tab-inline:hover {
    background: #edf2f7;
}

.settings-tab-inline.active {
    background: #667eea;
    color: white;
}

.settings-tab-content-inline {
    animation: fadeIn 0.2s ease-in;
}

.settings-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.settings-section-header {
    grid-column: span 2;
    font-weight: 600;
    color: #2d3748;
    margin-top: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-field label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.85rem;
}

.settings-input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.settings-note {
    color: #718096;
    font-size: 0.8rem;
    margin-top: 8px;
}

.settings-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Check Form Settings (scaled check form for Settings tab) */
.check-form-settings {
    transform: scale(0.85);
    transform-origin: top left;
    margin-bottom: -60px; /* Compensate for scaling whitespace */
}

.check-form-settings .field {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
}

.check-form-settings .field:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

/* Readonly fields in check form (display-only visual elements) */
.check-form-settings .field.readonly-field {
    background: #e9ecef;
    color: #999;
    border-color: #d1d5db;
    cursor: default;
}

.check-form-settings .field.readonly-field::placeholder {
    color: #bbb;
    font-style: italic;
}

.check-form-settings .field.readonly-field:focus {
    outline: none;
    box-shadow: none;
    background: #e9ecef;
    border-color: #d1d5db;
}

/* ============================================
   Design-A-Check Layout Editor Styles
   ============================================ */

/* Editor Layout - Two column grid */
.editor-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 15px;
}

/* Controls Panel */
.controls-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}

.controls-panel h3 {
    color: #2d3748;
    font-size: 1rem;
    margin-bottom: 10px;
}

.field-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    cursor: pointer;
    background: white;
}

.control-section {
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.control-section h4 {
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* Position Controls */
.position-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.position-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.position-row label {
    width: 22px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.85rem;
}

.pos-btn {
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s;
    min-width: 28px;
}

.pos-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.pos-btn:active {
    background: #e2e8f0;
}

.pos-input {
    width: 45px;
    padding: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
    font-size: 0.85rem;
    background: #f7fafc;
}

.help-text {
    font-size: 0.7rem;
    color: #a0aec0;
    margin-top: 8px;
}

/* Font Controls */
.font-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.font-control label {
    width: 40px;
    font-size: 0.85rem;
    color: #4a5568;
}

.font-control input[type="range"] {
    flex: 1;
    cursor: pointer;
}

#fontSizeValue {
    width: 35px;
    font-size: 0.85rem;
    color: #4a5568;
}

.font-select {
    flex: 1;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85rem;
    background: white;
}

/* Preview Panel */
.preview-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-header h3 {
    color: #2d3748;
    font-size: 1rem;
    margin: 0;
}

.preview-actions-top {
    display: flex;
    gap: 10px;
}

.preview-actions-top .btn {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.preview-panel h3 {
    color: #2d3748;
    font-size: 1rem;
    margin-bottom: 15px;
}

.scale-note {
    font-weight: normal;
    font-size: 0.75rem;
    color: #a0aec0;
}

.check-preview-container {
    border: 2px dashed #cbd5e0;
    border-radius: 4px;
    padding: 10px;
    background: #fafafa;
    outline: none;
}

.check-preview-container:focus {
    border-color: #4299e1;
}

.check-preview {
    /* Check is 8.5" x 3.5" = 816px x 336px at 96dpi */
    /* Scale factor: 600/816 = 0.735 applied to both dimensions */
    width: 600px;
    height: 247px;
    background: #fffef5;
    border: 1px solid #d4d4d4;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-field {
    position: absolute;
    padding: 2px 4px;
    border: 1px dashed transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.preview-field:hover {
    border-color: #90cdf4;
    background: rgba(66, 153, 225, 0.05);
}

.preview-field.selected {
    border-color: #4299e1;
    background: rgba(66, 153, 225, 0.1);
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.3);
}

.field-name {
    font-weight: 600;
}

.field-line {
    font-size: inherit;
    line-height: 1.3;
}

.field-amount {
    font-weight: 600;
    font-size: inherit;
}

.field-micr {
    font-family: 'MICRCHEK', 'Courier New', monospace;
    font-size: 12px;
    letter-spacing: 1px;
}

.micr-field {
    font-family: 'MICRCHEK', 'Courier New', monospace;
}

.preview-note {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 15px;
    text-align: center;
}


/* Responsive for inline views */
@media (max-width: 900px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
    
    .controls-panel {
        max-width: 300px;
        margin: 0 auto 20px;
    }
    
    .check-preview {
        width: 100%;
        max-width: 600px;
        height: auto;
        aspect-ratio: 600 / 247;
    }
}

@media (max-width: 768px) {
    .account-manager-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-form-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-section-header {
        grid-column: span 1;
    }
    
    .check-form-settings {
        transform: scale(0.7);
        margin-bottom: -120px;
    }
}

@media (max-width: 600px) {
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-actions-top {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ============================================
   HELP VIEW ACCORDION STYLES
   ============================================ */

.help-view-compact {
    padding: 5px 10px 10px 10px !important;
    min-height: auto !important;
}

.help-view-compact .inline-view-content {
    padding: 0;
}

.help-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.help-topic {
    border: 1px solid #e2e8f0;
    border-bottom: none;
    overflow: hidden;
    background: white;
}

.help-topic:first-child {
    border-radius: 6px 6px 0 0;
}

.help-topic:last-child {
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0 0 6px 6px;
}

.help-topic-header {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #f7fafc;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.help-topic-header:hover {
    background: #edf2f7;
}

.help-topic.expanded .help-topic-header {
    background: #e8f0fe;
    border-bottom: 1px solid #e2e8f0;
}

.help-topic-icon {
    font-size: 0.55rem;
    color: #4a5568;
    transition: transform 0.2s;
    width: 8px;
    text-align: center;
}

.help-topic.expanded .help-topic-icon {
    transform: rotate(90deg);
    color: #2D4492;
}

.help-topic-title {
    font-weight: 500;
    color: #2d3748;
    font-size: 0.75rem;
}

.help-topic.expanded .help-topic-title {
    color: #2D4492;
    font-weight: 600;
}

.help-topic-content {
    display: none;
    padding: 12px 15px;
    background: white;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4a5568;
    animation: slideDown 0.2s ease-out;
}

.help-topic.expanded .help-topic-content {
    display: block;
}

.help-topic-content p {
    margin: 0 0 10px 0;
}

.help-topic-content p:last-child {
    margin-bottom: 0;
}

.help-topic-content strong {
    color: #2d3748;
}

.help-topic-content ul,
.help-topic-content ol {
    margin: 8px 0;
    padding-left: 22px;
}

.help-topic-content li {
    margin-bottom: 3px;
}

/* ============================================
   DARK THEME
   ============================================ */

body.dark-theme {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

body.dark-theme .container {
    background: #16213e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

body.dark-theme header {
    border-bottom-color: #4a6fa5;
}

body.dark-theme .reader-bar {
    background: linear-gradient(to bottom, #1a2744, #16213e);
    border-color: #4a6fa5;
    color: #b0c4de;
}

body.dark-theme .reader-bar.message-success {
    background: linear-gradient(to bottom, #1e4d2b, #16301e);
    color: #90ee90;
    border-color: #2e7d32;
}

body.dark-theme .reader-bar.message-error {
    background: linear-gradient(to bottom, #4d1e1e, #301616);
    color: #ff9999;
    border-color: #c62828;
}

body.dark-theme .reader-bar.message-info {
    background: linear-gradient(to bottom, #1e3a5f, #162840);
    color: #87ceeb;
    border-color: #1976d2;
}

body.dark-theme .toolbar {
    background: #0f3460;
    border-color: #0f3460;
}

body.dark-theme .toolbar-btn {
    background: #1a1a2e;
    color: #e0e0e0;
    box-shadow: 
        0 3px 0 #0a0a1e,
        0 4px 6px rgba(0,0,0,0.3);
}

body.dark-theme .toolbar-btn:hover:not(:disabled) {
    background: #2a2a4e;
    color: #ffffff;
    box-shadow: 
        0 3px 0 #0a0a1e,
        0 5px 10px rgba(0,0,0,0.4);
}

body.dark-theme .toolbar-btn:active:not(:disabled) {
    box-shadow: 
        0 1px 0 #0a0a1e,
        0 2px 3px rgba(0,0,0,0.2);
    transform: translateY(2px);
}

body.dark-theme .toolbar-btn:disabled {
    background: #1a1a2e;
    opacity: 0.4;
    box-shadow: none;
}

body.dark-theme .toolbar-btn.active {
    background: #4a6fa5;
    color: white;
}

body.dark-theme .toolbar-btn.toggle.active {
    background: #2e7d32;
    color: white;
}

body.dark-theme .toolbar-btn.danger:hover:not(:disabled) {
    background: #4d1e1e;
    color: #ff9999;
}

body.dark-theme .toolbar-divider {
    background: rgba(255,255,255,0.15);
}

body.dark-theme .register-table {
    background: #1a1a2e;
}

body.dark-theme .register-table th {
    background: #0f3460;
    color: #e0e0e0;
    border-bottom-color: #4a6fa5;
}

body.dark-theme .register-table td {
    background: #1a1a2e;
    color: #e0e0e0;
    border-bottom-color: #2a2a4e;
}

body.dark-theme .register-table tbody tr:hover {
    background: #2a2a4e;
}

body.dark-theme .register-table tbody tr.selected {
    background: #1e3a5f;
}

body.dark-theme .register-table tbody tr.printed {
    background: #1e2d1e;
}

body.dark-theme .header-title h1 {
    color: #e0e0e0;
}

body.dark-theme .account-header h2 {
    color: #e0e0e0;
}

body.dark-theme .account-manager-btn {
    background: #0f3460;
    color: #e0e0e0;
}

body.dark-theme .account-manager-btn:hover {
    background: #1e3a5f;
}

body.dark-theme .filter-panel {
    background: #16213e;
    border-color: #4a6fa5;
}

body.dark-theme .filter-panel h3 {
    color: #e0e0e0;
}

body.dark-theme .filter-panel label {
    color: #b0c4de;
}

body.dark-theme .filter-panel input,
body.dark-theme .filter-panel select {
    background: #1a1a2e;
    border-color: #4a6fa5;
    color: #e0e0e0;
}

body.dark-theme .inline-view {
    background: #16213e;
}

body.dark-theme .inline-view-header h2,
body.dark-theme .inline-view-header h3 {
    color: #e0e0e0;
}

/* Dark theme transaction log */
body.dark-theme .transaction-log-filters {
    background: #1a1a2e;
    border-color: #4a6fa5;
}

body.dark-theme .transaction-log-filters .filter-group label {
    color: #b0c4de;
}

body.dark-theme .transaction-log-filters .filter-group select,
body.dark-theme .transaction-log-filters .filter-group input {
    background: #0f172a;
    border-color: #4a6fa5;
    color: #e0e0e0;
}

body.dark-theme .transaction-log-container {
    border-color: #4a6fa5;
}

body.dark-theme .transaction-log-table th {
    background: #0f3460;
}

body.dark-theme .transaction-log-table td {
    background: #1a1a2e;
    border-bottom-color: #4a6fa5;
    color: #e0e0e0;
}

body.dark-theme .transaction-log-table tr:hover td {
    background: #2a2a4e;
}

body.dark-theme .transaction-log-table tr.deleted-row td {
    background: #2d1f1f;
}

body.dark-theme .modal-container {
    background: #1a1a2e;
}

body.dark-theme .modal-header {
    background: #0f3460;
}

body.dark-theme .modal-content {
    color: #e0e0e0;
}

body.dark-theme .timeline-content {
    background: #0f172a;
}

body.dark-theme .timeline-entry {
    border-left-color: #4a6fa5;
}

body.dark-theme .timeline-changes {
    background: #2d1f1f;
    color: #ff9999;
}

body.dark-theme .timeline-snapshot {
    color: #b0c4de;
}

body.dark-theme .timeline-snapshot span strong {
    color: #e0e0e0;
}

body.dark-theme .inline-tabs button {
    background: #1a1a2e;
    color: #b0c4de;
    border-color: #4a6fa5;
}

body.dark-theme .inline-tabs button.active {
    background: #0f3460;
    color: #ffffff;
}

body.dark-theme .settings-section h3 {
    color: #e0e0e0;
    border-bottom-color: #4a6fa5;
}

body.dark-theme .settings-section label {
    color: #b0c4de;
}

body.dark-theme .settings-section input {
    background: #1a1a2e;
    border-color: #4a6fa5;
    color: #e0e0e0;
}

body.dark-theme .order-table th {
    background: #0f3460;
    color: #e0e0e0;
}

body.dark-theme .order-table td {
    background: #1a1a2e;
    color: #e0e0e0;
    border-bottom-color: #2a2a4e;
}

body.dark-theme .status-badge {
    background: #2a2a4e;
    color: #e0e0e0;
}

body.dark-theme .status-badge.pending {
    background: #4a4a1e;
    color: #ffd700;
}

body.dark-theme .status-badge.printed {
    background: #1e4d2b;
    color: #90ee90;
}

/* Dark theme help styles */
body.dark-theme .help-topic {
    border-color: #4a6fa5;
    background: #1a1a2e;
}

body.dark-theme .help-topic-header {
    background: #16213e;
}

body.dark-theme .help-topic-header:hover {
    background: #1e3a5f;
}

body.dark-theme .help-topic.expanded .help-topic-header {
    background: #0f3460;
    border-bottom-color: #4a6fa5;
}

body.dark-theme .help-topic-icon {
    color: #b0c4de;
}

body.dark-theme .help-topic.expanded .help-topic-icon {
    color: #87ceeb;
}

body.dark-theme .help-topic-title {
    color: #e0e0e0;
}

body.dark-theme .help-topic.expanded .help-topic-title {
    color: #87ceeb;
}

body.dark-theme .help-topic-content {
    background: #1a1a2e;
    color: #b0c4de;
}

body.dark-theme .help-topic-content strong {
    color: #e0e0e0;
}

/* Dark theme for modals */
body.dark-theme #preferencesModal,
body.dark-theme #multiSelectModal {
    background: #16213e !important;
}

body.dark-theme #preferencesModal > div:first-child,
body.dark-theme #multiSelectModal > div:first-child {
    background: #0f3460 !important;
}

body.dark-theme #preferencesModal label,
body.dark-theme #preferencesModal p {
    color: #e0e0e0 !important;
}

body.dark-theme #preferencesModal select {
    background: #1a1a2e;
    border-color: #4a6fa5;
    color: #e0e0e0;
}

body.dark-theme #multiSelectModal p {
    color: #e0e0e0 !important;
}

/* Dark theme header styles */
body.dark-theme header {
    background: #0f3460;
    border-bottom-color: #4a6fa5;
    padding: 10px;
    margin: -5px -10px 10px -10px;
    border-radius: 8px 8px 0 0;
}

body.dark-theme .header-left h1,
body.dark-theme h1 {
    color: #ffffff;
}

body.dark-theme .header-logo .logo-main,
body.dark-theme .logo-main {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

body.dark-theme .header-logo .logo-tagline {
    color: #b0c4de;
}

body.dark-theme .user-info,
body.dark-theme .user-info span,
body.dark-theme #userInfo {
    color: #ffffff;
}

body.dark-theme .credits-display {
    background: #1a1a2e;
    border-color: #4a6fa5;
    color: #e0e0e0;
}

body.dark-theme .credits-display a {
    color: #87ceeb;
}

body.dark-theme .credits-display.low-balance {
    background: #4d3a1e;
    border-color: #ffa500;
    color: #ffd700;
}

body.dark-theme .credits-display.zero-balance {
    background: #4d1e1e;
    border-color: #dc3545;
    color: #ff9999;
}

body.dark-theme .btn-primary {
    background-color: #4a6fa5;
    color: #ffffff;
    box-shadow: 
        0 4px 0 #2a4f85,
        0 6px 10px rgba(0,0,0,0.4);
}

body.dark-theme .btn-primary:hover:not(:disabled) {
    background-color: #5a7fb5;
    box-shadow: 
        0 4px 0 #2a4f85,
        0 8px 15px rgba(0,0,0,0.45);
}

body.dark-theme .btn-primary:active:not(:disabled) {
    box-shadow: 
        0 1px 0 #2a4f85,
        0 2px 5px rgba(0,0,0,0.3);
    transform: translateY(3px);
}

body.dark-theme .btn-secondary {
    background-color: #3a3a5e;
    color: #e0e0e0;
    box-shadow: 
        0 3px 0 #2a2a4e,
        0 4px 8px rgba(0,0,0,0.35);
}

body.dark-theme .btn-secondary:hover {
    background-color: #4a4a6e;
    box-shadow: 
        0 3px 0 #2a2a4e,
        0 6px 12px rgba(0,0,0,0.4);
}

body.dark-theme .btn-secondary:active {
    box-shadow: 
        0 1px 0 #2a2a4e,
        0 2px 4px rgba(0,0,0,0.3);
    transform: translateY(2px);
}

