* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #333; }
.header { background: #2962ff; color: white; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.header h1 { font-size: 18px; font-weight: 500; }
.tabs { display: flex; justify-content: center; background: #fff; border-bottom: 2px solid #e0e0e0; overflow-x: auto; padding: 0 20px; max-width: 1100px; margin: 0 auto; border-radius: 8px 8px 0 0; }
.tab { padding: 12px 20px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; font-size: 14px; font-weight: 500; color: #666; transition: all 0.2s; }
.tab:hover { background: #f5f5f5; color: #333; }
.tab.active { color: #2962ff; border-bottom-color: #2962ff; background: #e8f0fe; }
.content { padding: 20px; max-width: 1100px; margin: 0 auto; }
.card { background: white; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 20px; margin-bottom: 16px; }
.card h2 { font-size: 16px; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 14px; vertical-align: top; }
th { background: #fafafa; font-weight: 600; color: #555; }
.btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; }
.btn-primary { background: #2962ff; color: white; }
.btn-primary:hover { background: #1e4fd4; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.form-row input, .form-row select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; flex: 1; min-width: 120px; }
.form-row input:focus, .form-row select:focus { outline: none; border-color: #2962ff; }
.empty { text-align: center; padding: 40px; color: #999; }
.hidden { display: none; }
.btn-icon { background: none; border: none; color: #2962ff; cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: 4px; transition: background 0.2s; }
.btn-icon:hover { background: #e8f0fe; }
.edit-input { width: 100%; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; font-family: inherit; }
.edit-input:focus { outline: none; border-color: #2962ff; }
tr.editing { background: #f0f7ff; }
.btn-save { background: #2e7d32; color: white; }
.btn-save:hover { background: #1b5e20; }
.btn-cancel { background: #757575; color: white; }
.btn-cancel:hover { background: #616161; }
.btn-delete { background: #e53935; color: white; }
.btn-delete:hover { background: #c62828; }
.actions-cell { white-space: nowrap; }
.actions-cell .btn { margin-right: 4px; }
.actions-cell .btn:last-child { margin-right: 0; }
.stock-tabs { display: flex; gap: 0; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; flex: 1; min-width: 200px; }
.stock-tab { padding: 8px 16px; cursor: pointer; font-size: 13px; font-weight: 500; color: #666; background: #f5f5f5; transition: all 0.2s; text-align: center; flex: 1; }
.stock-tab:hover { background: #eee; }
.stock-tab.active { background: #2962ff; color: white; }
.stock-tabs-inline { display: flex; gap: 0; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.stock-tab-sm { padding: 5px 10px; cursor: pointer; font-size: 12px; font-weight: 500; color: #666; background: #f5f5f5; transition: all 0.2s; text-align: center; }
.stock-tab-sm:hover { background: #eee; }
.stock-tab-sm.active { background: #2962ff; color: white; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-green { background: #e8f5e9; color: #2e7d32; }
.badge-orange { background: #fff3e0; color: #e65100; }
.info-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #90caf9; color: #1565c0; font-size: 11px; font-weight: 700; font-style: italic; cursor: help; position: relative; vertical-align: middle; margin-left: 4px; }
.info-icon::after { content: attr(data-tooltip); position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 100; }
.info-icon:hover::after { opacity: 1; }
td a { color: #2962ff; text-decoration: none; }
td a:hover { text-decoration: underline; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 500; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.checkbox-label-sm { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.checkbox-label-sm input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.delivery-time-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.delivery-input { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; flex: 1; max-width: 200px; }
.delivery-input:focus { outline: none; border-color: #2962ff; }
.btn-remove-dt { color: #e53935; font-size: 14px; padding: 2px 6px; }
.btn-remove-dt:hover { background: #ffebee; }
.btn-add-dt { color: #2e7d32; font-size: 18px; font-weight: 700; padding: 2px 8px; background: #e8f5e9; border-radius: 50%; }
.btn-add-dt:hover { background: #c8e6c9; }
.label-sm { font-size: 13px; font-weight: 500; color: #555; min-width: 100px; }
.edit-dt-section { margin-top: 6px; }
.delivery-times-list-edit { margin-bottom: 4px; }
.payments-cell { font-size: 12px; max-width: 200px; }

/* Payment chips */
.payments-grid, .payments-grid-edit { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.payment-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #ddd; border-radius: 20px; cursor: pointer; font-size: 13px; background: #fafafa; transition: all 0.2s; user-select: none; }
.payment-chip:hover { border-color: #90caf9; }
.payment-chip.active { background: #e8f0fe; border-color: #2962ff; color: #1565c0; }
.payment-chip .pay-check { display: none; }
.payment-chip .pay-commission { width: 48px; padding: 3px 6px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; text-align: center; background: white; }
.payment-chip .pay-commission:focus { outline: none; border-color: #2962ff; }
.payment-chip .pay-pct { font-size: 12px; color: #999; }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: white; border-radius: 12px; padding: 24px; min-width: 320px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.modal-content h3 { margin-bottom: 16px; font-size: 16px; }
.modal-content input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; margin-bottom: 16px; }
.modal-content input:focus { outline: none; border-color: #2962ff; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Payment tags */






/* Inner table for payment methods */
.inner-table { width: 100%; margin-top: 10px; border-collapse: collapse; }
.inner-table th, .inner-table td { padding: 8px 10px; border-bottom: 1px solid #eee; font-size: 13px; }
.inner-table th { background: #f9f9f9; font-weight: 600; color: #666; }
.empty-sm { color: #999; font-size: 13px; padding: 8px 0; }
.badge-blue { background: #e3f2fd; color: #1565c0; }
.badge-gray { background: #f5f5f5; color: #757575; }





/* Number badge for section headers */
.num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2962ff;
    color: white;
    font-size: 13px;
    font-weight: 700;
    margin-right: 8px;
}

/* Payment tags - bigger and clearer */
.payments-tags { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-height: 36px; align-items: center; }
.payment-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #e8f0fe;
    border: 1px solid #90caf9;
    border-radius: 20px;
    font-size: 13px;
    color: #1565c0;
    transition: all 0.15s;
}
.payment-tag:hover { background: #bbdefb; border-color: #64b5f6; }
.payment-tag .tag-name { font-weight: 500; }
.payment-tag .tag-comm {
    background: #fff;
    border: 1px solid #90caf9;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 12px;
    font-weight: 600;
}
.tag-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffcdd2;
    border: none;
    color: #c62828;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.15s;
}
.tag-x:hover { background: #e53935; color: white; }

/* Add payment row - more spacious */
.add-payment-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    padding: 10px 12px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}
.add-payment-row select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 160px;
    background: white;
}
.add-payment-row input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 70px;
    text-align: center;
}
.add-payment-row .btn { padding: 8px 14px; }

/* Inline payment tags in table */
.payments-tags-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.payments-tags-inline .payment-tag { padding: 4px 8px; font-size: 12px; }
.payments-tags-inline .tag-x { width: 16px; height: 16px; font-size: 11px; }
.payments-tags-inline .tag-comm { font-size: 11px; padding: 0 4px; }
.add-payment-row-sm { display: flex; gap: 4px; align-items: center; }
.add-pay-sel-sm { padding: 4px 6px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; max-width: 100px; background: white; }
.add-pay-comm-sm { padding: 4px 6px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; width: 50px; text-align: center; }
.add-payment-row-sm .btn { padding: 4px 8px; font-size: 11px; }

/* Search box */
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 16px; flex-wrap: wrap; }
.card-header h2 { margin-bottom: 0; }
.search-box { position: relative; flex: 1; max-width: 320px; min-width: 200px; }
.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fafafa;
    transition: all 0.2s;
}
.search-box input:focus { outline: none; border-color: #2962ff; background: #fff; box-shadow: 0 0 0 3px rgba(41,98,255,0.1); }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; }

/* Card description */
.card-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Parts tags */
.parts-cell { max-width: 300px; }
.part-tag {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.form-row textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    flex: 1;
    min-width: 200px;
    resize: vertical;
}
.form-row textarea:focus {
    outline: none;
    border-color: #2962ff;
}
.edit-input textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

/* Expired price update date */
.date-expired {
    color: #e53935;
    font-weight: 600;
}
