/* ==========================================================================
   STYLE LINK AL-ISLAM - CLEAN MODERN UI (LIGHT FIRST)
   ========================================================================== */

:root {
  --color-primary: #059669;       /* Modern Emerald 600 */
  --color-primary-dark: #065f46;  /* Emerald 800 */
  --color-primary-light: #ecfdf5; /* Emerald 50 */
  --color-amber: #d97706;         /* Islamic Gold / Amber */
  --color-amber-light: #fffbeb;   /* Amber 50 */
  --bg-main: #f8fafc;             /* Slate 50 clean background */
}

/* Light Modern Clean Canvas Background */
body {
  background-color: var(--bg-main);
  color: #1e293b; /* Slate 800 */
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ultra-subtle Micro-dot Grid Pattern (Clean SaaS / Apple aesthetic) */
.clean-pattern-overlay {
  background-image: radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  opacity: 0.45;
}

/* Dark Mode Theme Classes */
body.dark-mode {
  --bg-main: #0f172a;
  background-color: #0f172a;
  color: #f1f5f9;
}

body.dark-mode .clean-pattern-overlay {
  background-image: radial-gradient(#334155 1.2px, transparent 1.2px);
  opacity: 0.35;
}

body.dark-mode .clean-card {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-mode .clean-card:hover {
  border-color: #10b981;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

body.dark-mode .bg-white {
  background-color: #1e293b !important;
}

body.dark-mode .bg-slate-50 {
  background-color: #0f172a !important;
}

body.dark-mode .bg-slate-100 {
  background-color: #1e293b !important;
}

body.dark-mode .text-slate-900 {
  color: #f8fafc !important;
}

body.dark-mode .text-slate-800 {
  color: #e2e8f0 !important;
}

body.dark-mode .text-slate-700 {
  color: #cbd5e1 !important;
}

body.dark-mode .text-slate-600 {
  color: #94a3b8 !important;
}

body.dark-mode .border-slate-200 {
  border-color: #334155 !important;
}

body.dark-mode .border-slate-100 {
  border-color: #1e293b !important;
}

/* Aksesibilitas Font Besar (Ramah Wali Santri Sepuh / Lansia) */
body.font-mode-large {
  font-size: 112%;
}

body.font-mode-large .text-xs {
  font-size: 0.85rem;
}

body.font-mode-large .text-sm {
  font-size: 1rem;
}

body.font-mode-large .text-base {
  font-size: 1.15rem;
}

/* Clean UI Card Style */
.clean-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.clean-card:hover {
  border-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -3px rgba(16, 185, 129, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

/* Highlighted Clean Card */
.clean-card-highlight {
  background-color: #ffffff;
  border: 2px solid #10b981;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.15);
  position: relative;
}

.clean-card-highlight:hover {
  border-color: #059669;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -4px rgba(16, 185, 129, 0.22);
}

/* Subtle Shimmer Effect for Highlight Badge */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.shimmer-badge {
  position: relative;
  overflow: hidden;
}

.shimmer-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: skewX(-20deg);
  animation: shimmer 3s infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Arabic Calligraphy Font Rendering */
.font-arabic {
  font-family: 'Amiri', 'Scheherazade New', serif;
}

/* Toggle Switch Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: #10b981;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Toast Floating Notification */
#toast {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#toast.hide {
  opacity: 0;
  transform: translate(-50%, 25px);
  pointer-events: none;
}

/* Form Inputs in Admin Panel */
.form-input-clean {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #1e293b;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
}

.form-input-clean:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Tab Admin Navigation */
.admin-tab-btn {
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
}

.admin-tab-btn.active {
  background-color: #059669;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.admin-tab-btn:not(.active) {
  background-color: #f1f5f9;
  color: #64748b;
}

.admin-tab-btn:not(.active):hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* Category Grouping Header */
.category-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  border-radius: 0.875rem;
  background-color: rgba(241, 245, 249, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

body.dark-mode .category-group-header {
  background-color: rgba(30, 41, 59, 0.7);
  border-color: rgba(51, 65, 85, 0.8);
}

/* Visual Icon Picker */
.icon-picker-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.6875rem;
  color: #475569;
}

.icon-picker-btn:hover {
  border-color: #10b981;
  background-color: #ecfdf5;
  color: #065f46;
  transform: translateY(-1px);
}

.icon-picker-btn.active {
  border-color: #059669;
  background-color: #ecfdf5;
  color: #047857;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Upload Preview Thumbnail Box */
.upload-preview-box {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  border: 2px dashed #cbd5e1;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: all 0.2s ease;
}

.upload-preview-box:hover {
  border-color: #10b981;
}
