body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
}

.error-banner {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
}

.info-banner {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    text-align: center;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.login-container h1 {
    margin-bottom: 24px;
}

.login-container input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.login-container button:hover {
    background-color: #0056b3;
}

.error {
    color: #d9534f;
    margin-top: 15px;
}

.dashboard-container header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-container header h1 {
    margin: 0;
}

.dashboard-container header a {
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-card h2 {
    margin-top: 0;
    font-size: 18px;
    color: #555;
}

.stat-card p {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.rate-form {
    display: flex;
    align-items: center;
}

.rate-form input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

.rate-form button {
    padding: 8px 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

.new-order-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.new-order-form h2 {
    margin-top: 0;
}

.new-order-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.new-order-form input[type="date"], 
.new-order-form input[type="text"], 
.new-order-form input[type="number"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex-grow: 1;
}

.new-order-form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex-grow: 1;
    white-space: pre-wrap;
}

.new-order-form button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    align-items: start;
}

.order-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.order-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.order-card .order-details {
    padding: 20px;
}

.order-card .order-details p {
    margin: 0 0 10px;
}

.order-card .order-details button {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
    margin-right: 5px; /* Add some space between buttons */
}

.order-card .order-details button:hover {
    background-color: #138496;
}

.edit-address-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.edit-address-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    white-space: pre-wrap;
}

.edit-address-form button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

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

.order-card .update-form {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-card .cny-input {
    display: flex;
    flex-direction: column;
}

.order-card .cny-input label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.order-card .cny-input input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.order-card .update-form button {
    padding: 10px;
    background-color: #ffc107;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.order-card .update-form button:hover {
    background-color: #e0a800;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 10px;
}

.gallery-item {
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.delete-image-form {
    position: absolute;
    top: 5px;
    right: 5px;
}

.delete-image-form button {
    background-color: rgba(217, 83, 79, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    line-height: 24px;
    padding: 0;
}

.delete-image-form button:hover {
    background-color: #d9534f;
}

.image-price-input {
    display: flex;
    margin-top: 5px;
}

.image-price-input input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.image-price-input input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Save All Prices Section */
.save-all-prices-section {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    margin: 10px 0;
}

.save-all-prices-form {
    margin: 0;
}

.save-all-btn {
    width: 100%;
    padding: 12px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.save-all-btn:hover {
    background-color: #218838;
}

.save-all-btn:active {
    transform: translateY(1px);
}

.delete-order-form {
    margin-top: 15px;
    padding: 0 20px 20px;
}

.delete-order-form button {
    width: 100%;
    padding: 10px;
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.delete-order-form button:hover {
    background-color: #c9302c;
}

/* Security Notice */
.security-notice {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    text-align: left;
}

.security-notice p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* Monthly Calendar */
.monthly-calendar {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.monthly-calendar h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

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

.calendar-month {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.calendar-month:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

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

.orders-count {
    background-color: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.month-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.month-stats > div {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.revenue {
    background-color: #d1ecf1;
    color: #0c5460;
}

.costs {
    background-color: #f8d7da;
    color: #721c24;
}

.profit {
    font-weight: bold;
    font-size: 16px;
}

.profit.positive {
    background-color: #d4edda;
    color: #155724;
}

.profit.negative {
    background-color: #f8d7da;
    color: #721c24;
}

.no-data {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* Copy notification styling */
.copy-notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
}

/* Order Status Summary in Stats */
.order-status-summary {
    display: flex;
    gap: 20px;
    justify-content: space-around;
    margin-top: 10px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.status-count {
    font-size: 24px;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 50%;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-count.open {
    background-color: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

.status-count.processed {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.status-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    color: #666;
}

/* Order Status Styling */
.order-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.open {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.order-status.processed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Status Toggle Button */
.status-toggle-form {
    margin-top: 10px;
}

.status-toggle-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.status-toggle-btn.close {
    background-color: #28a745;
    color: white;
}

.status-toggle-btn.close:hover {
    background-color: #218838;
}

.status-toggle-btn.reopen {
    background-color: #ffc107;
    color: #333;
}

.status-toggle-btn.reopen:hover {
    background-color: #e0a800;
}

/* Order Card Status Visual */
.order-card.processed-order {
    opacity: 0.8;
    border-left: 4px solid #28a745;
}

.order-card.open-order {
    border-left: 4px solid #ffc107;
}

/* Monthly Calendar Status Updates */
.orders-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.status-breakdown {
    display: flex;
    gap: 8px;
    font-size: 11px;
}

.open-count {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
}

.processed-count {
    background-color: #d4edda;
    color: #155724;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
}

.orders-count {
    background-color: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Orders Section Styling */
.orders-section {
    margin-bottom: 40px;
}

.section-title {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.no-orders {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Compact Layout for Open Orders */
.order-card.compact {
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: auto;
    border-radius: 12px;
    overflow: hidden;
}

.order-card.compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.compact-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
    height: 100%;
}

.compact-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
}

.compact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.order-card.compact:hover .compact-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    border: 2px dashed #dee2e6;
}

.compact-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    background: white;
}

.order-date {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customer-name {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profit-summary {
    font-size: 18px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    margin-top: auto;
}

.profit-summary.positive {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.profit-summary.negative {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Expanded content styling */
.expanded-content {
    padding: 0;
}

.order-card.expanded {
    cursor: default;
}

.order-card.expanded .compact-content {
    display: none;
}

/* Click prevention for forms inside expanded content */
.expanded-content form,
.expanded-content button,
.expanded-content input,
.expanded-content textarea {
    pointer-events: auto;
}

/* Processed orders styling */
.order-card.processed-order {
    opacity: 0.85;
}

.order-card.processed-order.compact {
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-card.processed-order.compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 1;
}

/* Profit Box Styling */
.profit-box {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    border: 3px solid #dc3545;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #fff;
    position: relative;
}

.profit-box.positive {
    border-color: #28a745;
    background-color: #f8fff9;
}

.profit-box.negative {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.profit-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 2px;
    line-height: 1;
}

.profit-amount {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 2px;
}

.profit-box.positive .profit-amount {
    color: #28a745;
}

.profit-box.negative .profit-amount {
    color: #dc3545;
}

.profit-details {
    font-size: 8px;
    color: #888;
    line-height: 1;
}

.profit-details small {
    font-size: 8px;
}

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

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

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    width: 900px;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #495057;
}

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

.modal-close:hover {
    background-color: #e9ecef;
    color: #495057;
}

.modal-body {
    padding: 25px;
}

.modal-section {
    margin-bottom: 30px;
}

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

.modal-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-section-icon {
    width: 20px;
    height: 20px;
    background-color: #007bff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Order Details in Modal */
.modal-order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-card {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    word-break: break-word;
}

.detail-card.status {
    border-left-color: #ffc107;
}

.detail-card.profit {
    border-left-color: #28a745;
}

.detail-card.profit.negative {
    border-left-color: #dc3545;
}

.detail-card.amount {
    border-left-color: #17a2b8;
}

/* Modal Image Gallery */
.modal-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.modal-gallery-item {
    position: relative;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

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

.modal-gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
}

.modal-image-info {
    padding: 10px;
}

.modal-image-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.modal-image-price label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    min-width: 35px;
}

.modal-image-price input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.modal-image-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.modal-image-delete:hover {
    background-color: rgba(220, 53, 69, 1);
}

/* Modal Forms */
.modal-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.modal-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.modal-form-group {
    display: flex;
    flex-direction: column;
}

.modal-form-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.modal-form-input,
.modal-form-textarea {
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.modal-form-input:focus,
.modal-form-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.modal-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-form-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.modal-form-button.primary {
    background-color: #007bff;
    color: white;
}

.modal-form-button.primary:hover {
    background-color: #0056b3;
}

.modal-form-button.success {
    background-color: #28a745;
    color: white;
}

.modal-form-button.success:hover {
    background-color: #218838;
}

.modal-form-button.warning {
    background-color: #ffc107;
    color: #212529;
}

.modal-form-button.warning:hover {
    background-color: #e0a800;
}

.modal-form-button.danger {
    background-color: #dc3545;
    color: white;
}

.modal-form-button.danger:hover {
    background-color: #c82333;
}

/* Modal Action Buttons */
.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 25px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 12px 12px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95vw;
        margin: 10px;
    }
    
    .modal-header,
    .modal-body,
    .modal-actions {
        padding: 15px;
    }
    
    .modal-order-details {
        grid-template-columns: 1fr;
    }
    
    .modal-image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .modal-form-row {
        grid-template-columns: 1fr;
    }
}

/* Section spacing */
.orders-section:last-of-type {
    margin-bottom: 20px;
}

/* Image Checkbox Styles */
.image-checkbox-wrapper {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 10;
}

.image-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.image-checkbox:hover {
    background-color: #fff;
    border-color: #28a745;
    transform: scale(1.05);
}

.image-checkbox.checked {
    background-color: #28a745;
    border-color: #28a745;
}

.image-checkbox .checkmark {
    display: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.image-checkbox.checked .checkmark {
    display: block;
}

.image-checkbox .unchecked-icon {
    display: block;
    color: #6c757d;
    font-size: 14px;
}

.image-checkbox.checked .unchecked-icon {
    display: none;
}

/* Responsive adjustments */
/* Drag and Drop Styles */
.drag-drop-container {
    width: 100%;
    margin: 15px 0;
}

.drag-drop-zone {
    border: 3px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drag-drop-zone:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.drag-drop-zone.drag-over {
    border-color: #28a745;
    background-color: #e8f5e9;
    transform: scale(1.02);
}

.drag-drop-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.drag-drop-text p {
    margin: 8px 0;
    color: #666;
}

.drag-drop-text p strong {
    color: #333;
    font-size: 16px;
}

.browse-button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.browse-button:hover {
    background-color: #0056b3;
}

/* Image Preview Container */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    min-height: 0;
}

.image-preview-container:empty {
    display: none;
}

.preview-item {
    position: relative;
    background-color: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

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

.preview-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.preview-filename {
    font-size: 11px;
    color: #666;
    text-align: center;
    word-break: break-word;
    line-height: 1.3;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    font-weight: bold;
}

.preview-remove:hover {
    background-color: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .month-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .orders-summary {
        align-items: flex-start;
    }

    .status-breakdown {
        justify-content: flex-start;
    }

    .orders-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .compact-image {
        height: 140px;
    }

    .section-title {
        font-size: 20px;
    }

    .customer-name {
        font-size: 14px;
    }

    .profit-summary {
        font-size: 16px;
    }
    
    .drag-drop-zone {
        padding: 30px 15px;
    }
    
    .drag-drop-icon {
        font-size: 36px;
    }
    
    .image-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .preview-image {
        height: 80px;
    }
}
