/* formatcheck-its.css */
/* CSS Terpusat untuk Sistem FormatCheck ITS */

/* ================ IMPORTS & BASE STYLES ================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --blue-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --green-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --red-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --yellow-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* ================ GLOBAL STYLES ================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--primary-gradient);
  min-height: 100vh;
  color: #333;
}

.no-horizontal-scroll {
  max-width: 100%;
  overflow-x: hidden;
}

.safe-area {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ================ TYPOGRAPHY UTILITIES ================ */
.text-overflow-fix {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.break-words {
  word-break: break-word;
  overflow-wrap: break-word;
}

.text-balance {
  text-wrap: balance;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.filename-truncate {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================ SCROLLBAR STYLING ================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--blue-gradient);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* ================ NAVBAR STYLES ================ */
.navbar {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  position: sticky;
  top: 0;
  z-index: 50;
  will-change: transform;
}

.nav-link {
  transition: all 0.2s ease-in-out;
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: #2563eb;
  transform: translateY(-1px);
}

/* ================ CARD & COMPONENT STYLES ================ */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 1rem;
  background: white;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.btn-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.result-card {
  transition: transform 0.3s ease;
}

.result-card:hover {
  transform: translateY(-5px);
}

.history-card {
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: white;
}

.history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.requirement-item {
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.requirement-item:hover {
  transform: translateX(5px);
  background-color: rgba(59, 130, 246, 0.05);
}

.login-container,
.register-container {
  transition: all 0.3s ease;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ================ ANIMATIONS ================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

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

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

@keyframes slideInRight {
  from { 
    transform: translateX(100%); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

@keyframes slideOutRight {
  from { 
    transform: translateX(0); 
    opacity: 1; 
  }
  to { 
    transform: translateX(100%); 
    opacity: 0; 
  }
}

.notification {
  animation: slideIn 0.3s ease-out;
}

.notification.hide {
  animation: slideOut 0.3s ease-in;
}

.notification.slide-right {
  animation: slideInRight 0.3s ease-out;
}

.notification.slide-right.hide {
  animation: slideOutRight 0.3s ease-in;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* ================ FORM COMPONENTS ================ */
.input-group {
  transition: all 0.3s ease;
}

.input-group:focus-within {
  transform: translateY(-2px);
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
  flex-shrink: 0;
}

.custom-checkbox:checked {
  background-color: #4f46e5;
  border-color: #4f46e5;
}

.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.file-upload-container {
  transition: all 0.3s ease;
  border: 2px dashed #d1d5db;
  border-radius: 0.75rem;
  background: white;
}

.file-upload-container.drag-over {
  transform: scale(1.02);
  border-color: #667eea;
  background-color: #f0f4ff;
}

.file-name-truncate {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bar {
  transition: width 0.5s ease-in-out;
  height: 0.625rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 9999px;
}

/* ================ PASSWORD STRENGTH ================ */
.password-strength {
  height: 4px;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.strength-weak { 
  background-color: #ef4444; 
  width: 25%; 
}

.strength-fair { 
  background-color: #f59e0b; 
  width: 50%; 
}

.strength-good { 
  background-color: #10b981; 
  width: 75%; 
}

.strength-strong { 
  background-color: #10b981; 
  width: 100%; 
}

/* ================ SCORE CIRCLE ================ */
.score-circle {
  transition: all 0.5s ease;
}

.circle-bg {
  fill: none;
  stroke: #eee;
  stroke-width: 3.8;
}

.circle {
  fill: none;
  stroke-width: 3.8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dasharray 1s ease-in-out;
}

/* ================ STEP INDICATOR ================ */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  position: relative;
}

.step-indicator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #e5e7eb;
  transform: translateY(-50%);
  z-index: 1;
}

.step {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.step.active {
  background-color: #4f46e5;
  color: white;
}

.step.completed {
  background-color: #10b981;
  color: white;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

/* ================ COLOR UTILITIES ================ */
.gradient-text {
  background: var(--blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-badge {
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
  text-align: center;
  min-width: 6rem;
}

/* ================ RESPONSIVE DESIGN ================ */
/* Mobile - Small screens */
@media (max-width: 480px) {
  .text-3xl, .text-4xl, .text-5xl, .text-6xl, .text-7xl {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }
  
  .text-2xl {
    font-size: 1.25rem !important;
  }
  
  .text-xl {
    font-size: 1.125rem !important;
  }
  
  .gap-8 {
    gap: 1.5rem !important;
  }
  
  .w-16.h-16 {
    width: 3rem !important;
    height: 3rem !important;
  }
  
  .w-10.h-10 {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }
  
  .w-24.h-24 {
    width: 4rem !important;
    height: 4rem !important;
  }
  
  .file-name-truncate {
    max-width: 150px;
  }
  
  .grid.gap-4 {
    gap: 0.5rem !important;
  }
  
  .grid.grid-cols-2 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  .grid.grid-cols-1.md\:grid-cols-2 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  .step {
    width: 25px;
    height: 25px;
    font-size: 0.7rem;
  }
  
  .filename-truncate {
    max-width: 180px;
  }
}

/* Performance optimizations */
.will-change-transform {
  will-change: transform;
}

/* Loading animation for cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Utility classes */
.max-h-100 {
  max-height: 200px;
}

.no-print {
  /* This class will be handled by the print media query */
}

/* File type icons */
.fa-file-pdf {
  color: #ef4444;
}

.fa-file-word {
  color: #2563eb;
}

.fa-file-alt {
  color: #10b981;
}

/* Status colors */
.text-success { color: #10b981; }
.bg-success { background-color: #10b981; }
.border-success { border-color: #10b981; }

.text-warning { color: #f59e0b; }
.bg-warning { background-color: #f59e0b; }
.border-warning { border-color: #f59e0b; }

.text-danger { color: #ef4444; }
.bg-danger { background-color: #ef4444; }
.border-danger { border-color: #ef4444; }

.text-info { color: #3b82f6; }
.bg-info { background-color: #3b82f6; }
.border-info { border-color: #3b82f6; }

/* PDF Viewer specific */
#pdf-container {
  position: relative;
  min-height: 400px;
}

#pdf-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 250, 251, 0.9);
  z-index: 10;
}

#pdf-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 250, 251, 0.9);
  z-index: 20;
}

/* Modal styles */
#confirmModal,
#loadingOverlay {
  position: fixed;
  inset: 0;
  background-color: rgba(75, 85, 99, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

/* Empty state */
.empty-state {
  background: var(--blue-gradient);
  border-radius: 50%;
  width: 6rem;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: white;
}

/* Compact form styling */
.compact-form .input-group {
  margin-bottom: 1rem;
}

.compact-form .input-group label {
  margin-bottom: 0.5rem;
}

/* Truncate utilities */
.truncate-multiline {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive image containers */
.image-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Loading overlay */
#loadingOverlay {
  background-color: rgba(75, 85, 99, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

/* Notification positioning */
.notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  max-width: 400px;
  width: 100%;
}

/* Print-specific utilities */
@media print {
  @page {
    margin: 0.5in;
  }
  
  body * {
    visibility: hidden;
  }
  
  .print-area, .print-area * {
    visibility: visible;
  }
  
  .print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* ================ UTILITY CLASSES ================ */
.no-horizontal-scroll {
  max-width: 100%;
  overflow-x: hidden;
}

.safe-area {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ================ PDF VIEWER ENHANCEMENTS ================ */
#pdf-container {
  position: relative;
  min-height: 400px;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: #f9fafb;
  overflow: hidden;
}

#pdf-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 250, 251, 0.9);
  z-index: 10;
}

#pdf-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 250, 251, 0.9);
  z-index: 20;
}

#pdf-viewer-container {
  width: 100%;
  height: 100%;
  overflow: auto;
  scroll-behavior: smooth;
}

#pdf-canvas {
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ================ PRINT UTILITIES ================ */
@media print {
  .print-hidden {
    display: none !important;
  }
  
  body {
    background: white !important;
    font-size: 12pt !important;
  }
  
  .bg-gradient-to-r {
    background: #0067ac !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
  
  #pdf-container,
  #pdf-loading,
  #pdf-error {
    display: none !important;
  }
}

/* formatcheck-its.css - Tambahkan di dalam :root */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --blue-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --green-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --red-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --yellow-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  
  /* Tambahkan variabel untuk dark mode */
  --dark-bg: #0f172a;
  --dark-card: #1e293b;
  --dark-text: #f1f5f9;
  --dark-border: #334155;
  --dark-gradient: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
}