/* DaebakMerchant Custom Styles */

:root {
  --primary-blue: #1e40af;
  --primary-green: #059669;
  --primary-purple: #7c3aed;
  --primary-red: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

/* Mobile Navigation Responsive Fixes */
@media (max-width: 768px) {
  /* Stack navigation on mobile */
  nav .container {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  
  /* Brand section full width on mobile */
  nav .container > div:first-child {
    width: 100% !important;
    margin-bottom: 0.5rem !important;
  }
  
  /* Navigation buttons section */
  nav .container > div:last-child {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  
  /* Smaller buttons on mobile */
  nav a, nav button, nav span {
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
    white-space: nowrap !important;
  }
  
  /* Responsive welcome text */
  nav span:contains("Welcome"), nav span:contains("환영합니다") {
    display: none !important;
  }
}

@media (max-width: 640px) {
  /* Extra small screens - hide less important elements */
  nav .container > div:last-child {
    justify-content: space-between !important;
  }
  
  /* Smaller text and padding */
  nav h1 {
    font-size: 1.125rem !important;
  }
  
  nav p {
    font-size: 0.75rem !important;
  }
  
  /* Hide digital clock on very small screens */
  #digitalClock {
    display: none !important;
  }
}

/* Hide number input spin buttons */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

/* Special handling for delivery dashboard with clock */
@media (max-width: 1024px) {
  /* Make delivery dashboard navigation more responsive */
  nav .flex-1 {
    flex: 0 1 auto !important;
    margin: 0 1rem !important;
  }
  
  #digitalClock {
    font-size: 1.5rem !important;
    min-height: 24px !important;
  }
}

@media (max-width: 768px) {
  /* Stack elements in delivery dashboard */
  nav .container.flex {
    flex-wrap: wrap !important;
  }
  
  nav .flex-1 {
    order: 3 !important;
    flex: 1 1 100% !important;
    margin: 0.5rem 0 !important;
    text-align: left !important;
  }
  
  #digitalClock {
    font-size: 1.25rem !important;
    text-align: left !important;
  }
}

/* Product Management Modal Improvements */
.modal-content.max-w-4xl {
  max-height: 95% !important;
  display: flex !important;
  flex-direction: column !important;
}

.modal-content.max-w-4xl .modal-body {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 1.5rem !important;
}

@media (max-width: 768px) {
  .modal-content.max-w-4xl {
    max-width: 98% !important;
    max-height: 98% !important;
    margin: 1rem 0 !important;
  }
}

/* Mobile dropdown menu improvements */
@media (max-width: 768px) {
  .relative .absolute {
    left: 0 !important;
    right: auto !important;
    width: 100% !important;
    min-width: 200px !important;
  }
}

/* Order History Button Responsiveness */
@media (max-width: 1024px) {
  /* Responsive button container */
  .button-group-responsive {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  /* Smaller buttons on mobile */
  .button-group-responsive button {
    font-size: 0.75rem !important;
    padding: 0.375rem 0.75rem !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }
  
  /* Grid layout for better organization */
  .button-group-responsive {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    gap: 0.375rem !important;
  }
}

@media (max-width: 640px) {
  /* Extra small screens - even smaller buttons */
  .button-group-responsive button {
    font-size: 0.625rem !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 0.25rem !important;
  }
  
  /* 2 columns on very small screens */
  .button-group-responsive {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.25rem !important;
  }
  
  /* Hide SVG icons on very small screens */
  .button-group-responsive button svg {
    display: none !important;
  }
}

/* Button group responsive layout - alternative approach with CSS Grid */
@media (max-width: 1024px) {
  .button-group-responsive {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }
  
  .button-group-responsive button {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.75rem !important;
    min-width: 0 !important;
  }
}

/* Base Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
}

/* Loading Spinner */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Custom Button Styles */
.btn-primary {
  background-color: var(--primary-blue);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-success {
  background-color: var(--primary-green);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background-color 0.2s;
}

.btn-success:hover {
  background-color: #047857;
}

/* Order Status Styles */
.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  min-width: 80px;
  border: 2px solid;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-pending {
  background-color: #fff7ed;
  color: #ea580c;
  border-color: #fed7aa;
}

.status-confirmed {
  background-color: #f0fdf4;
  color: #16a34a;
  border-color: #bbf7d0;
}

.status-shipped {
  background-color: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.status-delivery-failed {
  background-color: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.status-cancelled {
  background-color: #f9fafb;
  color: #6b7280;
  border-color: #d1d5db;
}

/* Alternative solid style for better visibility - Compact design */
.status-badge-solid {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  min-width: 45px;
  color: white;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-pending-solid {
  background-color: #f59e0b;
}

.status-accepted-solid {
  background-color: #06b6d4;
}

.status-confirmed-solid {
  background-color: #10b981;
}

.status-shipped-solid {
  background-color: #3b82f6;
}

.status-delivery-assigned-solid {
  background-color: #8b5cf6;
}

.status-delivery-failed-solid {
  background-color: #ef4444;
}

.status-cancelled-solid {
  background-color: #dc2626;
}





/* Ensure all buttons and clickable elements have proper cursor */
button, .btn-primary, .btn-success, a[onclick], [onclick] {
  cursor: pointer !important;
}

button:hover, .btn-primary:hover, .btn-success:hover, a[onclick]:hover, [onclick]:hover {
  cursor: pointer !important;
}

/* Fix any potential pointer-events issues */
.bg-purple-600, .bg-purple-700, .bg-green-600, .bg-green-700, .bg-red-600, .bg-red-700, .bg-blue-600, .bg-blue-700 {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Ensure buttons are not disabled */
button:not(:disabled) {
  cursor: pointer !important;
}

.btn-purple {
  background-color: var(--primary-purple);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background-color 0.2s;
}

.btn-purple:hover {
  background-color: #6d28d9;
}

/* Card Styles */
.card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
}

.card-header {
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

/* Form Styles */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-error {
  color: var(--primary-red);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  position: relative;
  z-index: 99999;
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

.table th {
  background-color: var(--gray-50);
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gray-200);
}

.table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.875rem;
}

.table tbody tr:hover {
  background-color: var(--gray-50);
}

/* Status Badge Styles */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  text-align: center;
}

.badge-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-confirmed {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge-shipped {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-info {
  background-color: #dbeafe;
  color: #1e40af;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal.hidden {
  display: none !important;
}

.modal-content {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  width: 100%;
  max-width: 600px;
  position: relative;
  pointer-events: auto;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-800);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 1.5rem;
}

.modal-close:hover {
  color: var(--gray-600);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background-color: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Navigation Styles */
.nav-tabs {
  border-bottom: 1px solid var(--gray-200);
  display: flex;
}

.nav-tab {
  padding: 1rem 1.5rem;
  border-bottom: 2px solid transparent;
  color: var(--gray-500);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s, border-color 0.2s;
}

.nav-tab:hover {
  color: var(--gray-700);
}

.nav-tab.active {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination a {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  background: white;
  color: var(--gray-700);
  text-decoration: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: background-color 0.2s, border-color 0.2s;
}

.pagination a:hover {
  background-color: var(--gray-50);
}

.pagination a.active {
  background-color: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

/* Alert Styles */
.alert {
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 99999;
}

.alert-success {
  background-color: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.alert-error {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-warning {
  background-color: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}

.alert-info {
  background-color: #dbeafe;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* Grid Styles */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Product Card Styles */
.product-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: var(--gray-200);
}

.product-content {
  padding: 1rem;
}

.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-purple);
  margin-bottom: 1rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.hidden {
  display: none !important;
}

.block {
  display: block;
}

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

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.space-x-2 > * + * {
  margin-left: 0.5rem;
}

.space-x-4 > * + * {
  margin-left: 1rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .modal-content {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }
  
  .table-container {
    font-size: 0.875rem;
  }
  
  .nav-tab {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12px;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here if needed */
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

button:focus,
a:focus {
  outline-color: currentColor;
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.3s ease-in-out;
}

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

/* Toast notification styles */
#toast {
  animation: toastSlideIn 0.3s ease-out forwards;
  transition: all 0.3s ease-in-out;
}

#toast:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes toastSlideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast-closing {
  animation: toastSlideOut 0.3s ease-in forwards;
}

/* Custom form validation styles */
.form-input:invalid {
  border-color: var(--primary-red);
}

.form-input:valid {
  border-color: var(--primary-green);
}

/* Loading states */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Empty state styles */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--gray-500);
}

.empty-state svg {
  margin: 0 auto 1rem;
  width: 3rem;
  height: 3rem;
  color: var(--gray-300);
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease-out;
  width: 100%;
  max-width: 600px;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.modal-body {
  padding: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
  background-color: var(--gray-100);
  color: var(--gray-700);
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Prevent modal from closing accidentally */
.modal-content * {
  pointer-events: auto;
}

/* Enhanced modal stability */
.modal-content:hover {
  /* Keep modal stable when hovering */
}

/* Ensure modal inputs work properly */
.modal-content input, 
.modal-content select, 
.modal-content textarea, 
.modal-content button {
  pointer-events: auto;
}

/* Mobile Responsive Tables - 모든 정보 유지하되 가독성 향상 */
@media (max-width: 768px) {
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    .overflow-x-auto table {
        font-size: 13px;
        min-width: 800px; /* 모든 컬럼이 보이도록 최소 너비 설정 */
    }
    
    .overflow-x-auto th,
    .overflow-x-auto td {
        padding: 6px 8px !important;
        white-space: nowrap;
        vertical-align: middle;
    }
    
    /* 버튼들을 작게 표시 */
    .overflow-x-auto button {
        font-size: 11px !important;
        padding: 2px 6px !important;
    }
}

@media (max-width: 640px) {
    .overflow-x-auto table {
        font-size: 12px;
        min-width: 700px; /* 작은 화면에서도 모든 정보 보장 */
    }
    
    .overflow-x-auto th,
    .overflow-x-auto td {
        padding: 4px 6px !important;
    }
    
    /* 더 작은 버튼 */
    .overflow-x-auto button {
        font-size: 10px !important;
        padding: 1px 4px !important;
        margin: 1px !important;
    }
    
    /* 작업 컬럼의 버튼들을 세로로 배치 */
    .overflow-x-auto td:last-child > div {
        flex-direction: column !important;
        gap: 2px !important;
    }
}

/* 모바일에서 테이블 상단에 스크롤 힌트 추가 */
.overflow-x-auto::before {
    content: "← 좌우로 스크롤하여 모든 정보를 확인하세요";
    display: none;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    padding: 8px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .overflow-x-auto::before {
        display: block;
    }
}

/* Filter Button Fix - Prevent CSS conflicts */
.filter-button-base {
  background-color: #e5e7eb !important; /* gray-200 */
  color: #374151 !important; /* gray-700 */
  transition: all 0.2s !important;
}

.filter-button-base:hover {
  background-color: #d1d5db !important; /* gray-300 */
}

/* Active filter button states with !important to prevent conflicts */
.filter-active-all {
  background-color: #1d4ed8 !important; /* blue-700 */
  color: white !important;
}

.filter-active-pending {
  background-color: #374151 !important; /* gray-700 */
  color: white !important;
}

.filter-active-accepted {
  background-color: #0891b2 !important; /* cyan-600 - safer than teal */
  color: white !important;
}

.filter-active-confirmed {
  background-color: #059669 !important; /* green-600 */
  color: white !important;
}

.filter-active-shipped {
  background-color: #1d4ed8 !important; /* blue-700 */
  color: white !important;
}

.filter-active-delivery-assigned {
  background-color: #7c3aed !important; /* purple-600 */
  color: white !important;
}

.filter-active-delivery-failed {
  background-color: #dc2626 !important; /* red-600 */
  color: white !important;
}

.filter-active-cancelled {
  background-color: #f87171 !important; /* red-400 */
  color: white !important;
}

/* 페이지 로딩 스피너 스타일 */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner-container {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #e5e7eb;
  border-top: 6px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.loading-text {
  font-size: 16px;
  color: #4b5563;
  font-weight: 500;
  margin-top: 10px;
}

.loading-dots {
  display: inline-block;
  width: 20px;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s linear infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
