.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

@media (max-width: 992px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green-primary), #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #052014;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--green-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Nav links */
.nav-menu {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-item.active {
  background: rgba(0, 230, 153, 0.12);
  color: var(--green-primary);
  border-left: 3px solid var(--green-primary);
}

.nav-badge {
  margin-left: auto;
  background: var(--red-primary);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 700;
}

/* Active Shift Bar */
.shift-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: auto;
}

.shift-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.shift-partner {
  font-weight: 700;
  color: var(--gold-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Main Content Area */
.admin-main {
  padding: 32px;
  overflow-y: auto;
  max-width: 1400px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--green-primary);
  font-weight: 600;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-primary);
  box-shadow: 0 0 12px var(--green-primary);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.kpi-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

.kpi-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 1.6rem;
  opacity: 0.25;
}

.kpi-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.kpi-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.kpi-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Operational Tables */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 12px 16px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.custom-table td {
  padding: 16px;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
}

/* ==========================================================
   LOCKSCREEN DOS SÓCIOS (AUTENTICAÇÃO)
   ========================================================== */
.lockscreen-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at top center, rgba(16, 24, 38, 0.98), rgba(7, 9, 14, 0.99));
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lockscreen-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lockscreen-card {
  background: rgba(18, 24, 38, 0.85);
  border: 1px solid rgba(0, 230, 153, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 230, 153, 0.1);
  border-radius: 20px;
  padding: 40px 32px;
  width: 90%;
  max-width: 420px;
  text-align: center;
  animation: lockFadeUp 0.35s ease-out;
}

@keyframes lockFadeUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lockscreen-logo {
  width: 64px;
  height: 64px;
  background: rgba(0, 230, 153, 0.12);
  border: 1px solid rgba(0, 230, 153, 0.3);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
  color: var(--green-primary);
  box-shadow: 0 0 20px rgba(0, 230, 153, 0.2);
}

.lockscreen-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 6px;
}

.lockscreen-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.lockscreen-input-group {
  position: relative;
  margin-bottom: 16px;
}

.lockscreen-input {
  width: 100%;
  padding: 14px 44px 14px 16px;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.lockscreen-input:focus {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(0, 230, 153, 0.2);
}

.lockscreen-toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
}

.lockscreen-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
}

.lockscreen-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lockscreen-footer {
  margin-top: 24px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
}

