/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #e3d5ff 0%, #d4c5f9 50%, #c5b3f0 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.logo {
    display: flex;
    gap: 10px;
}

.auth-box .logo {
    justify-content: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

header h1 {
    font-size: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

header h1 i {
    font-size: 28px;
    -webkit-text-fill-color: initial;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: right;
}

.user-info span {
    font-size: 15px;
    color: #555;
}

.user-info strong {
    color: #333;
    font-weight: 600;
}

/* Button row container - desktop */
.button-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3d5ff 0%, #d4c5f9 50%, #c5b3f0 100%);
}

.auth-box {
    background: white;
    padding: 20px;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 450px;
    margin: 20px;
}

.auth-box h1 {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.auth-box h1 i {
    font-size: 32px;
    -webkit-text-fill-color: initial;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-box h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

.auth-helper-links {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.text-link {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
}

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

#forgotPasswordSection {
    margin-top: 10px;
}

.forgot-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.forgot-header .back-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.instruction-text {
    color: #666;
    font-size: 14px;
}

.forgot-step {
    display: none;
}

.forgot-step.active {
    display: block;
}

.status-message {
    display: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
}

.status-message.show {
    display: block;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
}

.auth-box #forgotPasswordSection .btn {
    width: 100%;
    justify-content: center;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.text-link.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    text-decoration: none;
}

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

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

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

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

.modal-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.2s;
}

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

.modal-body {
    padding: 25px;
}

.modal-body .instruction-text {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .btn {
    width: 100%;
    margin-top: 10px;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.filters-section h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.filters-section h3 i {
    color: #667eea;
    font-size: 20px;
}

.search-bar {
    margin-bottom: 15px;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 15px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-controls input,
.filter-controls select {
    flex: 1;
    min-width: 200px;
    padding: 12px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-controls input:focus,
.filter-controls select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.filter-controls .btn {
    flex: 0 0 auto;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

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

#registerForm .btn-primary,
#loginForm .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    display: flex;
    justify-content: center;
}

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

a.btn-primary,
a.btn {
    text-decoration: none;
    width: auto;
}

.button-row .btn-primary,
.button-row a.btn-primary {
    width: auto;
    flex: 0 0 auto;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
}

/* Loading state for buttons */
.btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
    display: inline-block;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #0e8678 0%, #2dd46a 100%);
    box-shadow: 0 6px 20px rgba(56, 239, 125, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(238, 90, 111, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ee5253 0%, #d84857 100%);
    box-shadow: 0 6px 20px rgba(238, 90, 111, 0.4);
}

.btn-danger:disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e87fe9 0%, #e0455a 100%);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    box-shadow: 0 6px 16px rgba(23, 162, 184, 0.4);
}

kbd {
    background: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.9em;
}

.btn-sm {
    padding: 8px 10px;
    font-size: 12px;    
    border-radius: 10px;
    min-width: 36px;
    justify-content: center;
}
#clearFiltersBtn {
    padding: 15px 25px;
    font-size: 14px;
}

.icon {
    font-size: 16px;
}

/* Font Awesome Icon Styling */
.btn i {
    font-size: 14px;
}

.btn-sm i {
    font-size: 12px;
}

/* Selected Count Badge */
.badge {
    display: none;
    min-width: 20px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin-left: 5px;
    text-align: center;
}

.badge.show {
    display: inline-block;
}

.btn-danger .badge {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Table */
.table-container {
    background: white;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    padding: 25px;
}

.table-container h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.table-container h3 i {
    color: #667eea;
    font-size: 20px;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    position: relative;
}

.table-wrapper.no-records {
    overflow: hidden;
}

.table-wrapper.no-records::-webkit-scrollbar {
    display: none;
}

/* Scrollbar styling for better visibility */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
}

table {
    width: 100%;
    border-collapse: collapse;
}

/* Column Widths and Alignment */

/* Checkbox Column - Centered */
table th:nth-child(1),
table td:nth-child(1) {
    width: 50px;
    text-align: center;
}

/* # Column - Centered */
table th:nth-child(2),
table td:nth-child(2) {
    width: 60px;
    text-align: center;
}

/* Order Number Column - Left Aligned */
table th:nth-child(3),
table td:nth-child(3) {
    width: 180px;
    text-align: center;
}

/* Date Column - Centered */
table th:nth-child(4),
table td:nth-child(4) {
    width: 130px;
    text-align: center;
}

/* Time Column - Centered */
table th:nth-child(5),
table td:nth-child(5) {
    width: 110px;
    text-align: center;
}

/* Action Column - Centered */
table th:nth-child(6),
table td:nth-child(6) {
    width: auto;
    text-align: center;
}


thead {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f0ff 100%);
}

th, td {
    padding: 16px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    font-weight: 600;
    color: #667eea;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 14px;
    color: #333;
}

td strong {
    color: #333;
    text-decoration: none;
}

tbody tr {
    transition: all 0.2s ease;
}

/* tbody tr:hover {
    background: linear-gradient(135deg, #fafafe 0%, #f8f8ff 100%);
    transform: scale(1.005);
} */

.action-cell {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-Pending {
    background: #ffc107;
    color: #333;
}

.status-Processing {
    background: #2196F3;
    color: white;
}

.status-Completed {
    background: #4CAF50;
    color: white;
}

.status-Cancelled {
    background: #f44336;
    color: white;
}

.no-orders {
    padding: 80px 20px;
    text-align: center;
    color: #999;
    font-size: 16px;
    background: linear-gradient(135deg, #fafafe 0%, #f8f8ff 100%);
    border-radius: 15px;
    margin-top: 20px;
    position: relative;
}

.no-orders::before {
    content: "\f466";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: block;
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
    color: #667eea;
}

.no-orders p {
    font-size: 17px;
    font-weight: 500;
    color: #667eea;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

/* Date and Time Input Styling for Mobile */
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="datetime-local"] {
    background: #fafafa;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator,
.form-group input[type="time"]::-webkit-calendar-picker-indicator,
.form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    position: absolute;
    right: 12px;
    width: 24px;
    height: 24px;
    background-size: contain;
}

.form-group input[type="date"]:focus::-webkit-calendar-picker-indicator,
.form-group input[type="time"]:focus::-webkit-calendar-picker-indicator,
.form-group input[type="datetime-local"]:focus::-webkit-calendar-picker-indicator {
    opacity: 1;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

.form-group input[readonly] {
    background: #f8f9fa;
    cursor: not-allowed;
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 16px;
    transition: color 0.3s ease;
    user-select: none;
}

.password-toggle:hover {
    color: #667eea;
}

.password-toggle.active {
    color: #667eea;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal[style*="display: block"],
.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 25px;
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

#calendarModal .modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f0ff 100%);
    border-radius: 25px 0 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    -webkit-text-fill-color: initial;
    font-size: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #bbb;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding-bottom: 7px;
}

.close:hover {
    color: #ff6b6b;
    background: #ffebee;
    transform: rotate(90deg);
}

.modal form {
    padding: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 20px 25px;
    border-top: 2px solid #f0f0f0;
    margin-top: 10px;
    background: linear-gradient(135deg, #fafafe 0%, #f8f8ff 100%);
    border-radius: 0 0 25px 25px;
}

/* Error Message */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: none;
    font-size: 14px;
}

.error-message.show {
    display: block;
}

/* Calendar Styles */
#calendarView {
    padding: 30px;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

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

.calendar-header h3 {
    font-size: 20px;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav .btn {
    font-size: 14px;
    padding: 10px 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    grid-auto-rows: 1fr;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f0ff 100%);
    border-radius: 12px;
    color: #667eea;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    border: 2px solid #e8e8e8;
    border-radius: 15px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 100px;
    height: auto;
}

.calendar-day:hover {
    background: linear-gradient(135deg, #fafafe 0%, #f8f8ff 100%);
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.calendar-day.has-orders {
    background: linear-gradient(135deg, #e3f2fd 0%, #e8f5e9 100%);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.calendar-day.today {
    border: 3px solid #11998e;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.calendar-day-number {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
    flex-shrink: 0;
}

.calendar-day-count {
    font-size: 12px;
    color: white;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4px 8px;
    border-radius: 8px;
    display: table;
    flex-shrink: 0;
    margin-bottom: 4px;
}

.calendar-day-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: auto;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.calendar-tag-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 0 0 15px 15px;
    z-index: 1;
}

.calendar-tag {
    display: inline-block;
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.3;
    /* Background color will be set via inline style from JavaScript */
}

.order-details-view {
    padding: 25px;
}

.detail-row {
    display: flex;
    padding: 16px 20px;
    border-bottom: 2px solid #f8f8f8;
    transition: all 0.2s ease;
}

.detail-row:hover {
    background: linear-gradient(135deg, #fafafe 0%, #f8f8ff 100%);
}

.detail-label {
    font-weight: 600;
    width: 180px;
    color: #667eea;
    font-size: 14px;
}

.detail-value {
    flex: 1;
    color: #333;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px 10px;
    }
    
    /* Header Responsive */
    header {
        padding: 20px 15px;
    }

    .logo {
        justify-content: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    header h1 {
        font-size: 22px;
        text-align: center;
    }
    
    .user-info {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .button-row {
        width: 100%;
    }
    
    .button-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        width: 100%;
        flex-wrap: nowrap;
        align-items: stretch;
    }
    
    .user-info .btn {
        width: 100%;
        justify-content: center;
    }
    
    .button-row .btn,
    .button-row a.btn,
    .button-row .btn-primary,
    .button-row a.btn-primary {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    
    .filter-controls {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .filter-controls input,
    .filter-controls select {
        flex: 1;
        min-width: calc(50% - 8px);
        width: auto;
    }
    
    .filter-controls .btn {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Mobile-specific date/time input styling */
    .form-group input[type="date"],
    .form-group input[type="time"],
    .form-group input[type="datetime-local"] {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 16px;
        background: #fafafa;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        min-height: 44px; /* Better touch target for mobile */
    }
    
    .form-group input[type="date"]:focus,
    .form-group input[type="time"]:focus,
    .form-group input[type="datetime-local"]:focus {
        background: white;
        font-size: 16px;
    }
    
    table {
        font-size: 11px;
        min-width: 650px;
        display: table;
    }
    
    th, td {
        padding: 10px 5px;
    }
    
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 10px;
    }

    .modal-header{
        padding: 20px 15px;
    }
    
    #calendarView {
        padding: 15px;
    }
    
    .calendar-header {
        margin-bottom: 15px;
    }
    
    .calendar-nav .btn {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .calendar-grid {
        gap: 5px;
        grid-auto-rows: 1fr;
    }
    
    .calendar-day-header {
        padding: 8px 4px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .calendar-day {
        padding: 6px 4px;
        font-size: 14px;
        border-radius: 10px;
        border-width: 1px;
        min-height: 60px;
        width: 100%;
        height: auto;
    }
    
    .calendar-day:hover {
        transform: scale(1.03);
    }
    
    .calendar-day-number {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .calendar-day-count {
        font-size: 10px;
        padding: 2px 4px;
        border-radius: 5px;
    }
    
    /* Show only color for tags on tablet/mobile - hide text */
    .calendar-tag {
        width: 12px;
        height: 12px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
        text-indent: -9999px;
        overflow: hidden;
        min-width: 12px;
        min-height: 12px;
        line-height: 0;
        display: inline-block;
        border: 1px solid rgba(0, 0, 0, 0.15);
        /* Background color will be set via inline style from JavaScript */
    }
    
    .calendar-day-tags {
        gap: 4px;
        margin-top: 3px;
    }
    
    .calendar-day.today {
        border-width: 2px;
    }

    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .action-buttons .btn {
        flex: 1;
        min-width: 150px;
        justify-content: center;
    }
}

@media (max-width: 832px) {
    .table-container {
        padding: 20px 15px;
    }
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        margin: 0 0;
    }
    
    table {
        min-width: 600px;
        width: 100%;
    }
    
    th, td {
        white-space: nowrap;
        padding: 12px 8px;
    }
    
    .action-cell {
        justify-content: flex-end;
    }

    header {
        padding: 20px 15px;
    }
    
    .modal form {
        padding: 20px 15px;
    }
    .order-details-view {
        padding: 20px 15px;
    }
    .filters-section {
        padding: 20px 15px;
    }   
}

@media (max-width: 920px) {
    .user-info {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
}

/* Checkbox Styles */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Select Status in Table */
.status-select {
    padding: 6px 10px;
    border: 2px solid transparent;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Pending - Yellow/Orange (default) */
.status-select,
.status-select[data-status="Pending"] {
    background: linear-gradient(0, #f7b733 0%, #fc4a1a 100%) !important;
    box-shadow: 0 2px 8px rgba(247, 183, 51, 0.3);
}

/* Processing - Blue */
.status-select[data-status="Processing"] {
    background: linear-gradient(0, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Completed - Green */
.status-select[data-status="Completed"] {
    background: linear-gradient(#11998e 0%, #38ef7d 100%) !important;
    box-shadow: 0 2px 8px rgba(56, 239, 125, 0.3);
}

/* Cancelled - Red */
.status-select[data-status="Cancelled"] {
    background: linear-gradient(0, #ff6b6b 0%, #ee5a6f 100%) !important;
    box-shadow: 0 2px 8px rgba(238, 90, 111, 0.3);
}

.status-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.status-select:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Status Select Options */
.status-select option {
    background: white;
    color: #333;
    padding: 10px;
}

/* Extra small screens - prevent horizontal scroll and manage height */
@media (max-width: 480px) {
    #calendarModal .modal-header{
        padding: 15px 10px;
    }
    #calendarView {
        padding: 15px 10px;
    }
    
    .calendar-header {
        margin-bottom: 8px;
    }
    
    .calendar-header h3 {
        font-size: 15px;
    }
    
    .calendar-nav .btn {
        font-size: 11px;
        padding: 6px 8px;
        border-radius: 6px;
    }
    
    .calendar-grid {
        gap: 5px;
        grid-auto-rows: 1fr;
    }
    
    .calendar-day-header {
        padding: 4px 1px;
        font-size: 9px;
    }
    
    .calendar-day {
        padding: 4px 2px;
        border-radius: 6px;
        min-height: 60px;
        width: 100%;
        height: auto;
    }
    
    .calendar-day-number {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .calendar-day-count {
        font-size: 8px;
        padding: 1px 3px;
    }
    
    /* Show only color for tags on mobile - hide text */
    .calendar-tag {
        width: 12px;
        height: 12px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
        text-indent: -9999px;
        overflow: hidden;
        min-width: 12px;
        min-height: 12px;
        line-height: 0;
        display: inline-block;
        border: 1px solid rgba(0, 0, 0, 0.15);
        /* Background color will be set via inline style from JavaScript */
    }
    
    .calendar-day-tags {
        gap: 4px;
        margin-top: 3px;
    }
    .detail-value {
        font-size: 14px;
    }
    .modal-footer .btn {
        font-size: 12px;
    }
    
    /* Ensure button-row is 2 columns on small screens */
    .button-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
        align-items: stretch;
    }
    
    .button-row .btn,
    .button-row a.btn,
    .button-row .btn-primary,
    .button-row a.btn-primary {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        box-sizing: border-box;
        font-size: 13px;
        padding: 10px 8px;
    }
}

/* Very small screens - iPhone SE, Galaxy Fold, etc. (375px and below) */
@media (max-width: 375px) {
    #calendarModal .modal-header{
        padding: 15px 10px;
    }
    .modal-header h2 {
        font-size: 20px;
    }
    #calendarView {
        padding: 10px 10px;
    }
    
    .calendar-header {
        margin-bottom: 6px;
        gap: 8px;
    }
    
    .calendar-header h3 {
        font-size: 14px;
    }
    
    .calendar-nav .btn {
        font-size: 10px;
        padding: 5px 7px;
        border-radius: 6px;
    }
    
    .calendar-grid {
        gap: 5px;
        grid-auto-rows: 1fr;
    }
    
    .calendar-day-header {
        padding: 3px 1px;
        font-size: 8px;
        border-radius: 4px;
    }
    
    .calendar-day {
        padding: 1px 1px;
        border-radius: 5px;
        border-width: 1px;
        min-height: 60px;
        width: 100%;
        height: auto;
    }
    
    .calendar-day:hover {
        transform: scale(1.02);
    }
    
    .calendar-day-number {
        font-size: 9px;
        margin-bottom: 0px;
    }
    
    .calendar-day-count {
        font-size: 7px;
        padding: 1px 2px;
        border-radius: 3px;
    }
    
    .calendar-day.today {
        border-width: 1.5px;
    }
}

/* Tags Input Styling */
.tags-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.tag-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.tags-input {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 10px 0px;
    border: none;
    border-radius: 8px;
    background: #fff;
    height: 45px;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.tags-input:focus-within {
    border: 1px solid #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.tags-display-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    min-height: 40px;
}

.tags-display-container:empty {
    display: none;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    animation: tagSlideIn 0.3s ease;
}

@keyframes tagSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tag-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tag-text {
    user-select: none;
}

.tag-remove {
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.9;
}

.tag-remove:hover {
    opacity: 1;
    transform: scale(1.1);
}

.tag-input-wrapper-inner {
    flex: 1;
    min-width: 120px;
}

.tag-input-field {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    padding: 4px 0;
    width: 100%;
    min-width: 120px;
    color: #333;
    box-shadow: none;
}

.tag-input-field:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.tag-input-field::placeholder {
    color: #999;
}

/* Color Picker Styling */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

#tagColorPicker {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.color-picker-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #4CAF50;
    background-image: linear-gradient(135deg, #4CAF50 0%, #4CAF50 100%);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white;
    font-size: 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
    line-height: 1;
}

.color-picker-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-picker-label:hover::before {
    opacity: 1;
}

.color-picker-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.color-picker-label:active {
    transform: translateY(0);
}

.color-picker-label i {
    color: white;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    line-height: 1;
    text-align: center;
}

/* Tags Display in View Modal */
.tags-display-view {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.tag-pill-view {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive Tags */
@media (max-width: 768px) {
    .color-picker-wrapper {
        min-width: 38px;
    }
    .color-picker-label {
        width: 100%;
        height: 40px;
    }
    
    .tags-input {
        min-height: 40px;
        padding: 8px 10px;
    }
    
    .tag-pill {
        font-size: 12px;
        padding: 5px 10px;
    }
}



