/* ==========================================================================
   BusanaLab — Sistem Desain Busana Edukatif Siswa SMK
   Palet: Krem (#FAFAF7), Terracotta (#C4693A), Sage Green (#5C7A5C), Garis (#E5E1D8)
   Tipografi: Heading "Fraunces" (Serif), Body "Inter" (Sans-Serif)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;0,9..144,800;1,9..144,400&family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Palet Warna Spesifikasi */
  --bg-main: #FAFAF7;
  --bg-card: #FFFFFF;
  --bg-subtle: #F4F2EC;
  --border-color: #E5E1D8;
  --border-focus: #C4693A;

  --text-main: #2A2A2A;
  --text-muted: #6B6862;
  --text-light: #9C9890;

  /* Aksen Utama & Sekunder */
  --accent-terracotta: #C4693A;
  --accent-terracotta-dark: #A85428;
  --accent-terracotta-light: #F7EBE4;

  --accent-sage: #5C7A5C;
  --accent-sage-dark: #466046;
  --accent-sage-light: #EDF3ED;

  --accent-amber: #D97706;
  --accent-rose: #E11D48;

  /* Shadows & Radius */
  --radius-sm: 6px;
  --radius-md: 8px;   /* rounded-lg */
  --radius-lg: 12px;  /* rounded-xl */
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px 0 rgba(42, 42, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(42, 42, 42, 0.08);
  --shadow-lg: 0 12px 24px -4px rgba(42, 42, 42, 0.1);
  --shadow-hover: 0 8px 20px -2px rgba(196, 105, 58, 0.15);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Tipografi */
h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  color: var(--text-main);
  line-height: 1.25;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 28px;
  color: var(--text-main);
  line-height: 1.3;
}

h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  color: var(--text-main);
  line-height: 1.35;
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-main);
}

a {
  color: var(--accent-terracotta);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-terracotta-dark);
}

/* Navigasi */
.navbar {
  background: rgba(250, 250, 247, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--text-main);
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-terracotta);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(196, 105, 58, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover {
  color: var(--accent-terracotta);
  background-color: var(--accent-terracotta-light);
}

.nav-link.active {
  color: var(--accent-terracotta);
  background-color: var(--accent-terracotta-light);
  font-weight: 600;
}

/* Layout Container */
.main-wrapper {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
}

/* Tombol */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-md); /* 8px */
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-terracotta);
  color: white;
  box-shadow: 0 3px 8px rgba(196, 105, 58, 0.25);
}

.btn-primary:hover {
  background: var(--accent-terracotta-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(196, 105, 58, 0.35);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #D2CDC2;
}

.btn-sage {
  background: var(--accent-sage);
  color: white;
  box-shadow: 0 3px 8px rgba(92, 122, 92, 0.25);
}

.btn-sage:hover {
  background: var(--accent-sage-dark);
  color: white;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Kartu */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg); /* 12px */
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Kartu Proyek (Rasio 3:4) */
.project-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-terracotta);
}

.project-card-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.project-card-content {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

/* Hero Section */
.hero-card {
  background: linear-gradient(135deg, #362924 0%, #4D3830 50%, #68483B 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.75rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(196, 105, 58, 0.35) 0%, rgba(196, 105, 58, 0) 70%);
  border-radius: 50%;
}

.hero-card h1 {
  color: #FAFAF7;
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.hero-card p {
  color: #E5E1D8;
  font-size: 1.15rem;
  max-width: 680px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background-color: white;
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-terracotta);
  box-shadow: 0 0 0 3px rgba(196, 105, 58, 0.15);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-terracotta { background: var(--accent-terracotta-light); color: var(--accent-terracotta); }
.badge-sage { background: var(--accent-sage-light); color: var(--accent-sage-dark); }
.badge-amber { background: #FEF3C7; color: #92400E; }
.badge-subtle { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border-color); }

/* Notice Banner */
.notice-box {
  background: var(--accent-terracotta-light);
  border: 1px solid #EBCFC1;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--accent-terracotta-dark);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: white;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 3.5rem;
  color: var(--accent-terracotta);
  margin-bottom: 1rem;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 1.5rem auto;
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 42, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  position: relative;
  animation: modalIn 200ms ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text-main);
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: var(--text-main);
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  border-left: 4px solid var(--accent-terracotta);
  animation: slideIn 200ms ease-out;
}

.toast.toast-success { border-left-color: var(--accent-sage); }
.toast.toast-error { border-left-color: var(--accent-rose); }

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

/* Pola Dasar Layout & Responsive */
.pola-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.pola-chips {
  display: none;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.pola-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  background: white;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.pola-chip:hover, .pola-chip.active {
  background: var(--accent-terracotta);
  color: white;
  border-color: var(--accent-terracotta);
  box-shadow: 0 2px 8px rgba(196, 105, 58, 0.3);
}

.pola-chip i {
  font-size: 0.85rem;
}

/* Footer */
.footer {
  background: white;
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  margin-top: auto;
  font-size: 0.875rem;
  color: var(--text-muted);
}

