/* Variables de color aplicadas vía inline-style del contenedor */
:root {
  --g360-table-color: #e6f0ff;
  --g360-header-text: #111111;
  --g360-accent-color: #b3d4ff;
  --g360-button-bg: #9ed0ff;
  --g360-button-text: #000000;
}

.g360-table-wrapper {
  border: 1px solid var(--g360-accent-color);
  border-radius: 14px;
  overflow: auto;
  max-width: 100%;
  position: relative;
}

/* Sticky first column */
.g360-table .g360-sticky {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 3;
  box-shadow: 4px 0 10px -6px rgba(0,0,0,0.15);
}

.g360-table thead th {
  background: var(--g360-table-color);
  color: var(--g360-header-text);
  text-align: left;
  padding: 12px 10px;
  border-bottom: 2px solid var(--g360-accent-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.g360-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 780px;
}

.g360-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #e6e6e6;
  vertical-align: middle;
  background: #fff;
}

.g360-user small { color: #666; }

.g360-check input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 6px;
}

.g360-btn {
  display: inline-block;
  padding: 12px 18px;
  border: none;
  border-radius: 14px;
  background: var(--g360-button-bg);
  color: var(--g360-button-text);
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  margin: 4px 6px;
}

.g360-btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  margin: 2px 4px;
}

.g360-btn:hover { filter: brightness(0.95); }
.g360-btn:active { filter: brightness(0.9); }

.g360-view { line-height: 1 !important; }

.g360-compact thead th,
.g360-compact td { white-space: nowrap; }

.g360-note-box, .g360-user-card {
  border: 1px solid var(--g360-accent-color);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0;
  background: #fff;
}

.g360-form-row { margin: 10px 0; }
.g360-form-row label { display: block; margin-bottom: 6px; font-weight: 600; }
.g360-form-row textarea, .g360-form-row select, .g360-extra-input, #g360-user-search {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.g360-msg { margin-left: 10px; font-weight: 600; }
.g360-ok { color: #227a00; }
.g360-error { color: #b00020; }

.g360-notes { margin: 8px 0 0; padding-left: 18px; }
.g360-notes li { margin: 4px 0; }

/* Column panel */
.g360-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fafcff;
  border-bottom: 1px solid var(--g360-accent-color);
  position: sticky;
  top: 0;
  z-index: 4;
}

.g360-colpanel {
  position: absolute;
  top: 52px;
  left: 8px;
  background: #fff;
  border: 1px solid #e4ecff;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
  max-height: 320px;
  overflow: auto;
  min-width: 260px;
}

.g360-colpanel-head { font-weight: 700; margin-bottom: 6px; }
.g360-colopt {
  display: block;
  padding: 6px 4px;
  font-size: 13px;
}
.g360-colpanel-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.g360-hidden { display: none !important; }

/* Resultados de autocompletar */
.g360-user-results {
  position: absolute;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  margin-top: 4px;
  max-height: 260px;
  overflow: auto;
  z-index: 1000;
  width: min(520px, 100%);
  box-shadow: 0 6px 22px rgba(0,0,0,0.08);
}
.g360-user-item { padding: 10px 12px; cursor: pointer; }
.g360-user-item:hover { background: #f0f6ff; }

/* UI de recibos por período */
.g360-period-cell { display: flex; flex-direction: column; gap: 6px; }
.g360-period-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Row highlight */
.g360-table tbody tr.g360-row-selected > td {
  background: #fff8cc !important;
  box-shadow: inset 0 0 0 9999px rgba(255, 240, 120, 0.15);
}
.g360-table tbody tr.g360-row-selected > td.g360-sticky {
  background: #fff4a3 !important;
}
.g360-table tbody tr:hover > td {
  background: #fafcff;
}
