/* Page-specific styles extracted from inline CSS for better caching */

/* =============================================================================
   LUCIDE ICONS - Shared icon styles
   ============================================================================= */

/* Base icon styles */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 1;
}

/* Icon sizes */
.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-md {
  width: 20px;
  height: 20px;
}

.icon-lg {
  width: 32px;
  height: 32px;
}

.icon-xl {
  width: 48px;
  height: 48px;
}

/* Icon spacing - when icon is followed by text */
.icon + span,
.icon + .text,
.icon-with-text {
  margin-left: 4px;
}

/* Icon in buttons */
button .icon,
.btn .icon {
  margin-right: 6px;
}

button .icon:only-child,
.btn .icon:only-child {
  margin-right: 0;
}

/* Icon colors for status */
.icon-success {
  color: hsl(var(--success, 142 76% 36%));
}

.icon-error,
.icon-danger {
  color: hsl(var(--destructive, 0 84% 60%));
}

.icon-warning {
  color: hsl(var(--warning, 45 93% 47%));
}

.icon-info {
  color: hsl(var(--info, 199 89% 48%));
}

.icon-muted {
  color: hsl(var(--muted-foreground));
}

/* Icon animation for loading/refresh */
.icon-spin {
  animation: icon-spin 1s linear infinite;
}

@keyframes icon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Icon pulse animation */
.icon-pulse {
  animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* =============================================================================
   END LUCIDE ICONS
   ============================================================================= */

/* Font face declarations - shared across pages */
@font-face {
  font-family: 'Bastia';
  src: url('/assets/fonts/Bastia-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif Pro';
  src: url('/assets/fonts/SourceSerifPro-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Shared animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ============================================
   CONSISTENT BORDER-RADIUS UTILITY CLASSES
   Use these across all pages for consistency
   ============================================ */

/* Container styles - consistent across all pages */
.container {
  margin-top: 10px;
  margin-bottom: 10px;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
}

/* Header sections - consistent rounded corners */
.header {
  border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
}

/* Only round top corners for header when inside container */
.container .header {
  border-radius: 0;
}

/* Modal content styles - consistent across all pages */
.modal-content,
.smart-search-content,
.popup-content,
.dialog-content {
  border-radius: var(--radius-lg, 12px);
}

/* Form elements - consistent styling */
.form-input,
.form-select,
.form-textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  border-radius: var(--radius-sm, 6px);
}

/* Button styles - consistent across all pages */
.btn,
button:not(.nav-mobile-toggle):not(.nav-link):not(.nav-dropdown-toggle) {
  border-radius: var(--radius-sm, 6px);
}

/* Card styles - consistent across all pages */
.card,
.tool-card,
.stat-card,
.info-card {
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
}

/* Badge and tag styles */
.badge,
.tag,
.department-badge,
.status-badge {
  border-radius: var(--radius-xs, 4px);
}

/* Pills - fully rounded */
.pill,
.chip {
  border-radius: var(--radius-full, 9999px);
}

/* Table styles */
.table-container,
.data-table {
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
}

/* Error and status message boxes */
.error-message,
.success-message,
.warning-message,
.info-message,
.alert {
  border-radius: var(--radius-sm, 6px);
}

/* Dropdown menus */
.dropdown-menu,
.context-menu,
.autocomplete-dropdown {
  border-radius: var(--radius-md, 8px);
}

/* Tooltip styles */
.tooltip {
  border-radius: var(--radius-sm, 6px);
}

/* Index page styles */
body.index-page {
  padding: 16px;
  padding-top: calc(var(--navbar-height, 64px) + 16px + env(safe-area-inset-top));
  overscroll-behavior-y: contain;
  min-height: 100vh;
}

@media (min-width: 640px) {
  body.index-page {
    padding: 20px;
    padding-top: calc(var(--navbar-height, 64px) + 20px + env(safe-area-inset-top));
  }
}

.index-page .navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 10000 !important;
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.index-page .navbar-container {
  display: flex !important;
  visibility: visible !important;
  max-width: 1400px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 1rem !important;
}

@media (min-width: 768px) {
  .index-page .navbar-container {
    padding: 0 2rem !important;
  }
}

.index-page .navbar-nav {
  display: flex !important;
  visibility: visible !important;
  align-items: center !important;
  gap: 2rem !important;
}

.index-page .header {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 24px 20px;
  text-align: center;
  border: 1px solid hsl(var(--primary));
  margin-bottom: 24px;
  display: block!important;
  visibility: visible!important;
  border-radius: 12px;
}

@media (min-width: 640px) {
  .index-page .header {
    padding: 32px 30px;
  }
}


.index-page .nav-brand img {
  max-width: 80px;
  max-height: 30px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.index-page .header h1 {
  font-size: var(--heading-h2);
  margin-bottom: 12px;
  font-family: 'Bastia', Georgia, 'Times New Roman', serif;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .index-page .header h1 {
    font-size: var(--heading-h1);
    margin-bottom: 15px;
  }
}

.index-page .tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .index-page .tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .index-page .tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    margin-bottom: 40px;
  }
}

.index-page .tool-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  opacity: 1;
  visibility: visible;
  display: flex;
  flex-direction: column;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  overflow: hidden;
  background: hsl(var(--card));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  height: 100%;
  will-change: transform;
}

.index-page .tool-card.visible {
  opacity: 1;
  visibility: visible;
}

.index-page .tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  border-color: hsl(var(--primary) / 0.5);
}

.index-page .tool-card > .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.index-page .tool-card > .card-footer {
  padding: 16px 20px;
  margin-top: auto;
  border-top: 1px solid hsl(var(--border) / 0.5);
}

.index-page .tool-card > .card-footer .btn {
  width: 100%;
  max-width: 200px;
}

.index-page .tool-card.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.index-page .tool-card.tool-features {
  flex: 1;
}

.index-page body {
  visibility: visible!important;
}

.index-page .tool-header {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}

@media (min-width: 640px) {
  .index-page .tool-header {
    padding: 24px 20px;
    flex-direction: row;
    gap: 16px;
    min-height: 140px;
  }
}

@media (min-width: 1024px) {
  .index-page .tool-header {
    padding: 32px 24px;
  }
}

/* General system-overview-box styles */
.system-overview-box {
  margin-top: 10px;
  margin-bottom: 10px;
}

.index-page .system-overview-box {
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  padding: 16px;
  margin-top: 10px;
  margin-bottom: 10px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  will-change: transform;
}

@media (min-width: 640px) {
  .index-page .system-overview-box {
    padding: 20px;
  }
}

.index-page .system-overview-box:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.index-page .tool-icon {
  font-size: 2em;
  margin-right: 0;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: hsl(var(--primary-foreground) / 0.15);
  border-radius: 10px;
  color: hsl(var(--primary-foreground));
}

@media (min-width: 640px) {
  .index-page .tool-icon {
    font-size: 2.5em;
    margin-right: 18px;
    width: 60px;
    height: 60px;
  }
}

.index-page .tool-title {
  font-size: var(--heading-h4);
  font-family: 'Bastia', Georgia, 'Times New Roman', serif;
  text-align: center;
  line-height: 1.25;
  font-weight: 600;
}

@media (min-width: 640px) {
  .index-page .tool-title {
    font-size: var(--heading-h3);
    text-align: left;
  }
}

.index-page .tool-features {
  list-style: none;
  padding-left: 0;
}

.index-page .tool-features li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.625rem;
  line-height: 1.6;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.index-page .tool-features li:before {
  content: "→";
  position: absolute;
  left: 0;
  font-weight: bold;
  color: hsl(var(--primary));
  font-size: 1.1em;
}

@media (max-width: 640px) {
  .index-page body {
    padding: calc(var(--navbar-height, 64px) + 16px) 16px 16px 16px;
    padding-top: calc(var(--navbar-height, 64px) + 16px + env(safe-area-inset-top));
    /* Account for bottom navigation bar */
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .index-page .header {
    padding: 20px 16px;
  }

  .index-page .header h1 {
    font-size: var(--heading-h3);
  }

  .index-page .tools-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .index-page .tool-card .card-content {
    padding: 16px;
  }

  .index-page .tool-card .card-footer {
    padding: 12px 16px;
  }

  .index-page html, .index-page body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
}

