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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #1a1a2e;
  color: #eee;
  min-height: 100vh;
}

/* Tela de Login */
.login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #0d1421 100%);
}

.login-box {
  background: linear-gradient(180deg, #16213e 0%, #1a1a2e 100%);
  padding: 40px;
  border-radius: 15px;
  border: 2px solid #FF6B00;
  text-align: center;
  min-width: 380px;
  box-shadow: 0 10px 40px rgba(255, 107, 0, 0.2), 0 0 60px rgba(255, 107, 0, 0.1);
}

.samu-logo {
  margin-bottom: 20px;
}

.star-of-life {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.5));
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.5)); }
  50% { filter: drop-shadow(0 0 20px rgba(255, 107, 0, 0.8)); }
}

.login-box h1 {
  color: #FF6B00;
  font-size: 2rem;
  margin-bottom: 5px;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.samu-subtitle {
  color: #FF6B00;
  font-size: 0.85rem;
  margin-bottom: 10px !important;
  letter-spacing: 1px;
  opacity: 0.8;
}

.login-box p {
  color: #888;
  margin-bottom: 25px;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-box input {
  padding: 15px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #0f0f23;
  color: #fff;
  font-size: 1rem;
  text-align: center;
  transition: all 0.3s;
}

.login-box input:focus {
  outline: none;
  border-color: #FF6B00;
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.login-box button {
  padding: 15px;
  background: linear-gradient(135deg, #FF6B00, #E55A00);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.login-box button:hover {
  background: linear-gradient(135deg, #FF8533, #FF6B00);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 107, 0, 0.4);
}

.login-error {
  color: #e74c3c;
  font-size: 0.9rem;
  min-height: 20px;
}

/* Header ajustes */
.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo {
  display: flex;
  align-items: center;
}

.star-of-life-small {
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 0 5px rgba(255, 107, 0, 0.5));
}

.header-title {
  display: flex;
  flex-direction: column;
}

.header-title h1 {
  color: #FF6B00 !important;
  font-size: 1.3rem !important;
  margin: 0 !important;
  letter-spacing: 2px;
}

.header-subtitle {
  color: #888;
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info {
  background: #0f0f23;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #aaa;
  border: 1px solid #333;
}

.user-info .user-name {
  color: #fff;
  font-weight: bold;
}

.user-info .user-role {
  color: #FF6B00;
  margin-left: 5px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.btn-logout {
  background: transparent;
  color: #888;
  border: 1px solid #444;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.btn-logout:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

.container {
  padding: 15px;
  max-width: 100%;
}

/* Header */
header {
  background: linear-gradient(135deg, #16213e, #1a1a2e);
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid #FF6B00;
  border-top: 3px solid #FF6B00;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.1);
}

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

header h1 {
  font-size: 1.8rem;
  color: #FF6B00;
  letter-spacing: 2px;
}

.month-selector {
  display: flex;
  align-items: center;
  gap: 15px;
}

.month-selector button {
  background: #FF6B00;
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.month-selector button:hover {
  background: #ff6b6b;
  transform: scale(1.1);
}

#currentMonth {
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
  min-width: 200px;
  text-align: center;
}

nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  background: transparent;
  color: #aaa;
  border: 1px solid #444;
  padding: 10px 25px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.nav-btn:hover {
  border-color: #FF6B00;
  color: #FF6B00;
}

.nav-btn.active {
  background: #FF6B00;
  color: white;
  border-color: #FF6B00;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* Top Bar da Escala */
.schedule-top-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  align-items: center;
  flex-wrap: wrap;
}

/* Filtro por Profissional */
.filter-professional {
  display: flex;
  align-items: center;
}

.filter-professional select {
  padding: 10px 15px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #0f0f23;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 200px;
}

.filter-professional select:focus {
  outline: none;
  border-color: #FF6B00;
}

/* Export Bar */
.export-bar {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-import {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-import:hover {
  background: linear-gradient(135deg, #2980b9, #3498db);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-import:disabled {
  background: #555;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-danger:disabled {
  background: #555;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-export {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-export:hover {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.btn-export:disabled {
  background: #555;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Painel de Furos - Card Compacto */
.holes-panel {
  position: relative;
  margin-left: auto;
}

.holes-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.holes-badge.ok {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
}

.holes-badge.alert {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}

.holes-badge:hover {
  transform: scale(1.05);
}

.holes-icon {
  font-size: 1rem;
}

.holes-count {
  white-space: nowrap;
}

.holes-arrow {
  font-size: 0.7rem;
  transition: transform 0.3s;
}

.holes-panel.expanded .holes-arrow {
  transform: rotate(180deg);
}

/* Card de detalhes expandido */
.holes-details {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: #16213e;
  border: 1px solid #e74c3c;
  border-radius: 12px;
  min-width: 320px;
  max-width: 400px;
  max-height: 350px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.holes-panel.expanded .holes-details {
  display: block;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.holes-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  font-weight: bold;
  font-size: 0.95rem;
}

.holes-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.holes-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.holes-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.holes-station {
  background: #0f0f23;
  color: #FF6B00;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 5px;
  margin-top: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.holes-station:first-child {
  margin-top: 0;
}

.hole-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  margin-left: 8px;
}

.hole-item.morning {
  background: rgba(243, 156, 18, 0.15);
  border-left: 3px solid #f39c12;
}

.hole-item.afternoon {
  background: rgba(231, 76, 60, 0.15);
  border-left: 3px solid #e74c3c;
}

.hole-item.night {
  background: rgba(142, 68, 173, 0.15);
  border-left: 3px solid #8e44ad;
}

.hole-date {
  font-weight: bold;
  color: #fff;
  min-width: 45px;
}

.hole-shift {
  color: #aaa;
  flex: 1;
}

.hole-missing {
  color: #e74c3c;
  font-weight: bold;
}

/* Blocos por Dia da Semana */
.weekday-block {
  background: #16213e;
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid #333;
}

.weekday-header {
  background: linear-gradient(135deg, #FF6B00, #E55A00);
  padding: 12px 20px;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.weekday-header.weekend {
  background: linear-gradient(135deg, #6c5ce7, #a55eea);
}

.weekday-grid {
  overflow-x: auto;
}

.weekday-grid table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.weekday-grid th,
.weekday-grid td {
  border: 1px solid #2a2a4a;
  padding: 6px 8px;
  text-align: center;
  font-size: 0.8rem;
}

/* Separadores entre turnos */
.weekday-grid th.shift-separator,
.weekday-grid td.shift-separator {
  border-left: 4px solid #0f0f23 !important;
}

/* Header do turno */
.weekday-grid thead tr:first-child th {
  background: #0f0f23;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 10px;
}

.weekday-grid thead tr:first-child th.shift-header-m {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #000;
}

.weekday-grid thead tr:first-child th.shift-header-t {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
}

.weekday-grid thead tr:first-child th.shift-header-n {
  background: linear-gradient(135deg, #8e44ad, #6c3483);
  color: #fff;
}

/* Linha das datas */
.weekday-grid thead tr:nth-child(2) th {
  background: #1a1a2e;
  color: #f39c12;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 8px 4px;
}

/* Coluna de postos */
.weekday-grid th.station-col {
  width: 140px;
  min-width: 140px;
  text-align: left;
  padding-left: 15px;
  background: #0f0f23;
}

.weekday-grid td.station-name {
  text-align: left;
  padding-left: 10px;
  padding-right: 5px;
  font-weight: bold;
  background: #0f0f23;
  color: #FF6B00;
  vertical-align: middle;
}

.station-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

.station-controls span {
  flex: 1;
  font-size: 0.75rem;
}

.slot-buttons {
  display: flex;
  gap: 2px;
}

.slot-btn {
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 0.9rem;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: #FF6B00;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.slot-btn:hover {
  background: #ff6b6b;
  transform: scale(1.1);
}

/* Linha de setor */
.weekday-grid tr.sector-row td {
  background: #FF6B00 !important;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 8px 15px !important;
  text-align: left;
}

/* Células de dados */
.weekday-grid td.data-cell {
  cursor: pointer;
  transition: all 0.2s;
  height: 35px;
  min-width: 55px;
  vertical-align: middle;
  font-size: 0.75rem;
  background: #16213e;
}

.weekday-grid td.data-cell:hover {
  background: #2a2a4a;
  transform: scale(1.02);
}

.weekday-grid td.data-cell.filled {
  font-weight: bold;
  color: #fff;
  filter: saturate(0.4) brightness(0.85);
}

.weekday-grid td.data-cell.filtered-out {
  opacity: 0.15;
  filter: saturate(0) brightness(0.5);
}

.weekday-grid td.data-cell.highlighted {
  box-shadow: inset 0 0 0 2px #fff;
  font-weight: bold;
  filter: saturate(0.6) brightness(1);
}

/* Painéis */
.panel {
  background: #16213e;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #333;
  border-left: 3px solid #FF6B00;
}

.panel h2 {
  color: #FF6B00;
  margin-bottom: 20px;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255, 107, 0, 0.3);
  padding-bottom: 10px;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.form-grid input,
.form-grid select {
  padding: 12px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #0f0f23;
  color: #fff;
  font-size: 0.95rem;
}

.form-grid input:focus,
.form-grid select:focus {
  outline: none;
  border-color: #FF6B00;
}

.form-grid input[type="color"] {
  padding: 5px;
  height: 45px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 10px;
}

button[type="submit"],
.panel button {
  background: #FF6B00;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s;
}

button[type="submit"]:hover,
.panel button:hover {
  background: #ff6b6b;
}

.btn-cancel {
  background: #555 !important;
}

/* Lista de Profissionais */
.professionals-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.prof-card {
  background: #0f0f23;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-left: 4px solid #FF6B00;
}

.prof-color {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.prof-info {
  flex: 1;
}

.prof-info h4 {
  color: #fff;
  margin-bottom: 5px;
}

.prof-info p {
  color: #888;
  font-size: 0.85rem;
}

.prof-actions {
  display: flex;
  gap: 5px;
}

.prof-actions button {
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: 5px;
}

.prof-actions .btn-edit {
  background: #3498db;
}

.prof-actions .btn-delete {
  background: #e74c3c;
}

/* Listas de Config */
.stations-list,
.sectors-list {
  margin-top: 15px;
}

.config-item {
  background: #0f0f23;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.config-item span {
  color: #fff;
}

.config-item small {
  color: #888;
  margin-left: 10px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #16213e;
  padding: 25px;
  border-radius: 15px;
  min-width: 350px;
  max-width: 95%;
  border: 1px solid #333;
}

.modal-content h3 {
  color: #FF6B00;
  margin-bottom: 15px;
}

.modal-content .close {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  transition: color 0.3s;
}

.modal-content .close:hover {
  color: #FF6B00;
}

#modalInfo {
  background: #0f0f23;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  line-height: 1.6;
}

#modalInfo strong {
  color: #FF6B00;
}

#modalProfessional {
  width: 100%;
  padding: 12px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #0f0f23;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 15px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.btn-save {
  background: #27ae60 !important;
  color: white;
}

.btn-save:hover {
  background: #2ecc71 !important;
}

.btn-remove {
  background: #e74c3c !important;
  color: white;
}

.btn-remove:hover {
  background: #ff6b6b !important;
}

.copy-buttons-row {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.btn-copy-previous {
  flex: 1;
  background: linear-gradient(135deg, #6c5ce7, #a55eea) !important;
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s;
}

.btn-copy-previous:hover {
  background: linear-gradient(135deg, #a55eea, #6c5ce7) !important;
  transform: translateY(-1px);
}

.btn-copy-previous:disabled {
  background: #555 !important;
  cursor: not-allowed;
  transform: none;
}

/* Tabela de Horas */
.hours-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.summary-card {
  background: #0f0f23;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.summary-card .value {
  font-size: 2rem;
  font-weight: bold;
  color: #FF6B00;
}

.summary-card .label {
  color: #888;
  font-size: 0.85rem;
  margin-top: 5px;
}

.hours-table-wrapper {
  overflow-x: auto;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.hours-table th,
.hours-table td {
  border: 1px solid #2a2a4a;
  padding: 12px 10px;
  text-align: center;
}

.hours-table th {
  background: #0f0f23;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hours-table th.shift-col-m {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #000;
}

.hours-table th.shift-col-t {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.hours-table th.shift-col-n {
  background: linear-gradient(135deg, #8e44ad, #6c3483);
}

.hours-table tbody tr {
  background: #16213e;
  transition: background 0.2s;
}

.hours-table tbody tr:hover {
  background: #1f2b47;
}

.hours-table tbody tr:nth-child(even) {
  background: #1a2236;
}

.hours-table tbody tr:nth-child(even):hover {
  background: #1f2b47;
}

.hours-table td.prof-name {
  text-align: left;
  font-weight: bold;
}

.hours-table td.total-shifts {
  font-weight: bold;
  font-size: 1.1rem;
  color: #3498db;
}

.hours-table td.total-hours {
  font-weight: bold;
  font-size: 1.1rem;
}

.hours-table td.hours-green {
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}

.hours-table td.hours-yellow {
  color: #f39c12;
  background: rgba(243, 156, 18, 0.15);
}

.hours-table td.hours-red {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.2);
}

.hours-alert {
  display: block;
  font-size: 0.7rem;
  color: #fff;
  background: #e74c3c;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.hours-table .color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.hours-table .shift-detail {
  font-size: 0.75rem;
  color: #888;
}

/* Scrollbar */
::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0f0f23;
}

::-webkit-scrollbar-thumb {
  background: #FF6B00;
  border-radius: 4px;
}

/* Lista de Usuários */
.users-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.user-card {
  background: #0f0f23;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-left: 4px solid #FF6B00;
  position: relative;
}

.user-card.coordenador {
  border-left-color: #f39c12;
}

.user-card .role-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}

.user-card .role-badge.coordenador {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #000;
}

.user-card .role-badge.utilizador {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
}

.user-color {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
}

.user-info h4 {
  color: #fff;
  margin-bottom: 5px;
}

.user-info p {
  color: #888;
  font-size: 0.85rem;
}

.user-actions {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.user-actions button {
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: 5px;
}

/* Filtros */
.users-filter {
  display: flex;
  gap: 10px;
}

.filter-btn {
  background: #0f0f23;
  color: #aaa;
  border: 1px solid #333;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.filter-btn:hover {
  border-color: #FF6B00;
  color: #FF6B00;
}

.filter-btn.active {
  background: #FF6B00;
  color: white;
  border-color: #FF6B00;
}

/* Seletor de Dia da Semana */
.weekday-selector {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background: #16213e;
  border-radius: 10px;
  margin-top: 20px;
  border: 1px solid #333;
  position: sticky;
  bottom: 15px;
}

.weekday-btn {
  background: #0f0f23;
  color: #aaa;
  border: 2px solid #333;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: bold;
  transition: all 0.3s;
  min-width: 60px;
}

.weekday-btn:hover {
  border-color: #FF6B00;
  color: #FF6B00;
  transform: translateY(-2px);
}

.weekday-btn.active {
  background: linear-gradient(135deg, #FF6B00, #E55A00);
  color: white;
  border-color: #FF6B00;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.weekday-btn.weekend {
  border-color: #6c5ce7;
}

.weekday-btn.weekend:hover {
  border-color: #a55eea;
  color: #a55eea;
}

.weekday-btn.weekend.active {
  background: linear-gradient(135deg, #6c5ce7, #a55eea);
  border-color: #6c5ce7;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    gap: 15px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    min-width: 90%;
  }

  .weekday-selector {
    gap: 5px;
    padding: 15px 10px;
  }

  .weekday-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
    min-width: 40px;
  }

  .schedule-top-bar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .export-bar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .holes-details {
    right: auto;
    left: 0;
    min-width: 280px;
  }
}

/* Estilos compactos para exportação PDF */
body.exporting-pdf .schedule-top-bar {
  display: none;
}

body.exporting-pdf .weekday-block {
  margin-bottom: 0;
}

body.exporting-pdf .weekday-header {
  padding: 6px 10px;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

body.exporting-pdf .weekday-grid table {
  min-width: auto;
}

body.exporting-pdf .weekday-grid th,
body.exporting-pdf .weekday-grid td {
  padding: 3px 4px;
  font-size: 0.55rem;
}

body.exporting-pdf .weekday-grid th.station-col {
  width: 80px;
  min-width: 80px;
  padding-left: 5px;
}

body.exporting-pdf .weekday-grid td.station-name {
  padding-left: 5px;
  padding-right: 3px;
}

body.exporting-pdf .station-controls span {
  font-size: 0.55rem;
}

body.exporting-pdf .slot-buttons {
  display: none;
}

body.exporting-pdf .weekday-grid thead tr:first-child th {
  font-size: 0.6rem;
  padding: 5px 3px;
}

body.exporting-pdf .weekday-grid thead tr:nth-child(2) th {
  font-size: 0.55rem;
  padding: 4px 2px;
}

body.exporting-pdf .weekday-grid td.data-cell {
  height: 20px;
  min-width: 30px;
  font-size: 0.5rem;
}

body.exporting-pdf .weekday-grid tr.sector-row td {
  padding: 4px 8px !important;
  font-size: 0.6rem;
  letter-spacing: 1px;
}

body.exporting-pdf .weekday-grid th.shift-separator,
body.exporting-pdf .weekday-grid td.shift-separator {
  border-left: 2px solid #0f0f23 !important;
}

/* ==================== ABA DE FUROS ==================== */

.holes-table-wrapper {
  overflow-x: auto;
}

.holes-table-full {
  width: 100%;
  border-collapse: collapse;
  background: #0f0f23;
  border-radius: 10px;
  overflow: hidden;
}

.holes-table-full th,
.holes-table-full td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #333;
}

.holes-table-full th {
  background: #16213e;
  color: #FF6B00;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.holes-table-full td {
  font-size: 0.9rem;
}

.holes-table-full tr:hover {
  background: rgba(233, 69, 96, 0.1);
}

.holes-table-full .shift-morning {
  color: #f39c12;
}

.holes-table-full .shift-afternoon {
  color: #3498db;
}

.holes-table-full .shift-night {
  color: #9b59b6;
}

.holes-table-full .missing-count {
  color: #e74c3c;
  font-weight: bold;
}

.btn-candidatar {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.btn-candidatar:hover {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  transform: scale(1.05);
}

.holes-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.summary-card.alert {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.summary-card.ok {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}

/* Candidaturas */
.candidatures-list,
.pending-candidatures-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.candidature-item,
.pending-candidature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f0f23;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.candidature-item.approved {
  border-left-color: #27ae60;
}

.candidature-item.rejected {
  border-left-color: #e74c3c;
}

.candidature-item.pending {
  border-left-color: #f39c12;
}

.candidature-info {
  flex: 1;
}

.candidature-date {
  color: #888;
  font-size: 0.85rem;
}

.candidature-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-badge {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
}

.status-badge.pending {
  background: #f39c12;
  color: #000;
}

.status-badge.approved {
  background: #27ae60;
  color: #fff;
}

.status-badge.rejected {
  background: #e74c3c;
  color: #fff;
}

.btn-cancel-small {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
}

.btn-cancel-small:hover {
  background: #c0392b;
}

.candidature-actions {
  display: flex;
  gap: 10px;
}

.btn-approve {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-approve:hover {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.btn-reject {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-reject:hover {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
}

.pending-candidature-item {
  border-left-color: #f39c12;
}

/* Furos agrupados por dia da semana */
.holes-by-weekday {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.holes-weekday-block {
  background: #16213e;
  border-radius: 10px;
  overflow: hidden;
}

.holes-weekday-block.weekend {
  border: 1px solid #FF6B00;
}

.holes-weekday-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #0f0f23;
  border-bottom: 2px solid #FF6B00;
}

.holes-weekday-block.weekend .holes-weekday-header {
  background: linear-gradient(135deg, #2d1f3d, #1a1a2e);
}

.weekday-name {
  font-weight: bold;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #FF6B00;
}

.weekday-count {
  background: #e74c3c;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: bold;
}

.holes-weekday-block .holes-table-full {
  margin: 0;
  border-radius: 0;
}

.holes-weekday-block .holes-table-full th {
  background: transparent;
  padding: 10px 15px;
}

.no-holes-message {
  text-align: center;
  color: #27ae60;
  padding: 40px;
  font-size: 1.1rem;
  background: #0f0f23;
  border-radius: 10px;
}

/* Candidatos nos furos */
.hole-candidatos {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 120px;
}

.candidato-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #0f0f23;
  padding: 5px 10px;
  border-radius: 5px;
  border-left: 3px solid #f39c12;
}

.candidato-nome {
  font-size: 0.85rem;
  color: #f39c12;
  font-weight: 500;
}

.btn-aprovar-small {
  background: #27ae60;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-aprovar-small:hover {
  background: #2ecc71;
  transform: scale(1.1);
}

.btn-rejeitar-small {
  background: #e74c3c;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-rejeitar-small:hover {
  background: #c0392b;
  transform: scale(1.1);
}

.ja-candidatou {
  color: #27ae60;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 5px 10px;
  background: rgba(39, 174, 96, 0.2);
  border-radius: 5px;
}

.sem-candidatos {
  color: #666;
  font-size: 0.85rem;
}

/* Visibilidade da Escala */
.visibility-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  background: linear-gradient(135deg, #2d1f3d, #1a1a2e);
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid #FF6B00;
  margin-bottom: 15px;
}

.visibility-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.visibility-icon {
  font-size: 1.5rem;
}

.visibility-text {
  font-weight: bold;
  font-size: 0.95rem;
}

.visibility-status.hidden .visibility-text {
  color: #e74c3c;
}

.visibility-status.visible .visibility-text {
  color: #27ae60;
}

.btn-visibility {
  padding: 8px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.btn-visibility.release {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
}

.btn-visibility.release:hover {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  transform: scale(1.05);
}

.btn-visibility.block {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.btn-visibility.block:hover {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  transform: scale(1.05);
}

/* Mensagem de escala oculta */
.schedule-hidden-message {
  background: linear-gradient(135deg, #16213e, #1a1a2e);
  border: 2px solid #e74c3c;
  border-radius: 15px;
  padding: 60px 40px;
  text-align: center;
  margin: 40px auto;
  max-width: 500px;
}

.schedule-hidden-message .hidden-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.schedule-hidden-message h3 {
  color: #e74c3c;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.schedule-hidden-message p {
  color: #888;
  font-size: 1rem;
  margin-bottom: 10px;
}
