/* LensShow — Custom CSS (Tema Light) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
  --primary: #2563eb; /* blue-600 */
  --primary-dark: #1d4ed8; /* blue-700 */
  --secondary: #3b82f6; /* blue-500 */
  --accent: #f59e0b;
  --dark: #0f172a;
  --glass: rgba(255,255,255,0.9);
  --glass-border: rgba(226,232,240,0.8);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: #334155; /* slate-700 */
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* ─── Glass Card ─────────────── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
}

/* ─── Gradient Text ──────────── */
.gradient-text {
  background: linear-gradient(90deg, var(--primary, #2563eb), var(--secondary, #3b82f6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Sidebar Nav ────────────── */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: #ffffff;
  border-right: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 1001;
  box-shadow: 4px 0 24px rgba(0,0,0,0.02);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav a span.w-5 {
  width: 1rem !important;
  font-size: 0.7rem;
}
.sidebar-logo {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  color: #64748b;
  text-decoration: none;
  font-size: 0.6rem;
  font-weight: 500;
  transition: all 0.2s;
  border-radius: 0.5rem;
  margin: 0.05rem 0.5rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: #eff6ff;
  color: #2563eb;
  transform: translateX(4px);
}

.sidebar-nav a.active {
  border-left: 3px solid #2563eb;
  color: #1d4ed8;
  background: #dbeafe;
}

.main-content {
  margin-left: 240px;
  min-height: 100vh;
  background: #f8fafc;
  transition: margin 0.3s ease;
}

/* ─── Public Header ──────────── */
.public-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.public-nav a {
  color: #64748b;
  text-decoration: none;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.public-nav a:hover { color: #2563eb; }
.public-nav a.active { color: #2563eb; background: #ffffff; border: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

/* ─── Cards ──────────────────── */
.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(37,99,235,0.1); }

/* ─── Btn Primary ────────────── */
.btn-primary {
  background: linear-gradient(90deg, var(--primary, #2563eb), var(--secondary, #3b82f6));
  color: white;
  border: none;
  padding: 0.625rem 1.5rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--primary, #2563eb) 25%, transparent);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 25px color-mix(in srgb, var(--primary, #2563eb) 40%, transparent); filter: brightness(1.1); color: white; }
.btn-primary:active { transform: translateY(0); filter: brightness(0.95); }

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 0.625rem 1.5rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-secondary:hover { background: #e2e8f0; border-color: #cbd5e1; }

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { background: #fee2e2; }

/* ─── Form Inputs ────────────── */
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  color: #0f172a;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'Inter', sans-serif;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  background: #ffffff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #2563eb) 15%, transparent);
}
.form-input::placeholder { color: #94a3b8; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: #475569; margin-bottom: 0.375rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ─── Status Badges ──────────── */
.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.badge-pending     { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.badge-sent        { background: #dbeafe; color: var(--primary, #2563eb); border: 1px solid #bfdbfe; }
.badge-completed   { background: #d1fae5; color: #059669; border: 1px solid #a7f3d0; }
.badge-canceled    { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.badge-scheduled   { background: #ede9fe; color: #7c3aed; border: 1px solid #ddd6fe; }

/* ─── Table ──────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.data-table td { padding: 0.875rem 1rem; font-size: 0.875rem; color: #334155; border-bottom: 1px solid #f1f5f9; }
.data-table tr:hover td { background: #f8fafc; }

/* ─── Hero Gradient ──────────── */
.hero-gradient {
  background: #ffffff;
  position: relative;
  overflow: hidden;
}
.hero-gradient::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary, #2563eb) 5%, transparent) 0%, transparent 70%);
  top: -200px; right: -100px;
  border-radius: 50%;
}
.hero-gradient::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, color-mix(in srgb, var(--secondary, #3b82f6) 4%, transparent) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  border-radius: 50%;
}

/* ─── Stat Cards ─────────────── */
.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: linear-gradient(90deg, var(--primary, #2563eb), var(--secondary, #3b82f6));
  opacity: 0.05;
  border-radius: 0 1rem 0 5rem;
}

/* ─── Animations ─────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeInUp 0.4s ease forwards; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px color-mix(in srgb, var(--primary, #2563eb) 15%, transparent); }
  50%       { box-shadow: 0 0 40px color-mix(in srgb, var(--primary, #2563eb) 30%, transparent); }
}
.pulse-glow { animation: pulse-glow 2s ease infinite; }

/* ─── Modal ──────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  border-radius: 1.5rem;
  padding: 2rem;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeInUp 0.3s ease;
}

/* ─── Scrollbar ──────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,0.6); }

/* ─── Toast ──────────────────── */
#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  animation: fadeInUp 0.3s ease;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.toast-success { background: #10b981; color: white; }
.toast-error   { background: #ef4444; color: white; }
.toast-info    { background: #3b82f6; color: white; }

/* ─── Responsive ─────────────── */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }
  .mobile-overlay.active { opacity: 1; visibility: visible; }
}

@media (max-width: 640px) {
  .main-content .p-8 { padding: 1.25rem; }
  .lg\:px-8 { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* ─── Permission Cards ───────── */
.perm-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
}
.perm-card:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}
.perm-card.checked {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-color: #3b82f6;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.15);
}
.perm-card:active {
  transform: scale(0.98);
}

.perm-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.perm-icon-box {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  transition: all 0.18s ease;
}
.perm-card:hover .perm-icon-box {
  background: #bfdbfe;
  color: #2563eb;
}
.perm-card.checked .perm-icon-box {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.perm-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.perm-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.2;
  transition: color 0.15s;
}
.perm-card:hover .perm-label { color: #1e40af; }
.perm-card.checked .perm-label { color: #1d4ed8; }

.perm-desc {
  font-size: 0.6875rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.perm-card:hover .perm-desc { color: #64748b; }
.perm-card.checked .perm-desc { color: #3b82f6; }

.perm-check-box {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 4px;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
  background: #ffffff;
}
.perm-card:hover .perm-check-box {
  border-color: #93c5fd;
  background: #eff6ff;
}
.perm-card.checked .perm-check-box {
  background: #2563eb;
  border-color: #2563eb;
}
.perm-check-icon {
  font-size: 0.5rem;
  color: #ffffff;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s ease;
}
.perm-card.checked .perm-check-icon {
  opacity: 1;
  transform: scale(1);
}

/* ─── Access Denied Page (403) ── */
.access-denied-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  padding: 2rem;
}
.access-denied-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  padding: 3rem 2.5rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.06);
  animation: fadeInUp 0.4s ease;
}
.access-denied-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: #dc2626;
}
.access-denied-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.access-denied-card p {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}
.access-denied-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── AI Improvements & Glass ── */
.glass-white {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.5);
}

.shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #f8fafc 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

.hover-lift {
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.hover-lift:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.ai-pulse {
  animation: ai-pulse 2s infinite;
}
@keyframes ai-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

@media (max-width: 768px) {
  .section-mobile-p-0 { padding: 1.5rem 1rem !important; }
  .grid-mobile-1 { grid-template-columns: 1fr !important; }
}
