/* Custom CSS for Shipping Manager - Modern UI Refresh */

/* Enhanced Color Variables */
:root {
  --primary-teal: #00d1b2;
  --primary-dark: #00b89c;
  --secondary-blue: #3273dc;
  --success-green: #23d160;
  --warning-orange: #ffdd57;
  --danger-red: #ff3860;
  --light-gray: #f5f5f5;
  --medium-gray: #dbdbdb;
  --dark-gray: #4a4a4a;
  --white: #ffffff;
  --gradient-primary: linear-gradient(135deg, #00d1b2 0%, #3273dc 100%);
  --gradient-light: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
  --transition-smooth: all 0.3s ease;
}

/* Global Enhancements */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #fafafa;
}

/* Enhanced Hero Section */
.hero.is-primary {
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.hero.is-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,0 1000,60 0,100"/></svg>');
  background-size: cover;
  background-position: bottom;
}

.hero-body {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
}

.hero .title {
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.hero .subtitle {
  font-weight: 400;
  opacity: 0.9;
  margin-top: 0.75rem;
}

/* Enhanced Navigation */
.navbar {
  box-shadow: var(--shadow-soft);
  border-bottom: 1px solid var(--medium-gray);
  background: var(--white);
}

.navbar-item {
  transition: var(--transition-smooth);
  border-radius: 4px;
  margin: 0 2px;
}

.navbar-item:hover {
  background-color: var(--light-gray);
  transform: translateY(-1px);
}

.navbar-item.is-active {
  background-color: var(--primary-teal);
  color: var(--white) !important;
}

.navbar-dropdown {
  box-shadow: var(--shadow-medium);
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0;
}

.navbar-dropdown .navbar-item {
  padding: 0.75rem 1.25rem;
  margin: 0;
}

/* Enhanced Tables */
.table-container {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin: 1rem 0;
}

.table {
  background: transparent;
  border-radius: 0;
}

.table thead th {
  background: var(--gradient-light);
  border: none;
  font-weight: 600;
  color: var(--dark-gray);
  padding: 1rem 0.75rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: var(--transition-smooth);
  border: none;
}

.table tbody tr:hover {
  background-color: rgba(0, 209, 178, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

.table td {
  border: none;
  padding: 1rem 0.75rem;
  vertical-align: middle;
}

/* Enhanced Buttons */
.button {
  transition: var(--transition-smooth);
  font-weight: 500;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.button.is-primary {
  background: var(--gradient-primary);
  border: none;
}

.button.is-primary:hover {
  background: var(--primary-dark);
}

.button.is-rounded {
  border-radius: 20px;
}

.button.is-small {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
}

/* Action Button Groups */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.action-buttons .button {
  min-width: auto;
  margin: 0;
}

/* Status Indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-indicator.shipped {
  background-color: rgba(35, 209, 96, 0.1);
  color: var(--success-green);
  border: 1px solid rgba(35, 209, 96, 0.2);
}

.status-indicator.not-shipped {
  background-color: rgba(255, 221, 87, 0.1);
  color: #b8860b;
  border: 1px solid rgba(255, 221, 87, 0.3);
}

/* Weight Difference Indicators */
.weight-difference {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
}

.weight-difference.good {
  color: var(--success-green);
}

.weight-difference.warning {
  color: #ff9500;
}

.weight-difference.danger {
  color: var(--danger-red);
}

/* Enhanced Cards */
.card {
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.card-header {
  background: var(--gradient-light);
  border-bottom: 1px solid var(--medium-gray);
  border-radius: 12px 12px 0 0;
}

.card-header-title {
  font-weight: 600;
  color: var(--dark-gray);
}

/* Enhanced Notifications */
.notification {
  border-radius: 8px;
  border: none;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1rem;
}

.notification.is-primary {
  background: linear-gradient(135deg, rgba(0, 209, 178, 0.1) 0%, rgba(50, 115, 220, 0.1) 100%);
  border-left: 4px solid var(--primary-teal);
}

.notification.is-success {
  background: rgba(35, 209, 96, 0.1);
  border-left: 4px solid var(--success-green);
  color: var(--success-green);
}

.notification.is-warning {
  background: rgba(255, 221, 87, 0.1);
  border-left: 4px solid var(--warning-orange);
  color: #b8860b;
}

.notification.is-danger {
  background: rgba(255, 56, 96, 0.1);
  border-left: 4px solid var(--danger-red);
  color: var(--danger-red);
}

/* Enhanced Pagination */
.pagination {
  margin: 2rem 0;
}

.pagination-link,
.pagination-previous,
.pagination-next {
  border-radius: 8px;
  transition: var(--transition-smooth);
  border: 1px solid var(--medium-gray);
}

.pagination-link:hover,
.pagination-previous:hover,
.pagination-next:hover {
  background-color: var(--primary-teal);
  color: var(--white);
  border-color: var(--primary-teal);
  transform: translateY(-1px);
}

.pagination-link.is-current {
  background: var(--gradient-primary);
  border-color: var(--primary-teal);
}

/* Enhanced Forms */
.field {
  margin-bottom: 1.5rem;
}

.label {
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.input,
.select select {
  border-radius: 8px;
  border: 2px solid var(--medium-gray);
  transition: var(--transition-smooth);
}

.input:focus,
.select select:focus {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 0.125em rgba(0, 209, 178, 0.25);
}

/* Statistics Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.stat-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-teal);
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--dark-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Loading States */
.loading-overlay {
  position: relative;
  overflow: hidden;
}

.loading-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Mobile Responsive Enhancements */
@media screen and (max-width: 768px) {
  .table-container {
    border-radius: 0;
    margin: 0 -1rem;
  }
  
  .hero-body {
    padding: 1.5rem 1rem;
  }
  
  .hero .title {
    font-size: 1.5rem;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .action-buttons .button {
    width: 100%;
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
  :root {
    --light-gray: #2a2a2a;
    --white: #1a1a1a;
    --dark-gray: #e0e0e0;
  }
}

/* Utility Classes */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.shadow-medium {
  box-shadow: var(--shadow-medium);
}

.transition-smooth {
  transition: var(--transition-smooth);
}

.border-radius-large {
  border-radius: 12px;
}

.border-radius-small {
  border-radius: 8px;
}