@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #c62828;
  --primary-glow: rgba(198, 40, 40, 0.15);
  --primary-grad: linear-gradient(135deg, #e52d27 0%, #b31217 100%);
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --border-color: #e2e8f0;
  
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  
  --info: #3b82f6;
  --info-bg: #eff6ff;
  --info-text: #1e40af;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  padding-top: 70px;
}

@media (max-width: 992px) {
  body {
    padding-top: 0;
  }
}

/* ==========================================================================
   Header and Navigation Style (Single-line Navbar layout)
   ========================================================================== */
header {
  background: var(--primary-grad);
  color: var(--text-light);
  height: 70px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-shadow: var(--shadow-md);
  overflow: visible;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  padding: 0 24px;
  z-index: 1000;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

header .logo-container {
  display: flex;
  align-items: center;
  margin: 0;
}

header .logo-container img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  display: block;
}

header .logo-container img:hover {
  transform: scale(1.08) rotate(5deg);
}

header h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
  display: inline-block;
  width: auto;
  max-width: none;
  white-space: nowrap;
}

header h1:first-of-type {
  margin-left: 12px;
}

header h1:last-of-type {
  margin-left: 6px;
  color: #fca5a5;
}

/* Nav Menu */
nav {
  background: transparent;
  padding: 0;
  box-shadow: none;
  border-bottom: none;
  position: fixed;
  top: 0;
  right: 210px; /* sit nicely beside profile button */
  height: 70px;
  z-index: 1001;
  display: flex;
  align-items: center;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  width: auto;
  padding: 0;
  margin: 0;
}

nav li {
  margin: 0;
}

nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 14px;
  display: block;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm);
  position: relative;
}

nav a::after {
  display: none;
}

nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

nav li.active a, nav ul li.active a {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 992px) {
  header {
    height: auto;
    min-height: 60px;
    flex-direction: column;
    padding: 15px 10px;
    position: static;
    gap: 8px;
  }
  header h1 {
    font-size: 16px;
  }
  header .logo-container img {
    width: 38px;
    height: 38px;
  }
  nav {
    position: static;
    height: auto;
    width: 100%;
    justify-content: center;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
  }
  nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
  }
  nav a {
    color: var(--text-dark);
    padding: 8px 12px;
    font-size: 13px;
  }
  nav a:hover {
    background: var(--bg-main);
    color: var(--primary);
  }
  nav li.active a, nav ul li.active a {
    color: var(--primary) !important;
    background: var(--primary-glow);
  }
  .logout-button {
    position: absolute;
    top: 12px;
    right: 15px;
  }
}

/* User pill & dropdown */
.logout-button {
  position: fixed;
  top: 15px;
  right: 24px;
  z-index: 1002;
}

@media (max-width: 992px) {
  .logout-button {
    position: absolute;
    top: 12px;
    right: 15px;
  }
  .user-dropdown {
    top: 45px !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
  }
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.user-pill:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.user-pill img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.user-pill .user-name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: 48px;
  right: 0;
  width: 280px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
  z-index: 1200;
  animation: slideDown 0.3s ease;
}

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

.user-dropdown-header {
  padding: 16px;
  background: #f8fafc;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.user-dropdown-header img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-color);
}

.user-meta-name {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 14.5px;
}

.user-meta-email {
  font-size: 12px;
  color: var(--text-muted);
}

.user-dropdown-body {
  padding: 16px;
}

.user-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.user-row:last-child {
  border-bottom: none;
}

.user-row strong {
  color: var(--text-muted);
}

.user-row span {
  color: var(--text-dark);
  font-weight: 600;
}

.logout-action {
  display: block;
  background: var(--primary-grad);
  color: var(--text-light);
  font-weight: 700;
  font-size: 13px;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  margin: 0 16px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.logout-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}


/* ==========================================================================
   Page & Section Style
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
  text-align: center;
  position: relative;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 40px;
}


/* ==========================================================================
   Cards & Layouts
   ========================================================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 30px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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


/* ==========================================================================
   Bahan Baku Cards Grid
   ========================================================================== */
.image-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.image-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.image-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(198, 40, 40, 0.2);
}

.image-box img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-box:hover img {
  transform: scale(1.04);
}

.image-box-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.image-box h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.image-box .price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

.image-box .stok {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.image-box .stok strong {
  color: var(--text-dark);
}


/* ==========================================================================
   Tables & Data Grid
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}

th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 20px;
  border-bottom: 2px solid var(--border-color);
}

td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14.5px;
  color: var(--text-dark);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #f8fafc;
}


/* ==========================================================================
   Badges and Status
   ========================================================================== */
.badge-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-status.belum, .badge-status.menunggu {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.badge-status.menunggu {
  background: var(--info-bg);
  color: var(--info-text);
}

.badge-status.lunas, .badge-status.diterima {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge-status.ditolak, .badge-status.menolak {
  background: var(--danger-bg);
  color: var(--danger-text);
}


/* ==========================================================================
   Forms and Inputs
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: var(--text-dark);
  font-family: inherit;
  font-size: 14.5px;
  transition: all 0.2s ease;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

input[readonly] {
  background: #f1f5f9;
  color: var(--text-muted);
  cursor: not-allowed;
}

input[type="file"] {
  width: 100%;
  padding: 12px;
  background: #ffffff;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="file"]:hover {
  border-color: var(--primary);
  background: #fafafa;
}


/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14.5px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  box-shadow: var(--shadow-sm);
  gap: 8px;
}

.btn-primary, button[type="submit"] {
  background: var(--primary-grad);
  color: var(--text-light);
}

.btn-primary:hover, button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text-dark);
}

.btn-secondary:hover {
  background: #cbd5e1;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-glow);
}


/* ==========================================================================
   Notifications and Notes
   ========================================================================== */
.note {
  margin: 20px 0;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.note.info {
  background: var(--info-bg);
  border-left: 4px solid var(--info);
  color: var(--info-text);
}

.note.ok {
  background: var(--success-bg);
  border-left: 4px solid var(--success);
  color: var(--success-text);
}

.note.bad {
  background: var(--danger-bg);
  border-left: 4px solid var(--danger);
  color: var(--danger-text);
}


/* ==========================================================================
   Timer / Countdown Float
   ========================================================================== */
.timer-wrap {
  display: flex;
  justify-content: center;
  margin: 10px 0 20px 0;
}

.timer-float {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--border-color);
}

.timer-float.ok {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success-text);
}

.timer-float.expired {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger-text);
}


/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: transparent;
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  margin-top: 60px;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.footer p {
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.85;
}


/* ==========================================================================
   Floating Help Button
   ========================================================================== */
.help-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary-grad);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-btn:hover {
  transform: scale(1.1) rotate(-10deg);
  box-shadow: 0 10px 20px rgba(198, 40, 40, 0.4);
}

.help-popup {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 30px;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  width: 300px;
  z-index: 1000;
  border: 1px solid var(--border-color);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

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

.help-popup-header {
  background: var(--primary-grad);
  color: #fff;
  padding: 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.help-popup-content {
  padding: 20px;
  color: var(--text-dark);
}

.help-popup-content p {
  font-size: 14px;
  margin-bottom: 15px;
}

.help-popup-content a {
  display: block;
  background-color: #f1f5f9;
  color: var(--text-dark);
  text-decoration: none;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.help-popup-content a:hover {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================================================
   React Bits Style Micro-Animations and Utilities
   ========================================================================== */

/* 1. Grid Background Pattern */
.grid-background {
  background-color: var(--bg-main);
  background-image: 
    linear-gradient(to right, rgba(198, 40, 40, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(198, 40, 40, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* 2. Shiny Text (Gradient Shine Animation) */
.shiny-text {
  background: linear-gradient(
    120deg,
    #b31217 30%,
    #ef4444 50%,
    #b31217 70%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shineText 4s linear infinite;
  display: inline-block;
}

@keyframes shineText {
  to {
    background-position: 200% center;
  }
}

/* 3. Spotlight Card / Glow on Hover */
.glow-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(198, 40, 40, 0.3), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(198, 40, 40, 0.1), 0 10px 10px -5px rgba(198, 40, 40, 0.04);
  border-color: rgba(198, 40, 40, 0.3);
}

.glow-card:hover::after {
  opacity: 1;
}

/* 4. Float Animation */
.float-element {
  animation: floatAnim 3s ease-in-out infinite alternate;
}

@keyframes floatAnim {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-10px); }
}

/* 5. Magnet Hover Effect for Buttons */
.magnet-btn {
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}
.magnet-btn:hover {
  transform: scale(1.03);
}

