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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.order-form {
    padding: 40px 30px;
}

.form-section {
    margin-bottom: 40px;
}

.form-section:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.item-card {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.item-card:hover {
    border-color: #4facfe;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.item-description {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.quantity-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-input input {
    width: 80px;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.quantity-input input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.quantity-input input[type="number"]::-webkit-inner-spin-button,
.quantity-input input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input input[type="number"] {
    -moz-appearance: textfield;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.success-message {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    margin: 20px 30px;
}

.success-message h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.error-message {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa07a 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    margin: 20px 30px;
}

.error-message h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.login-form {
    padding: 40px 30px;
    max-width: 400px;
    margin: 0 auto;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus,
.login-form input[type="email"]:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .order-form {
        padding: 30px 20px;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .success-message,
    .error-message {
        margin: 20px;
    }
    
    .logout-btn {
        position: static;
        margin-top: 20px;
        width: 100%;
    }
}

.search-container {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

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

.no-items {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #e1e5e9;
}

.order-summary {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.order-summary h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.summary-item {
    padding: 8px 0;
    border-bottom: 1px solid #e1e5e9;
    color: #555;
}

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

.summary-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #4facfe;
    color: #333;
    font-size: 1.1rem;
}

.place-another-btn {
    margin-top: 20px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.place-another-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(86, 171, 47, 0.3);
}

.place-another-btn:active {
    transform: translateY(0);
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

.nav-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.nav-btn.admin-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.nav-btn.admin-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Modal Styles */
.modal {
    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-content {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Bulk Controls */
.bulk-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.bulk-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bulk-btn:hover {
    background: #4facfe;
    color: white;
    border-color: #4facfe;
}

/* Advanced Filters */
.advanced-filters {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.filter-select,
.filter-input {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.filter-btn {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #5a6268;
}

/* Order History & Favorites Styles */
.history-item,
.favorite-item {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.history-item:hover,
.favorite-item:hover {
    border-color: #4facfe;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.history-header,
.favorite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-date,
.favorite-name {
    font-weight: 600;
    color: #333;
}

.history-details,
.favorite-details {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.history-actions,
.favorite-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reorder-btn {
    background: #28a745;
    color: white;
}

.reorder-btn:hover {
    background: #218838;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .bulk-controls {
        flex-direction: column;
    }
    
    .advanced-filters {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .history-actions,
    .favorite-actions {
        flex-direction: column;
    }
}

.supplier-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 10px;
}

.supplier-checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.supplier-checkbox-item:hover {
    border-color: #4facfe;
    background: #f8f9fa;
}

.supplier-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #4facfe;
}

.supplier-checkbox-item label {
    margin: 0;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    flex: 1;
}

.supplier-checkbox-item.selected {
    border-color: #4facfe;
    background: #e3f2fd;
}

.supplier-selection-info {
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

.supplier-group {
    margin-bottom: 30px;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    overflow: hidden;
}

.supplier-group-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.supplier-group-items {
    padding: 20px;
    background: #f8f9fa;
}

.no-suppliers-selected {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #e1e5e9;
}

.no-suppliers-selected h3 {
    margin-bottom: 10px;
    color: #333;
}

@media (max-width: 768px) {
    .supplier-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .supplier-checkbox-item {
        padding: 10px;
    }
}

.summary-supplier {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4facfe;
}

.summary-supplier h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.summary-supplier .summary-item {
    margin: 4px 0;
    padding-left: 10px;
    border-left: 2px solid #e1e5e9;
}

/* Notes Section Styles */
.summary-notes, .history-notes {
    background: #fffbe6;
    border-left: 4px solid #ffd700;
    padding: 12px 16px;
    margin-bottom: 18px;
    border-radius: 8px;
    font-size: 1rem;
    position: relative;
    word-break: break-word;
}
.summary-notes strong, .history-notes strong {
    margin-right: 8px;
    color: #b8860b;
}
.summary-notes .notes-icon, .history-notes .notes-icon {
    margin-right: 6px;
    font-size: 1.1em;
    vertical-align: middle;
}
/* Highlight important notes */
.summary-notes.important, .history-notes.important {
    background: #ffeaea;
    border-left: 4px solid #ff4d4f;
}
.summary-notes.important strong, .history-notes.important strong {
    color: #d32f2f;
}
/* Character Counter */
#notesCounter {
    display: block;
    text-align: right;
    font-size: 0.95em;
    color: #888;
    margin-top: 2px;
    margin-bottom: 8px;
}
/* Auto-expanding textarea */
textarea#notes {
    min-height: 48px;
    resize: none;
    overflow-y: hidden;
    transition: min-height 0.2s;
}

.field-info {
    margin-top: 8px;
}

.field-info small {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
} 