/* =====================================================================
   Photo to QR — Design System
   Style: Glassmorphism | Palette: Teal / Modern | Font: Prompt
   ===================================================================== */

:root{
  --teal-50:#f0fdfa;  --teal-100:#ccfbf1; --teal-200:#99f6e4;
  --teal-300:#5eead4; --teal-400:#2dd4bf; --teal-500:#14b8a6;
  --teal-600:#0d9488; --teal-700:#0f766e; --teal-800:#115e59; --teal-900:#134e4a;

  --accent: var(--teal-600);
  --accent-light: var(--teal-400);

  --bg-gradient: linear-gradient(135deg,#e6fffa 0%,#ccfbf1 35%,#a7f3d0 70%,#5eead4 100%);
  --glass-bg: rgba(255,255,255,0.55);
  --glass-border: rgba(255,255,255,0.35);
  --glass-shadow: 0 8px 32px rgba(15,118,110,0.18);
  --text-main:#0f2f2c;
  --text-muted:#4b6b68;
  --sidebar-w: 260px;
  --sidebar-w-collapsed: 78px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --font-main: 'Prompt', sans-serif;
}

[data-theme="dark"]{
  --bg-gradient: linear-gradient(135deg,#031b1a 0%,#062b28 40%,#0a3a35 100%);
  --glass-bg: rgba(17,40,38,0.55);
  --glass-border: rgba(94,234,212,0.15);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.45);
  --text-main:#e6fffa;
  --text-muted:#9fd8d2;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font-main);
  background:var(--bg-gradient);
  background-attachment:fixed;
  color:var(--text-main);
  transition:background .4s ease,color .3s ease;
  min-height:100vh;
}

a{ color:inherit; text-decoration:none; }
::selection{ background:var(--teal-300); }

/* ---------- Glass Card ---------- */
.glass{
  background:var(--glass-bg);
  border:1px solid var(--glass-border);
  border-radius:var(--radius-lg);
  box-shadow:var(--glass-shadow);
  backdrop-filter:blur(18px) saturate(160%);
  -webkit-backdrop-filter:blur(18px) saturate(160%);
}
.glass-panel{ padding:24px; }

/* ---------- Layout ---------- */
.app-shell{ display:flex; min-height:100vh; }

.sidebar{
  width:var(--sidebar-w);
  flex-shrink:0;
  margin:16px 0 16px 16px;
  padding:20px 14px;
  display:flex; flex-direction:column; gap:6px;
  transition:width .25s ease, padding .25s ease;
  position:sticky; top:16px; height:calc(100vh - 32px);
  overflow-y:auto;
}
.sidebar.collapsed{ width:var(--sidebar-w-collapsed); padding:20px 10px; }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-section-title{ display:none; }

.brand{ display:flex; align-items:center; gap:10px; padding:6px 10px 20px; font-weight:700; font-size:1.15rem; }
.brand-logo{ width:34px; height:34px; border-radius:10px; background:linear-gradient(135deg,var(--teal-400),var(--teal-700)); display:flex; align-items:center; justify-content:center; color:#fff; font-size:1.1rem; flex-shrink:0; }

.sidebar-section-title{ font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); margin:14px 10px 6px; }

.nav-item{
  display:flex; align-items:center; gap:12px;
  padding:11px 12px; border-radius:var(--radius-md);
  color:var(--text-main); font-size:.92rem; font-weight:500;
  cursor:pointer; transition:background .2s, color .2s;
}
.nav-item:hover{ background:rgba(13,148,136,0.12); }
.nav-item.active{ background:linear-gradient(135deg,var(--teal-500),var(--teal-700)); color:#fff; box-shadow:0 4px 14px rgba(13,148,136,0.35); }
.nav-item .icon{ width:20px; text-align:center; flex-shrink:0; }

.main-area{ flex:1; min-width:0; padding:16px 16px 40px; }

/* ---------- Topbar ---------- */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 20px; margin-bottom:18px;
}
.topbar-left{ display:flex; align-items:center; gap:14px; }
.icon-btn{
  width:40px; height:40px; border-radius:var(--radius-sm);
  display:flex; align-items:center; justify-content:center;
  background:rgba(13,148,136,0.1); border:none; cursor:pointer; color:var(--text-main);
  font-size:1.05rem; transition:.2s;
}
.icon-btn:hover{ background:rgba(13,148,136,0.22); }

.breadcrumb{ display:flex; gap:6px; align-items:center; font-size:.85rem; color:var(--text-muted); }
.breadcrumb a:hover{ color:var(--accent); }

.topbar-right{ display:flex; align-items:center; gap:10px; position:relative; }

.avatar{ width:40px; height:40px; border-radius:50%; object-fit:cover; border:2px solid var(--teal-400); cursor:pointer; }
.avatar-fallback{ width:40px; height:40px; border-radius:50%; background:linear-gradient(135deg,var(--teal-400),var(--teal-700)); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:600; cursor:pointer; }

.dropdown-menu{
  position:absolute; top:52px; right:0; min-width:220px; z-index:50;
  padding:10px; display:none;
}
.dropdown-menu.show{ display:block; }
.dropdown-item{ padding:10px 12px; border-radius:var(--radius-sm); font-size:.88rem; cursor:pointer; display:flex; align-items:center; gap:10px; }
.dropdown-item:hover{ background:rgba(13,148,136,0.12); }

.badge-dot{ position:absolute; top:-2px; right:-2px; width:9px; height:9px; border-radius:50%; background:#f43f5e; border:2px solid var(--glass-bg); }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 18px; border-radius:var(--radius-sm);
  font-family:var(--font-main); font-size:.88rem; font-weight:600;
  border:none; cursor:pointer; transition:.2s transform,.2s box-shadow,.2s background;
}
.btn:active{ transform:scale(.97); }
.btn-primary{ background:linear-gradient(135deg,var(--teal-500),var(--teal-700)); color:#fff; box-shadow:0 4px 14px rgba(13,148,136,0.35); }
.btn-primary:hover{ box-shadow:0 6px 20px rgba(13,148,136,0.5); }
.btn-outline{ background:transparent; border:1.5px solid var(--teal-500); color:var(--teal-700); }
[data-theme="dark"] .btn-outline{ color:var(--teal-200); }
.btn-ghost{ background:rgba(13,148,136,0.1); color:var(--text-main); }
.btn-danger{ background:linear-gradient(135deg,#f87171,#dc2626); color:#fff; }
.btn-sm{ padding:6px 12px; font-size:.78rem; }
.btn-block{ width:100%; justify-content:center; }

/* ---------- Forms ---------- */
label{ font-size:.82rem; font-weight:600; color:var(--text-muted); display:block; margin-bottom:6px; }
.form-group{ margin-bottom:16px; }
input[type=text],input[type=email],input[type=password],input[type=date],input[type=datetime-local],
input[type=number],input[type=tel],input[type=search],select,textarea{
  width:100%; padding:11px 14px; border-radius:var(--radius-sm);
  border:1.5px solid rgba(13,148,136,0.25); background:rgba(255,255,255,0.6);
  font-family:var(--font-main); font-size:.9rem; color:var(--text-main);
  transition:.2s border-color, .2s box-shadow;
}
[data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea{ background:rgba(255,255,255,0.06); color:var(--text-main); }
input:focus,select:focus,textarea:focus{ outline:none; border-color:var(--teal-500); box-shadow:0 0 0 3px rgba(13,148,136,0.18); }

/* ---------- Table ---------- */
table{ width:100%; border-collapse:collapse; font-size:.87rem; }
thead th{ text-align:left; padding:12px 14px; color:var(--text-muted); font-weight:600; font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; border-bottom:1.5px solid rgba(13,148,136,0.18); }
tbody td{ padding:13px 14px; border-bottom:1px solid rgba(13,148,136,0.1); }
tbody tr:hover{ background:rgba(13,148,136,0.06); }

.status-pill{ padding:4px 12px; border-radius:100px; font-size:.72rem; font-weight:700; }
.status-active{ background:rgba(16,185,129,0.15); color:#059669; }
.status-draft{ background:rgba(148,163,184,0.2); color:#64748b; }
.status-closed{ background:rgba(239,68,68,0.15); color:#dc2626; }

/* ---------- Stat Cards ---------- */
.stat-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:16px; margin-bottom:20px; }
.stat-card{ padding:20px; display:flex; flex-direction:column; gap:6px; }
.stat-card .stat-icon{ width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,var(--teal-400),var(--teal-700)); color:#fff; font-size:1.2rem; margin-bottom:6px; }
.stat-value{ font-size:1.7rem; font-weight:700; }
.stat-label{ font-size:.8rem; color:var(--text-muted); }

/* ---------- Gallery / Guest View ---------- */
.gallery-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; }
.gallery-item{ position:relative; border-radius:var(--radius-md); overflow:hidden; aspect-ratio:1/1; cursor:pointer; }
.gallery-item img{ width:100%; height:100%; object-fit:cover; transition:.3s transform; }
.gallery-item:hover img{ transform:scale(1.06); }

.qr-box{ display:flex; flex-direction:column; align-items:center; gap:14px; padding:28px; text-align:center; }
.qr-box img{ border-radius:var(--radius-md); border:6px solid #fff; box-shadow:0 6px 24px rgba(0,0,0,0.15); }

/* ---------- Login pages ---------- */
.auth-wrapper{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; }
.auth-card{ width:100%; max-width:420px; padding:40px 34px; }
.oauth-btn{ display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:11px; border-radius:var(--radius-sm); font-weight:600; font-size:.86rem; border:1.5px solid rgba(0,0,0,0.08); background:rgba(255,255,255,0.7); cursor:pointer; margin-bottom:10px; transition:.2s; }
.oauth-btn:hover{ background:#fff; box-shadow:0 4px 14px rgba(0,0,0,0.08); }
.divider{ display:flex; align-items:center; gap:10px; color:var(--text-muted); font-size:.8rem; margin:18px 0; }
.divider::before,.divider::after{ content:''; flex:1; height:1px; background:rgba(13,148,136,0.2); }

/* ---------- Utility ---------- */
.flex{ display:flex; } .items-center{ align-items:center; } .justify-between{ justify-content:space-between; }
.gap-2{ gap:8px; } .gap-3{ gap:12px; } .gap-4{ gap:16px; }
.mb-2{ margin-bottom:8px; } .mb-3{ margin-bottom:12px; } .mb-4{ margin-bottom:16px; }
.text-muted{ color:var(--text-muted); } .text-sm{ font-size:.85rem; } .fw-bold{ font-weight:700; }
.w-full{ width:100%; }
.alert{ padding:13px 16px; border-radius:var(--radius-sm); font-size:.86rem; margin-bottom:16px; }
.alert-success{ background:rgba(16,185,129,0.14); color:#047857; }
.alert-error{ background:rgba(239,68,68,0.14); color:#b91c1c; }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .sidebar{ position:fixed; left:-280px; z-index:200; margin:0; top:0; height:100vh; border-radius:0; transition:left .3s ease; }
  .sidebar.mobile-open{ left:0; }
  .main-area{ padding:12px; }
  .stat-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 560px){
  .stat-grid{ grid-template-columns:1fr; }
  .auth-card{ padding:28px 20px; }
}

/* ---------- Print ---------- */
@media print{
  .sidebar,.topbar,.no-print{ display:none !important; }
  body{ background:#fff; }
  .glass{ box-shadow:none; border:1px solid #ddd; backdrop-filter:none; background:#fff; }
}
