/* 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;
}


/* === G360 SC: Buscador + Informe === */
.g360-sc-user { border: 1px solid #e4ecff; border-radius: 14px; background: #fff; padding: 12px; }
.g360-sc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: relative; }
#g360sc-search { min-width: 280px; padding: 8px 10px; border: 1px solid #ddd; border-radius: 10px; }
.g360sc-results {
  position: absolute; top: 42px; left: 120px; background: #fff; border: 1px solid #ddd; border-radius: 10px;
  width: min(560px, 100%); max-height: 280px; overflow: auto; box-shadow: 0 10px 24px rgba(0,0,0,.08); z-index: 50;
}
.g360sc-item { padding: 10px 12px; cursor: pointer; }
.g360sc-item:hover { background: #f0f6ff; }

.g360-sc-card { border: 1px solid #eef3ff; border-radius: 14px; padding: 12px; margin-top: 12px; }
.g360-sc-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 8px 16px; }
.g360-sc-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.g360-sc-table th, .g360-sc-table td { border: 1px solid #e9eef7; padding: 8px 10px; text-align: left; }

.g360-modal { position: fixed; inset: 0; z-index: 10000; }
.g360-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.35); }
.g360-modal-card {
  position: relative; max-width: 900px; margin: 5vh auto; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
}
.g360-modal-head { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; background:#e6f0ff; border-bottom:1px solid #d9e6ff; }
.g360-modal-head h3 { margin: 0; }
.g360-modal-close { background: transparent; border: none; font-size: 28px; line-height: 1; cursor: pointer; }
.g360-modal-body { padding: 16px; max-height: 70vh; overflow: auto; }
.g360-modal-foot { padding: 12px 16px; border-top: 1px solid #eee; display:flex; justify-content:flex-end; background:#fafafa; }

@media print {
  body * { visibility: hidden; }
  #g360-report-card, #g360-report-card * { visibility: visible; }
  #g360-report-card { position: fixed; inset: 0; margin: 0; box-shadow: none; border-radius: 0; }
}
