/* ===== Global Styles ===== */
:root {
  --color-primary: #0A2540;
  --color-secondary: #1E3A5F;
  --color-accent: #3B82F6;
  --color-light: #F8FAFC;
  --color-text: #1A202C;
  --color-border: #E2E8F0;
}

/* ===== Vue v-cloak: prevent FOUC ===== */
[v-cloak] { display: none !important; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }
.animate-slide-in { animation: slideInLeft 0.5s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.4s ease-out forwards; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.animate-fade-in-up, .animate-fade-in, .animate-slide-in, .animate-scale-in {
  animation-fill-mode: forwards;
}

/* ===== Navigation ===== */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ===== Product Card (Amazon-style) ===== */
.product-card {
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
}
.product-card:hover {
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.1);
  border-color: #cbd5e1;
}

/* ===== Buttons ===== */
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
}
@media (min-width: 640px) {
  .btn-primary { padding: 12px 32px; }
}
.btn-primary:hover {
  background: #2563EB;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  border: 2px solid var(--color-primary);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
@media (min-width: 640px) {
  .btn-outline { padding: 12px 32px; }
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ===== Form ===== */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
  background: #fff;
}
.form-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 6px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 32px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 9999;
  animation: scaleIn 0.3s ease-out;
}
.toast-success { background: #10B981; color: #fff; }
.toast-error { background: #EF4444; color: #fff; }

/* ===== Admin Layout ===== */
.admin-sidebar {
  background: var(--color-primary);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  z-index: 50;
}
.admin-content {
  margin-left: 240px;
  min-height: 100vh;
  background: #f8fafc;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.7);
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  font-size: 15px;
}
.admin-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.admin-nav-item.active {
  background: rgba(59,130,246,0.15);
  color: #fff;
  border-left-color: var(--color-accent);
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-content { margin-left: 0; }
}

/* ===== Banner ===== */
.banner-bg {
  background: linear-gradient(135deg, #0A2540 0%, #1E3A5F 50%, #2563EB 100%);
  position: relative;
  overflow: hidden;
}
.banner-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

/* ===== Section Title ===== */
.section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-title h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 12px;
}
@media (min-width: 640px) {
  .section-title h2 { font-size: 32px; }
}
@media (min-width: 768px) {
  .section-title h2 { font-size: 36px; }
}
.section-title p {
  font-size: 17px;
  color: #64748b;
}
.section-title .accent-line {
  width: 60px;
  height: 4px;
  background: var(--color-accent);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ===== Stats Card ===== */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}
.stat-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* ===== Table ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: #f1f5f9;
  font-weight: 600;
  font-size: 14px;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}
.data-table tr:hover td {
  background: #f8fafc;
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-following { background: #DBEAFE; color: #1E40AF; }
.badge-closed { background: #D1FAE5; color: #065F46; }
.badge-invalid { background: #FEE2E2; color: #991B1B; }
.badge-unread { background: #EF4444; color: #fff; }

/* ===== Mobile Menu ===== */
.mobile-menu-btn { display: none; }
.mobile-overlay { display: none; }
@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .desktop-menu { display: none; }
  .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 39;
  }
}

/* ===== Mobile Menu Transition ===== */
.slide-down-enter-active { transition: all 0.3s ease-out; }
.slide-down-leave-active { transition: all 0.2s ease-in; }
.slide-down-enter-from { opacity: 0; transform: translateY(-10px); }
.slide-down-leave-to { opacity: 0; transform: translateY(-10px); }
.mobile-panel { transform-origin: top; }
