/* ══════════════════════════════════════════════════════════════
   PONTO ELETRÔNICO — DOTPLAN
   Design System: Dark Premium + Glassmorphism
   ══════════════════════════════════════════════════════════════ */

/* ── Variáveis ── */
:root {
  --bg-base:       #05070f;
  --bg-surface:    #0a0d1a;
  --bg-elevated:   #0f1422;
  --glass-bg:      rgba(255,255,255,0.04);
  --glass-border:  rgba(255,255,255,0.08);
  --glass-hover:   rgba(255,255,255,0.07);

  --primary:       #818cf8;
  --primary-dark:  #6366f1;
  --secondary:     #38bdf8;
  --accent:        #a78bfa;

  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;

  --entrada-color: #10b981;
  --almoco-color:  #f59e0b;
  --retorno-color: #38bdf8;
  --saida-color:   #ef4444;

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;

  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:     0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:     0 20px 60px rgba(0,0,0,0.6);
  --shadow-glow:   0 0 40px rgba(129,140,248,0.15);

  --transition:    0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }

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

/* ══════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ══════════════════════════════════════════════════════════════ */

.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(99,102,241,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(56,189,248,0.1) 0%, transparent 60%),
    var(--bg-base);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(129,140,248,0.3);
  animation: float var(--dur, 8s) ease-in-out infinite var(--delay, 0s);
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.3; }
  33%       { transform: translateY(-30px) translateX(15px) scale(1.1); opacity: 0.6; }
  66%       { transform: translateY(20px) translateX(-10px) scale(0.9); opacity: 0.4; }
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}

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

.login-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.logo-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(129,140,248,0.2), rgba(56,189,248,0.2));
  border: 1px solid rgba(129,140,248,0.3);
  border-radius: 16px;
  flex-shrink: 0;
}

.login-brand h1 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #f1f5f9, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.login-company {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.login-divider {
  height: 1px;
  background: var(--glass-border);
  margin-bottom: 28px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
  text-align: center;
}

.btn-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: #5865F2;
  color: white;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(88,101,242,0.4);
  position: relative;
  overflow: hidden;
}

.btn-discord::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--transition);
}

.btn-discord:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(88,101,242,0.5); }
.btn-discord:hover::before { background: rgba(255,255,255,0.08); }
.btn-discord:active { transform: translateY(0); }

.login-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 13px;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════════ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(5,7,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab:hover { color: var(--text-primary); background: var(--glass-hover); }

.nav-tab.active {
  color: var(--primary);
  background: rgba(129,140,248,0.1);
  border: 1px solid rgba(129,140,248,0.2);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: var(--transition);
}

.btn-logout:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

/* ══════════════════════════════════════════════════════════════
   TAB: PONTO
   ══════════════════════════════════════════════════════════════ */

.ponto-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Clock */
.clock-card {
  text-align: center;
  padding: 40px 32px 36px;
  background: linear-gradient(135deg, rgba(129,140,248,0.08), rgba(56,189,248,0.06));
  border: 1px solid rgba(129,140,248,0.2);
  position: relative;
  overflow: hidden;
}

.clock-card::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(129,140,248,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.clock-time {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: clamp(52px, 10vw, 84px);
  font-weight: 600;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.clock-date {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 16px;
  text-transform: capitalize;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  letter-spacing: 0.02em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-dot.active   { background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse-dot 2s infinite; }
.status-dot.almoco   { background: var(--warning); box-shadow: 0 0 8px var(--warning); animation: pulse-dot 2s infinite; }
.status-dot.encerrado{ background: var(--danger); }
.status-dot.nao-util { background: var(--text-muted); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Punch Buttons */
.punch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.punch-btn {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
  min-height: 140px;
  transition: var(--transition);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
}

.punch-btn-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: var(--transition);
}

.punch-btn:not(:disabled):hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.punch-btn:not(:disabled):hover .punch-btn-bg { opacity: 1; }
.punch-btn:not(:disabled):active { transform: translateY(-1px); }

.punch-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.punch-btn.done {
  opacity: 0.6;
  cursor: default;
}

.punch-btn-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  height: 100%;
}

.punch-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

/* Button color variants */
#btn-entrada { border-color: rgba(16,185,129,0.2); }
#btn-entrada .punch-btn-bg { background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.04)); }
#btn-entrada .punch-icon-wrap { background: rgba(16,185,129,0.15); color: var(--entrada-color); }
#btn-entrada:not(:disabled):hover { border-color: rgba(16,185,129,0.4); box-shadow: 0 8px 32px rgba(16,185,129,0.15); }

#btn-saida-almoco { border-color: rgba(245,158,11,0.2); }
#btn-saida-almoco .punch-btn-bg { background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(245,158,11,0.04)); }
#btn-saida-almoco .punch-icon-wrap { background: rgba(245,158,11,0.15); color: var(--almoco-color); }
#btn-saida-almoco:not(:disabled):hover { border-color: rgba(245,158,11,0.4); box-shadow: 0 8px 32px rgba(245,158,11,0.15); }

#btn-retorno-almoco { border-color: rgba(56,189,248,0.2); }
#btn-retorno-almoco .punch-btn-bg { background: linear-gradient(135deg, rgba(56,189,248,0.08), rgba(56,189,248,0.04)); }
#btn-retorno-almoco .punch-icon-wrap { background: rgba(56,189,248,0.15); color: var(--retorno-color); }
#btn-retorno-almoco:not(:disabled):hover { border-color: rgba(56,189,248,0.4); box-shadow: 0 8px 32px rgba(56,189,248,0.15); }

#btn-saida { border-color: rgba(239,68,68,0.2); }
#btn-saida .punch-btn-bg { background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(239,68,68,0.04)); }
#btn-saida .punch-icon-wrap { background: rgba(239,68,68,0.15); color: var(--saida-color); }
#btn-saida:not(:disabled):hover { border-color: rgba(239,68,68,0.4); box-shadow: 0 8px 32px rgba(239,68,68,0.15); }

.punch-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.punch-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  min-height: 24px;
}

.punch-btn.done .punch-time { color: var(--text-primary); }

/* Summary Card */
.summary-card {
  padding: 28px;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.summary-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.summary-date {
  font-size: 13px;
  color: var(--text-muted);
}

.summary-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 80px;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid;
  background: var(--bg-base);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.entrada-dot  { border-color: var(--entrada-color); }
.almoco-dot   { border-color: var(--almoco-color); }
.retorno-dot  { border-color: var(--retorno-color); }
.saida-dot    { border-color: var(--saida-color); }

.timeline-dot.filled.entrada-dot  { background: var(--entrada-color); box-shadow: 0 0 8px rgba(16,185,129,0.5); }
.timeline-dot.filled.almoco-dot   { background: var(--almoco-color);  box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.timeline-dot.filled.retorno-dot  { background: var(--retorno-color); box-shadow: 0 0 8px rgba(56,189,248,0.5); }
.timeline-dot.filled.saida-dot    { background: var(--saida-color);   box-shadow: 0 0 8px rgba(239,68,68,0.5); }

.timeline-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tl-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}

.tl-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.tl-time.filled { color: var(--text-primary); }

.timeline-line {
  flex: 1;
  height: 2px;
  background: var(--glass-border);
  margin-top: -28px; /* align with dots */
  position: relative;
}

.hours-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.hours-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}

.hours-icon {
  font-size: 20px;
}

.hours-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.hours-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.hours-value.extra    { color: var(--success); }
.hours-value.devida   { color: var(--danger); }
.hours-value.warning  { color: var(--warning); }

.hours-divider {
  width: 1px;
  height: 48px;
  background: var(--glass-border);
}

/* Non-working day alert */
.nao-util-alert {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-lg);
}

.alert-icon { font-size: 28px; }
.alert-content { display: flex; flex-direction: column; gap: 4px; }
.alert-content strong { font-size: 15px; font-weight: 700; }
.alert-content span { font-size: 13px; color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════════
   TAB: HISTÓRICO
   ══════════════════════════════════════════════════════════════ */

.historico-container, .admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-badge {
  background: rgba(129,140,248,0.15);
  color: var(--primary);
  border: 1px solid rgba(129,140,248,0.3);
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.month-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 18px;
  transition: var(--transition);
}

.month-btn:hover { background: var(--glass-hover); }

.month-label {
  font-size: 15px;
  font-weight: 600;
  min-width: 140px;
  text-align: center;
}

.historico-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.hist-stat {
  padding: 20px 24px;
  border-right: 1px solid var(--glass-border);
}

.hist-stat:last-child { border-right: none; }
.hist-stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.hist-stat-value { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; }

.historico-table-wrap {
  padding: 0;
  overflow: hidden;
}

.historico-table {
  width: 100%;
  border-collapse: collapse;
}

.historico-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

.historico-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-family: 'JetBrains Mono', monospace;
}

.historico-table tbody tr:last-child td { border-bottom: none; }
.historico-table tbody tr:hover { background: var(--glass-hover); }

.historico-table td.day-name {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.day-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}

.day-status.ok      { background: rgba(16,185,129,0.1);  color: var(--success); }
.day-status.parcial { background: rgba(245,158,11,0.1);  color: var(--warning); }
.day-status.falta   { background: rgba(239,68,68,0.1);   color: var(--danger); }
.day-status.folga   { background: rgba(148,163,184,0.1); color: var(--text-muted); }
.day-status.ferias  { background: rgba(56,189,248,0.1);  color: var(--secondary); }

/* ══════════════════════════════════════════════════════════════
   ADMIN: USUÁRIOS
   ══════════════════════════════════════════════════════════════ */

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.user-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
}

.user-card:hover { border-color: rgba(129,140,248,0.3); box-shadow: var(--shadow-sm); }

.user-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  object-fit: cover;
}

.user-card-info { flex: 1; }
.user-card-name { font-size: 15px; font-weight: 700; }
.user-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.user-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-badge.admin { background: rgba(239,68,68,0.15); color: var(--danger); }
.user-badge.user  { background: rgba(129,140,248,0.15); color: var(--primary); }
.user-badge.inactive { background: rgba(148,163,184,0.1); color: var(--text-muted); }

.user-card-stats {
  display: flex;
  gap: 16px;
}

.user-stat { display: flex; flex-direction: column; gap: 2px; }
.user-stat-label { font-size: 11px; color: var(--text-muted); }
.user-stat-value { font-size: 14px; font-weight: 600; }

.user-card-actions {
  display: flex;
  gap: 8px;
}

/* ══════════════════════════════════════════════════════════════
   ADMIN: CALENDÁRIO
   ══════════════════════════════════════════════════════════════ */

.calendario-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.calendario-add { padding: 24px; }
.calendario-add h3 { margin-bottom: 20px; font-size: 16px; font-weight: 700; }

.calendario-list-wrap { padding: 24px; }
.cal-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.cal-list-header h3 { font-size: 16px; font-weight: 700; }

.month-nav.small { gap: 8px; }
.month-nav.small .month-btn { width: 28px; height: 28px; font-size: 16px; }
.month-nav.small .month-label { font-size: 13px; min-width: 110px; }

.nao-uteis-list { display: flex; flex-direction: column; gap: 8px; }

.nao-util-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nao-util-item:hover { background: var(--glass-hover); }
.nao-util-date { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.nao-util-tipo { font-size: 12px; }
.nao-util-desc { flex: 1; font-size: 13px; color: var(--text-secondary); }
.nao-util-del { color: var(--text-muted); transition: var(--transition); padding: 4px; border-radius: 4px; }
.nao-util-del:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

/* ══════════════════════════════════════════════════════════════
   ADMIN: RELATÓRIOS
   ══════════════════════════════════════════════════════════════ */

.relatorios-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.relatorio-send, .relatorio-log { padding: 28px; }
.relatorio-send h3, .relatorio-log h3 { margin-bottom: 12px; font-size: 16px; font-weight: 700; }
.card-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.6; }

.auto-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(56,189,248,0.06);
  border: 1px solid rgba(56,189,248,0.15);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}

.log-list { display: flex; flex-direction: column; gap: 8px; }

.log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.log-icon { font-size: 16px; }
.log-info { flex: 1; }
.log-title { font-weight: 600; }
.log-meta { font-size: 11px; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════ */

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(129,140,248,0.1); }
.form-input::placeholder { color: var(--text-muted); }

/* Fix date/time inputs in dark mode */
.form-input[type="date"], .form-input[type="time"] { color-scheme: dark; }
select.form-input option { background: var(--bg-elevated); color: var(--text-primary); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.form-input-sm { width: auto; }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
  cursor: pointer;
  border: none;
  width: 100%;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--glass-bg);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  cursor: pointer;
}

.btn-secondary:hover { background: var(--glass-hover); }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: var(--transition);
}
.btn-icon:hover { color: var(--primary); border-color: rgba(129,140,248,0.4); }
.btn-icon.danger:hover { color: var(--danger); border-color: rgba(239,68,68,0.4); }

/* Toggle */
.toggle-row { display: flex; align-items: center; }
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
}
.toggle-input { display: none; }
.toggle-switch {
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: var(--transition);
}
.toggle-input:checked + .toggle-switch { background: var(--success); }
.toggle-input:checked + .toggle-switch::after { left: 23px; }

/* Férias */
.ferias-section { margin-top: 8px; }
.ferias-section h4 { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.ferias-add-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ferias-separator { font-size: 12px; color: var(--text-muted); }
.ferias-list { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.ferias-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(56,189,248,0.06);
  border: 1px solid rgba(56,189,248,0.15);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.ferias-item-dates { font-family: 'JetBrains Mono', monospace; color: var(--secondary); }
.ferias-item-del { color: var(--text-muted); cursor: pointer; transition: var(--transition); padding: 2px 6px; border-radius: 4px; }
.ferias-item-del:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

.saldo-input-wrap { position: relative; }

/* Feedback */
.feedback-msg {
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}
.feedback-msg.success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.feedback-msg.error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }

/* ══════════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 { font-size: 18px; font-weight: 700; }

.modal-user-info { display: flex; align-items: center; gap: 12px; }
.modal-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--glass-border); }
.modal-user-role-label { font-size: 12px; color: var(--text-muted); }

.modal-close {
  color: var(--text-muted);
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); background: var(--glass-hover); }

.modal-body { padding: 24px 28px; }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 28px;
  border-top: 1px solid var(--glass-border);
}
.modal-footer .btn-primary, .modal-footer .btn-secondary { width: auto; }

/* ══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 500;
  max-width: 360px;
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.toast.removing { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn { from { opacity: 0; transform: translateX(20px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

.toast.success { border-color: rgba(16,185,129,0.3); }
.toast.error   { border-color: rgba(239,68,68,0.3); }
.toast.info    { border-color: rgba(129,140,248,0.3); }

.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-text { flex: 1; line-height: 1.4; }

/* ══════════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════════ */

.hidden { display: none !important; }
.loading { opacity: 0.5; pointer-events: none; }
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVO
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .navbar { padding: 10px 16px; }
  .nav-tabs .nav-tab span { display: none; }
  .user-info { display: none; }
  .nav-brand span { display: none; }

  .ponto-container { padding: 20px 16px; }
  .punch-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .punch-btn { min-height: 120px; }
  .punch-icon-wrap { width: 48px; height: 48px; }
  .clock-time { font-size: 52px; }

  .summary-timeline { gap: 8px; }
  .hours-strip { flex-direction: column; }
  .hours-divider { width: 100%; height: 1px; }
  .hours-item { width: 100%; }

  .calendario-layout { grid-template-columns: 1fr; }
  .relatorios-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .ferias-add-row { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .punch-grid { grid-template-columns: 1fr; }
  .month-nav { gap: 8px; }
  .month-label { min-width: 100px; font-size: 13px; }
}

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

/* ── Admin: Seletor de usuário no histórico ── */
.hist-user-selector {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  margin-bottom: 16px;
  border-left: 3px solid var(--primary);
}

.hist-user-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.hist-user-label svg {
  color: var(--primary);
  flex-shrink: 0;
}

.hist-user-select {
  flex: 1;
  max-width: 300px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

/* Badge de "visualizando como admin" na tabela de histórico */
.hist-viewing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

