.nav-btn.active {
  background: var(--primary-blue);
  color: #fff;
  border-color: var(--primary-blue);
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.15);
  transform: translateY(-2px);
}
/* SehatSphere MVP - Elder-Friendly Healthcare App */

:root {
  --primary-blue: #1e88e5;
  --primary-blue-light: #42a5f5;
  --success-green: #43a047;
  --danger-red: #e53935;
  --muted-gray: #6b7280;
  --card-white: #fff;
  --border-light: #d6dbe6;
  --bg-light: #f4f7fb;
  --shadow-soft: 0 6px 20px rgba(18, 38, 63, 0.06);
  --transition-smooth: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Arial, sans-serif;
  background: var(--bg-light);
  color: #111;
  line-height: 1.6;
  font-size: 16px;
}

/* ===== SPLASH SCREEN ===== */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 2000;
  animation: fadeOut 0.6s ease forwards;
  animation-delay: 1s;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    pointer-events: none;
  }
}

.logo {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  border-radius: 12px;
  object-fit: cover;
  animation: slideDown 0.6s ease;
}

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

#splash h1 {
  font-size: 32px;
  margin-bottom: 8px;
  font-weight: 700;
}

#splash p {
  font-size: 16px;
  opacity: 0.95;
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-light));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  color: #fff;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo-small {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

.header-content {
  flex: 1;
}

.app-title {
  font-weight: 700;
  font-size: 16px;
}

.app-tag {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2px;
}

.header-logout {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition-smooth);
}

.header-logout:hover {
  background: rgba(255, 255, 255, 0.3);
}

.header-logout.hidden {
  display: none;
}

/* ===== MAIN CONTENT ===== */
.content {
  padding: 90px 16px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: var(--card-white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
  animation: slideIn 0.3s ease;
}

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

.card h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #111;
}

.card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #111;
}

.card h4 {
  font-size: 16px;
  margin-top: 16px;
  margin-bottom: 12px;
  color: #111;
}

.card h5 {
  font-size: 14px;
  margin-top: 12px;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
}

/* ===== LOGIN SECTION ===== */
.login-card {
  max-width: 420px;
  margin: 0 auto;
}

.subtitle-text {
  color: var(--muted-gray);
  font-size: 15px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition-smooth);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--primary-blue);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  transition: var(--transition-smooth);
  margin-top: 12px;
}

.btn-primary:hover {
  background: var(--primary-blue-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #fff;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--primary-blue);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.btn-secondary:active {
  transform: translateY(0);
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(30, 136, 229, 0.15);
  background: #fff;
  color: var(--primary-blue);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  background: var(--primary-blue);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.2);
}

.menu-toggle {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  width: 100%;
  transition: var(--transition-smooth);
}

.menu-toggle:hover {
  background: #f5f5f5;
}

/* ===== DASHBOARD MVP ===== */
.dashboard-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef3fb;
}

.user-welcome {
  flex: 1;
}

.welcome-text {
  font-weight: 700;
  font-size: 20px;
  color: #111;
  margin-bottom: 4px;
}

.health-id-badge {
  background: #e3f2fd;
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 4px solid var(--primary-blue);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-blue);
}

.dashboard-intro {
  text-align: center;
  padding: 30px 20px;
}

.dashboard-intro h2 {
  margin-bottom: 8px;
}

/* Elder-Friendly Big Buttons Dashboard */
.dashboard-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.dashboard-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #e3f2fd, #fff);
  border: 2px solid rgba(30, 136, 229, 0.2);
  color: #333;
  cursor: pointer;
  transition: var(--transition-smooth);
  min-height: 160px;
}

.big-btn {
  background: linear-gradient(135deg, #e3f2fd, #fff);
}

.big-btn:hover {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(30, 136, 229, 0.3);
  border-color: var(--primary-blue);
}

.btn-icon {
  font-size: 48px;
  line-height: 1;
}

.btn-text {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}

.btn-hint {
  font-size: 12px;
  color: var(--muted-gray);
  text-align: center;
}

.big-btn:hover .btn-hint {
  color: rgba(255, 255, 255, 0.9);
}

.secondary-menu {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eef3fb;
}

/* ===== GRID LAYOUTS ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

/* ===== LIST ITEMS ===== */
.list-item {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #eef3fb;
  background: #fbfeff;
  margin: 8px 0;
  transition: var(--transition-smooth);
}

.list-item:hover {
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.1);
  border-color: var(--primary-blue);
}

.sos-item {
  border-left: 5px solid var(--danger-red);
  padding: 12px;
  background: #fff3f3;
  border-radius: 6px;
  margin: 8px 0;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.3);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.1);
  }
}

/* ===== UTILITY CLASSES ===== */
.muted {
  color: var(--muted-gray);
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.info-note {
  background: #e3f2fd;
  padding: 12px;
  border-radius: 6px;
  margin-top: 16px;
  border-left: 4px solid var(--primary-blue);
  font-size: 13px;
  color: #333;
}

.small {
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e6eefc;
  background: #fff;
  color: var(--primary-blue);
  cursor: pointer;
}

.content-views {
  margin-top: 16px;
}

/* ===== FOOTER ===== */
footer {
  background: #f8f9fa;
  padding: 20px 16px;
  text-align: center;
  color: var(--muted-gray);
  font-size: 13px;
  margin-top: 40px;
  border-top: 1px solid #eef3fb;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .content {
    padding: 80px 12px 50px;
  }

  .card {
    padding: 16px;
    border-radius: 8px;
  }

  .dashboard-buttons {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-icon {
    font-size: 36px;
  }

  .btn-text {
    font-size: 14px;
  }

  #splash h1 {
    font-size: 24px;
  }

  .logo {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  header {
    padding: 8px 12px;
  }

  .app-title {
    font-size: 14px;
  }

  .app-tag {
    font-size: 11px;
  }

  .content {
    padding: 80px 10px 50px;
  }

  .card {
    padding: 14px;
  }

  .card h2 {
    font-size: 20px;
  }

  .card h3 {
    font-size: 18px;
  }

  .dashboard-buttons {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .btn-icon {
    font-size: 32px;
  }

  .btn-text {
    font-size: 13px;
  }

  body {
    font-size: 14px;
  }

  #splash h1 {
    font-size: 20px;
  }

  .logo {
    width: 50px;
    height: 50px;
  }
}
