/* Modern styling with default Tailwind fonts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f9fafb;
    color: #111827;
}

/* Navigation styles */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: #374151;
    border-bottom-color: #d1d5db;
}

.nav-link.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

.nav-link i {
    margin-right: 0.25rem;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Modal animations */
.modal-enter {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Table hover effect */
.table-row-hover:hover {
    background-color: #f9fafb;
}

/* Table styles */
.table-container {
    overflow-x: auto;
}

.table-container table {
    min-width: 100%;
    border-collapse: collapse;
}

.table-container th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.table-container td {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.table-container td:first-child {
    color: #111827;
}

/* Form focus */
input:focus, 
select:focus, 
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    border-color: #4f46e5;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Card styles */
.card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Button styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background-color: #4f46e5;
    color: #ffffff;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-primary i {
    margin-right: 0.5rem;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    color: #ef4444;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.btn-danger:hover {
    color: #dc2626;
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    color: #4f46e5;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    transition: color 0.2s;
    margin-right: 0.75rem;
}

.btn-edit:hover {
    color: #4338ca;
}

/* Alert styles */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-close {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    transition: opacity 0.2s;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

.alert-close:hover {
    opacity: 1;
}

/* Stats card */
.stats-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.stats-card .stats-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.stats-card .stats-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
}

.stats-card .stats-icon {
    font-size: 1.875rem;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(75, 85, 99, 0.5);
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.modal-overlay.active {
    display: block;
}

.modal-container {
    position: relative;
    top: 2rem;
    margin: 0 auto;
    padding: 1.5rem;
    max-width: 90%;
    width: 50%;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        top: 1rem;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.modal-close {
    color: #9ca3af;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.25rem 0.5rem;
}

.modal-close:hover {
    color: #4b5563;
}

/* Form in modal */
#editForm .form-group {
    margin-bottom: 1rem;
}

#editForm .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

#editForm .form-group input,
#editForm .form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-weight: 400;
    font-size: 0.875rem;
    background-color: #ffffff;
}

#editForm .form-group input:focus,
#editForm .form-group select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#editForm .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 0.625rem 1.5rem;
}

/* Size entries in edit modal */
#editSizeContainer .size-entry {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #f3f4f6;
}

#editSizeContainer .size-entry .field-group {
    flex: 1;
}

#editSizeContainer .size-entry .field-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

#editSizeContainer .size-entry .field-group input {
    width: 100%;
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-weight: 400;
    font-size: 0.875rem;
}

#editSizeContainer .size-entry .remove-size {
    color: #f87171;
    background: transparent;
    border: none;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}

#editSizeContainer .size-entry .remove-size:hover {
    color: #dc2626;
}

/* Add size button */
.add-size-btn {
    color: #4f46e5;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.add-size-btn:hover {
    color: #4338ca;
}

.add-size-btn i {
    margin-right: 0.25rem;
}

/* Grid layout for forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Form group */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-weight: 400;
    font-size: 0.875rem;
    background-color: #ffffff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Toast notification */
.toast-alert {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Size entry styles */
.size-entry {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

.size-entry .field-group {
    flex: 1;
}

.size-entry label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.size-entry input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-weight: 400;
    font-size: 0.875rem;
}

.size-entry input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.size-entry .remove-size {
    color: #f87171;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.size-entry .remove-size:hover {
    color: #dc2626;
}

/* Input validation styles */
input.error {
    border-color: #ef4444 !important;
}

input.success {
    border-color: #10b981 !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Order number validation indicator */
#orderNoError {
    transition: all 0.3s ease;
}

#orderNoError:not(.hidden) {
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
}