/* ============================================================
   WorkCenter · Estilos personalizados
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --bg-dark:        #0b0e1c;
  --bg-darker:      #080a14;
  --blue-deep:      #1a2660;
  --blue-mid:       #1e3080;
  --blue-glow:      #3358d4;
  --accent:         #93b4f7;
  --accent-light:   #c0d4ff;
  --emerald:        #10b981;
  --emerald-dark:   #065f46;
  --glass-bg:       rgba(255,255,255,0.05);
  --glass-border:   rgba(255,255,255,0.10);
  --glass-hover-bg: rgba(255,255,255,0.09);
  --glass-hover-b:  rgba(255,255,255,0.25);
}

/* ---------- Reset base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; font-family: 'Inter', system-ui, -apple-system, sans-serif; }

/* ---------- Backgrounds ---------- */
.bg-kiosk {
  background:
    radial-gradient(ellipse at 15% 0%,   rgba(26,38,96,0.85)  0%, transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(30,48,128,0.75) 0%, transparent 55%),
    linear-gradient(180deg, #0e1020 0%, #080c18 100%);
}

.bg-welcome {
  background:
    radial-gradient(ellipse at 20% 10%,  rgba(32,50,120,0.90) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 90%,  rgba(40,65,160,0.80) 0%, transparent 55%),
    linear-gradient(160deg, #0f1124 0%, #090c1a 100%);
}

.bg-gradient-hero {
  background: linear-gradient(135deg, #1e3fa8 0%, #1530c0 50%, #1020a0 100%);
}

/* ---------- Glassmorphism ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
}

.glass-light {
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.80);
}

/* ---------- Text gradients ---------- */
.text-gradient {
  background: linear-gradient(90deg, #fff 0%, #fff 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-bold {
  background: linear-gradient(90deg, #fff 0%, #d0e0ff 50%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent { color: var(--accent); }

/* ---------- Shadows ---------- */
.shadow-card    { box-shadow: 0 4px 20px rgba(0,0,0,0.10); }
.shadow-elegant { box-shadow: 0 24px 64px -12px rgba(0,0,0,0.35); }
.shadow-glow    { box-shadow: 0 0 32px rgba(51,88,212,0.45); }

/* ---------- Professional card ---------- */
.prof-card {
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease,
              background 0.3s ease, box-shadow 0.3s ease;
}
.prof-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-hover-b) !important;
  background: var(--glass-hover-bg) !important;
  box-shadow: 0 30px 64px -20px rgba(0,0,0,0.65);
}
.prof-card:active { transform: scale(0.985); }

.prof-card .top-line {
  display: none;
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
}
.prof-card:hover .top-line { display: block; }

/* ---------- Selects (dark theme) ---------- */
.dark-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: white;
  border-radius: 1rem;
  padding: 14px 40px 14px 16px;
  font-size: 0.9rem;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.dark-select:hover  { border-color: rgba(255,255,255,0.25); background-color: rgba(255,255,255,0.08); }
.dark-select:focus  { outline: none; border-color: rgba(255,255,255,0.35); }
.dark-select option { background: #1a1f3a; color: white; }

/* ---------- Search input ---------- */
.search-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06);
  padding: 14px 20px;
  transition: border-color 0.2s, background 0.2s;
}
.search-wrapper:focus-within {
  border-color: rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.10);
}
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: white;
  font-size: 1.1rem;
}
.search-input::placeholder { color: rgba(255,255,255,0.35); }

/* ---------- Buttons ---------- */
.btn-ghost {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.10); color: white; }

.btn-clear-search {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.75);
  transition: background 0.2s;
  flex-shrink: 0;
}
.btn-clear-search:hover { background: rgba(255,255,255,0.22); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-box {
  background: #f8faff;
  border-radius: 1.75rem;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px -16px rgba(0,0,0,0.50);
  position: relative;
}
.modal-header {
  background: linear-gradient(135deg, #1e3fa8, #1020a0);
  padding: 2rem;
  color: white;
  border-radius: 1.75rem 1.75rem 0 0;
}
.modal-body  { padding: 1.5rem; }
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: white;
  transition: background 0.2s, transform 0.15s;
}
.modal-close:hover { background: rgba(255,255,255,0.28); }
.modal-close:active { transform: scale(0.93); }

.info-card {
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.info-card-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.info-row label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  display: block;
}
.info-row span {
  font-size: 0.95rem;
  font-weight: 500;
  color: #111827;
}

/* ---------- WhatsApp QR ---------- */
.qr-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 1rem;
  padding: 1.25rem;
}
.qr-box {
  background: white;
  border-radius: 0.75rem;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

/* ---------- Avatar (initials) ---------- */
.avatar-initials {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3358d4, #1a2660);
  color: white;
  font-weight: 700;
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  ring: 1px solid rgba(255,255,255,0.2);
}

/* ---------- Stat pills ---------- */
.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 10px 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.stat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.9);
  flex-shrink: 0;
}
.stat-val   { font-size: 1.2rem; font-weight: 600; color: white; line-height: 1; }
.stat-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.55); }

/* ---------- Tag pill (welcome screen) ---------- */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 9999px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

/* ---------- Empty state ---------- */
.empty-state {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 3.5rem 2rem;
  text-align: center;
  backdrop-filter: blur(14px);
}
.empty-icon {
  width: 76px; height: 76px;
  border-radius: 1.25rem;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  margin: 0 auto 1.5rem;
  color: white;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.20); border-radius: 3px; }

/* ---------- Admin panel ---------- */
.admin-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef2ff 0%, #e8f0fe 50%, #f0f4ff 100%);
}
.admin-glass {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.90);
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: #f1f5f9;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  font-weight: 600;
}
.admin-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; color: #1e293b; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #f8faff; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 9999px; font-size: 0.72rem; font-weight: 600; }
.badge-active   { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }

.btn-primary {
  background: linear-gradient(135deg, #1e3fa8, #1530c0);
  color: white;
  border: none;
  border-radius: 9999px;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover   { opacity: 0.88; }
.btn-primary:active  { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: white;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.btn-secondary:hover { background: #f8faff; }

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-danger:hover { background: #fecaca; }

.btn-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.btn-icon-edit   { background: #eff6ff; color: #1d4ed8; }
.btn-icon-edit:hover   { background: #dbeafe; }
.btn-icon-del    { background: #fff1f2; color: #e11d48; }
.btn-icon-del:hover    { background: #ffe4e6; }
.btn-icon-toggle { background: #f0fdf4; color: #15803d; }
.btn-icon-toggle:hover { background: #dcfce7; }
.btn-icon-toggle.off   { background: #fafafa; color: #9ca3af; }
.btn-icon-toggle.off:hover { background: #f3f4f6; }

/* Admin modal */
.admin-modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.40);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.admin-modal {
  background: white;
  border-radius: 1.25rem;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.20);
}
.admin-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}
.admin-modal-header h3 { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin: 0; }
.admin-modal-body   { padding: 1.5rem; }
.admin-modal-footer { padding: 1rem 1.5rem; border-top: 1px solid #f1f5f9; display: flex; justify-content: flex-end; gap: 10px; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #64748b; margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid #e2e8f0; font-size: 0.9rem; color: #0f172a;
  background: white; transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.form-control:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-col-2  { grid-column: 1 / -1; }

/* Tabs (admin) */
.tab-list {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.70);
  border-radius: 9999px;
  padding: 4px;
  width: fit-content;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.tab-btn {
  padding: 8px 22px; border-radius: 9999px; border: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 500; color: #64748b;
  background: transparent; transition: all 0.2s;
}
.tab-btn.active { background: white; color: #0f172a; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,0.10); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Live indicator */
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px 2px rgba(52,211,153,0.7);
  display: inline-block;
  flex-shrink: 0;
}

/* Toast */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px; border-radius: 12px; color: white; font-size: 0.875rem; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.20); animation: toast-in 0.3s ease;
  display: flex; align-items: center; gap: 8px; min-width: 280px;
}
.toast-success { background: #059669; }
.toast-error   { background: #dc2626; }
.toast-info    { background: #2563eb; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* Switch toggle */
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #d1d5db; border-radius: 9999px; transition: 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.20);
}
.toggle-switch input:checked + .toggle-slider { background: #22c55e; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ============================================================
   Keyframe animations
   ============================================================ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float-slow {
  0%,100% { transform: translateY(0px) rotate(0deg); }
  33%     { transform: translateY(-28px) rotate(3deg); }
  66%     { transform: translateY(-12px) rotate(-3deg); }
}
@keyframes float-slower {
  0%,100% { transform: translateY(0px) rotate(0deg); }
  50%     { transform: translateY(-20px) rotate(-2deg); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes spin-slower {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes particle-float {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-36px) scale(1.18); }
}
@keyframes beam-sweep {
  0%   { transform: translateX(-150%) rotate(12deg); }
  100% { transform: translateX(400%) rotate(12deg); }
}
@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: 0.65; }
  100% { transform: scale(1.45); opacity: 0; }
}
@keyframes bounce-y {
  0%,100% { transform: translateY(0); animation-timing-function: cubic-bezier(0.8,0,1,1); }
  50%     { transform: translateY(-8px); animation-timing-function: cubic-bezier(0,0,0.2,1); }
}

/* Animation utility classes */
.anim-fade-up      { animation: fade-up 0.5s ease both; }
.anim-float-slow   { animation: float-slow 18s ease-in-out infinite; }
.anim-float-slower { animation: float-slower 26s ease-in-out infinite; }
.anim-spin-slow    { animation: spin-slow 48s linear infinite; transform-origin: center; }
.anim-spin-slower  { animation: spin-slower 75s linear infinite; transform-origin: center; }
.anim-particle     { animation: particle-float var(--dur,15s) ease-in-out infinite; }
.anim-beam         { animation: beam-sweep 14s ease-in-out infinite; }
.anim-beam-slow    { animation: beam-sweep 20s ease-in-out infinite 4s; }
.anim-pulse-ring   { animation: pulse-ring 2.2s cubic-bezier(0.4,0,0.6,1) infinite; }
.anim-bounce       { animation: bounce-y 1.2s ease infinite; }

/* Photo avatar preview */
.photo-preview {
  width: 88px; height: 88px; border-radius: 1rem;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}
.photo-placeholder {
  width: 88px; height: 88px; border-radius: 1rem;
  background: #f1f5f9;
  display: grid; place-items: center;
  color: #94a3b8; font-size: 0.78rem;
  border: 2px dashed #cbd5e1;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .admin-table { font-size: 0.8rem; }
  .admin-table td, .admin-table th { padding: 8px 10px; }
}
