/* ===== FONTS ===== */
@font-face {
  font-family: 'Gotham Rounded';
  src: url('../font/Gotham Rounded Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== BASE STYLES ===== */
:root {
  --primary-color: #0a74da;
  --primary-dark: #0558b3;
  --primary-light: #3d94e8;
  --secondary-color: #6c757d;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --dark-bg: #1a1a2e;
  --card-bg: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

body {
  font-family: 'Gotham Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.1px;
  line-height: 1.8;
  color: var(--text-primary);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

.text-error {
  color: #dc3545 !important;
}

/* ===== LOADING SPINNER ===== */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lcenter {
  text-align: center;
}

.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--primary-light);
  border-bottom-color: var(--primary-color);
  border-radius: 50%;
  display: inline-block;
  animation: rotation 1s linear infinite;
}

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

/* ===== FADE TRANSITION ===== */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.3s ease;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}

/* ===== LOGIN PAGE ===== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.login-logo {
  max-width: 120px;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  animation: float 3s ease-in-out infinite;
}

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

.login-card .card-body {
  padding: 2.5rem !important;
}

.login-card h3 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-card .text-muted {
  color: var(--text-secondary) !important;
  font-size: 0.95rem;
}

.login-card .form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.login-card .input-group-text {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.login-card .form-control {
  border: 2px solid var(--border-color);
  border-left: none;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.login-card .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(10, 116, 218, 0.1);
}

.login-card .btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border: none;
  padding: 0.875rem 2rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.login-card .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.login-card .btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.login-card .btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ===== MENU PAGE ===== */
.menu-card {
  border: none;
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  background: white;
  overflow: hidden;
  height: 100%;
}

.menu-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.menu-card .card-body {
  padding: 2rem;
}

.menu-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(10, 116, 218, 0.1) 0%, rgba(10, 116, 218, 0.05) 100%);
  transition: all 0.3s ease;
}

.menu-card:hover .menu-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(10, 116, 218, 0.15) 0%, rgba(10, 116, 218, 0.1) 100%);
}

.menu-card .card-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1rem;
  font-size: 1.25rem;
}

.menu-card .card-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== CARDS & CONTAINERS ===== */
.card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  background: white;
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border: none;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.card-header h4,
.card-header h5 {
  margin: 0;
  font-weight: 700;
}

.card-body {
  padding: 1.5rem;
}

/* ===== BUTTONS ===== */
.btn {
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.625rem 1.25rem;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-outline-success {
  border: 2px solid var(--success-color);
  color: var(--success-color);
  background: transparent;
}

.btn-outline-success:hover {
  background: var(--success-color);
  color: white;
  transform: translateY(-2px);
}

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

/* ===== VERIFY ==== */
.verify-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 3rem;
  margin: 0 auto;
  animation: slideUp 0.6s ease-out;
}

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

.verify-icon-wrapper {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(102, 126, 234, 0); }
}

.verify-icon {
  font-size: 3rem;
  color: white;
  position: relative;
}

.verify-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
  text-align: center;
}

.verify-username {
  font-size: 1.25rem;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 1.5rem;
  text-align: center;
}

.verify-message {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.95rem;
}

.verify-alert {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  padding: 1rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  animation: slideIn 0.5s ease-out 0.3s both;
}

@keyframes slideIn {
  from {
      opacity: 0;
      transform: translateX(-20px);
  }
  to {
      opacity: 1;
      transform: translateX(0);
  }
}

.verify-alert p {
  margin: 0;
  color: #78350f;
  font-weight: 600;
  font-size: 0.9rem;
}

.verify-actions {
  margin-top: 2rem;
}

.verify-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  width: 100%;
  margin-bottom: 0.75rem;
  position: relative;
  overflow: hidden;
}

.verify-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.verify-btn:hover::before {
  left: 100%;
}

.verify-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

.verify-btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.verify-btn-secondary:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.verify-btn-danger {
  background: white;
  color: #ef4444;
  border: 2px solid #ef4444;
}

.verify-btn-danger:hover {
  background: #ef4444;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.verify-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
}

.verify-divider::before,
.verify-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

/* Loading spinner override */
#loading {
  background: rgba(102, 126, 234, 0.95);
  backdrop-filter: blur(10px);
}

/* ===== FORMS ===== */
.form-control,
.form-select {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(10, 116, 218, 0.1);
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* ===== LIST GROUPS ===== */
.list-group-item {
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-md) !important;
}

.list-group-item:hover {
  background: #f9fafb;
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* ===== BADGES ===== */
.badge {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8rem;
}

/* ===== MODALS ===== */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border: none;
  padding: 1rem 1.5rem;
  background: #f9fafb;
}

/* ===== NAVBAR ===== */
.navbar {
  background: white !important;
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary-color) !important;
  font-size: 1.25rem;
}

/* ===== ALERTS ===== */
.alert {
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

#offline-alert {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050;
  display: none;
  animation: slideInRight 0.3s ease;
}

#offline-alert.isoff {
  display: block;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== CAPTURE PAGE ===== */
.preview-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.preview-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.preview-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.preview-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.preview-item .remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.preview-item .remove-btn:hover {
  transform: scale(1.1);
  background: #dc2626;
}

/* ===== PROGRESS BAR ===== */
.progress {
  height: 1.5rem;
  border-radius: var(--radius-md);
  background: #e5e7eb;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
  transition: width 0.3s ease;
  font-weight: 600;
}

/* ===== SCAN LIST ===== */
.scan-item {
  transition: all 0.3s ease;
}

.scan-item:hover {
  background: #f9fafb;
}

.scan-item img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* ===== UTILITIES ===== */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .login-card .card-body {
    padding: 2rem !important;
  }
  
  .menu-card .card-body {
    padding: 1.5rem;
  }
  
  .menu-icon {
    width: 60px;
    height: 60px;
  }
  
  .menu-icon i {
    font-size: 2rem !important;
  }
}

@media (max-width: 576px) {
  .verify-card {
    padding: 1.5rem 1rem;
  }

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

  .verify-username {
      font-size: 1.1rem;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease;
}