/* Navigation Styles */
.nav-header {
    background-color: #333;
    padding: 15px 20px;
    margin: -50px -20px 30px -20px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: black;
    text-decoration: none;
    font-size: 32px;
    font-family: 'Bagel Fat One', cursive;
    font-weight: normal;
    background-color: white;
    padding: 8px 16px;
    border-radius: 6px;
    border: 2px solid #333;
}

.nav-logo:hover {
    background-color: #f0f0f0;
}

/* Hamburger Menu */
.hamburger-menu {
    position: relative;
}

.hamburger-btn {
    background: white;
    border: 2px solid #333;
    color: black;
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
}

.hamburger-btn:hover {
    background-color: #f0f0f0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.slide-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 999;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.slide-menu.active {
    right: 0;
}

.menu-header {
    background-color: #333;
    color: white;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
}

.menu-items {
    padding: 0;
    margin: 0;
    list-style: none;
}

.menu-items li {
    border-bottom: 1px solid #eee;
}

.menu-items a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.menu-items a:hover {
    background-color: #f8f9fa;
    color: #007cba;
}

/* Base Styles */
body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    margin-bottom: 20px;
}

/* Button Styles - Specific Classes Instead of Universal */
.add-button {
    display: inline-block;
    background-color: #007cba;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 30px;
}

.add-button:hover {
    background-color: #005a8a;
}

/* Primary Button Class */
.btn-primary {
    display: inline-block;
    background-color: #007cba;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #005a8a;
}

/* Secondary Button Class */
.btn-secondary {
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.edit-button {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Action Buttons - Unified Styling for Both <a> and <button> */
.action-button {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-align: center;
    min-width: 60px;
    font-family: inherit;      /* Normalize font family */
    line-height: 1.4;          /* Consistent line height */
    box-sizing: border-box;    /* Consistent box model */
    vertical-align: middle;    /* Consistent alignment */
    transition: background-color 0.2s ease;
}

.action-button.edit {
    background-color: #28a745;
    color: white;
}

.action-button.edit:hover {
    background-color: #218838;
}

.action-button.delete {
    background-color: #dc3545;
    color: white;
}

.action-button.delete:hover {
    background-color: #c82333;
}

.action-button.secondary {
    background-color: #6c757d;
    color: white;
}

.action-button.secondary:hover {
    background-color: #545b62;
}

/* Legacy button support for other pages */
.edit-button {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.edit-button:hover {
    background-color: #218838;
}

.delete-button {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    margin-left: 10px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.delete-button:hover {
    background-color: #c82333;
}

/* Settings Pages */
.settings-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.settings-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.settings-actions {
    margin-bottom: 30px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

table tr:hover {
    background-color: #f8f9fa;
}

.action-buttons {
    white-space: nowrap;
}

/* FIXED BUTTON STYLES - PROPER CONTRAST & VISIBILITY */
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 3px;
    border: 1px solid #333;
    background: #555 !important;  /* Dark gray background - FORCES override */
    color: white !important;      /* White text for contrast */
    cursor: pointer;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.2s ease;
    font-family: inherit;
    
    /* Enhanced consistency for <a> and <button> elements */
    vertical-align: middle !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
    text-align: center;
    min-height: 28px;
}

.btn-small:hover {
    background: #333 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-decoration: none !important;
}

/* Specific button variants with strong overrides */
.btn-small.btn-edit {
    background-color: #ffc107 !important;
    color: #212529 !important;
    border-color: #ffc107 !important;
}

.btn-small.btn-edit:hover {
    background-color: #e0a800 !important;
    border-color: #d39e00 !important;
    color: #212529 !important;
}

.btn-small.btn-delete {
    background-color: #dc3545 !important;  /* Red for delete */
    color: white !important;
    border-color: #dc3545 !important;
}

.btn-small.btn-delete:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: white !important;
}

/* Disabled state */
.btn-small:disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-small:disabled:hover {
    background-color: #6c757d !important;
    transform: none;
    box-shadow: none;
}

.btn-edit {
    background-color: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background-color: #e0a800;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* Select Dropdowns */
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    background-color: white;
}

select:focus {
    outline: none;
    border-color: #007cba;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* Success/Error Messages */
.alert {
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Form Improvements */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
}

.form-col-auto {
    flex: 0 0 auto;
}

/* Size Management */
.size-row {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.size-row:first-child {
    background: transparent;
    border: none;
    padding: 0;
}

.size-row .form-row {
    margin-bottom: 0;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-settings {
        position: static;
        transform: none;
        margin-top: 10px;
    }
    
    .table-container {
        font-size: 14px;
    }
    
    .action-buttons {
        white-space: normal;
    }
}

/* Products List Updates */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.list-header h2 {
    margin: 0;
    color: #333;
}

.search-container {
    flex: 0 0 auto;
}

.search-container input {
    width: 250px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-container input:focus {
    outline: none;
    border-color: #007cba;
}

/* Floating Add Button */
.floating-add-btn {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 60px;
    height: 60px;
    background: white;
    border: 3px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: 'Bagel Fat One', cursive;
    font-size: 32px;
    color: black;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 9999 !important;
}

.floating-add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background-color: #f0f0f0;
}

/* Inventory Management */
.inventory-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.inventory-total {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Inline Feedback Styles - Fixed Height to Prevent Shift */
.inventory-feedback {
    height: 1.3em;
    padding: 2px 5px;
    margin: 0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: inline-block;
}

.inventory-feedback.success {
    background-color: #d4edda;
    color: #155724;
    opacity: 1;
}

.inventory-feedback.error {
    background-color: #f8d7da;
    color: #721c24;
    opacity: 1;
}

.add-inventory-btn {
    background-color: #555;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.add-inventory-btn:hover {
    background-color: #333;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

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

.inventory-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.inventory-table tr:hover {
    background-color: #f1f3f4;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.2s ease;
    user-select: none;
}

.quantity-btn:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #007cba;
    transform: scale(1.05);
}

.quantity-btn.plus {
    color: #28a745;
    border-color: #28a745;
}

.quantity-btn.plus:hover:not(:disabled) {
    background-color: #d4edda;
    border-color: #28a745;
}

.quantity-btn.minus {
    color: #dc3545;
    border-color: #dc3545;
}

.quantity-btn.minus:hover:not(:disabled) {
    background-color: #f8d7da;
    border-color: #dc3545;
}

.quantity-display {
    min-width: 35px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    backdrop-filter: blur(3px);
    transition: all 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body .form-row {
    margin-bottom: 15px;
}

.modal-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

/* Remove duplicate modal button styles since we now have .btn-primary and .btn-secondary */

/* Product Actions */
.product-actions {
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.product-actions .action-button {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Card/Container Styles */
.products-list, .form-container, .product-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-container, .product-container {
    padding: 30px;
}

/* Products List */
.products-list h2 {
    margin-top: 0;
    color: #333;
}

.products-list ul {
    list-style: none;
    padding: 0;
}

.products-list li {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.products-list li:last-child {
    border-bottom: none;
}

.products-list a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.products-list a:hover {
    text-decoration: underline;
}

.empty-message {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 40px 0;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

input[type="text"], input[type="number"], select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #007cba;
}

.button-group {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cancel-link {
    color: #666;
    text-decoration: none;
    padding: 12px 24px;
}

.cancel-link:hover {
    text-decoration: underline;
}

/* Product Detail Styles */
.product-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

/* NEW: Flex Header Layout */
.product-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
    gap: 20px;
}

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

.product-actions-area {
    flex: 0 0 auto;
    align-self: flex-start;
}

.product-title {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: #333;
}

.inventory-number {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

.product-details {
    list-style: none;
    padding: 0;
}

.product-details li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
}

.product-details li:last-child {
    border-bottom: none;
}

.field-label {
    font-weight: 600;
    width: 150px;
    color: #555;
}

.field-value {
    flex: 1;
    color: #333;
}

.empty-value {
    color: #999;
    font-style: italic;
}

/* Navigation Links */
.back-link {
    display: inline-block;
    margin-top: 30px;
    color: #007cba;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Message Styles */
.error {
    background-color: #ffe6e6;
    color: #d00;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.success {
    background-color: #e6ffe6;
    color: #060;
    border-radius: 4px;
}

/* ===== NEW AJAX & ENHANCED UX STYLES ===== */

/* AJAX Loading and Feedback Styles */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

.quantity-btn.loading {
    background: #ccc !important;
    color: #666 !important;
    border-color: #ccc !important;
}

.ajax-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
    animation: successPulse 0.6s ease;
}

.ajax-error {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important; 
    color: #721c24 !important;
    animation: errorShake 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background-color: #c3e6cb; }
    100% { transform: scale(1); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Enhanced Inventory Table Styles */
.inventory-table tr.updating {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.inventory-table tr.success {
    background-color: #d4edda !important;
    animation: rowSuccess 2s ease forwards;
}

.inventory-table tr.error {
    background-color: #f8d7da !important;
    animation: rowError 2s ease forwards;
}

@keyframes rowSuccess {
    0% { background-color: #d4edda; }
    100% { background-color: transparent; }
}

@keyframes rowError {
    0% { background-color: #f8d7da; }
    100% { background-color: transparent; }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 140px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -70px;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    white-space: nowrap;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Loading states for forms */
.form-loading {
    opacity: 0.6;
    pointer-events: none;
}

.form-loading::after {
    content: "Processing...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Message displays */
.message-display {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: 500;
    transition: all 0.3s ease;
}

.message-display.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-display.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-display.show {
    opacity: 1;
    transform: translateY(0);
}

.message-display.hide {
    opacity: 0;
    transform: translateY(-10px);
}

/* Enhanced responsive */
@media (max-width: 768px) {
    .tooltip .tooltiptext {
        width: 120px;
        margin-left: -60px;
        font-size: 11px;
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* VERSION 1.0 NEW FEATURES - In-Use Tracking & Notes */

/* Notes Section Styles */
.notes-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.notes-header {
    margin-bottom: 20px;
}

.notes-header h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.add-note-form {
    margin-bottom: 20px;
}

.note-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.note-input-row textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 50px;
}

.note-input-row textarea:focus {
    outline: none;
    border-color: #007cba;
}

.note-input-row button {
    padding: 10px 16px;
    height: auto;
    align-self: stretch;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.note-content {
    color: #333;
    line-height: 1.5;
    margin-bottom: 8px;
    font-size: 14px;
}

.note-date {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* In-Use Section Specific Styles */
.inventory-section[style*="border-color: #28a745"] {
    border-color: #28a745 !important;
    background: #f8fff8;
}

.inventory-section[style*="border-color: #28a745"] .inventory-total {
    color: #28a745;
}

/* Use One Button Styling */
.btn-small[style*="background-color: #28a745"] {
    background-color: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}

.btn-small[style*="background-color: #28a745"]:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
}

/* Add Note Button Styling */
.btn-small[style*="background-color: #007cba"] {
    background-color: #007cba !important;
    color: white !important;
    border-color: #007cba !important;
}

.btn-small[style*="background-color: #007cba"]:hover {
    background-color: #005a8a !important;
    border-color: #004d74 !important;
}

/* Form Loading State for Notes */
.add-note-form.form-loading {
    position: relative;
}

.add-note-form.form-loading::after {
    content: "Adding note...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
}

/* Responsive Notes */
@media (max-width: 768px) {
    .note-input-row {
        flex-direction: column;
    }
    
    .note-input-row button {
        align-self: stretch;
        padding: 12px;
    }
    
    .notes-section {
        padding: 15px;
    }
    
    .note-item {
        padding: 12px;
    }
}

/* Used Items Section Styles */
.used-section {
    margin: 30px 0;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #b3d9ff;
}

.used-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #b3d9ff;
}

.used-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.used-total {
    font-size: 14px;
    font-weight: 600;
    color: #0066cc;
}

.used-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.used-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #b3d9ff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.used-size {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    margin-bottom: 8px;
}

.used-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
}

.used-started {
    color: #28a745;
}

.used-finished {
    color: #dc3545;
}

.used-duration {
    color: #007cba;
    font-weight: 500;
}

/* Action buttons spacing for inventory table */
.inventory-table td .tooltip + .tooltip {
    margin-left: 5px;
}

/* Load More Notes Button Styles */
.load-more-container {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.load-more-btn {
    background: #6c757d;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 100px;
}

.load-more-btn:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.load-more-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn:disabled:hover {
    background: #adb5bd;
    transform: none;
}

/* Responsive Used Section */
@media (max-width: 768px) {
    .used-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .used-dates {
        flex-direction: column;
        gap: 5px;
    }
    
    .used-section {
        padding: 15px;
    }
    
    .used-item {
        padding: 12px;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        margin: 20px auto;
        padding: 15px;
    }
    
    .product-details li {
        flex-direction: column;
    }
    
    .field-label {
        width: auto;
        margin-bottom: 5px;
    }
    
    /* Responsive header layout */
    .product-header-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .product-actions-area {
        align-self: flex-end;
    }
    
    /* Responsive button group */
    .button-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .button-group form {
        margin-left: 0 !important;
    }
}