:root {
  --bg-dark: #0a0c10;
  --bg-surface: #121620;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --primary: #2ecc71;
  --primary-glow: rgba(46, 204, 113, 0.3);
  --secondary: #f1c40f;
  --warning: #e67e22;
  --danger: #e74c3c;
  --info: #3498db;
  --text-main: #ffffff;
  --text-muted: #9ba1b0;
  --border-color: rgba(255, 255, 255, 0.1);
  --font-main: 'Outfit', sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.admin-navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 800;
  font-size: 1.2rem;
}

.brand-text h1 {
  font-size: 1.2rem;
  font-weight: 700;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Containers */
.admin-container {
  max-width: 1300px;
  width: 96%;
  margin: 1.5rem auto;
  flex: 1;
}

/* Controls Bar */
.controls-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-control {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
}

select option {
  background-color: #1a1e29;
  color: #ffffff;
}

.filter-control:focus {
  border-color: var(--primary);
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: #27ae60;
  color: #000;
  box-shadow: 0 0 15px var(--primary-glow);
}

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

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}

.kpi-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
}

.kpi-subtitle {
  font-size: 0.75rem;
  margin-top: 6px;
  color: var(--text-muted);
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.tab-link {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-link:hover {
  color: white;
}

.tab-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Tables */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.data-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

/* Badges */
.badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.badge-success { background: rgba(46, 204, 113, 0.15); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.3); }
.badge-warning { background: rgba(241, 196, 15, 0.15); color: #f1c40f; border: 1px solid rgba(241, 196, 15, 0.3); }
.badge-danger { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border: 1px solid rgba(231, 76, 60, 0.3); }
.badge-info { background: rgba(52, 152, 219, 0.15); color: #3498db; border: 1px solid rgba(52, 152, 219, 0.3); }
.badge-muted { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

/* Modais */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: #151922;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.2rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.close-btn:hover {
  color: white;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
}

/* Impressão - Espelho de Ponto Limpo */
@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .admin-navbar,
  .controls-bar,
  .tabs-nav,
  .btn,
  .kpi-grid,
  .modal-backdrop,
  #tab-raw-logs,
  #tab-employees,
  #tab-settings,
  .tab-actions {
    display: none !important;
  }

  #tab-consolidation {
    display: block !important;
  }

  .admin-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .table-card {
    border: none !important;
    background: transparent !important;
  }

  .data-table {
    border: 1px solid #000 !important;
    font-size: 8.5pt !important;
    color: black !important;
  }

  .data-table th, .data-table td {
    border: 1px solid #333 !important;
    color: black !important;
    padding: 5px 8px !important;
  }

  .badge {
    border: none !important;
    background: transparent !important;
    color: black !important;
    padding: 0 !important;
  }

  .print-header {
    display: block !important;
    margin-bottom: 20px;
    text-align: center;
  }

  .print-signatures {
    display: flex !important;
    justify-content: space-around;
    margin-top: 60px;
    page-break-inside: avoid;
  }

  .sig-line {
    border-top: 1px solid black;
    width: 250px;
    text-align: center;
    padding-top: 5px;
    font-size: 9pt;
  }
}

.print-header, .print-signatures {
  display: none;
}
