/* ============================================================
   E-TAMU Design System
   Dark Green Glassmorphism Theme
   ============================================================ */

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

/* ── Design Tokens ── */
:root {
  /* Background */
  --bg-page: linear-gradient(135deg, #0a1f14 0%, #0d2d1e 50%, #0f3d26 100%);
  --bg-card: rgba(255, 255, 255, 0.07);
  --bg-card-hover: rgba(255, 255, 255, 0.11);
  --bg-input: rgba(255, 255, 255, 0.08);
  --bg-input-hover: rgba(255, 255, 255, 0.12);
  --bg-overlay: rgba(0, 0, 0, 0.4);

  /* Brand Colors */
  --color-primary: #059669;
  --color-primary-light: #10b981;
  --color-primary-dark: #047857;
  --color-primary-glow: rgba(5, 150, 105, 0.35);
  --color-accent: #34d399;
  --color-accent-soft: rgba(52, 211, 153, 0.15);

  /* Sentiment Colors (SPK) */
  --color-sangat-puas: linear-gradient(135deg, #059669, #10b981);
  --color-puas: linear-gradient(135deg, #0891b2, #06b6d4);
  --color-cukup-puas: linear-gradient(135deg, #d97706, #f59e0b);
  --color-tidak-puas: linear-gradient(135deg, #dc2626, #ef4444);

  /* Border */
  --border-default: rgba(255, 255, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(16, 185, 129, 0.6);
  --border-card: rgba(255, 255, 255, 0.15);

  /* Text */
  --text-primary: #f0fdf4;
  --text-secondary: #a7f3d0;
  --text-muted: rgba(167, 243, 208, 0.6);
  --text-placeholder: rgba(255, 255, 255, 0.35);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-blur: blur(20px);
  --glass-blur-heavy: blur(40px);

  /* Shadows */
  --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 30px rgba(5, 150, 105, 0.3);
  --shadow-glow-lg: 0 0 60px rgba(5, 150, 105, 0.2);

  /* Border Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Typography */
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-size-xs: 11px;
  --font-size-sm: 13px;
  --font-size-base: 15px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-2xl: 28px;
  --font-size-3xl: 36px;

  /* Transitions */
  --transition-fast: all 0.15s ease;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --header-height: 72px;
  --container-max: 1400px;
  --sidebar-width: 300px;
}

/* ── Base Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background: #060f0a;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* ── Aurora Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(5, 150, 105, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(16, 185, 129, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 70% 40% at 20% 80%, rgba(6, 78, 59, 0.18) 0%, transparent 50%),
    linear-gradient(180deg, #060f0a 0%, #0a1f14 40%, #0d2d1e 100%);
}

/* Aurora Overlay — animated glow layers */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Aurora light ribbons */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.aurora-bg .aurora-1,
.aurora-bg .aurora-2,
.aurora-bg .aurora-3 {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  will-change: transform, opacity;
}

/* Pita aurora utama — hijau terang */
.aurora-bg .aurora-1 {
  width: 600px;
  height: 300px;
  top: -5%;
  left: 10%;
  background: radial-gradient(ellipse, rgba(16, 185, 129, 0.30) 0%, rgba(5, 150, 105, 0.10) 50%, transparent 70%);
  animation: aurora1 12s ease-in-out infinite alternate;
}

/* Pita aurora kedua — teal / cyan */
.aurora-bg .aurora-2 {
  width: 500px;
  height: 250px;
  top: 20%;
  right: -5%;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.20) 0%, rgba(8, 145, 178, 0.08) 50%, transparent 70%);
  animation: aurora2 15s ease-in-out infinite alternate;
}

/* Pita aurora ketiga — emerald gelap */
.aurora-bg .aurora-3 {
  width: 700px;
  height: 200px;
  bottom: 5%;
  left: 20%;
  background: radial-gradient(ellipse, rgba(52, 211, 153, 0.15) 0%, rgba(5, 150, 105, 0.06) 50%, transparent 70%);
  animation: aurora3 18s ease-in-out infinite alternate;
}

@keyframes aurora1 {
  0% {
    transform: translateX(0) translateY(0) rotate(-5deg) scaleX(1);
    opacity: 0.6;
  }
  33% {
    transform: translateX(80px) translateY(30px) rotate(3deg) scaleX(1.2);
    opacity: 0.8;
  }
  66% {
    transform: translateX(-40px) translateY(-20px) rotate(-8deg) scaleX(0.9);
    opacity: 0.5;
  }
  100% {
    transform: translateX(50px) translateY(40px) rotate(5deg) scaleX(1.1);
    opacity: 0.7;
  }
}

@keyframes aurora2 {
  0% {
    transform: translateX(0) translateY(0) rotate(10deg) scaleY(1);
    opacity: 0.4;
  }
  50% {
    transform: translateX(-60px) translateY(50px) rotate(-5deg) scaleY(1.3);
    opacity: 0.7;
  }
  100% {
    transform: translateX(40px) translateY(-30px) rotate(8deg) scaleY(0.8);
    opacity: 0.5;
  }
}

@keyframes aurora3 {
  0% {
    transform: translateX(0) translateY(0) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateX(100px) translateY(-40px) rotate(5deg);
    opacity: 0.6;
  }
  100% {
    transform: translateX(-60px) translateY(20px) rotate(-3deg);
    opacity: 0.4;
  }
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Background Decoration ── */
.page-bg {
  position: fixed;
  inset: 0;
  background: var(--bg-page);
  z-index: -2;
}

.page-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.page-bg::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ── Header ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(6, 15, 10, 0.70);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 0 var(--space-8);
  gap: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 0 0 auto;
  min-width: 0;
}

.brand-logo {
  height: 44px;
  width: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.datetime-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.datetime-display .date {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.datetime-display .time {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-default);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: var(--border-card);
}

.nav-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

/* ── Main Layout ── */
.app-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-8) var(--space-8);
  min-height: calc(100vh - var(--header-height));
}

.app-grid {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--space-6);
  align-items: start;
}

/* ── Glass Card ── */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.glass-card-body {
  padding: var(--space-6);
}

/* ── Section Title ── */
.section-title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm) var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--space-6);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  border-left: transparent 10px solid;
  border-top: var(--color-primary-dark) 8px solid;
}

/* ── Welcome Panel ── */
.welcome-panel {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.welcome-panel .welcome-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.welcome-panel .welcome-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}

.welcome-panel .welcome-sub {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

.welcome-panel .company-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--space-3);
}

.welcome-illustration {
  margin-top: var(--space-6);
  padding: var(--space-4);
}

.welcome-illustration img {
  width: 80%;
  max-width: 220px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  opacity: 0.9;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border-default);
  margin: var(--space-6) 0;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-primary {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ── Selection ── */
::selection {
  background: var(--color-primary-glow);
  color: var(--text-primary);
}
