/* site.css */

/* Modern Design Variables */
:root {
  --primary-color: #1890ff;
  --primary-hover: #40a9ff;
  --primary-active: #096dd9;
  --text-primary: #262626;
  --text-secondary: #8c8c8c;
  --text-tertiary: #bfbfbf;
  --border-color: #d9d9d9;
  --background-light: #fafafa;
  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
}

/* Base Typography & Layout */
html, body {
  height: 100%;
  margin: 0;
  padding: 0; /* Ensure no default padding */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html {
  font-size: 16px;
}

body {
  background-color: #ffffff;
  margin: 0;
  padding: 0; /* Ensure no default padding */
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-x: hidden;
}

.main-content {
  min-height: calc(100vh - 80px);
}

/* Global animation keyframe - used by both navbar and hero */
@keyframes grid-move-global {
  0% { transform: translate(0, 0); }
  100% { transform: translate(32px, 32px); }
}

/* Modern Navigation */
.modern-nav {
  background: #f0f9ff;
  backdrop-filter: blur(20px);
  border: none;
  border-bottom: none;
  box-shadow: none;
  padding: var(--spacing-sm) 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-bottom: 0; /* Ensure no bottom margin */
}

/* Synchronized animated background for navbar */
.modern-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(24, 144, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 144, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: grid-move-global 20s linear infinite;
  z-index: -1;
}

.modern-nav.scrolled {
  background: rgba(240, 249, 255, 0.98);
  box-shadow: var(--shadow-1);
  padding: var(--spacing-xs) 0;
}

/* Keep the same animation for scrolled state */
.modern-nav.scrolled::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(24, 144, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 144, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: grid-move-global 20s linear infinite;
  z-index: -1;
}

.modern-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.modern-brand:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #722ed1 100%);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.brand-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, #722ed1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modern-nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  margin: 0 4px;
  border-radius: var(--border-radius);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  text-decoration: none;
}

.modern-nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.modern-nav-link:hover {
  color: var(--primary-color);
  background: rgba(24, 144, 255, 0.08);
  text-decoration: none;
}

.modern-nav-link:hover::before {
  width: 60%;
}

.modern-nav-link.active {
  color: var(--primary-color);
  background: rgba(24, 144, 255, 0.12);
}

.modern-nav-link.active::before {
  width: 60%;
}

.modern-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-left: var(--spacing-xs);
}

.modern-nav-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
  color: white;
  text-decoration: none;
}

/* Modern Language Switcher */
.modern-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(24, 144, 255, 0.2);
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-left: var(--spacing-xs);
  cursor: pointer;
}

.modern-lang-btn:hover {
  background: rgba(24, 144, 255, 0.08);
  border-color: rgba(24, 144, 255, 0.3);
  color: var(--primary-color);
}

.modern-lang-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.lang-globe-icon {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.lang-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
  background: rgba(24, 144, 255, 0.1);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-color);
  flex-shrink: 0;
}

.lang-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.modern-dropdown {
  border: 1px solid rgba(24, 144, 255, 0.15);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-2);
  padding: var(--spacing-xs);
  min-width: 120px;
}

.modern-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: calc(var(--border-radius) - 2px);
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
}

.modern-dropdown-item:hover {
  background: rgba(24, 144, 255, 0.08);
  color: var(--primary-color);
}

.modern-dropdown-item.active {
  background: rgba(24, 144, 255, 0.12);
  color: var(--primary-color);
  font-weight: 600;
}

.modern-toggler {
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modern-toggler span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: center;
}

.modern-toggler:hover span {
  background: var(--primary-color);
}

.modern-toggler[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translateY(6px);
}

.modern-toggler[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.modern-toggler[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translateY(-6px);
}

/* Page offset for fixed navbar */
.page-content {
  padding-top: 80px;
  transition: opacity 0.2s ease-in-out;
}

.page-content.loading {
  opacity: 0.6;
}

/* Mobile navbar adjustments */
@media (max-width: 768px) {
  .modern-nav {
    padding: var(--spacing-xs) 0;
  }
  
  .page-content {
    padding-top: 70px;
  }
  
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-2);
  }
  
  .modern-nav-link {
    margin: 2px 0;
    padding: var(--spacing-sm);
  }
  
  .modern-nav-btn {
    margin: var(--spacing-xs) 0;
    justify-content: center;
  }

  .modern-lang-btn {
    margin: var(--spacing-xs) 0;
    padding: var(--spacing-xs) var(--spacing-sm);
  }
  
  .lang-text {
    display: none; /* Hide text on mobile, show only flag */
  }
}

/* Tablet logo fix - hide text between 576px and 768px to prevent wrapping */
@media (min-width: 576px) and (max-width: 768px) {
  .brand-text {
    display: none;
  }
  
  .modern-brand {
    gap: 0; /* Remove gap when text is hidden */
  }
}

/* AJAX Navigation Styles */
.ajax-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
  z-index: 9999;
  transition: width 0.3s ease;
  display: none;
}

/* Enhanced fade transition for smoother content loading */
.page-content {
  animation: fadeIn 0.3s ease-in-out;
}

/* Modern Footer */
.modern-footer {
  background: var(--text-primary);
  color: white;
  padding: var(--spacing-lg) 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-brand .brand-icon {
  background: linear-gradient(135deg, var(--primary-color) 0%, #722ed1 100%);
}

.footer-brand .brand-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, #722ed1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-divider {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.footer-copyright {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-sm);
  }
  
  .footer-links {
    order: -1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toast notifications for AJAX form submissions */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 350px;
}

#toast-container .alert {
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: none;
}

/* Screen reader only class for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Color Palette */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #06b6d4;
  --secondary-color: #6b7280;
  --light-gray: #f3f4f6;
  --medium-gray: #9ca3af;
  --dark-gray: #374151;
  --border-color: #e5e7eb;
}

/* Professional Typography Hierarchy */
h1 {
  font-size: 1.75rem; /* Reduced from 2rem for compactness */
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem; /* 24px */
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

h3 {
  font-size: 1.25rem; /* 20px */
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
}

h4 {
  font-size: 1.125rem; /* 18px */
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
}

h5 {
  font-size: 1rem; /* 16px */
  font-weight: 600;
  color: #374151;
  line-height: 1.5;
}

h6 {
  font-size: 0.875rem; /* 14px */
  font-weight: 600;
  color: #374151;
  line-height: 1.5;
}

/* Link Styling */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Button Improvements */
.btn {
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem; /* 14px */
  transition: all 0.15s ease-in-out;
  border-width: 1.5px;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  color: #fff;
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.btn-warning {
  background-color: var(--warning-color);
  border-color: var(--warning-color);
  color: #000;
}

.btn-danger {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-info {
  background-color: var(--info-color);
  border-color: var(--info-color);
}

/* Card Enhancements */
.card {
  border-radius: 8px;
  border: none;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease-in-out;
}

.card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Table Improvements */
.table {
  font-size: 0.9375rem; /* 15px */
}

.table thead th {
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  font-size: 0.875rem; /* 14px */
  color: var(--dark-gray);
  background-color: var(--light-gray);
}

.table tbody tr {
  border-bottom: 1px solid #f3f4f6;
}

.table tbody tr:hover {
  background-color: #f9fafb;
}

/* Form Controls */
.form-control {
  border-radius: 6px;
  border: 1.5px solid var(--border-color);
  font-size: 0.9375rem; /* 15px */
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Badge Styling */
.badge {
  font-weight: 500;
  font-size: 0.75rem; /* 12px */
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
}

/* Navbar */
.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
  font-weight: 700;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Borders */
.border-top {
  border-top: 1px solid var(--border-color) !important;
}

.border-bottom {
  border-bottom: 1px solid var(--border-color) !important;
}

/* Text Colors */
.text-muted {
  color: var(--medium-gray) !important;
}

/* Spacing Utilities */
.gap-2 {
  gap: 0.5rem !important;
}

.gap-3 {
  gap: 0.75rem !important;
}

.gap-4 {
  gap: 1rem !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 1.75rem; /* 28px */
  }
  
  h2 {
    font-size: 1.375rem; /* 22px */
  }
  
  .btn {
    font-size: 0.8125rem; /* 13px */
  }
  
  .table {
    font-size: 0.875rem; /* 14px */
  }
  
  .form-control {
    font-size: 0.875rem; /* 14px */
  }
}

.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

.footer {
  position: relative; /* Allow the footer to stay within the normal document flow */
  bottom: unset; /* Remove the absolute positioning */
  width: 100%;
  background: #343a40;
  color: #fff;
  padding: 15px 10px; /* Reduced padding */
  text-align: center;
  line-height: 1.4; /* Reduced line height */
  font-size: 0.875rem; /* Smaller footer text */
}

/* Compact UI Styles */
.card {
  margin-bottom: 1rem; /* Reduced spacing between cards */
  border: 1px solid #e3e6f0;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-body {
  padding: 1rem; /* Reduced from default 1.25rem */
}

.card-header {
  padding: 0.75rem 1rem; /* More compact header */
  background-color: #f8f9fc;
  border-bottom: 1px solid #e3e6f0;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
}

.table td, .table th {
  padding: 0.5rem; /* More compact table cells */
  font-size: 0.875rem;
}

.badge {
  font-size: 0.7rem;
  padding: 0.25em 0.4em;
}


.hero-section {
  text-align: center;
  padding: 100px 20px;
  background: #f8f9fa;
}

.features-section {
  padding: 50px 20px;
}

.feature {
  text-align: center;
  margin-bottom: 30px;
}

.icon-placeholder {
  font-size: 50px;
  color: #258cfb;
  margin-bottom: 20px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* site.css or layout.css */

/* Style for dashboard cards (Blank Form and Templates) */
.card.bg-light {
  background-color: #f8f9fa; /* Matches your body background */
  border-color: #e5e5e5; /* Subtle border from your border classes */
  transition: transform 0.2s, box-shadow 0.2s; /* Smooth hover effects */
}

.card.bg-light:hover {
  transform: scale(1.05); /* Slight zoom on hover, same as template cards */
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .1); /* Subtle shadow */
}

.card-body .bi-plus-lg {
  color: #0066cc; /* Matches your btn-primary color for consistency */
}

.card-body .bi-plus-lg:hover {
  color: #0056b3; /* Blue on hover, same as your links */
}

.card-body h6 {
  font-size: 1rem; /* Ensure template titles are readable */
  color: #333; /* Darker text for contrast */
}

.btn-outline-primary {
  border-color: #0066cc; /* Match your btn-primary border */
  color: #0066cc;
}

.btn-outline-primary:hover {
  background-color: #0066cc; /* Match btn-primary on hover */
  color: #fff;
  border-color: #0056b3;
}

/* Enhanced Form Elements */
.rating-container .btn-group {
  gap: 0.25rem;
}

.rating-container .btn-check:checked + .btn-outline-primary {
  background-color: #ffc107;
  border-color: #ffc107;
  color: #000;
}

.slider-container {
  margin: 1rem 0;
}

.slider-container .form-range {
  margin: 1rem 0;
}

.slider-container .badge {
  min-width: 3rem;
}

.question-item {
  border-left: 4px solid #e9ecef;
  transition: border-color 0.2s;
}

.question-item:hover {
  border-left-color: #007bff;
}

.drag-handle {
  cursor: grab;
  color: #6c757d;
}

.drag-handle:active {
  cursor: grabbing;
}

.options-container .option-item {
  background: #f8f9fa;
  padding: 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #e9ecef;
}

/* Form validation */
.is-invalid {
  border-color: #dc3545;
}

.invalid-feedback {
  display: none;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Modern page transition animations */
.page-content {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .page-content {
    animation: none;
  }
}

/* ===== COMPACT DESIGN ADDITIONS ===== */

/* Compact template cards */
.template-card {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.template-card:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.template-content {
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: white;
}

.template-content h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.template-content p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* COMPACT STATS CARDS */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
}

/* MODERN FORM LIST */
.modern-form-list {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.form-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.form-item:last-child {
    border-bottom: none;
}

.form-item:hover {
    background-color: #f9fafb;
}

.form-item-content {
    flex: 1;
}

.form-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.form-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.form-item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.form-id {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.form-item-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.form-item-actions .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
}

/* GENERAL COMPACT ADJUSTMENTS */
h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .form-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .form-item-actions {
        justify-content: flex-end;
    }
    
    .form-item-meta {
        flex-wrap: wrap;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .template-content,
    .create-form-content {
        padding: 1rem;
    }
    
    .template-icon,
    .create-form-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ===== COMPACT DESIGN ADDITIONS ===== */

/* Compact template cards */
.template-card {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.template-card:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.template-content {
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: white;
}

.template-content h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.template-content p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* COMPACT STATS CARDS */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
}

/* MODERN FORM LIST */
.modern-form-list {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.form-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.form-item:last-child {
    border-bottom: none;
}

.form-item:hover {
    background-color: #f9fafb;
}

.form-item-content {
    flex: 1;
}

.form-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.form-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.form-item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.form-id {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.form-item-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.form-item-actions .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
}

/* GENERAL COMPACT ADJUSTMENTS */
h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .form-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .form-item-actions {
        justify-content: flex-end;
    }
    
    .form-item-meta {
        flex-wrap: wrap;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .template-content,
    .create-form-content {
        padding: 1rem;
    }
    
    .template-icon,
    .create-form-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}
/* ===== MODERN LOGIN FORM STYLES ===== */
.login-wrapper {
    margin-top: 60px;
    margin-bottom: 60px;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-signin {
    max-width: 400px;
    padding: 40px 35px 45px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.form-signin:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.form-signin .form-signin-heading {
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    color: #374151;
    font-size: 1.5rem;
}

.form-signin .form-control {
    position: relative;
    font-size: 16px;
    height: auto;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.form-signin .form-control:focus {
    z-index: 2;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-signin input[type="email"],
.form-signin input[type="text"] {
    margin-bottom: 0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.form-signin input[type="password"] {
    margin-bottom: 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.form-signin .form-check {
    margin-bottom: 20px;
}

.form-signin .form-check-label {
    font-weight: normal;
    color: #6b7280;
    font-size: 0.9rem;
}

.form-signin .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.form-signin .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.form-signin .btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-signin .btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.form-signin .divider {
    position: relative;
    margin: 24px 0;
    text-align: center;
}

.form-signin .divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.form-signin .divider span {
    background: white;
    padding: 0 16px;
    color: #6b7280;
    font-size: 0.9rem;
}

.form-signin .register-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.form-signin .register-link p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.form-signin .register-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.form-signin .register-link a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Google login button specific styling */
.btn-google {
    background: #fff;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #374151;
}

.btn-google i {
    font-size: 18px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .login-wrapper {
        margin-top: 20px;
        margin-bottom: 20px;
        padding: 0 20px;
    }
    
    .form-signin {
        padding: 30px 25px 35px;
        max-width: 100%;
    }
    
    .form-signin .form-signin-heading {
        font-size: 1.3rem;
        margin-bottom: 25px;
    }
    
    .form-signin .form-control,
    .form-signin .btn-primary,
    .form-signin .btn-danger,
    .btn-google {
        font-size: 15px;
        padding: 10px 16px;
    }
}

/* Hero Section Features */
.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.hero-feature {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.hero-feature:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-feature-icon {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
}

.hero-feature h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero-feature p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

/* Key Features Section */
.key-features-section {
    padding: 5rem 0;
    background: #f8fafc;
}

.key-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.key-feature-card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.key-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(24, 144, 255, 0.15);
    border-color: #1890ff;
}

.key-feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1890ff, #40a9ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: #fff;
}

.key-feature-card h4 {
    color: #1a1a1a;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.key-feature-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* How It Works Section */
.how-it-works-section {
    padding: 5rem 0;
    background: #fff;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    position: relative;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1890ff, #40a9ff);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 2;
}

.step-content {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 16px;
    margin-top: -25px;
    padding-top: 3rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.step-card:hover .step-content {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(24, 144, 255, 0.1);
    border-color: #1890ff;
}

.step-icon {
    font-size: 2rem;
    color: #1890ff;
    margin-bottom: 1rem;
}

.step-title {
    color: #1a1a1a;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.step-text {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Navigation Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .nav-link.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease-in-out;
}

/* Remove Bootstrap's dropdown arrow since we have our own */
.nav-dropdown .nav-link.dropdown-toggle::after {
    display: none;
}

.nav-dropdown .nav-link.dropdown-toggle .bi-chevron-down {
    font-size: 0.8rem;
    transition: transform 0.2s ease-in-out;
}

.nav-dropdown .nav-link.dropdown-toggle[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.nav-dropdown-content {
    padding-left: 1rem;
}

.nav-sub-link {
    padding-left: 2.5rem !important;
    font-size: 0.85rem;
    border-left: 2px solid transparent;
    transition: all 0.2s ease-in-out;
}

.nav-sub-link:hover {
    border-left-color: var(--primary-color);
    background-color: rgba(24, 144, 255, 0.05);
}

.nav-sub-link.active {
    background-color: rgba(24, 144, 255, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.nav-sub-link i {
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

/* Additional responsive styles for new sections */
@media (max-width: 768px) {
    .hero-features {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .key-features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .key-feature-card,
    .step-content {
        padding: 2rem 1.5rem;
    }
    
    .key-features-section,
    .how-it-works-section {
        padding: 3rem 0;
    }
}

/* QR Code Page Styles */
.qr-code-container {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-image {
    border: 8px solid #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease-in-out;
}

.qr-code-image:hover {
    transform: scale(1.05);
}

/* QR Size Options */
.qr-size-options .btn-check:checked + .btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Action Buttons */
.action-buttons .btn {
    min-width: 120px;
    margin-bottom: 8px;
}

/* Toast Container Override for better positioning */
.toast-container {
    z-index: 1060;
}

.toast {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive QR Code */
@media (max-width: 768px) {
    .qr-code-image {
        max-width: 250px !important;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .qr-size-options .btn-group {
        width: 100%;
    }
    
    .qr-size-options .btn {
        flex: 1;
    }
}

/* Print Styles for QR Code Page */
@media print {
    .card-header,
    .action-buttons,
    .qr-size-options,
    .navbar,
    .btn {
        display: none !important;
    }
    
    .qr-code-image {
        max-width: 300px;
        border: 2px solid #000;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* Disabled template card styles */
.template-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.template-card.disabled:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
