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

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation - Sidebar for large screens */
.navbar {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 260px;
  z-index: 100;
  transition: width 0.3s ease;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.navbar.collapsed {
  width: 70px;
}

/* Sidebar toggle button */
.sidebar-toggle {
  position: absolute;
  right: -15px;
  top: 20px;
  width: 30px;
  height: 30px;
  background: var(--primary);
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 101;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sidebar-toggle:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.sidebar-toggle svg {
  width: 16px;
  height: 16px;
  color: white;
  transition: transform 0.3s ease;
}

.navbar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.nav-container {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  gap: 2rem;
  flex: 1;
  overflow-y: auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.navbar.collapsed .nav-brand {
  justify-content: center;
}

.navbar.collapsed .brand-info {
  display: none;
}

.logo {
  width: 32px;
  height: 32px;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.brand-text {
  font-family: "Momo Trust Sans", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
}

.brand-datetime {
  font-size: 0.75rem;
  font-weight: 400;
  color: #6b7280;
  line-height: 1;
}

.nav-links {
  display: flex;
  flex-direction: column;
  list-style: none;
  gap: 0.5rem;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
}

.nav-link:hover {
  background: var(--bg);
  transform: translateX(4px);
}

.nav-link.active {
  background: var(--primary);
  color: white;
}

/* Material Symbols */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';
}

.nav-icon {
  color: #2563eb;
  min-width: 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-link.active .nav-icon {
  color: white;
}

.navbar.collapsed .nav-link {
  justify-content: center;
  padding: 0.75rem;
}

.navbar.collapsed .nav-link span:not(.nav-icon) {
  display: none;
}

.navbar.collapsed .nav-link:hover {
  transform: none;
}

/* Tooltip for collapsed sidebar */
.navbar.collapsed .nav-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  margin-left: 1rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-size: 0.875rem;
  z-index: 102;
}

.navbar.collapsed .nav-link:hover::after {
  opacity: 1;
}

.lang-btn {
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.lang-btn .material-symbols-outlined {
  color: white;
  font-size: 20px;
}

.lang-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.navbar.collapsed .lang-btn {
  padding: 0.75rem;
}

.navbar.collapsed .lang-btn span:not(.material-symbols-outlined) {
  display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 0;
  margin-left: 260px;
  transition: margin-left 0.3s ease;
}

.navbar.collapsed ~ .main-content,
body:has(.navbar.collapsed) .main-content {
  margin-left: 70px;
}

/* Breadcrumbs */
.breadcrumb-container {
  margin-bottom: 1.5rem;
  padding: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0.75rem 1.25rem;
  margin: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.breadcrumb-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  transition: left 0.5s ease;
}

.breadcrumb-link:hover::before {
  left: 100%;
}

.breadcrumb-link:not(.active):hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.breadcrumb-link.active {
  background: var(--primary);
  color: white;
  cursor: default;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.breadcrumb-link.active .breadcrumb-text {
  font-weight: 600;
}

.breadcrumb-home-icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.breadcrumb-link:hover .breadcrumb-home-icon {
  transform: scale(1.1);
}

.breadcrumb-text {
  line-height: 1;
  transition: all 0.3s ease;
}

.breadcrumb-separator {
  font-size: 1.125rem;
  color: var(--text-light);
  opacity: 0.6;
  transition: all 0.3s ease;
  user-select: none;
}

.breadcrumb-item:hover + .breadcrumb-item .breadcrumb-separator {
  opacity: 1;
  color: var(--primary);
}

/* Breadcrumb animations */
@keyframes breadcrumbSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.breadcrumb-item {
  animation: breadcrumbSlideIn 0.3s ease forwards;
}

.breadcrumb-item:nth-child(1) {
  animation-delay: 0s;
}

.breadcrumb-item:nth-child(2) {
  animation-delay: 0.1s;
}

.breadcrumb-item:nth-child(3) {
  animation-delay: 0.2s;
}

.breadcrumb-item:nth-child(4) {
  animation-delay: 0.3s;
}

/* Mobile breadcrumb adjustments */
@media (max-width: 768px) {
  .breadcrumb {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
  }

  .breadcrumb-link {
    padding: 0.35rem 0.625rem;
    font-size: 0.8125rem;
  }

  .breadcrumb-home-icon {
    font-size: 1.125rem;
  }

  .breadcrumb-separator {
    font-size: 1rem;
  }

  /* Hide text on very small screens, keep icons */
  @media (max-width: 480px) {
    .breadcrumb-text {
      display: none;
    }

    .breadcrumb-home-icon {
      display: inline-block;
    }

    .breadcrumb-link {
      padding: 0.35rem 0.5rem;
    }
  }
}

/* Beautiful Custom Tooltips */
.custom-tooltip {
  position: absolute;
  z-index: 100000;
  padding: 0.625rem 1rem;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(0.95);
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.custom-tooltip::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

/* Tooltip arrow positions */
.custom-tooltip-top::before {
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0 4px;
  border-color: #1f2937 transparent transparent transparent;
}

.custom-tooltip-bottom::before {
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 4px 4px 4px;
  border-color: transparent transparent #1f2937 transparent;
}

.custom-tooltip-left::before {
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 4px 0 4px 4px;
  border-color: transparent transparent transparent #1f2937;
}

.custom-tooltip-right::before {
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 4px 4px 4px 0;
  border-color: transparent #1f2937 transparent transparent;
}

/* Show tooltip */
.custom-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Tooltip glow effect */
.custom-tooltip::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(147, 51, 234, 0.5));
  border-radius: 8px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.custom-tooltip.show::after {
  opacity: 0.3;
  animation: tooltipGlow 2s ease-in-out infinite;
}

@keyframes tooltipGlow {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.4;
  }
}

/* Hide default browser tooltips */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  display: none !important;
}

/* Remove title attribute tooltips */
[data-tooltip][title] {
  cursor: pointer;
}

/* Footer */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-header {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M18 17V9'/%3E%3Cpath d='M13 17V5'/%3E%3Cpath d='M8 17v-3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.2;
  animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
  0%, 100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(-5px);
  }
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e40af;
  margin: 0;
  letter-spacing: 0.025em;
  position: relative;
  z-index: 1;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-gentle 3s ease-in-out infinite;
}

.stat-card::after {
  content: '📊';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2.5rem;
  opacity: 0.1;
  animation: float 3s ease-in-out infinite;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
  border-color: var(--primary);
}

.stat-card:hover::before {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
}

@keyframes pulse-gentle {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  position: relative;
  z-index: 1;
}

.stat-card.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.03) 0%, var(--card-bg) 100%);
}

.stat-card.warning::before {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
}

.stat-card.warning::after {
  content: '⚠️';
  animation: shake 2s ease-in-out infinite;
}

.stat-card.warning:hover::before {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
}

.stat-card.warning .stat-value {
  color: var(--warning);
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-3px) rotate(-5deg);
  }
  75% {
    transform: translateX(3px) rotate(5deg);
  }
}

.stat-card.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.03) 0%, var(--card-bg) 100%);
}

.stat-card.success::before {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.12) 0%, transparent 70%);
}

.stat-card.success::after {
  content: '💰';
  animation: bounce-gentle 2s ease-in-out infinite;
}

.stat-card.success:hover::before {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.2) 0%, transparent 70%);
}

.stat-card.success .stat-value {
  color: #22c55e;
}

@keyframes bounce-gentle {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.05);
  }
}

/* Buttons */
.btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.required-indicator {
  color: var(--danger);
  margin-left: 0.25rem;
  font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: all 0.2s;
  background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Compact form inputs */
.form-input-compact {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  border: 2px solid #d1d5db;
}

.form-textarea-compact {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  min-height: 60px;
  border: 2px solid #d1d5db;
}

/* Searchable Select */
.searchable-select-container {
  position: relative;
}

/* Validation icon for searchable select */
.searchable-select-container.form-input-wrapper {
  display: flex;
  align-items: center;
}

.searchable-select-container .validation-icon-container {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 10;
}

.searchable-select-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.8125rem;
  background: white;
  transition: all 0.2s;
}

.searchable-select-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.searchable-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
}

.searchable-select-option {
  padding: 0.625rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.8125rem;
  border-bottom: 1px solid #f3f4f6;
}

.searchable-select-option:last-child {
  border-bottom: none;
}

.searchable-select-option:hover {
  background: #eff6ff;
}

.searchable-select-option strong {
  color: var(--text);
  font-weight: 600;
}

.searchable-select-dropdown::-webkit-scrollbar {
  width: 8px;
}

.searchable-select-dropdown::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 0 6px 6px 0;
}

.searchable-select-dropdown::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

/* Larger Searchable Select Dropdown */
.searchable-select-dropdown-large {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  max-height: 420px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.searchable-select-search-bar {
  padding: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 8px 8px 0 0;
}

.searchable-select-options-list {
  overflow-y: auto;
  max-height: 350px;
  padding: 0.5rem;
}

.searchable-select-options-list::-webkit-scrollbar {
  width: 10px;
}

.searchable-select-options-list::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 0 8px 8px 0;
}

.searchable-select-options-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 5px;
}

.searchable-select-options-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.searchable-select-dropdown-large .searchable-select-option {
  padding: 0.75rem 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  border-radius: 6px;
  margin-bottom: 0.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 1px solid transparent;
}

.searchable-select-dropdown-large .searchable-select-option:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.searchable-select-dropdown-large .searchable-select-option.out-of-stock {
  background: #fef2f2;
  border-color: #fecaca;
}

.searchable-select-dropdown-large .searchable-select-option.out-of-stock:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.stock-info {
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.stock-warning {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.75rem;
}

/* Modal Header Custom - Matching Card Header Theme */
.modal-header-custom {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  padding: 0.875rem 1.5rem;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header-custom::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 3rem;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M18 17V9'/%3E%3Cpath d='M13 17V5'/%3E%3Cpath d='M8 17v-3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.15;
  animation: float-icon 3s ease-in-out infinite;
  pointer-events: none;
}

.modal-title-custom {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e40af;
  margin: 0;
  letter-spacing: 0.025em;
  position: relative;
  z-index: 1;
}

.modal-close-custom {
  background: rgba(30, 64, 175, 0.1);
  border: none;
  color: #1e40af;
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}

.modal-close-custom:hover {
  background: rgba(30, 64, 175, 0.2);
  transform: scale(1.05);
}

.searchable-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Search input - more visible border */
.form-input[type="text"][id*="Search"],
.form-input[placeholder*="Search"],
.form-input[placeholder*="search"] {
  border: 2px solid #9ca3af;
  background-color: #fff;
}

.form-input[type="text"][id*="Search"]:focus,
.form-input[placeholder*="Search"]:focus,
.form-input[placeholder*="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

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

/* Form group sizing */
.form-group-large {
  grid-column: span 2;
}

.form-group-small {
  grid-column: span 1;
  max-width: 150px;
}

/* Form Validation */
.form-group-validated {
  position: relative;
}

.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-with-icon {
  padding-right: 2.5rem;
}

.validation-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.validation-icon.show {
  opacity: 1;
}

.validation-icon.valid {
  color: var(--success);
}

.validation-icon.invalid {
  color: var(--danger);
}

.form-input.valid {
  border-color: var(--success);
  background-color: #f0fdf4;
}

.form-input.invalid {
  border-color: var(--danger);
  background-color: #fef2f2;
}

.form-input.valid:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.validation-message {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}

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

.validation-message.valid {
  color: var(--success);
}

.validation-message.invalid {
  color: var(--danger);
}

/* Form Progress Bar */
.form-progress-container {
  margin-bottom: 1rem;
}

.form-progress-label {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.375rem;
}

.form-progress-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.form-progress-bar-track {
  height: 8px;
  background: #e0f2fe;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.form-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 10px;
  transition: width 0.4s ease, background 0.3s ease;
  position: relative;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.form-progress-bar-fill.complete {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.form-progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Floating Labels (Bootstrap-style) */
.form-floating {
  position: relative;
}

.form-floating > .form-input,
.form-floating > .form-select,
.form-floating > .form-textarea {
  height: calc(3.5rem + 2px);
  line-height: 1.25;
  padding: 1.625rem 0.75rem 0.625rem 0.75rem;
}

.form-floating > .form-textarea {
  height: auto;
  min-height: calc(3.5rem + 2px);
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
}

.form-floating > label {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1rem 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  border: 2px solid transparent;
  transform-origin: 0 0;
  transition: all 0.15s ease-in-out;
  color: var(--text-light);
  font-weight: 400;
  font-size: 0.875rem;
}

.form-floating > .form-input:focus ~ label,
.form-floating > .form-input:not(:placeholder-shown) ~ label,
.form-floating > .form-input.has-value ~ label,
.form-floating > .form-select:focus ~ label,
.form-floating > .form-select:not([value=""]) ~ label,
.form-floating > .form-textarea:focus ~ label,
.form-floating > .form-textarea:not(:placeholder-shown) ~ label,
.form-floating > .form-textarea.has-value ~ label,
.form-floating > .form-input.valid ~ label,
.form-floating > .form-input.invalid ~ label,
.form-floating > .form-input[readonly] ~ label {
  padding: 0.125rem 0.375rem;
  transform: scale(0.85) translateY(0.25rem) translateX(0.15rem);
  color: var(--primary);
  font-weight: 500;
  height: auto;
  width: auto;
  max-width: calc(100% / 0.85);
  background-color: var(--card-bg);
  border-radius: 4px;
}

.form-floating > .form-input::placeholder,
.form-floating > .form-textarea::placeholder {
  color: transparent;
  opacity: 0;
}

.form-floating > .form-input:focus::placeholder,
.form-floating > .form-textarea:focus::placeholder {
  color: var(--text-light);
  opacity: 0.4;
}

/* Form with floating labels and icons */
.form-floating .form-input-with-icon {
  padding-right: 2.5rem;
}

.form-floating .validation-icon-container {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding-right: 0.75rem;
  pointer-events: none;
}

/* Helptext for form fields */
.form-helptext {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.4;
}

.form-helptext-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.form-helptext-icon::before {
  content: 'ℹ';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4f46e5;
  font-size: 0.625rem;
  font-weight: 700;
}

/* Simplified select dropdown - more compact */
.searchable-select-dropdown-large {
  max-height: 320px;
  padding: 0;
}

.searchable-select-search-bar {
  padding: 0.5rem 0.625rem;
}

.searchable-select-options-list {
  max-height: 250px;
  padding: 0.25rem;
}

.searchable-select-dropdown-large .searchable-select-option {
  padding: 0.5rem 0.625rem;
  margin-bottom: 0.25rem;
  font-size: 0.8125rem;
}

.searchable-select-dropdown-large .searchable-select-option strong {
  font-size: 0.8125rem;
}

.stock-info {
  font-size: 0.6875rem;
  margin-top: 0.125rem;
}

/* Reduced modal padding for input forms */
.modal.modal-compact {
  padding: 1.25rem;
}

.modal.modal-compact .modal-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.modal.modal-compact .modal-title {
  font-size: 1.25rem;
}

.modal.modal-compact .form-group {
  margin-bottom: 0.875rem;
}

.modal.modal-compact .modal-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
}

/* Table */
.table-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 600px;
  position: relative;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.table-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.scroll-indicator {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(249, 250, 251, 0.95) 0%, rgba(249, 250, 251, 0.8) 50%, transparent 100%);
  padding: 1rem 0 0.5rem;
  text-align: center;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s;
}

.scroll-indicator.show {
  opacity: 1;
}

.scroll-indicator-content {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--card-bg);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.scroll-indicator-arrow {
  font-size: 1rem;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.end-of-list {
  text-align: center;
  padding: 1rem;
  color: var(--text-light);
  font-size: 0.8125rem;
  border-top: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  background: var(--bg);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}

.table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.table tbody tr:hover {
  background: var(--bg);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

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

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

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

/* Alert */
.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

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

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

/* Loading */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: slideUp 0.3s ease-out;
}

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

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

.modal-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Floating Action Buttons */
.floating-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1000;
}

.floating-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.floating-btn:active {
  transform: scale(0.95);
}

.floating-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.floating-btn-shopee {
  background-color: #EE4D2D;
}

.floating-btn-maps {
  background-color: white;
}

/* Pulsing ring animation */
.floating-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid;
  transform: translate(-50%, -50%);
  animation: pulse-ring 2s ease-out infinite;
  pointer-events: none;
}

.floating-btn-shopee::after {
  border-color: #EE4D2D;
}

.floating-btn-maps::after {
  border-color: #4285F4;
}

@keyframes pulse-ring {
  0% {
    width: 100%;
    height: 100%;
    opacity: 1;
  }
  100% {
    width: 150%;
    height: 150%;
    opacity: 0;
  }
}

.floating-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 68px;
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-weight: 500;
  z-index: 1;
}

.floating-btn:hover::before {
  opacity: 1;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.skeleton-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.skeleton-title {
  height: 24px;
  width: 40%;
  margin-bottom: 1rem;
}

.skeleton-text {
  height: 16px;
  width: 100%;
  margin-bottom: 0.75rem;
}

.skeleton-text-short {
  height: 16px;
  width: 60%;
  margin-bottom: 0.75rem;
}

.skeleton-stat-label {
  height: 14px;
  width: 70%;
  margin-bottom: 0.5rem;
}

.skeleton-stat-value {
  height: 32px;
  width: 50%;
}

.skeleton-table-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.skeleton-table-cell {
  height: 20px;
  flex: 1;
}

.skeleton-button {
  height: 40px;
  width: 120px;
  border-radius: 6px;
}

.skeleton-chart {
  height: 300px;
  width: 100%;
}

/* Responsive */
/* Mobile responsive - restore top navbar for mobile */
@media (max-width: 768px) {
  /* Reset navbar to top position for mobile */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .navbar.collapsed {
    width: 100%;
  }

  /* Hide sidebar toggle on mobile */
  .sidebar-toggle {
    display: none;
  }

  /* Reset main content margin for mobile */
  .main-content {
    margin-left: 0;
    margin-top: 70px;
  }

  .navbar.collapsed ~ .main-content,
  body:has(.navbar.collapsed) .main-content {
    margin-left: 0;
  }

  .floating-buttons {
    bottom: 16px;
    right: 16px;
    gap: 16px;
  }

  .floating-btn {
    width: 48px;
    height: 48px;
  }

  .floating-btn img {
    width: 28px;
    height: 28px;
  }

  .floating-btn::before {
    display: none;
  }

  .nav-container {
    padding: 0.75rem;
    gap: 0;
    flex-direction: row;
    flex-wrap: wrap;
    position: relative;
  }

  .nav-brand {
    font-size: 1rem;
    flex: 1;
    border-bottom: none;
    padding-bottom: 0;
  }

  .navbar.collapsed .brand-info {
    display: flex;
  }

  .logo {
    width: 28px;
    height: 28px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .mobile-menu-toggle {
    display: flex;
    order: 2;
  }

  .lang-btn {
    order: 3;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    width: auto;
  }

  .navbar.collapsed .lang-btn span:not(.material-symbols-outlined) {
    display: inline;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    order: 4;
    padding: 1rem 0;
    background: var(--bg);
    border-radius: 8px;
    margin-top: 0.5rem;
  }

  .nav-links.mobile-menu-open {
    display: flex;
  }

  .navbar.collapsed .nav-link span:not(.nav-icon) {
    display: inline;
  }

  .navbar.collapsed .nav-link {
    justify-content: flex-start;
    padding: 0.75rem 1rem;
  }

  .navbar.collapsed .nav-link:hover {
    transform: translateX(4px);
  }

  .navbar.collapsed .nav-link::after {
    display: none;
  }

  #userNav {
    order: 5;
    width: 100%;
    margin-top: 0.5rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    justify-content: flex-start;
  }

  .nav-link span:not(.nav-icon) {
    display: inline;
  }

  .nav-icon {
    font-size: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .table {
    font-size: 0.75rem;
  }

  .table th,
  .table td {
    padding: 0.5rem;
  }
}

/* Date Range Button Group */
.date-range-btn {
  padding: 0.375rem 0.75rem;
  border: none;
  background: transparent;
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.date-range-btn:hover {
  background: rgba(30, 64, 175, 0.1);
}

.date-range-btn.active {
  background: #1e40af;
  color: white;
  box-shadow: 0 2px 4px rgba(30, 64, 175, 0.3);
}

.date-range-btn.active:hover {
  background: #1e3a8a;
}

/* Utilities */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-light { color: var(--text-light); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* Login Page */
.container.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('/store-emtech.png') center center / cover no-repeat;
  position: relative;
  padding: 2rem;
}

.container.login-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 0;
}

/* Login Modal Overlay */
.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 2rem;
}

.login-modal {
  position: relative;
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  padding: 3rem;
  max-width: 400px;
  width: 100%;
  animation: modalFadeIn 0.3s ease-out;
}

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

.login-card {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 3rem;
  max-width: 400px;
  width: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 1rem;
  color: var(--text-light);
}

.login-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--card-bg);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.google-login-btn:hover {
  background: var(--bg);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.google-icon {
  flex-shrink: 0;
}

.error-message {
  padding: 0.75rem 1rem;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  text-align: center;
}

@media (max-width: 768px) {
  .container.login-bg {
    padding: 1rem;
  }

  .login-card {
    padding: 2rem;
  }

  .login-modal-overlay {
    padding: 1rem;
  }

  .login-modal {
    padding: 2rem;
  }

  .login-title {
    font-size: 1.5rem;
  }
}

/* User Navigation */
.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: 1rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  padding: 0.5rem 1rem;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #dc2626;
}

@media (max-width: 768px) {
  .user-info {
    margin-right: 0.5rem;
  }

  .user-name {
    display: none;
  }
}

/* 404 Error Page */
.error-404-container {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: -2rem -2rem 0 -2rem;
}

.error-404-content {
  text-align: center;
  max-width: 600px;
  background: white;
  padding: 3rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.6s ease-out;
}

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

.error-404-illustration {
  position: relative;
  margin-bottom: 2rem;
}

.error-404-number {
  font-size: 8rem;
  font-weight: 800;
  color: #667eea;
  line-height: 1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.error-404-icon {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.error-404-icon svg {
  width: 120px;
  height: 120px;
  color: #667eea;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.error-404-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

.error-404-message {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-404-actions {
  margin-bottom: 2rem;
}

.error-404-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.error-404-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.error-404-actions .btn-primary:active {
  transform: translateY(0);
}

.error-404-redirect {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-top: 1rem;
}

.countdown-number {
  display: inline-block;
  font-weight: 700;
  color: #667eea;
  font-size: 1.25rem;
  margin: 0 0.25rem;
  min-width: 30px;
  animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@media (max-width: 768px) {
  .error-404-number {
    font-size: 5rem;
  }

  .error-404-icon svg {
    width: 80px;
    height: 80px;
  }

  .error-404-title {
    font-size: 1.5rem;
  }

  .error-404-message {
    font-size: 1rem;
  }

  .error-404-content {
    padding: 2rem 1.5rem;
  }
}

/* 500 Error Page */
.error-500-container {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  margin: -2rem -2rem 0 -2rem;
}

.error-500-content {
  text-align: center;
  max-width: 700px;
  background: white;
  padding: 3rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: shake 0.8s ease-out;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.error-500-illustration {
  position: relative;
  margin-bottom: 2rem;
}

.error-500-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.error-500-icon svg {
  width: 140px;
  height: 140px;
  color: #dc2626;
  animation: glitch 3s ease-in-out infinite;
}

@keyframes glitch {
  0%, 90%, 100% {
    transform: translate(0);
    filter: hue-rotate(0deg);
  }
  92% {
    transform: translate(-2px, 2px);
    filter: hue-rotate(90deg);
  }
  94% {
    transform: translate(2px, -2px);
    filter: hue-rotate(-90deg);
  }
  96% {
    transform: translate(-2px, -2px);
    filter: hue-rotate(45deg);
  }
  98% {
    transform: translate(2px, 2px);
    filter: hue-rotate(-45deg);
  }
}

.error-500-number {
  font-size: 7rem;
  font-weight: 800;
  color: #dc2626;
  line-height: 1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.error-500-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

.error-500-message {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-500-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #fef2f2;
  border-radius: 0.5rem;
  border-left: 4px solid #dc2626;
}

.error-500-detail-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #991b1b;
  font-size: 0.95rem;
  text-align: left;
}

.error-500-detail-item .material-symbols-outlined {
  font-size: 1.5rem;
  color: #dc2626;
}

.error-500-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.error-500-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.error-500-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.error-500-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  background: white;
  color: #dc2626;
  border: 2px solid #dc2626;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.error-500-actions .btn-secondary:hover {
  background: #fef2f2;
  transform: translateY(-2px);
}

.error-500-actions .btn-primary:active,
.error-500-actions .btn-secondary:active {
  transform: translateY(0);
}

.error-500-redirect {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .error-500-number {
    font-size: 5rem;
  }

  .error-500-icon svg {
    width: 100px;
    height: 100px;
  }

  .error-500-title {
    font-size: 1.5rem;
  }

  .error-500-message {
    font-size: 1rem;
  }

  .error-500-content {
    padding: 2rem 1.5rem;
  }

  .error-500-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-500-actions .btn-primary,
  .error-500-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .error-500-details {
    padding: 1rem;
  }

  .error-500-detail-item {
    font-size: 0.875rem;
  }
}
