/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Zabráni horizontálnemu scrollu */
html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

:root {
    --primary: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
    color: var(--gray-900);
}

.subtitle {
    text-align: center;
    color: var(--gray-700);
    margin-bottom: 30px;
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Navbar */
.navbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 0;
    margin-bottom: 30px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 22px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user {
    color: var(--gray-700);
    font-size: 14px;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.card h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.card-subtitle {
    color: var(--gray-700);
    font-size: 14px;
    margin-bottom: 20px;
}

.card-progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-progress h2 {
    color: white;
}

/* Progress Grid */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.progress-item {
    text-align: center;
}

.progress-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.progress-value {
    font-size: 32px;
    font-weight: bold;
}

.progress-percent {
    font-size: 16px;
    margin-left: 8px;
    opacity: 0.8;
}

/* Progress Bars */
.progress-bars {
    display: grid;
    gap: 16px;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
}

.progress-bar-label {
    font-size: 13px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.progress-bar {
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: white;
    transition: width 0.5s ease;
    border-radius: 12px;
}

.progress-bar-fill-success {
    background: var(--success);
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background: var(--gray-100);
}

.table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
}

/* Sortable headers */
.th-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 30px !important;
    transition: background 0.3s;
}

.th-sortable:hover {
    background: var(--gray-200);
}

.sort-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
}

.sort-icon::before {
    content: '⇅';
    font-size: 16px;
}

.th-sortable.sorted-asc .sort-icon {
    opacity: 1;
}

.th-sortable.sorted-asc .sort-icon::before {
    content: '↑';
    color: var(--primary);
}

.th-sortable.sorted-desc .sort-icon {
    opacity: 1;
}

.th-sortable.sorted-desc .sort-icon::before {
    content: '↓';
    color: var(--primary);
}

.table td {
    padding: 12px;
    border-top: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.text-center {
    text-align: center;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Ready Parcels */
.ready-parcels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.ready-parcel-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.ready-parcel-item:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ready-parcel-info {
    flex: 1;
}

.ready-parcel-number {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.ready-parcel-meta {
    font-size: 12px;
    color: var(--gray-700);
}

.ready-parcel-actions button {
    padding: 6px 12px;
    font-size: 12px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--gray-700);
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-900);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Parcel Group */
.parcel-group {
    margin-bottom: 24px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    background: var(--gray-50);
}

.parcel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.parcel-title {
    font-weight: 600;
    font-size: 16px;
}

.sack-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
}

.sack-item:last-child {
    margin-bottom: 0;
}

.sack-checkbox {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.sack-info {
    flex: 1;
}

.sack-ref {
    font-weight: 500;
    margin-right: 12px;
}

.sack-product {
    color: var(--gray-700);
    font-size: 13px;
}

/* Print styles */
@media print {
    .navbar, .btn, .modal-footer {
        display: none !important;
    }

    .modal-content {
        box-shadow: none;
        margin: 0;
        max-height: none;
    }

    .parcel-group {
        page-break-inside: avoid;
    }
}

/* Filter Bar */
.filter-bar {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 6px;
}

.filter-row {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.filter-item input[type="text"] {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

.filter-item input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-bar select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Mini Progress Bar */
.mini-progress {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}

.mini-progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.5s ease;
}

/* Row Completed */
.row-completed {
    opacity: 0.6;
}

.row-completed:hover {
    opacity: 1;
}

/* Batch Info Header */
.batch-info-header {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
}

.batch-info-item strong {
    margin-right: 8px;
}

/* Code styling */
code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Pagination */
.pagination {
    margin-top: 20px;
}

.pagination-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

.pagination-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-buttons .btn {
    min-width: 40px;
}

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

.pagination-dots {
    padding: 0 8px;
    color: var(--gray-700);
    font-weight: bold;
}

.pagination-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pagination-jump {
    display: flex;
    align-items: center;
}

.pagination-jump label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.pagination-jump input {
    padding: 8px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    width: 80px;
}

.pagination-jump input:focus {
    outline: none;
    border-color: var(--primary);
}

.pagination-info {
    font-size: 14px;
    color: var(--gray-700);
}

/* Batch Size Selector */
.batch-size-selector {
    margin-bottom: 24px;
}

.batch-size-selector label {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
}

.batch-size-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-batch {
    padding: 12px 20px;
    border: 2px solid var(--gray-300);
    background: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-batch:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.btn-batch.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.batch-count {
    font-size: 12px;
    opacity: 0.8;
}

/* Product Codes Selector */
.product-codes-selector {
    margin-bottom: 24px;
}

.product-codes-selector label {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
}

.product-codes-list {
    display: grid;
    gap: 8px;
}

.product-code-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.product-code-chip:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.product-code-chip.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.product-code-chip.active code {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.product-code-chip.active .product-code-meta {
    color: rgba(255, 255, 255, 0.9);
}

.product-code-chip.completed {
    border-color: var(--success);
    background: #d1fae5;
}

.product-code-chip.completed:hover {
    border-color: var(--success);
    background: #a7f3d0;
}

.product-code-chip.completed.active {
    border-color: var(--success);
    background: var(--success);
}

.product-code-info code {
    font-size: 16px;
    font-weight: bold;
}

.product-code-meta {
    font-size: 12px;
    color: var(--gray-700);
    margin-top: 4px;
}

.product-code-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

/* Selected Work Info */
.selected-work-info {
    margin-top: 24px;
}

.work-info-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
}

.work-info-item {
    display: inline-block;
    margin-right: 24px;
    margin-bottom: 12px;
    font-size: 14px;
}

.work-info-item strong {
    margin-right: 8px;
}

.work-info-item code {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
}

.work-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Variant Info */
.variant-info {
    padding: 16px 20px;
    background: #dbeafe;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 500;
}

/* Work List Container */
.work-list-container {
    animation: fadeIn 0.3s ease-in;
}

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

/* Work List */
.work-parcel-group {
    margin-bottom: 24px;
    border: 3px solid var(--gray-300);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.work-parcel-group:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.work-parcel-group.all-packed {
    border-color: var(--success);
    background: #f0fdf4;
}

.work-parcel-group.all-packed:hover {
    border-color: var(--success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.work-parcel-group.all-packed .work-parcel-header {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.work-parcel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid var(--gray-300);
    font-size: 16px;
    font-weight: 600;
}

.work-sack-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 2px solid var(--gray-200);
    transition: all 0.3s;
    background: white;
}

.work-sack-item:last-child {
    border-bottom: none;
}

.work-sack-item:hover {
    background: var(--gray-50);
    padding-left: 24px;
}

.work-sack-item.packed {
    background: #d1fae5;
    border-left: 6px solid var(--success);
}

.work-sack-item.packed:hover {
    background: #a7f3d0;
}

.work-sack-item .sack-checkbox {
    margin-right: 16px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    accent-color: var(--success);
}

.work-sack-item label {
    flex: 1;
    cursor: pointer;
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 16px;
}

.work-sack-item .sack-ref {
    font-weight: 700;
    min-width: 160px;
    font-size: 17px;
    color: var(--gray-900);
}

.work-sack-item .sack-product {
    color: var(--gray-700);
    font-size: 15px;
    line-height: 1.4;
}

.work-sack-item.packed .sack-ref,
.work-sack-item.packed .sack-product {
    opacity: 0.8;
}

/* Print styles for work list */
@media print {
    #batch-selector-card,
    .work-actions,
    .navbar,
    #batches-overview-card {
        display: none !important;
    }

    .work-sack-item {
        page-break-inside: avoid;
    }

    .work-parcel-group {
        page-break-inside: avoid;
    }
}

/* ============================================================ */
/* VYLEPŠENÝ PRACOVNÝ REŽIM - FOOLPROOF UX */
/* ============================================================ */

.work-mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary);
}

.work-mode-header h2 {
    margin: 0;
    font-size: 32px;
    color: var(--primary);
}

/* Progress Steps */
.work-progress-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    padding: 24px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: all 0.3s;
}

.step-indicator.active {
    opacity: 1;
    transform: scale(1.1);
}

.step-indicator.completed {
    opacity: 0.8;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: var(--gray-600);
    transition: all 0.3s;
}

.step-indicator.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.2);
}

.step-indicator.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    text-align: center;
}

.step-indicator.active .step-text {
    color: var(--primary);
    font-size: 16px;
}

/* Work Step Sections */
.work-step-section {
    margin-bottom: 32px;
}

.step-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.step-badge {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.step-section-header h3 {
    margin: 0;
    font-size: 22px;
    color: var(--gray-900);
    flex: 1;
}

.help-text {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 500;
    color: #92400e;
    line-height: 1.5;
}

/* Batch Size Buttons - BIG */
.batch-size-buttons-big {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.btn-batch {
    padding: 24px 20px;
    font-size: 20px;
    font-weight: bold;
    border: 3px solid var(--gray-300);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-batch:hover {
    border-color: var(--primary);
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-batch.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.btn-batch .batch-count {
    display: block;
    font-size: 14px;
    opacity: 0.7;
    margin-top: 8px;
}

/* Product Code Cards - BIG */
.product-codes-list-big {
    display: grid;
    gap: 16px;
}

.product-code-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border: 3px solid var(--gray-300);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    gap: 20px;
}

.product-code-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.product-code-card.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

.product-code-card.completed {
    border-color: var(--success);
    background: #d1fae5;
}

.product-code-card.completed:hover {
    background: #a7f3d0;
}

.product-code-card.completed.active {
    background: var(--success);
    color: white;
}

.product-code-main {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.product-code-title {
    flex: 1;
}

.code-big {
    font-size: 28px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: var(--gray-900);
}

.product-code-card.active .code-big {
    color: white;
}

.product-name-small {
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 4px;
}

.product-code-card.active .product-name-small {
    color: rgba(255, 255, 255, 0.9);
}

.product-code-stats {
    display: flex;
    gap: 16px;
}

.stat-box {
    text-align: center;
    min-width: 80px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
}

.product-code-card.active .stat-number {
    color: white;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-600);
    text-transform: uppercase;
}

.product-code-card.active .stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.status-badge {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    white-space: nowrap;
}

.status-badge.completed {
    background: var(--success);
    color: white;
}

.status-badge.done {
    background: #10b981;
    color: white;
}

.status-badge.inprogress {
    background: #f59e0b;
    color: white;
}

.status-badge.waiting {
    background: #6b7280;
    color: white;
}

.product-code-card.active .status-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Work Current Selection */
.work-current-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 24px;
}

.selection-item {
    text-align: center;
}

.selection-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selection-value {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.selection-value code {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 24px;
}

/* Work Actions Big */
.work-actions-big {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-large {
    padding: 20px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 12px;
    min-width: 250px;
}

.btn-complete {
    font-size: 22px;
    padding: 24px 48px;
    background: var(--success);
    border: none;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

.btn-complete:hover {
    background: #059669;
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
    }
}

.completed-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    color: white;
    flex: 1;
    min-width: 300px;
}

.completed-icon {
    font-size: 48px;
}

.completed-text {
    font-size: 16px;
    line-height: 1.4;
}

.completed-text strong {
    font-size: 20px;
}

/* Work Actions Top - HORE NAD ZOZNAMOM */
.work-actions-top {
    margin-top: 24px;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--gray-50);
    border-radius: 12px;
    border: 3px solid var(--primary);
}

.work-actions-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.work-actions-row:last-child {
    margin-bottom: 0;
}

.completed-banner-full {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.completed-banner-full .completed-icon {
    font-size: 56px;
    flex-shrink: 0;
}

.completed-banner-full .completed-text {
    flex: 1;
    font-size: 18px;
    line-height: 1.6;
}

.completed-banner-full .completed-text strong {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.completed-banner-full .btn {
    flex-shrink: 0;
}

.empty-state {
    padding: 48px;
    text-align: center;
    font-size: 20px;
    color: var(--gray-600);
    background: var(--gray-50);
    border-radius: 12px;
    border: 2px dashed var(--gray-300);
}

.loading-state {
    padding: 48px;
    text-align: center;
    font-size: 18px;
    color: var(--gray-700);
    background: var(--gray-50);
    border-radius: 12px;
}

.loading-state .spinner {
    display: inline-block;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .progress-grid {
        grid-template-columns: 1fr;
    }

    .ready-parcels {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .work-progress-steps {
        gap: 20px;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .batch-size-buttons-big {
        grid-template-columns: 1fr;
    }

    .product-code-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .work-current-selection {
        grid-template-columns: 1fr;
    }

    .btn-large {
        min-width: 100%;
    }

    .work-mode-header {
        flex-direction: column;
        gap: 16px;
    }
}

/* ============================================================ */
/* HLAVNÁ TAB NAVIGÁCIA                                         */
/* ============================================================ */

.main-tabs-wrapper {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.main-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.main-tabs::-webkit-scrollbar {
    display: none;
}

.main-tab {
    flex: 1;
    min-width: 80px;
    padding: 14px 10px;
    border: none;
    background: transparent;
    color: var(--gray-700);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
}

.main-tab:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.main-tab.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    background: #eff6ff;
}

.tab-icon {
    font-size: 22px;
    line-height: 1;
}

.tab-label {
    font-size: 12px;
    font-weight: 600;
}

.main-tab-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.main-tab-badge[data-count="0"],
.main-tab-badge:empty {
    display: none;
}

/* Obsah tabov */
.main-content {
    padding-top: 24px;
}

.main-tab-content {
    animation: fadeIn 0.2s ease;
}

/* Quick actions na progress stránke */
.progress-quick-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    .main-tab {
        padding: 10px 6px;
        min-width: 70px;
    }
    .tab-icon {
        font-size: 20px;
    }
    .tab-label {
        font-size: 11px;
    }
    .main-tab-badge {
        top: 4px;
        right: 4px;
    }
    .progress-quick-actions {
        flex-direction: column;
    }
    .progress-quick-actions .btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
}

/* ============================================================ */
/* SEKCIA BALENIA - TABY                                        */
/* ============================================================ */

/* Tab navigácia */
.balenie-tabs {
    display: flex;
    border-bottom: 3px solid var(--gray-200);
    margin-bottom: 24px;
    gap: 4px;
}

.balenie-tab {
    flex: 1;
    padding: 16px 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    background: var(--gray-100);
    color: var(--gray-700);
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    white-space: nowrap;
}

.balenie-tab:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.balenie-tab.active {
    background: white;
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

/* Badge s počtom v tabe */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

.tab-badge-blue {
    background: var(--primary);
    color: white;
}

.tab-badge-green {
    background: var(--success);
    color: white;
}

.balenie-tab:not(.active) .tab-badge-blue {
    background: var(--gray-300);
    color: var(--gray-700);
}

.balenie-tab:not(.active) .tab-badge-green {
    background: var(--gray-300);
    color: var(--gray-700);
}

/* Tab obsah */
.balenie-tab-content {
    animation: fadeIn 0.2s ease;
}

/* ============================================================ */
/* SEKCIA BALENIA - rozšírená                                   */
/* ============================================================ */

/* Filter bar pre balenie */
.balenie-filter-bar {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

/* Bulk actions */
.balenie-bulk-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Ready parcel item s checkboxom */
.ready-parcel-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.parcel-select-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--success);
}

.ready-parcel-item.selected {
    background: #d1fae5;
    border-color: var(--success);
}

/* Packaged parcels list */
.packaged-parcels-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.packaged-parcel-item {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.packaged-parcel-item:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.packaged-parcel-info {
    flex: 1;
}

.packaged-parcel-number {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--gray-900);
}

.packaged-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--success);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    vertical-align: middle;
}

.packaged-parcel-meta {
    font-size: 12px;
    color: var(--gray-700);
}

.packaged-parcel-actions button {
    padding: 6px 12px;
    font-size: 12px;
}

/* Packaged parcels pagination */
#packaged-parcels-pagination {
    margin-top: 16px;
}

/* Disabled button */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Count badges */
#ready-parcels-count,
#packaged-parcels-count {
    font-weight: bold;
    color: var(--primary);
}

/* ============================================================ */
/* ACTION CARDS (Progress tab)                                  */
/* ============================================================ */

.action-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    user-select: none;
    touch-action: manipulation;
}

.action-card:active {
    transform: scale(0.97);
}

.action-card-primary { background: #eff6ff; border: 2px solid #bfdbfe; }
.action-card-success  { background: #f0fdf4; border: 2px solid #bbf7d0; }
.action-card-gray     { background: var(--gray-50); border: 2px solid var(--gray-200); }

.action-card-icon { font-size: 28px; flex-shrink: 0; }

.action-card-text { flex: 1; }

.action-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
}

.action-card-subtitle {
    font-size: 12px;
    color: var(--gray-700);
    margin-top: 2px;
}

.action-card-arrow {
    font-size: 22px;
    color: var(--gray-400);
    font-weight: 300;
}

/* STATUS CARDS */
.status-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.status-card {
    border-radius: 12px;
    padding: 16px;
}

.status-card-blue { background: #eff6ff; border: 2px solid #bfdbfe; }
.status-card-green { background: #f0fdf4; border: 2px solid #bbf7d0; }

.status-card-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.status-card-big {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 4px;
}

.status-card-label {
    font-size: 12px;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.status-card-bar {
    height: 8px;
    background: rgba(0,0,0,0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.status-card-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.status-card-green .status-card-fill {
    background: var(--success);
}

.status-card-pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
    text-align: right;
}

/* Card header row */
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.card-header-row h2 {
    margin: 0;
}

/* Input + button row */
.input-btn-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.input-btn-row input {
    flex: 1;
    min-width: 120px;
}

/* ============================================================ */
/* BOTTOM NAVIGATION (mobile only)                              */
/* ============================================================ */

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 16px rgba(0,0,0,0.1);
    z-index: 300;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    padding-bottom: 10px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    position: relative;
    min-height: 58px;
    touch-action: manipulation;
    transition: color 0.15s;
}

.bnav-item.active {
    color: var(--primary);
}

.bnav-item.active .bnav-icon {
    transform: scale(1.15);
}

.bnav-icon {
    font-size: 24px;
    line-height: 1;
    transition: transform 0.15s;
}

.bnav-label {
    font-size: 10px;
    font-weight: 600;
}

.bnav-badge {
    position: absolute;
    top: 5px;
    right: calc(50% - 22px);
    background: var(--danger);
    color: white;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}

/* ============================================================ */
/* MOBILE RESPONSIVE - hlavné zmeny                             */
/* ============================================================ */

@media (max-width: 768px) {

    /* Bottom nav visible */
    .bottom-nav {
        display: flex;
    }

    /* Desktop top tabs skryté */
    .desktop-only {
        display: none !important;
    }

    /* Body padding pre bottom nav */
    body {
        padding-bottom: calc(62px + env(safe-area-inset-bottom, 0));
    }

    /* Navbar kompaktnejší */
    .navbar {
        padding: 10px 0;
        margin-bottom: 0;
    }

    .nav-brand h1 {
        font-size: 18px;
    }

    .nav-user {
        display: none;
    }

    /* Container */
    .container {
        padding: 0 10px;
    }

    .main-content {
        padding-top: 16px;
    }

    /* Cards */
    .card {
        padding: 14px;
        border-radius: 10px;
        margin-bottom: 14px;
    }

    .card h2 {
        font-size: 17px;
    }

    /* Progress grid 2 stĺpce */
    .progress-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .progress-value {
        font-size: 22px;
    }

    .progress-percent {
        font-size: 13px;
    }

    /* Action cards - 1 stĺpec na mobile */
    .action-cards-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .action-card {
        padding: 14px;
    }

    .action-card-icon { font-size: 26px; }
    .action-card-title { font-size: 16px; }

    /* Status cards 1 stĺpec */
    .status-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .status-card-big {
        font-size: 28px;
    }

    /* Touch-friendly buttons */
    .btn {
        min-height: 44px;
        font-size: 15px;
        padding: 10px 16px;
    }

    .btn-small {
        min-height: 36px;
        font-size: 13px;
        padding: 6px 12px;
    }

    .btn-large {
        width: 100%;
        min-width: unset;
        font-size: 16px;
        padding: 16px;
        min-height: 52px;
    }

    /* Touch-friendly form elementy (16px zabráni iOS zoom) */
    select,
    input[type="text"],
    input[type="number"],
    input[type="checkbox"] {
        font-size: 16px !important;
    }

    select {
        min-height: 44px;
        padding: 8px 12px;
    }

    input[type="text"],
    input[type="number"] {
        min-height: 44px;
        padding: 10px 12px;
    }

    input[type="checkbox"] {
        width: 22px;
        height: 22px;
        min-height: unset;
    }

    /* Filter bar stacked */
    .filter-bar,
    .balenie-filter-bar {
        padding: 12px;
    }

    .filter-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .filter-item {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: 100%;
        font-size: 14px;
    }

    .filter-item select,
    .filter-item input[type="text"] {
        flex: 1;
    }

    .filter-item-wide {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-btn-row {
        width: 100%;
    }

    .input-btn-row input {
        flex: 1;
    }

    /* Bulk actions */
    .balenie-bulk-actions {
        gap: 10px;
        width: 100%;
    }

    .balenie-bulk-actions .btn {
        flex: 1;
    }

    /* Tabuľka scrollovateľná ale stránka nie */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -14px;
        padding: 0 14px;
    }

    .table {
        min-width: 560px;
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 8px 8px;
        white-space: nowrap;
    }

    /* Ready parcels */
    .ready-parcels {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ready-parcel-item {
        padding: 14px;
    }

    .ready-parcel-number {
        font-size: 15px;
    }

    /* Packaged parcels */
    .packaged-parcels-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .packaged-parcel-item {
        padding: 14px;
    }

    /* Work mode */
    .work-progress-steps {
        gap: 8px;
        padding: 14px;
    }

    .step-number {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .step-text {
        font-size: 11px;
    }

    .work-current-selection {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 14px;
    }

    .selection-value {
        font-size: 18px;
    }

    .selection-value code {
        font-size: 18px;
        padding: 4px 8px;
    }

    /* Batch size buttons 2 stĺpce */
    .batch-size-buttons-big {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .btn-batch {
        padding: 18px 10px;
        font-size: 17px;
    }

    /* Product code cards */
    .product-code-card {
        padding: 14px;
        flex-wrap: wrap;
    }

    .product-code-main {
        gap: 12px;
    }

    .code-big {
        font-size: 22px;
    }

    .product-code-stats {
        gap: 10px;
    }

    .stat-number {
        font-size: 22px;
    }

    /* Work sack items */
    .work-sack-item {
        padding: 12px 14px;
    }

    .work-sack-item label {
        font-size: 14px;
        gap: 10px;
    }

    .work-sack-item .sack-ref {
        font-size: 14px;
        min-width: 100px;
    }

    .work-sack-item .sack-product {
        font-size: 13px;
    }

    .work-sack-item .sack-checkbox {
        width: 26px;
        height: 26px;
    }

    /* Work actions */
    .work-actions-top {
        padding: 16px;
    }

    .work-actions-row {
        flex-direction: column;
        gap: 10px;
    }

    /* Completed banner */
    .completed-banner-full {
        flex-direction: column;
        gap: 14px;
        text-align: center;
        padding: 20px;
    }

    .completed-icon { font-size: 42px; }

    .completed-text {
        font-size: 15px;
    }

    .completed-text strong {
        font-size: 20px;
    }

    /* Balenie taby */
    .balenie-tab {
        padding: 12px 8px;
        font-size: 14px;
        gap: 6px;
    }

    /* Pagination kompaktná */
    .pagination-buttons {
        gap: 3px;
        flex-wrap: wrap;
    }

    .pagination-buttons .btn {
        min-width: 36px;
        min-height: 36px;
        padding: 6px 8px;
        font-size: 13px;
    }

    .pagination-bottom {
        flex-direction: column;
        gap: 10px;
    }

    /* Modal full screen na mobile */
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    /* Help text kompaktnejší */
    .help-text {
        font-size: 14px;
        padding: 12px 14px;
    }

    /* Step section header */
    .step-section-header {
        gap: 10px;
    }

    .step-section-header h3 {
        font-size: 17px;
    }

    /* Card subtitle */
    .card-subtitle {
        font-size: 13px;
    }

    /* Parcel checkbox väčší */
    .parcel-select-checkbox {
        width: 26px;
        height: 26px;
    }

}

/* ============================================================
   RÝCHLE VYHĽADANIE KÓDU TOVARU
   ============================================================ */

.code-search-block {
    background: #eff6ff;
    border: 2px solid var(--primary);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.code-search-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.code-search-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.code-search-row input {
    flex: 1;
    font-size: 22px;
    font-weight: 800;
    padding: 12px 16px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    outline: none;
    letter-spacing: 1px;
    min-height: 54px;
}

.code-search-row input:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.code-search-btn {
    min-height: 54px;
    font-size: 16px;
    padding: 0 22px;
    white-space: nowrap;
}

.search-not-found {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 15px;
}

.search-found {
    background: #f0fdf4;
    color: #15803d;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 15px;
}

.search-results-list {
    margin-top: 10px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.search-results-title {
    padding: 10px 16px;
    background: var(--gray-100);
    font-size: 13px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    transition: background 0.15s;
    min-height: 58px;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #eff6ff; }
.search-result-item:active { background: #dbeafe; }

.sri-size {
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 8px;
    min-width: 52px;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

.sri-info {
    flex: 1;
}

.sri-code {
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-900);
}

.sri-detail {
    font-size: 12px;
    color: var(--gray-700);
    margin-top: 2px;
}

.sri-arrow {
    font-size: 22px;
    color: var(--gray-300);
    font-weight: 300;
}
