/* ==========================================================
   OPERATOR MANAGEMENT — Desktop Operator Page
   Custom styles beyond Tailwind utilities.
   ========================================================== */

/* --- SCROLLBAR HIDE --- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --- MODAL ANIMATIONS --- */
.modal-fade-in { animation: modalFadeIn 0.15s ease-out forwards; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-pop-in { animation: modalPopIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== DETAIL SHELL (matches Home page internal messages modal) ===== */
.detail-shell {
  width: 1010px;
  max-width: calc(100vw - 54px);
  height: 652px;
  max-height: calc(100vh - 54px);
}
@media (max-width: 1180px) {
  .detail-shell { width: 980px; max-width: calc(100vw - 30px); height: 644px; max-height: calc(100vh - 30px); }
}
@media (max-width: 1024px) {
  .detail-shell { width: 960px; max-width: calc(100vw - 22px); height: 640px; max-height: calc(100vh - 22px); }
}
@media (max-width: 820px) {
  .detail-shell { width: calc(100vw - 14px); max-width: calc(100vw - 14px); height: calc(100vh - 14px); max-height: calc(100vh - 14px); }
}

/* --- TABLET PAY PERIODS TOGGLE --- */
.show-on-tablet { display: none; }
.hide-on-tablet { display: flex; flex-direction: column; }
body.is-tablet .show-on-tablet { display: block; }
body.is-tablet .hide-on-tablet { display: none !important; }

/* --- OPERATOR LIST ROW --- */
.op-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid transparent;
}
.op-row:hover { background: rgba(0,0,0,0.03); }
.dark .op-row:hover { background: rgba(255,255,255,0.04); }

.op-row.active {
  background: rgba(59,128,48,0.06);
  border-color: #3b8030;
}
.dark .op-row.active {
  background: rgba(59,130,246,0.08);
  border-color: #3b82f6;
}

/* Retired row — grayed out */
.op-row.retired-row { opacity: 0.4; }
.op-row.retired-row:hover { opacity: 0.55; }
.op-row.retired-row.active { opacity: 0.65; }

/* --- RETIRED DETAIL — grayed overlay --- */
.retired-detail .op-input-sm,
.retired-detail .op-label-sm,
.retired-detail .hours-table,
.retired-detail .card-flip-container,
.retired-detail .license-zone-sm { opacity: 0.45; }

/* --- COMPACT FORM INPUT --- */
.op-input-sm {
  width: 100%;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #e3e0d3;
  background: #fcfcfb;
  color: #2d2a26;
  outline: none;
  transition: border-color 0.2s;
}
.op-input-sm:focus { border-color: #3b8030; }
.dark .op-input-sm {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: #f1f5f9;
}
.dark .op-input-sm:focus { border-color: #3b82f6; }

/* --- COMPACT FORM LABEL --- */
.op-label-sm {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b665f;
  margin-bottom: 2px;
}
.dark .op-label-sm { color: #64748b; }

/* --- LICENSE THUMBNAIL (inline, opens modal) --- */
.license-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #e3e0d3;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.license-thumb:hover { border-color: #3b8030; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.dark .license-thumb { border-color: rgba(255,255,255,0.08); }
.dark .license-thumb:hover { border-color: #3b82f6; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

.license-thumb img {
  width: 100%;
  display: block;
  border-radius: 7px;
}
.license-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 7px;
}
.license-thumb:hover .license-thumb-overlay { opacity: 1; }

/* Empty upload zone */
.license-thumb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.585 / 1;
  border: 2px dashed #e3e0d3;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.license-thumb-empty:hover { border-color: #3b8030; background: rgba(59,128,48,0.03); }
.dark .license-thumb-empty { border-color: rgba(255,255,255,0.1); }
.dark .license-thumb-empty:hover { border-color: #3b82f6; background: rgba(59,130,246,0.05); }

/* ===== LICENSE CARD 3D FLIP (from opschedule — proven approach) ===== */
.card-flip-container {
  width: 100%;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  display: block;
}
.card-flip-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.4,0,0.2,1);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  -webkit-transform: scaleX(1);
  transform: scaleX(1);
}
.card-flip-wrap img {
  width: 100%;
  display: block;
  pointer-events: none;
  border-radius: 16px;
}

/* ===== PAY PERIOD ACCORDION (same as Home report-section) ===== */
.period-section-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
  overflow: hidden;
}
.period-section.open .period-section-body {
  grid-template-rows: 1fr;
}
.period-section-body > div {
  overflow: hidden;
}

.period-chevron {
  transition: transform 0.25s ease;
}
.period-section.open .period-chevron {
  transform: rotate(180deg);
}

/* --- HOURS TABLE --- */
.hours-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
}
.hours-table th {
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b665f;
  padding: 4px 6px;
  border-bottom: 1px solid #e3e0d3;
}
.dark .hours-table th {
  color: #64748b;
  border-bottom-color: rgba(255,255,255,0.08);
}
.hours-table td {
  padding: 2px 6px;
  border-bottom: 1px solid #f0ede6;
  vertical-align: middle;
}
.dark .hours-table td { border-bottom-color: rgba(255,255,255,0.04); }

.hours-table .hour-input {
  width: 100%;
  height: 24px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.hours-table .hour-input:hover {
  border-color: #e3e0d3;
  background: #fcfcfb;
}
.hours-table .hour-input:focus {
  border-color: #3b8030;
  background: #fcfcfb;
}
.dark .hours-table .hour-input:hover {
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}
.dark .hours-table .hour-input:focus {
  border-color: #3b82f6;
  background: rgba(255,255,255,0.04);
}

/* --- ADD MODAL UPLOAD ZONE --- */
.license-zone-sm {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.585 / 1;
  border: 2px dashed #e3e0d3;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.license-zone-sm:hover { border-color: #3b8030; background: rgba(59,128,48,0.03); }
.dark .license-zone-sm { border-color: rgba(255,255,255,0.1); }
.dark .license-zone-sm:hover { border-color: #3b82f6; background: rgba(59,130,246,0.05); }

/* --- DETAIL PANEL ENTRANCE --- */
.detail-fade-in {
  animation: detailFade 0.25s ease-out both;
}
@keyframes detailFade {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}
