/* Style for ASKep Jiwa Smart */
/* Modern Design with Purple Theme */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap");

:root {
  --primary: #7c3aed;
  --primary-light: #8b5cf6;
  --primary-soft: #f5f3ff;
  --secondary: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --accent: #f43f5e;
  --success: #10b981;
  --card-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --card-shadow-hover:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --primary-soft: #2e1065;
  --bg-light: #0f172a;
  --bg-white: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

html {
  font-size: 12px; /* Set to exactly 75% (12px / 16px) */
}

body {
  background-color: var(--bg-light);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
  /* Prevent pull-to-refresh on PWA */
  overscroll-behavior-y: contain;
}

/* Fast-Loading License Check */
html.is-licensed #license-screen {
  display: none !important;
}

/* Ensure font rendering is smooth */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
.brand {
  font-family: "Outfit", sans-serif;
}

/* Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.section-badge {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--primary);
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 1.25rem !important;
  display: block;
}

.standard-form {
  max-width: 1000px;
  margin: 0 auto;
}

.checklist-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .checklist-compact {
    grid-template-columns: 1fr;
  }
}

/* Sidebar & Navigation */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px; /* Reduced from 280px */
  background-color: var(--bg-white);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2rem;
}

.nav-links {
  list-style: none;
  flex: 1 1 auto;
  overflow-y: auto;
  margin-right: -0.5rem;
  padding-right: 0.5rem;
}

/* Custom Scrollbar for Sidebar */
.nav-links::-webkit-scrollbar {
  width: 5px;
}

.nav-links::-webkit-scrollbar-track {
  background: transparent;
}

.nav-links::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.nav-links::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  text-decoration: none;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-weight: 500;
}

.nav-link:hover {
  background-color: var(--primary-soft);
  color: var(--primary);
}

.nav-link.active {
  background-color: var(--primary);
  color: white;
}

.nav-link i {
  font-size: 1.15rem;
}

/* Header */
.main-content {
  flex: 1;
  margin-left: 240px; /* Match sidebar width */
  padding: 1.5rem;
  transition: var(--transition);
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Buttons */
.btn {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px var(--primary-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background-color: var(--primary-soft);
  color: var(--primary);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-main);
}

/* Dashboards Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-info h3 {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat-info p {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Sections */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--bg-light);
  color: var(--text-main);
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-light);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.checkbox-item input {
  width: auto;
}

/* Table Style */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 1rem;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

tr:hover td {
  background-color: var(--primary-soft);
}

/* Report Area */
#lp-result,
#askep-result {
  margin-top: 2rem;
  padding: 2rem;
  background: white;
  color: black; /* Export often needs light bg */
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  line-height: 1.6;
}

.report-header {
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid #333;
  padding-bottom: 1rem;
}

.report-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
}

.report-section {
  margin-bottom: 1.5rem;
}

.report-section h4 {
  border-bottom: 1px solid #ddd;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

/* Loader */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--primary-soft);
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
  }
}

/* Landing Screen Styling */
#landing-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  overflow: hidden;
  transition:
    transform 1s cubic-bezier(0.85, 0, 0.15, 1),
    opacity 0.5s ease;
}

#landing-screen.hidden {
  transform: scale(1.1) translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.landing-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 0% 0%,
      rgba(124, 58, 237, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 100% 0%,
      rgba(219, 39, 119, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(99, 102, 241, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(236, 72, 153, 0.05) 0%,
      transparent 50%
    );
  z-index: 1;
}

.landing-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236d28d9' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0);
  }
}

.landing-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 800px;
  animation:
    slideUp 1s ease-out,
    float 6s ease-in-out infinite;
}

/* Decorative glass elements - adjusted for light theme */
.glass-decoration {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.08),
    rgba(124, 58, 237, 0.03)
  );
  backdrop-filter: blur(10px);
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgba(124, 58, 237, 0.1);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.glass-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -150px;
  animation: float 10s ease-in-out infinite;
}
.glass-2 {
  width: 200px;
  height: 200px;
  bottom: -50px;
  left: -100px;
  animation: float 12s ease-in-out infinite reverse;
}

.landing-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 5rem 3rem;
  border-radius: 4rem;
  text-align: center;
  color: #1e293b;
  box-shadow:
    0 30px 60px -12px rgba(124, 58, 237, 0.15),
    0 18px 36px -18px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.landing-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(124, 58, 237, 0.03) 90deg,
    transparent 180deg
  );
  animation: rotate 20s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.landing-card::before {
  display: none;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.6rem 1.5rem;
  border-radius: 3rem;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(109, 40, 217, 0.2);
}

.landing-card h1 {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 2rem;
  letter-spacing: -2px;
  color: #0f172a;
}

.text-gradient {
  background: linear-gradient(135deg, #6d28d9 0%, #db2777 50%, #4f46e5 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(124, 58, 237, 0.1));
  animation: shine 5s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.landing-description {
  font-size: 1.15rem;
  color: #64748b;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.landing-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  padding: 0.85rem 1.5rem;
  border-radius: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  color: #475569;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  background: white;
  border-color: var(--primary-light);
  box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.1);
  color: var(--primary);
}

.feature-item i {
  color: var(--primary);
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 5px rgba(124, 58, 237, 0.3));
}

.btn-landing {
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  color: white;
  border: none;
  padding: 1.5rem 4rem;
  font-size: 1.4rem;
  font-weight: 800;
  border-radius: 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow:
    0 15px 35px -5px rgba(124, 58, 237, 0.4),
    0 0 30px rgba(219, 39, 119, 0.2),
    inset 0 -4px 0 rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 10;
}

.btn-landing:hover {
  transform: scale(1.08) translateY(-8px);
  box-shadow:
    0 25px 40px -5px rgba(124, 58, 237, 0.6),
    0 0 50px rgba(219, 39, 119, 0.5);
  letter-spacing: 1px;
}

.btn-landing::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #ff71ba, #7dd3fc);
  border-radius: 1.55rem;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-landing:hover::after {
  opacity: 1;
}

.btn-landing i {
  transition: transform 0.4s ease;
  width: 24px;
  height: 24px;
}

.btn-landing:hover i {
  transform: translateX(8px) scale(1.1);
}

/* Glow Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  z-index: 1;
}

.orb-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -200px;
  background: var(--primary);
}
.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -150px;
  background: var(--accent);
}
.orb-3 {
  width: 400px;
  height: 400px;
  top: 40%;
  left: 60%;
  background: #6366f1;
}

.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  border-radius: 24px;
  padding: 2.5rem;
  color: white;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(109, 40, 217, 0.3);
}

.welcome-banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: radial-gradient(
    circle at top right,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
}

.welcome-banner h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  font-family: "Outfit", sans-serif;
}

.welcome-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.6;
}

.landing-footer {
  margin-top: 3.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.app-container.blur {
  filter: blur(10px);
  pointer-events: none;
}

/* ===== License Activation Screen ===== */
#license-screen {
  position: fixed;
  inset: 0;
  z-index: 1900;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  overflow: hidden;
  transition:
    transform 0.8s cubic-bezier(0.85, 0, 0.15, 1),
    opacity 0.5s ease;
}

#license-screen.hidden {
  transform: scale(1.05) translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.license-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 580px;
  animation: slideUp 0.8s ease-out;
}

.license-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 3.5rem 2.5rem 2.5rem;
  border-radius: 2.5rem;
  text-align: center;
  color: #1e293b;
  box-shadow:
    0 30px 60px -12px rgba(124, 58, 237, 0.15),
    0 18px 36px -18px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

/* Animated icon at top */
.license-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.license-icon-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-soft),
    rgba(219, 39, 119, 0.1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  position: relative;
  animation: pulse 3s ease-in-out infinite;
}

.license-icon-ring::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--primary),
    var(--accent),
    #6366f1,
    var(--primary)
  );
  z-index: -1;
  opacity: 0.3;
  animation: spin 4s linear infinite;
}

.license-icon-ring::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: white;
  z-index: -1;
  margin: 2px;
}

.license-title {
  font-family: "Outfit", sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  color: #0f172a;
}

.license-description {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto 2rem;
}

/* License Input Group */
.license-input-group {
  position: relative;
  margin-bottom: 1rem;
}

.license-input-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  display: flex;
  align-items: center;
  pointer-events: none;
  opacity: 0.7;
}

.license-input-group input {
  width: 100%;
  padding: 1.1rem 1.25rem 1.1rem 3.5rem;
  border-radius: 1.25rem;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-size: 1.1rem;
  font-weight: 500;
  color: #1e293b;
  transition: all 0.3s ease;
}

.license-input-group input::placeholder {
  font-weight: 400;
  color: #94a3b8;
}

.license-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow:
    0 0 0 4px var(--primary-soft),
    0 4px 12px rgba(124, 58, 237, 0.1);
  background: white;
}

/* Error Message */
.license-error-msg {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fef2f2;
  color: #dc2626;
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border: 1px solid #fecaca;
  animation: fadeIn 0.3s ease;
}

/* Shake animation for invalid input */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.5s ease;
}

/* Submit Button */
.btn-license-submit {
  width: 100%;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #db2777 100%);
  background-size: 200% auto;
  color: white;
  border: none;
  padding: 1.15rem 2rem;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow:
    0 10px 25px -5px rgba(124, 58, 237, 0.35),
    0 0 15px rgba(219, 39, 119, 0.15);
  margin-top: 0.5rem;
}

.btn-license-submit:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow:
    0 15px 30px -5px rgba(124, 58, 237, 0.5),
    0 0 25px rgba(219, 39, 119, 0.3);
}

.btn-license-submit:active {
  transform: translateY(0);
}

.btn-license-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.license-btn-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Help Link */
.license-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.license-help a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.license-help a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Dark theme support */
[data-theme="dark"] #license-screen {
  background-color: #0f172a;
}

[data-theme="dark"] .license-card {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(51, 65, 85, 0.6);
  color: #e2e8f0;
}

[data-theme="dark"] .license-title {
  color: #f1f5f9;
}

[data-theme="dark"] .license-description {
  color: #94a3b8;
}

[data-theme="dark"] .license-input-group input {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .license-input-group input::placeholder {
  color: #64748b;
}

[data-theme="dark"] .license-error-msg {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
  .license-card {
    padding: 2.5rem 1.5rem 2rem;
    border-radius: 2rem;
  }
  .license-title {
    font-size: 1.75rem;
  }
  .license-description {
    font-size: 0.9rem;
  }
  .license-icon-ring {
    width: 72px;
    height: 72px;
  }
  .license-icon-ring i {
    width: 36px !important;
    height: 36px !important;
  }
}

@media (max-width: 640px) {
  .landing-card {
    padding: 3rem 1.5rem;
  }
  .landing-card h1 {
    font-size: 2.25rem;
  }
  .landing-description {
    font-size: 1rem;
  }
  .landing-features {
    gap: 1rem;
  }
  .feature-item {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive & Mobile Enhancements */
.mobile-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 101;
}

.bottom-quick-nav {
  display: none;
}

@media (max-width: 992px) {
  .sidebar {
    width: 80px;
    padding: 2rem 0.5rem;
  }
  .brand span,
  .nav-link span {
    display: none;
  }
  .main-content {
    margin-left: 80px;
  }
}

@media (max-width: 640px) {
  .mobile-header {
    display: flex;
  }
  .sidebar {
    left: -280px;
    top: 0;
    bottom: auto;
    height: 100vh;
    width: 280px;
    padding: 2rem 1.5rem;
    position: fixed;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
  }
  .sidebar.open {
    left: 0;
  }
  .brand span,
  .nav-link span {
    display: block;
  }
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  .top-header {
    display: none;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }
  .sidebar-overlay.active {
    display: block;
  }

  /* Bottom Nav alternative for 4 key actions */
  .bottom-quick-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    border-top: 1px solid var(--border);
    z-index: 90;
  }
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-decoration: none;
  }
  .bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
  }
  .bottom-nav-item.active {
    color: var(--primary);
  }
}

/* Professional Print Styles */
@media print {
  .sidebar,
  .top-header,
  .header-actions,
  .mobile-header,
  .btn,
  .bottom-quick-nav,
  .theme-toggle,
  .no-print {
    display: none !important;
  }
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }
  body {
    background: white;
    color: black;
  }
  .card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
  .report-container,
  #lp-result,
  #askep-result,
  #mse-result {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
  }
  .report-header {
    border-bottom: 3px solid black !important;
    padding-bottom: 20px !important;
  }
  h4 {
    border-bottom: 2px solid #555 !important;
    padding-bottom: 5px !important;
    margin-top: 20px !important;
  }
  table {
    border: 1px solid black !important;
  }
  th,
  td {
    border: 1px solid black !important;
    padding: 8px !important;
    font-size: 0.9rem !important;
  }
  th {
    background-color: #f2f2f2 !important;
    color: black !important;
  }
  .report-title {
    font-size: 1.8rem !important;
  }
  p,
  li {
    font-size: 0.95rem !important;
  }
  @page {
    margin: 2cm;
  }
}
/* Colorful SPO Categories */
.btn-spo-a {
  border-color: #3b82f6 !important;
  color: #3b82f6 !important;
}
.btn-spo-a.active,
.btn-spo-a:hover {
  background: #3b82f6 !important;
  color: white !important;
}

.btn-spo-b {
  border-color: #10b981 !important;
  color: #10b981 !important;
}
.btn-spo-b.active,
.btn-spo-b:hover {
  background: #10b981 !important;
  color: white !important;
}

.btn-spo-c {
  border-color: #f97316 !important;
  color: #f97316 !important;
}
.btn-spo-c.active,
.btn-spo-c:hover {
  background: #f97316 !important;
  color: white !important;
}

.btn-spo-d {
  border-color: #8b5cf6 !important;
  color: #8b5cf6 !important;
}
.btn-spo-d.active,
.btn-spo-d:hover {
  background: #8b5cf6 !important;
  color: white !important;
}

.btn-spo-e {
  border-color: #06b6d4 !important;
  color: #06b6d4 !important;
}
.btn-spo-e.active,
.btn-spo-e:hover {
  background: #06b6d4 !important;
  color: white !important;
}

.btn-spo-f {
  border-color: #6366f1 !important;
  color: #6366f1 !important;
}
.btn-spo-f.active,
.btn-spo-f:hover {
  background: #6366f1 !important;
  color: white !important;
}

.btn-spo-g {
  border-color: #64748b !important;
  color: #64748b !important;
}
.btn-spo-g.active,
.btn-spo-g:hover {
  background: #64748b !important;
  color: white !important;
}

/* Top Nav Styling */
.header-nav {
  display: flex;
  gap: 0.5rem;
  background: var(--primary-soft);
  padding: 0.4rem;
  border-radius: var(--radius-md);
  margin-right: 1.5rem;
}

.header-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.header-nav-item i {
  width: 18px;
  height: 18px;
}

.header-nav-item:hover {
  background: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-nav-item.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--card-shadow);
}

@media (max-width: 991px) {
  .header-nav {
    display: none;
  }
}

/* Quiz Specific Styling */
.quiz-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 1rem;
  display: inline-block;
}

.quiz-option {
  position: relative;
  padding: 1.25rem 1.5rem !important;
  background: var(--bg-white) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  text-align: left !important;
  justify-content: flex-start !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer;
  overflow: hidden;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--primary) !important;
  background: var(--primary-soft) !important;
  transform: translateX(8px);
}

.quiz-option.correct {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

.quiz-option.wrong {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
}

.quiz-option-letter {
  width: 28px;
  height: 28px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.quiz-option:hover .quiz-option-letter {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.quiz-option.correct .quiz-option-letter {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.quiz-option.wrong .quiz-option-letter {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Professional Assessment Form Styling */
.standard-form .report-section {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.section-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.checkbox-table {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--bg-soft);
  padding: 1rem;
  border-radius: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.checkbox-item:hover {
  transform: translateX(4px);
}

.compact-text {
  font-size: 0.85rem;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}
.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* App Footer */
.app-footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

@media (max-width: 640px) {
  .app-footer {
    padding-bottom: 6rem; /* Space for bottom nav */
  }
}
