/* ═══════════════════════════════════════════════
   TIMESHEET.CSS
═══════════════════════════════════════════════ */

.ts-executive-panel {
  padding: 0;
}

/* ─── HEADER ─── */
.ts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.ts-header-left {
  flex: 1;
}

.ts-title {
  font-size: 28px;
  font-weight: 900;
  font-family: var(--condensed);
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
  margin-bottom: 6px;
}

.ts-title em {
  font-style: normal;
  font-weight: 500;
  color: var(--t3);
}

.ts-icon {
  font-size: 32px;
}

.ts-subtitle {
  font-size: 13px;
  color: var(--t3);
  font-weight: 600;
}

.ts-header-right {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── BOTÕES ─── */
.ts-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  white-space: nowrap;
}

.ts-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ts-btn-icon svg {
  width: 16px;
  height: 16px;
}

.ts-btn-primary {
  background: var(--orange);
  color: #fff;
}

.ts-btn-primary:hover {
  background: #e68229;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,145,45,0.3);
}

.ts-btn-secondary {
  background: rgba(255,145,45,0.1);
  color: var(--orange);
  border: 1px solid rgba(255,145,45,0.3);
}

.ts-btn-secondary:hover {
  background: rgba(255,145,45,0.15);
}

.ts-btn-ghost {
  background: transparent;
  color: var(--t2);
  border: 1px solid rgba(0,0,0,0.1);
}

.ts-btn-ghost:hover {
  background: rgba(0,0,0,0.05);
}

.ts-btn-danger {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
}

.ts-btn-danger:hover {
  background: rgba(239,68,68,0.15);
}

.ts-btn-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(245,158,11,.30);
  border-radius: 12px;
  background: rgba(245,158,11,.10);
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}

.ts-btn-warning:hover {
  background: rgba(245,158,11,.16);
  border-color: rgba(245,158,11,.50);
}

.ts-btn-sm {
  padding: 8px 14px;
  font-size: 12px;
}

.ts-btn-xs {
  padding: 6px 10px;
  font-size: 11px;
}

.ts-btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ts-btn-icon-sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(232,200,164,.9);
  background: rgba(255,255,255,.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  color: var(--t2);
}

.ts-btn-icon-sm:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-dim);
}

.ts-btn-icon-sm svg {
  width: 16px;
  height: 16px;
}

/* ─── ALERTAS ─── */
.ts-alerts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.ts-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  border-left: 4px solid;
}

.ts-alert-critical {
  background: rgba(239,68,68,0.08);
  border-left-color: #ef4444;
}

.ts-alert-warning {
  background: rgba(245,158,11,0.08);
  border-left-color: #f59e0b;
}

.ts-alert-info {
  background: rgba(59,130,246,0.08);
  border-left-color: #3b82f6;
}

.ts-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ts-alert-icon svg {
  width: 20px;
  height: 20px;
}

.ts-alert-content {
  flex: 1;
}

.ts-alert-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--t1);
  margin-bottom: 2px;
}

.ts-alert-message {
  font-size: 12px;
  color: var(--t3);
}

/* ─── FILTROS ─── */
.ts-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ts-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-filter-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--t2);
}

.ts-filter-select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,145,45,0.2);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  cursor: pointer;
  min-width: 180px;
}

.ts-filter-select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,145,45,0.1);
}

/* ─── MÉTRICAS ─── */
.ts-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.ts-metric {
  background: #fff;
  border: 1px solid rgba(255,145,45,0.12);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}

.ts-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.ts-metric-primary {
  background: linear-gradient(135deg, rgba(255,145,45,0.08), rgba(255,145,45,0.02));
  border-color: rgba(255,145,45,0.3);
}

.ts-metric-warning {
  background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(239,68,68,0.02));
  border-color: rgba(239,68,68,0.3);
}

.ts-metric-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,250,245,0.8);
  border-radius: 12px;
  flex-shrink: 0;
}

.ts-metric-icon svg {
  width: 28px;
  height: 28px;
}

.ts-metric-body {
  flex: 1;
}

.ts-metric-value {
  font-size: 32px;
  font-weight: 900;
  font-family: var(--condensed);
  color: var(--t1);
  line-height: 1;
  margin-bottom: 4px;
}

.ts-metric-label {
  font-size: 11px;
  color: var(--t3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ts-metric-detail {
  font-size: 11px;
  color: var(--t3);
  margin-top: 6px;
}

.ts-metric-trend {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
}

.ts-metric-trend.up {
  background: rgba(16,185,129,0.1);
  color: #10b981;
}

.ts-metric-trend.down {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}

/* ─── GRÁFICO ─── */
.ts-chart-container {
  background: #fff;
  border: 1px solid rgba(255,145,45,0.12);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

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

.ts-chart-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-chart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ts-chart-icon svg {
  width: 18px;
  height: 18px;
}

.ts-chart-legend {
  display: flex;
  gap: 16px;
}

.ts-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--t3);
  font-weight: 600;
}

.ts-chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ts-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 180px;
  padding: 16px 0;
}

.ts-chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ts-chart-bar-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ts-chart-bar {
  width: 60%;
  border-radius: 6px 6px 0 0;
  transition: all 0.3s;
  position: relative;
  cursor: pointer;
  min-height: 4px;
}

.ts-chart-bar:hover {
  opacity: 0.8;
}

.ts-chart-bar:hover .ts-chart-tooltip {
  opacity: 1;
  transform: translateY(-8px);
}

.ts-chart-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 10;
}

.ts-chart-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
}

/* ─── CONTEÚDO ─── */
.ts-content {
  margin-top: 24px;
}

/* ─── SQUAD GRID ─── */
.ts-squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.ts-squad-card {
  background: #fff;
  border: 1px solid rgba(255,145,45,0.12);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.2s;
}

.ts-squad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.ts-squad-card-disabled {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.06);
}

.ts-squad-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,145,45,0.1);
  gap: 12px;
}

.ts-squad-card-name {
  font-size: 18px;
  font-weight: 900;
  color: var(--t1);
  margin-bottom: 2px;
}

.ts-squad-card-meta {
  font-size: 11px;
  color: var(--t3);
  font-weight: 600;
}

/* ─── BADGES ─── */
.ts-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.ts-badge svg {
  width: 12px;
  height: 12px;
}

.ts-badge-success {
  background: #10b981;
  color: #fff;
}

.ts-badge-warning {
  background: #f59e0b;
  color: #fff;
}

.ts-badge-danger {
  background: #ef4444;
  color: #fff;
}

.ts-badge-inactive {
  background: rgba(0,0,0,0.1);
  color: var(--t3);
}

.ts-badge-xs {
  padding: 4px 8px;
  font-size: 9px;
}

/* ─── SQUAD STATS ─── */
.ts-squad-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.ts-squad-stat {
  text-align: center;
  padding: 12px;
  background: rgba(255,250,245,0.6);
  border-radius: 12px;
}

.ts-squad-stat-value {
  font-size: 24px;
  font-weight: 900;
  font-family: var(--condensed);
  color: var(--t1);
  line-height: 1;
  margin-bottom: 4px;
}

.ts-squad-stat-label {
  font-size: 10px;
  color: var(--t3);
  font-weight: 700;
  text-transform: uppercase;
}

.ts-text-success {
  color: #10b981 !important;
}

.ts-text-danger {
  color: #ef4444 !important;
}

/* ─── DEV CARDS ─── */
.ts-squad-devs {
  margin-bottom: 16px;
  max-height: 240px;
  overflow-y: auto;
}

.ts-dev-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255,250,245,0.5);
  border-radius: 12px;
  margin-bottom: 8px;
}

.ts-dev-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.ts-dev-info {
  flex: 1;
  min-width: 0;
}

.ts-dev-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-dev-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-dev-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(0,0,0,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.ts-dev-progress-fill {
  height: 100%;
  transition: width 0.3s;
}

.ts-dev-progress-text {
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
}

.ts-dev-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── SQUAD EMPTY ─── */
.ts-squad-empty {
  text-align: center;
  padding: 40px 20px;
}

.ts-squad-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  margin-bottom: 8px;
}

.ts-squad-empty-icon svg {
  width: 48px;
  height: 48px;
}

.ts-squad-empty-text {
  font-size: 12px;
  color: var(--t3);
}

.ts-squad-devs-toggle {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed rgba(255,145,45,0.25);
  background: rgba(255,250,245,0.5);
  border-radius: 12px;
  color: var(--t2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ts-squad-devs-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ─── SQUAD ACTIONS ─── */
.ts-squad-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,145,45,0.1);
  flex-wrap: wrap;
}

/* ─── TABELA ─── */
.ts-table-container {
  background: #fff;
  border: 1px solid rgba(255,145,45,0.12);
  border-radius: 16px;
  overflow: hidden;
}

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

.ts-table thead {
  background: rgba(255,250,245,0.8);
}

.ts-table th {
  padding: 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid rgba(255,145,45,0.2);
}

.ts-table td {
  padding: 16px;
  font-size: 13px;
  color: var(--t1);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.ts-table tbody tr:hover {
  background: rgba(255,250,245,0.4);
}

/* ─── MODAIS ─── */
.ts-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.ts-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ts-modal-lg {
  max-width: 800px;
}

.ts-modal-xl {
  max-width: 1000px;
}

.ts-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.ts-modal-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ts-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ts-modal-icon svg {
  width: 20px;
  height: 20px;
}

.ts-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.ts-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* ─── PREVIEW SQUAD ─── */
.ts-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(255,145,45,0.2);
  gap: 20px;
}

.ts-preview-info h3 {
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 4px;
}

.ts-preview-info p {
  font-size: 13px;
  color: var(--t3);
  margin: 0;
}

.ts-preview-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.ts-preview-stat {
  text-align: right;
}

.ts-preview-stat-label {
  font-size: 11px;
  color: var(--t3);
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.ts-preview-stat-value {
  font-size: 24px;
  font-weight: 900;
  font-family: var(--condensed);
  color: var(--orange);
}

.ts-preview-table-container {
  max-height: 400px;
  overflow: auto;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
}

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

.ts-preview-table thead {
  position: sticky;
  top: 0;
  background: rgba(255,250,245,0.95);
  z-index: 1;
}

.ts-preview-table th {
  padding: 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  color: var(--t2);
  text-transform: uppercase;
  border-bottom: 2px solid rgba(255,145,45,0.2);
}

.ts-preview-table td {
  padding: 12px;
  font-size: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.ts-preview-weekend {
  background: rgba(0,0,0,0.02);
}

.ts-preview-hours {
  font-weight: 700;
  color: var(--orange);
}

/* ─── PREVIEW DEV PREMIUM ─── */
.ts-modal-preview-dev-v2 {
  width: min(1380px, 96vw);
  max-width: 1380px;
  max-height: 92vh;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(232,200,164,.75);
  box-shadow: 0 28px 80px rgba(0,0,0,.24);
}

.ts-modal-header-preview-v2 {
  padding: 22px 26px;
  background: #fff;
  border-bottom: 1px solid rgba(232,200,164,.45);
}

.ts-preview-dev-body-v2 {
  padding: 22px 24px 24px;
  background: linear-gradient(180deg, #fffaf5 0%, #fff5ec 100%);
}

.ts-preview-topbar-v2 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.ts-preview-person-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ts-preview-avatar-v2 {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #3cbf73 0%, #24995a 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 14px 28px rgba(36,153,90,.20);
  flex-shrink: 0;
}

.ts-preview-person-name-v2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--t1);
  line-height: 1.1;
}

.ts-preview-person-squad-v2 {
  font-size: 12px;
  color: var(--t3);
  margin-top: 3px;
}

.ts-preview-person-month-v2 {
  font-size: 13px;
  color: var(--t2);
  font-weight: 700;
  margin-top: 4px;
}

.ts-preview-side-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.ts-preview-side-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ts-preview-side-badge.ok {
  background: rgba(34,197,94,.12);
  color: #15803d;
}

.ts-preview-side-badge.warn {
  background: rgba(245,158,11,.12);
  color: #b45309;
}

.ts-preview-side-badge.danger {
  background: rgba(239,68,68,.12);
  color: #b91c1c;
}

.ts-preview-side-main {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 800;
  color: var(--t1);
  line-height: 1;
}

.ts-preview-side-sub {
  font-size: 12px;
  color: var(--t3);
  font-weight: 600;
}

.ts-preview-progress-wrap {
  margin-bottom: 16px;
}

.ts-preview-progress-bar {
  height: 4px;
  width: 100%;
  background: rgba(232,200,164,.4);
  border-radius: 999px;
  overflow: hidden;
}

.ts-preview-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .45s ease;
}

.ts-preview-progress-fill.ok {
  background: #22c55e;
}

.ts-preview-progress-fill.warn {
  background: #f59e0b;
}

.ts-preview-progress-fill.danger {
  background: #ef4444;
}

.ts-preview-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ts-preview-summary-item {
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(232,200,164,.72);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(160,84,23,.05);
}

.ts-preview-summary-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

.ts-preview-summary-value {
  display: block;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--t1);
  line-height: 1;
}

.ts-preview-summary-value.danger {
  color: #dc2626;
}

.ts-preview-toolbar-v2 {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.ts-preview-calendar-shell {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(232,200,164,.7);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 18px 38px rgba(160,84,23,.06);
}

.ts-preview-cal-head-v2 {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.ts-preview-cal-head-v2 div {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 6px 0;
}

.ts-preview-cal-grid-v2 {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.ts-preview-cal-cell-v2 {
  min-height: 180px;
  border-radius: 16px;
  padding: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(232,200,164,.35);
  transition: transform .12s, box-shadow .15s;
}

.ts-preview-cal-cell-v2:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(160,84,23,.06);
}

.ts-preview-cal-empty-v2 {
  background: transparent;
  border: none;
  min-height: 180px;
}

.ts-preview-cal-weekend-v2 {
  background: #f6f1ea;
  color: #5e5449;
}

.ts-preview-cal-filled-v2 {
  background: #cfe5d9;
  color: #16815c;
}

.ts-preview-cal-missing-v2 {
  background: #f2dedd;
  color: #c23a3a;
}

.ts-preview-day-top-v2 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  min-height: 28px;
}

.ts-preview-day-number-v2 {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.ts-preview-day-actions-v2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ts-preview-day-check-v2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ts-preview-day-check-v2 input[type="checkbox"] {
  accent-color: var(--orange);
  width: 14px;
  height: 14px;
}

.ts-retro-day-btn-v2 {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(232,200,164,.72);
  background: rgba(255,255,255,.88);
  color: var(--t2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
}

.ts-retro-day-btn-v2 svg {
  width: 14px;
  height: 14px;
}

.ts-retro-day-btn-v2:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255,145,45,.12);
}

.ts-preview-day-center-v2 {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ts-preview-day-status-v2 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
}

.ts-preview-day-bottom-v2 {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ts-preview-day-hours-v2 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--t1);
  opacity: .9;
}

.ts-preview-day-desc-v2 {
  font-size: 11px;
  line-height: 1.45;
  color: var(--t1);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
  opacity: .92;
}

.ts-preview-empty {
  text-align: center;
  padding: 28px;
  color: var(--t3);
}

/* ─── HOURS SUMMARY ─── */
.ts-hours-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.ts-hours-card {
  text-align: center;
  padding: 20px;
  background: rgba(255,250,245,0.6);
  border-radius: 12px;
}

.ts-hours-value {
  font-size: 32px;
  font-weight: 900;
  font-family: var(--condensed);
  color: var(--orange);
  line-height: 1;
  margin-bottom: 8px;
}

.ts-hours-label {
  font-size: 11px;
  color: var(--t3);
  font-weight: 700;
  text-transform: uppercase;
}

.ts-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 24px 0 12px;
}

/* ─── SETTINGS ─── */
.ts-settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
}

.ts-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  gap: 12px;
}

.ts-settings-item-active {
  background: rgba(16,185,129,0.05);
  border-color: rgba(16,185,129,0.2);
}

.ts-settings-item-info {
  flex: 1;
}

.ts-settings-item-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--t1);
  margin-bottom: 4px;
}

.ts-settings-item-meta {
  font-size: 11px;
  color: var(--t3);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.ts-settings-item-meta code {
  font-size: 10px;
  background: rgba(0,0,0,0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.ts-settings-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── FORM ─── */
.ts-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ts-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ts-form-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--t1);
}

.ts-form-input {
  padding: 12px 16px;
  border: 1px solid rgba(255,145,45,0.2);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
}

.ts-form-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,145,45,0.1);
}

.ts-form-hint {
  font-size: 11px;
  color: var(--t3);
}

.ts-form-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── FEEDBACK ─── */
.ts-feedback {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.ts-feedback-info {
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
}

.ts-feedback-error {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1180px) {
  .ts-preview-summary-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .ts-preview-cal-grid-v2,
  .ts-preview-cal-head-v2 {
    grid-template-columns: repeat(4, 1fr);
  }

  .ts-preview-cal-head-v2 div:nth-child(n+5) {
    display: none;
  }
}

@media (max-width: 768px) {
  .ts-squad-grid {
    grid-template-columns: 1fr;
  }

  .ts-metrics {
    grid-template-columns: 1fr;
  }

  .ts-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .ts-filter-select {
    width: 100%;
  }

  .ts-preview-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ts-preview-stats {
    gap: 12px;
  }

  .ts-hours-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ts-preview-topbar-v2 {
    flex-direction: column;
    align-items: stretch;
  }

  .ts-preview-side-metrics {
    align-items: flex-start;
  }

  .ts-preview-summary-row {
    grid-template-columns: 1fr 1fr;
  }

  .ts-preview-cal-grid-v2,
  .ts-preview-cal-head-v2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .ts-preview-cal-head-v2 div:nth-child(n+3) {
    display: none;
  }

  .ts-preview-cal-cell-v2,
  .ts-preview-cal-empty-v2 {
    min-height: 150px;
  }
}

@media (max-width: 640px) {
  .ts-squad-actions {
    flex-direction: column;
  }

  .ts-dev-card {
    flex-wrap: wrap;
  }

  .ts-dev-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .ts-settings-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════
   PEOPLE — botões extras
═══════════════════════════════════════════════ */

.ppl-btn-schedule {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

.ppl-btn-schedule svg,
.ppl-nf-btn svg,
.ppl-xlsx-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.ppl-nf-btn,
.ppl-xlsx-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
}

/* ═══════════════════════════════════════════════
   INVOICE MODAL
═══════════════════════════════════════════════ */

.invoice-sheet {
  max-width: 680px;
  width: 100%;
}

.invoice-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.invoice-preview-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

.invoice-preview {
  background: rgba(255,250,245,0.8);
  border: 1px solid rgba(255,145,45,0.18);
  border-radius: 10px;
  padding: 16px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  line-height: 1.65;
  color: var(--t2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════
   SCHEDULE PANEL
═══════════════════════════════════════════════ */

.schedule-sheet {
  max-width: 640px;
  width: 100%;
}

.schedule-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,145,45,0.15);
  padding-bottom: 12px;
}

.sch-tab {
  padding: 7px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  background: none;
  border: 1px solid transparent;
  color: var(--t3);
  cursor: pointer;
  transition: all 0.15s;
}

.sch-tab:hover { color: var(--orange); background: rgba(255,145,45,0.08); }

.sch-tab-active {
  background: rgba(255,145,45,0.12);
  border-color: rgba(255,145,45,0.3);
  color: var(--orange);
}

.sch-panel {
  min-height: 200px;
  max-height: 380px;
  overflow-y: auto;
}

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

.sch-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255,250,245,0.7);
  border: 1px solid rgba(255,145,45,0.12);
  border-radius: 12px;
  transition: border-color 0.15s;
}

.sch-item:hover { border-color: rgba(255,145,45,0.3); }

.sch-item-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  text-align: center;
}

.sch-dow {
  font-size: 10px;
  font-weight: 800;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sch-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
  white-space: nowrap;
}

.sch-time {
  font-size: 11px;
  color: var(--t3);
  font-family: var(--mono, monospace);
}

.sch-item-body {
  flex: 1;
  min-width: 0;
}

.sch-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
}

.sch-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sch-status-dot {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.sch-btn-done,
.sch-btn-cancel {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.sch-btn-done svg,
.sch-btn-cancel svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sch-btn-done {
  background: rgba(16,185,129,0.1);
  color: #10b981;
  border-color: rgba(16,185,129,0.2);
}

.sch-btn-done:hover { background: rgba(16,185,129,0.2); }

.sch-btn-cancel {
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  border-color: rgba(239,68,68,0.18);
}

.sch-btn-cancel:hover { background: rgba(239,68,68,0.16); }

/* Availability grid */
.avail-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.avail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,250,245,0.7);
  border: 1px solid rgba(255,145,45,0.12);
  border-radius: 10px;
}

.avail-day {
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
  min-width: 68px;
}

.avail-time {
  font-family: var(--mono, monospace);
  font-size: 13px;
  color: var(--t2);
  flex: 1;
}

.avail-input {
  border: 1px solid rgba(255,145,45,0.25);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  color: var(--t1);
  background: #fff;
  width: 96px;
  outline: none;
}

.avail-input:focus { border-color: var(--orange); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════
   TIMESHEET — Visão Tabela
═══════════════════════════════════════════════ */

.ts-table-container {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,145,45,0.14);
}

.ts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ts-table-th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--t3);
  background: rgba(255,250,245,0.8);
  border-bottom: 1px solid rgba(255,145,45,0.12);
  white-space: nowrap;
}

.ts-table-row {
  border-bottom: 1px solid rgba(255,145,45,0.08);
  transition: background 0.1s;
}

.ts-table-row:last-child { border-bottom: none; }
.ts-table-row:hover { background: rgba(255,145,45,0.04); }

.ts-table-cell {
  padding: 10px 14px;
  vertical-align: middle;
  color: var(--t2);
}

.ts-table-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--t1);
}

.ts-table-av {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffd29d, #ff8a1f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #5d2800;
  flex-shrink: 0;
}

.ts-table-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.ts-table-num {
  font-family: var(--mono, monospace);
  font-size: 12px;
  white-space: nowrap;
}

.ts-table-bar-wrap {
  display: inline-block;
  width: 80px;
  height: 5px;
  background: rgba(255,145,45,0.12);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
}

.ts-table-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.ts-table-last {
  color: var(--t3);
  font-size: 12px;
  font-family: var(--mono, monospace);
}

/* ═══════════════════════════════════════════════
   USERS PAGE
═══════════════════════════════════════════════ */

.users-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,145,45,0.14);
  margin-bottom: 8px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.users-th {
  padding: 10px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--t3);
  background: rgba(255,250,245,0.8);
  border-bottom: 1px solid rgba(255,145,45,0.12);
  white-space: nowrap;
}

.users-row {
  border-bottom: 1px solid rgba(255,145,45,0.08);
  transition: background 0.1s;
}

.users-row:last-child { border-bottom: none; }
.users-row:hover { background: rgba(255,145,45,0.04); }

.users-cell {
  padding: 12px 16px;
  vertical-align: middle;
  color: var(--t2);
}

.users-cell-actions {
  text-align: right;
  width: 48px;
}

.users-av {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffd29d, #ff8a1f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #5d2800;
  flex-shrink: 0;
}

.users-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 700;
}

.users-btn-rm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.users-btn-rm:hover { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.4); }

.users-btn-rm svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.users-form {
  background: rgba(255,250,245,0.6);
  border: 1px solid rgba(255,145,45,0.14);
  border-radius: 14px;
  padding: 20px;
}