/* ============================================
   VAL LOGISTICS - BRAND DESIGN SYSTEM
   Primary: Navy Blue | Accent: Gold
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* === Brand Colors === */
  --navy-900: #0C1F3F;
  --navy-800: #112B55;
  --navy-700: #1A3A6B;
  --navy-600: #1E4480;
  --navy-500: #2455A0;
  --gold-500: #C9A227;
  --gold-400: #D4AF37;
  --gold-300: #E2C46A;
  --gold-100: rgba(201, 162, 39, 0.1);

  /* === Semantic Tokens === */
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --surface-2: #EEF1F7;
  --fg: #0C1F3F;
  --muted: #6B7A95;
  --border: #DDE2ED;
  --accent: var(--navy-700);
  --accent-gold: var(--gold-500);
  --success: #1A8C5B;
  --success-bg: rgba(26, 140, 91, 0.1);
  --danger: #C0392B;
  --danger-bg: rgba(192, 57, 43, 0.1);
  --warning: #D4820A;
  --warning-bg: rgba(212, 130, 10, 0.1);

  /* === Typography === */
  --font-display: 'Montserrat', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* === Spacing & Radius === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* === Shadows === */
  --shadow-sm: 0 1px 4px rgba(12, 31, 63, 0.06);
  --shadow-md: 0 4px 16px rgba(12, 31, 63, 0.08);
  --shadow-lg: 0 8px 32px rgba(12, 31, 63, 0.12);
  --shadow-gold: 0 4px 20px rgba(201, 162, 39, 0.2);

  --transition: 0.2s ease-in-out;
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; }
img { max-width: 100%; }

/* === LAYOUT === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* === CARD === */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(26, 58, 107, 0.2);
  box-shadow: var(--shadow-md);
}

/* === BUTTONS === */
.btn {
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-display);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(26, 58, 107, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26, 58, 107, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900);
  border: none;
  box-shadow: var(--shadow-gold);
  font-weight: 700;
}
.btn-gold:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-outline {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
}
.btn-outline:hover {
  border-color: var(--navy-700);
  color: var(--navy-700);
  background: rgba(26, 58, 107, 0.04);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
}
.btn-danger:hover { filter: brightness(0.9); }

/* === BADGES === */
.badge {
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-display);
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-gold { background: var(--gold-100); color: var(--gold-500); border: 1px solid rgba(201,162,39,0.3); }
.badge-navy { background: rgba(26, 58, 107, 0.1); color: var(--navy-700); }

/* === STATUS PILLS (dashboard) === */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.status-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-active { background: var(--success-bg); color: var(--success); }
.status-pending { background: var(--warning-bg); color: var(--warning); }
.status-danger { background: var(--danger-bg); color: var(--danger); }

/* === FORMS === */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-display);
}

input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy-700);
  background: white;
  box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.1);
}

input[readonly] {
  background: var(--surface-2);
  color: var(--muted);
  cursor: default;
}

/* === DIVIDER === */
hr { border: 0; border-top: 1px solid var(--border); }

/* === SIDEBAR NAV ACTIVE ITEM === */
.nav-item { transition: var(--transition); border-radius: var(--radius-md); }
.nav-item.active {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: white !important;
}
.nav-item:hover:not(.active) {
  background: rgba(26, 58, 107, 0.08);
  color: var(--navy-700);
}

/* === GOLD ACCENT LINE === */
.gold-line {
  width: 40px; height: 3px;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-300));
  border-radius: 2px;
  margin: 0.75rem 0 1.5rem;
}

/* === LANGUAGE === */
[data-lang="en"] .th, [data-lang="th"] .en { display: none !important; }
body[data-lang="th"] .en { display: none !important; }
body[data-lang="en"] .th { display: none !important; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .display { font-size: calc(1.4rem + 1.5vw); }
  .hide-on-mobile { display: none !important; }
}

@media (max-width: 480px) {
  .btn { padding: 0.6rem 1rem; font-size: 0.8rem; }
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: rgba(26, 58, 107, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy-700); }

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.4s ease forwards; }

/* === BRAND LOGO GLOW EFFECT === */
.brand-logo-glow {
  filter: 
    brightness(1.3) 
    contrast(1.1)
    drop-shadow(1px 0px 0px rgba(201, 162, 39, 0.7)) 
    drop-shadow(-1px 0px 0px rgba(201, 162, 39, 0.7))
    drop-shadow(0px 1px 0px rgba(201, 162, 39, 0.7))
    drop-shadow(0px -1px 0px rgba(201, 162, 39, 0.7))
    drop-shadow(0 0 15px rgba(201, 162, 39, 0.4));
  transition: all 0.3s ease;
  animation: logoFloat 4s ease-in-out infinite;
}

.brand-logo-glow:hover {
  transform: scale(1.05);
  filter: 
    brightness(1.4) 
    contrast(1.1)
    drop-shadow(1px 0px 0px rgba(201, 162, 39, 0.9)) 
    drop-shadow(-1px 0px 0px rgba(201, 162, 39, 0.9))
    drop-shadow(0px 1px 0px rgba(201, 162, 39, 0.9))
    drop-shadow(0px -1px 0px rgba(201, 162, 39, 0.9))
    drop-shadow(0 0 20px rgba(201, 162, 39, 0.6));
}

@keyframes logoFloat {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}
