/* ==============================================
   KVC ITA Online 2026 — style.css
   Theme: Blue & White | Modern | Premium
   ============================================== */

:root {
  --primary: #1565C0;
  --primary-light: #1e88e5;
  --primary-lighter: #42a5f5;
  --primary-dark: #0d47a1;
  --accent: #00b8d9;
  --accent2: #0097a7;
  --white: #ffffff;
  --off-white: #f0f7ff;
  --gray-50: #f8fafc;
  --gray-100: #e8f4fd;
  --gray-200: #d0e8f8;
  --gray-400: #94b4cc;
  --gray-600: #5a7fa0;
  --gray-800: #1a3a5c;
  --text-main: #0d2a4a;
  --text-muted: #4a6f8a;
  --text-light: #7a9db8;
  --shadow-sm: 0 2px 8px rgba(21,101,192,0.08);
  --shadow-md: 0 4px 20px rgba(21,101,192,0.14);
  --shadow-lg: 0 8px 40px rgba(21,101,192,0.2);
  --shadow-xl: 0 20px 60px rgba(21,101,192,0.25);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Sarabun', 'Inter', sans-serif;
  color: var(--text-main);
  background: var(--off-white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Animated Background ---- */
.bg-animated {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 40%, #e8f4fd 100%);
}
.bubble {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(66,165,245,0.18), rgba(21,101,192,0.05));
  animation: floatBubble linear infinite;
}
.bubble-1 { width: 520px; height: 520px; top: -100px; left: -150px; animation-duration: 22s; }
.bubble-2 { width: 380px; height: 380px; top: 40%; right: -80px; animation-duration: 28s; animation-delay: -8s; }
.bubble-3 { width: 260px; height: 260px; bottom: 10%; left: 20%; animation-duration: 18s; animation-delay: -4s; }
.bubble-4 { width: 180px; height: 180px; top: 30%; left: 60%; animation-duration: 24s; animation-delay: -12s; }
.bubble-5 { width: 320px; height: 320px; bottom: -80px; right: 10%; animation-duration: 32s; animation-delay: -6s; }
@keyframes floatBubble {
  0% { transform: translateY(0) scale(1) rotate(0deg); }
  33% { transform: translateY(-40px) scale(1.05) rotate(120deg); }
  66% { transform: translateY(20px) scale(0.97) rotate(240deg); }
  100% { transform: translateY(0) scale(1) rotate(360deg); }
}

/* ---- Site Header ---- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(21,101,192,0.12);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  max-width: 1280px; margin: 0 auto;
  height: 100%; padding: 0 24px;
  display: flex; align-items: center; gap: 24px;
}
.logo-group {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit; flex-shrink: 0;
}
.logo-icon { display: flex; align-items: center; justify-content: center; }

/* Logo Image */
.logo-img {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(21,101,192,0.2);
  box-shadow: var(--shadow-sm);
}
.hero-logo-img {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; position: absolute; z-index: 3;
  box-shadow: var(--shadow-xl);
  border: 3px solid white;
}
.footer-logo-img {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(255,255,255,0.3);
}

/* Admin Tools */
.admin-tools {
  display: flex; align-items: center; gap: 6px;
}
.btn-tool {
  display: flex; align-items: center; gap: 5px;
  background: rgba(21,101,192,0.1); color: var(--primary);
  border: 1px solid rgba(21,101,192,0.25); border-radius: var(--radius-full);
  padding: 6px 12px; font-family: 'Sarabun', sans-serif;
  font-size: 0.78rem; font-weight: 700; cursor: pointer;
  transition: all var(--transition);
}
.btn-tool:hover { background: rgba(21,101,192,0.18); transform: translateY(-1px); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main {
  font-size: 1rem; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-year {
  font-size: 0.7rem; font-weight: 600; color: var(--accent);
  letter-spacing: 0.05em;
}

.header-nav {
  display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center;
}
.nav-link {
  text-decoration: none; color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  padding: 8px 16px; border-radius: var(--radius-full);
  transition: all var(--transition);
}
.nav-link:hover { background: var(--gray-100); color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.btn-login {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none; cursor: pointer;
  padding: 9px 20px; border-radius: var(--radius-full);
  font-family: 'Sarabun', sans-serif; font-size: 0.875rem; font-weight: 600;
  box-shadow: 0 2px 12px rgba(21,101,192,0.3);
  transition: all var(--transition);
}
.btn-login:hover {
  transform: translateY(-1px); box-shadow: 0 4px 20px rgba(21,101,192,0.4);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-logout {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,80,80,0.1); color: #d32f2f; border: 1px solid rgba(255,80,80,0.25);
  cursor: pointer; padding: 9px 20px; border-radius: var(--radius-full);
  font-family: 'Sarabun', sans-serif; font-size: 0.875rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-logout:hover { background: rgba(255,80,80,0.2); transform: translateY(-1px); }

.admin-badge {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(0,184,217,0.15), rgba(21,101,192,0.15));
  color: var(--primary); border: 1px solid rgba(21,101,192,0.25);
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: 0.8rem; font-weight: 700;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ---- Hero Section ---- */
.hero-section {
  position: relative; z-index: 1;
  min-height: 88vh; padding: calc(var(--header-h) + 60px) 24px 80px;
  display: flex; align-items: center; justify-content: center; gap: 80px;
  max-width: 1280px; margin: 0 auto;
}
.hero-content { flex: 1; max-width: 600px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(21,101,192,0.1); border: 1px solid rgba(21,101,192,0.2);
  color: var(--primary); padding: 8px 16px; border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 600; margin-bottom: 24px;
  animation: fadeSlideDown 0.6s ease;
}
.badge-icon { font-size: 1rem; }

.hero-title {
  font-size: clamp(2.8rem, 5vw, 4.5rem); font-weight: 900;
  line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 20px;
  color: var(--primary-dark); animation: fadeSlideDown 0.7s ease;
}
.hero-title-accent {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; display: block;
}
.hero-subtitle {
  font-size: 1.1rem; line-height: 1.7; color: var(--text-muted);
  margin-bottom: 36px; animation: fadeSlideDown 0.8s ease;
}
.hero-subtitle strong { color: var(--primary); }

.hero-stats {
  display: flex; gap: 16px; margin-bottom: 36px; flex-wrap: wrap;
  animation: fadeSlideDown 0.9s ease;
}
.stat-card {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 16px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-lighter); }
.stat-number { font-size: 2rem; font-weight: 900; color: var(--primary); line-height: 1; }
.stat-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.btn-hero {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; text-decoration: none; border: none; cursor: pointer;
  padding: 14px 32px; border-radius: var(--radius-full);
  font-family: 'Sarabun', sans-serif; font-size: 1rem; font-weight: 700;
  box-shadow: 0 4px 20px rgba(21,101,192,0.35);
  transition: all var(--transition); animation: fadeSlideDown 1s ease;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(21,101,192,0.45); }
.btn-hero svg { transition: transform var(--transition); }
.btn-hero:hover svg { transform: translateY(3px); }

/* Hero Visual Ring */
.hero-visual {
  position: relative; width: 300px; height: 300px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  animation: fadeSlideUp 1s ease;
}
.visual-ring {
  position: absolute; border-radius: 50%;
  border: 2px solid rgba(21,101,192,0.15);
  animation: rotateRing linear infinite;
}
.ring-1 { width: 100%; height: 100%; animation-duration: 20s; border-color: rgba(21,101,192,0.2); }
.ring-2 { width: 75%; height: 75%; animation-duration: 15s; animation-direction: reverse; border-color: rgba(0,184,217,0.25); border-style: dashed; }
.ring-3 { width: 50%; height: 50%; animation-duration: 10s; border-color: rgba(21,101,192,0.3); }
@keyframes rotateRing { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.visual-center {
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white; box-shadow: var(--shadow-xl); z-index: 2;
}
.visual-center span { font-size: 2.2rem; font-weight: 900; line-height: 1; }
.visual-center small { font-size: 0.75rem; font-weight: 500; opacity: 0.85; }

/* ---- Info Banner ---- */
.info-banner {
  position: relative; z-index: 1;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
}
.banner-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 12px;
  font-size: 0.875rem; font-weight: 500;
}

/* ---- Indicators Section ---- */
.indicators-section {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  padding: 80px 24px;
}
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
  display: inline-block; background: rgba(21,101,192,0.1); color: var(--primary);
  border: 1px solid rgba(21,101,192,0.2); border-radius: var(--radius-full);
  padding: 6px 18px; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 900;
  color: var(--primary-dark); letter-spacing: -0.02em; margin-bottom: 12px;
}
.section-desc { font-size: 1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* Category Admin Actions */
.cat-admin-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.btn-cat-edit, .btn-cat-add, .btn-cat-del {
  border: none; border-radius: var(--radius-full);
  padding: 6px 12px; font-family: 'Sarabun', sans-serif;
  font-size: 0.78rem; font-weight: 700; cursor: pointer;
  transition: all var(--transition);
}
.btn-cat-edit { background: rgba(21,101,192,0.1); color: var(--primary); border: 1px solid rgba(21,101,192,0.2); }
.btn-cat-add  { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; box-shadow: 0 2px 8px rgba(21,101,192,0.25); }
.btn-cat-del  { background: rgba(211,47,47,0.08); color: #c62828; border: 1px solid rgba(211,47,47,0.2); }
.btn-cat-edit:hover { background: rgba(21,101,192,0.18); }
.btn-cat-add:hover  { box-shadow: 0 4px 14px rgba(21,101,192,0.4); transform: translateY(-1px); }
.btn-cat-del:hover  { background: rgba(211,47,47,0.18); }

/* Delete button in edit modal */
.btn-danger-sm {
  padding: 12px 16px; border-radius: var(--radius-md);
  border: 1.5px solid rgba(211,47,47,0.3); background: rgba(211,47,47,0.07);
  color: #c62828; cursor: pointer;
  font-family: 'Sarabun', sans-serif; font-size: 0.875rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-danger-sm:hover { background: rgba(211,47,47,0.18); }

/* Settings card */
.settings-card { max-width: 480px; }

.category-block { margin-bottom: 56px; }
.category-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-200);
}
.category-icon {
  width: 50px; height: 50px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cat-icon-1 { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: var(--primary); }
.cat-icon-2 { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #2e7d32; }
.cat-icon-3 { background: linear-gradient(135deg, #fff8e1, #ffecb3); color: #f57f17; }
.cat-icon-4 { background: linear-gradient(135deg, #fce4ec, #f8bbd9); color: #c62828; }
.cat-icon-5 { background: linear-gradient(135deg, #e8eaf6, #c5cae9); color: #283593; }
.cat-icon-6 { background: linear-gradient(135deg, #e0f2f1, #b2dfdb); color: #00695c; }
.category-title { font-size: 1.25rem; font-weight: 800; color: var(--text-main); margin-bottom: 2px; }
.category-range { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }

/* ---- Cards Grid ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ---- Indicator Card ---- */
.ind-card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 24px; cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  animation: cardAppear 0.4s ease both;
}
.ind-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.ind-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-lighter); }
.ind-card:hover::before { transform: scaleX(1); }

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

.card-code-badge {
  display: inline-flex; align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.card-title {
  font-size: 0.95rem; font-weight: 700; color: var(--text-main);
  line-height: 1.45; margin-bottom: 8px;
}
.card-desc {
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.55;
  margin-bottom: 16px; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--gray-100);
}
.card-link-count {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
}
.card-link-count .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.card-link-count.has-links { color: var(--primary); }
.card-link-count.has-links .dot { background: var(--primary); }

.card-actions { display: flex; gap: 8px; }
.btn-card {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-full); border: none; cursor: pointer;
  font-family: 'Sarabun', sans-serif; font-size: 0.78rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-view { background: var(--gray-100); color: var(--primary); }
.btn-view:hover { background: rgba(21,101,192,0.15); }
.btn-edit {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; box-shadow: 0 2px 8px rgba(21,101,192,0.25);
}
.btn-edit:hover { box-shadow: 0 4px 14px rgba(21,101,192,0.4); transform: translateY(-1px); }

/* ---- Footer ---- */
.site-footer {
  position: relative; z-index: 1;
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1a237e 100%);
  color: rgba(255,255,255,0.85); padding: 48px 24px 32px;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px; margin-bottom: 32px;
}
.footer-logo { display: flex; align-items: center; gap: 14px; }
.footer-brand { font-size: 1.1rem; font-weight: 800; color: white; }
.footer-sub { font-size: 0.8rem; color: rgba(255,255,255,0.65); margin-top: 2px; }
.footer-copy {
  text-align: center; font-size: 0.78rem;
  color: rgba(255,255,255,0.45); border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px; max-width: 1280px; margin: 0 auto;
}
.footer-credit {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 12px; padding: 10px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  width: fit-content; margin: 12px auto 0;
  font-size: 0.78rem; color: rgba(255,255,255,0.55);
  transition: all 0.25s ease;
}
.footer-credit svg { opacity: 0.6; flex-shrink: 0; }
.footer-credit strong { color: rgba(255,255,255,0.85); font-weight: 700; }
.footer-credit:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  transform: translateY(-1px);
}

/* ========== MODALS ========== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(13, 42, 74, 0.55);
  backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.is-open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: white; border-radius: var(--radius-xl);
  padding: 40px; width: 100%; position: relative;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card { max-width: 420px; }
.edit-card { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.view-card { max-width: 520px; max-height: 85vh; overflow-y: auto; }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--gray-100); color: var(--text-muted);
  font-size: 1.3rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--gray-200); color: var(--text-main); }

.modal-icon {
  width: 64px; height: 64px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; box-shadow: 0 4px 16px rgba(21,101,192,0.3);
}
.edit-icon { background: linear-gradient(135deg, #0097a7, var(--accent)); }
.view-icon { background: linear-gradient(135deg, #1565c0, var(--accent)); }

.modal-title {
  font-size: 1.4rem; font-weight: 800; color: var(--text-main);
  text-align: center; margin-bottom: 6px;
}
.modal-desc { font-size: 0.875rem; color: var(--text-muted); text-align: center; margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 0.82rem; font-weight: 700;
  color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em;
}
.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); pointer-events: none;
}
.textarea-wrap .input-icon { top: 14px; transform: none; }
.form-input {
  width: 100%; padding: 12px 14px 12px 40px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-md);
  font-family: 'Sarabun', sans-serif; font-size: 0.9rem; color: var(--text-main);
  background: var(--gray-50); transition: all var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--primary-light); background: white; box-shadow: 0 0 0 3px rgba(30,136,229,0.12); }
.form-textarea { resize: vertical; min-height: 70px; padding-left: 40px; }

.login-error {
  background: rgba(211,47,47,0.08); color: #c62828;
  border: 1px solid rgba(211,47,47,0.2); border-radius: var(--radius-md);
  padding: 10px 14px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 14px; text-align: center;
}

.btn-submit {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none; cursor: pointer;
  font-family: 'Sarabun', sans-serif; font-size: 1rem; font-weight: 700;
  box-shadow: 0 4px 16px rgba(21,101,192,0.3);
  transition: all var(--transition);
}
.btn-submit:hover { box-shadow: 0 6px 24px rgba(21,101,192,0.45); transform: translateY(-1px); }

/* ---- Link Rows ---- */
.link-list-section { margin-bottom: 20px; }
.link-list-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.btn-add-link {
  display: flex; align-items: center; gap: 6px;
  background: rgba(21,101,192,0.1); color: var(--primary);
  border: 1px solid rgba(21,101,192,0.2); border-radius: var(--radius-full);
  padding: 6px 14px; font-family: 'Sarabun', sans-serif; font-size: 0.8rem;
  font-weight: 700; cursor: pointer; transition: all var(--transition);
}
.btn-add-link:hover { background: rgba(21,101,192,0.18); }

.link-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 10px;
  animation: fadeIn 0.2s ease;
}
.link-row-label-input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md); font-family: 'Sarabun', sans-serif;
  font-size: 0.85rem; color: var(--text-main); background: var(--gray-50);
  transition: all var(--transition); outline: none;
}
.link-row-label-input:focus { border-color: var(--primary-light); background: white; box-shadow: 0 0 0 3px rgba(30,136,229,0.1); }
.btn-remove-link {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(211,47,47,0.25); background: rgba(211,47,47,0.07);
  color: #c62828; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0;
}
.btn-remove-link:hover { background: rgba(211,47,47,0.18); }

.modal-actions { display: flex; gap: 12px; }
.btn-cancel {
  flex: 1; padding: 12px; border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-200); background: white;
  color: var(--text-muted); cursor: pointer;
  font-family: 'Sarabun', sans-serif; font-size: 0.95rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-cancel:hover { background: var(--gray-50); border-color: var(--gray-400); }
.modal-actions .btn-submit { flex: 2; width: auto; }

/* ---- View Modal ---- */
.view-desc-text {
  font-size: 0.9rem; color: var(--text-muted); line-height: 1.6;
  margin-bottom: 20px; padding: 14px; background: var(--gray-50);
  border-radius: var(--radius-md); border-left: 3px solid var(--primary-lighter);
}
.view-links-label {
  font-size: 0.82rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px;
}
.view-link-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  margin-bottom: 10px; text-decoration: none; color: var(--primary);
  transition: all var(--transition);
}
.view-link-item:hover { background: rgba(21,101,192,0.08); border-color: var(--primary-lighter); transform: translateX(4px); }
.view-link-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.view-link-text { flex: 1; }
.view-link-label { font-size: 0.85rem; font-weight: 700; color: var(--text-main); }
.view-link-url { font-size: 0.75rem; color: var(--text-muted); word-break: break-all; margin-top: 2px; }
.no-links-msg {
  text-align: center; padding: 24px; color: var(--text-light);
  font-size: 0.85rem; background: var(--gray-50); border-radius: var(--radius-md);
  border: 1.5px dashed var(--gray-200);
}

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--primary-dark); color: white;
  padding: 12px 28px; border-radius: var(--radius-full);
  font-size: 0.875rem; font-weight: 600;
  box-shadow: var(--shadow-xl); z-index: 9999;
  opacity: 0; transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Animations ---- */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-section { flex-direction: column; text-align: center; gap: 40px; min-height: auto; padding-top: calc(var(--header-h) + 40px); }
  .hero-visual { width: 220px; height: 220px; }
  .header-nav { display: none; }
  .hero-stats { justify-content: center; }
}
@media (max-width: 600px) {
  .logo-main { font-size: 0.85rem; }
  .btn-login { padding: 8px 14px; font-size: 0.8rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 28px 20px; }
  .header-inner { padding: 0 16px; gap: 12px; }
}

/* ---- Loading Overlay ---- */
/* ===== PREMIUM SPLASH SCREEN ===== */
.loading-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 40%, #1e88e5 70%, #00b8d9 100%);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loading-overlay.fade-out {
  opacity: 0; visibility: hidden; pointer-events: none;
}

/* Decorative animated circles in background */
.loading-overlay::before,
.loading-overlay::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.05);
  animation: floatBubble 8s ease-in-out infinite;
}
.loading-overlay::before { width: 500px; height: 500px; top: -150px; right: -100px; }
.loading-overlay::after  { width: 350px; height: 350px; bottom: -80px; left: -60px; animation-delay: -4s; }

.splash-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 0; position: relative; z-index: 1;
  animation: splashAppear 0.8s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes splashAppear {
  from { opacity:0; transform: scale(0.85) translateY(20px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}

/* Logo ring container */
.splash-logo-wrap {
  position: relative; width: 160px; height: 160px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 32px;
}
.splash-ring {
  position: absolute; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  animation: rotateRing linear infinite;
}
.splash-ring-1 { width: 160px; height: 160px; animation-duration: 12s; border-color: rgba(255,255,255,0.25); }
.splash-ring-2 { width: 130px; height: 130px; animation-duration: 8s; animation-direction: reverse; border-color: rgba(0,184,217,0.5); border-style: dashed; }
.splash-logo-img {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover; border: 3px solid white;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 2; position: relative;
}
.splash-logo-fallback {
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: white; z-index: 2; position: relative;
  border: 3px solid rgba(255,255,255,0.5);
}
.splash-logo-fallback span { font-size: 2rem; font-weight: 900; }
.splash-logo-fallback small { font-size: 0.65rem; font-weight: 600; opacity: 0.8; }

/* Text */
.splash-title {
  font-size: 1.5rem; font-weight: 900; color: white;
  letter-spacing: -0.02em; text-align: center; margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.splash-subtitle {
  font-size: 0.9rem; color: rgba(255,255,255,0.8);
  text-align: center; margin-bottom: 40px; line-height: 1.5;
}

/* Dot loader */
.splash-dots {
  display: flex; gap: 10px; align-items: center;
}
.splash-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  animation: dotBounce 1.2s ease-in-out infinite;
}
.splash-dot:nth-child(2) { animation-delay: 0.2s; }
.splash-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1.2); opacity: 1; }
}

/* ---- Indicators section transition ---- */
#indicators { transition: opacity 0.4s ease; }
