/* Professional operational interfaces: dashboard, alerts, attendance, reports and directories */
:root {
  --ops-ink: #10231f;
  --ops-muted: #60706b;
  --ops-line: #dbe6e2;
  --ops-soft: #f2f7f5;
  --ops-soft-strong: #e6f1ed;
  --ops-primary: #176957;
  --ops-primary-dark: #0f4d40;
  --ops-primary-light: #dff1eb;
  --ops-danger: #b63434;
  --ops-warning: #a25d00;
  --ops-shadow: 0 18px 50px rgba(16, 46, 39, 0.08);
  --ops-shadow-hover: 0 22px 60px rgba(16, 46, 39, 0.13);
}

/* Main navigation */
.operations-tabs {
  gap: 8px;
  margin: 4px 0 22px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--ops-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 32px rgba(16, 46, 39, 0.06);
  scrollbar-width: thin;
}

.operations-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 9px 13px;
  color: #52635e;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.operations-tabs .tab:hover {
  border-color: #d7e4df;
  background: #f5f9f7;
  color: var(--ops-ink);
  transform: translateY(-1px);
}

.operations-tabs .tab.active {
  border-color: #c6ded6;
  background: linear-gradient(145deg, #e7f4f0, #f8fbfa);
  color: var(--ops-primary-dark);
  box-shadow: 0 8px 22px rgba(23, 105, 87, 0.1);
}

.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: #edf3f1;
  color: #49645d;
  font-size: 0.9rem;
  font-weight: 900;
}

.operations-tabs .tab.active .tab-icon {
  background: var(--ops-primary);
  color: #fff;
}

.tab-label {
  display: grid;
  gap: 1px;
  text-align: left;
  line-height: 1.1;
}

.tab-label small {
  color: #81908c;
  font-size: 0.67rem;
  font-weight: 650;
}

.operations-tabs .tab.active .tab-label small {
  color: #50746b;
}

/* Shared page structure */
.operation-tab-panel,
#dashboardTab,
#alertsTab {
  animation: opsFadeIn 180ms ease-out;
}

@keyframes opsFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.operation-panel {
  border-color: var(--ops-line);
  border-radius: 20px;
  box-shadow: var(--ops-shadow);
}

.operation-panel--dashboard,
.operation-panel--alerts,
.operation-panel--reports,
.operation-panel--directory {
  padding: clamp(18px, 2.2vw, 30px);
}

.operation-hero {
  position: relative;
  overflow: hidden;
  padding: 6px 4px 20px;
  margin-bottom: 2px;
  border-bottom: 1px solid #e4ece9;
}

.operation-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -95px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(36, 130, 108, 0.13), rgba(36, 130, 108, 0));
  pointer-events: none;
}

.operation-hero-copy {
  max-width: 760px;
}

.operation-hero h2,
.operation-page-hero h2 {
  margin: 5px 0 7px;
  color: var(--ops-ink);
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.operation-hero .muted,
.operation-page-hero > div > p:last-child {
  max-width: 720px;
  color: var(--ops-muted);
  font-size: 0.98rem;
}

.operation-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin-bottom: 12px;
  border: 1px solid #cfe3dc;
  border-radius: 999px;
  background: #f3faf7;
  color: #315f54;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.operation-kicker--warning {
  border-color: #f0dcc1;
  background: #fff8ee;
  color: #805322;
}

.operation-live-dot,
.operation-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #23a47f;
  box-shadow: 0 0 0 4px rgba(35, 164, 127, 0.13);
}

.operation-alert-dot {
  background: #e18b2d;
  box-shadow: 0 0 0 4px rgba(225, 139, 45, 0.13);
}

.operation-page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--ops-line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 8%, rgba(53, 139, 117, 0.18), transparent 28%),
    linear-gradient(135deg, #f8fbfa, #edf6f3);
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 15px 40px rgba(16, 46, 39, 0.07);
}

.operation-page-hero::before {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -62px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(35, 107, 91, 0.15);
  border-radius: 50%;
}

.operation-page-hero > * {
  position: relative;
  z-index: 1;
}

.operation-page-hero > div:first-child {
  max-width: 780px;
}

.operation-page-hero .eyebrow {
  margin-bottom: 0;
}

.operation-trust-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
}

.operation-trust-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d5e5df;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #45645c;
  padding: 7px 11px;
  font-size: 0.75rem;
  font-weight: 750;
  white-space: nowrap;
}

.operation-trust-list span::before {
  content: "✓";
  color: var(--ops-primary);
  font-weight: 900;
}

.operation-section-title {
  margin: 0 0 4px;
  color: var(--ops-ink);
  font-size: 1.05rem;
}

/* Dashboard and alerts */
.operation-panel .dashboard-metrics {
  gap: 14px;
}

.operation-panel .dashboard-card {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  border-radius: 17px;
  border-color: #dce7e3;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(20, 59, 49, 0.055);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.operation-panel .dashboard-card:hover {
  transform: translateY(-2px);
  border-color: #c8dbd4;
  box-shadow: var(--ops-shadow-hover);
}

.operation-panel .dashboard-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(31, 112, 93, 0.055);
}

.operation-panel .dashboard-card > * {
  position: relative;
  z-index: 1;
}

.operation-panel .dashboard-card span {
  color: #65756f;
  font-size: 0.78rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.operation-panel .dashboard-card strong {
  margin: 9px 0 5px;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  letter-spacing: -0.045em;
}

.operation-panel .dashboard-section-card {
  border-radius: 17px;
  border-color: #dce7e3;
  box-shadow: 0 8px 25px rgba(20, 59, 49, 0.045);
}

.operation-panel .dashboard-section-card h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 11px;
  border-bottom: 1px solid #e6eeeb;
  font-size: 0.98rem;
}

.operation-panel .dashboard-section-card h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ops-primary);
  box-shadow: 0 0 0 4px rgba(23, 105, 87, 0.1);
}

.operation-panel .dashboard-list-item,
.operation-panel .dashboard-list-empty {
  border: 1px solid #e7eeeb;
  background: #f8fbfa;
}

.alerts-panel .dashboard-section-card h3::before {
  background: #db7c20;
  box-shadow: 0 0 0 4px rgba(219, 124, 32, 0.1);
}

.alert-list-item {
  position: relative;
  padding-left: 16px !important;
}

.alert-list-item::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 4px;
  background: #d77a28;
}

/* Attendance */
.operation-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  gap: 18px;
}

.operation-panel--roster,
.operation-panel--detail {
  padding: 20px;
}

.operation-panel--roster .panel-head,
.operation-panel--detail .panel-head,
.operation-panel--reports > .panel-head,
.operation-panel--directory > .panel-head {
  padding-bottom: 14px;
  border-bottom: 1px solid #e5edea;
}

.operation-panel--roster .status-strip {
  gap: 10px;
  margin-bottom: 15px;
}

.operation-panel--roster .status-strip .metric {
  min-height: 82px;
  border: 1px solid #dce8e4;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fbfa, #fff);
  padding: 12px 14px;
}

.operation-panel--roster .status-strip .metric strong {
  color: var(--ops-ink);
  font-size: 1.7rem;
}

.operation-panel .table-wrap {
  border: 1px solid #dfe9e5;
  border-radius: 15px;
  background: #fff;
}

.operation-panel .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f7f5;
  color: #556762;
  font-size: 0.7rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.operation-panel .data-table tbody tr {
  transition: background 140ms ease, box-shadow 140ms ease;
}

.operation-panel .data-table tbody tr:not(.empty-row):hover {
  background: #f6faf8;
}

.operation-panel .data-table tbody tr.selected {
  background: #e9f4f0;
  box-shadow: inset 3px 0 0 var(--ops-primary);
}

.operation-panel--detail {
  position: sticky;
  top: 12px;
}

.operation-panel--detail .quick-actions {
  gap: 9px;
  margin-bottom: 14px;
}

.operation-panel--detail .quick-actions .button {
  min-height: 45px;
  border-radius: 11px;
}

.operation-panel--detail .location-card {
  border-color: #dce7e3;
  border-radius: 13px;
  background: #f7faf9;
}

.operation-panel--detail .manual-form {
  margin-top: 15px;
  border-top: 1px solid #e4ece9;
  padding-top: 15px;
}

/* Reports */
.operation-panel--reports .operation-page-hero {
  margin: -2px -2px 22px;
}

.operation-panel--reports > .report-head {
  align-items: flex-end;
  margin-bottom: 18px;
  border: 1px solid #dfe9e5;
  border-radius: 15px;
  background: #f8fbfa;
  padding: 15px;
}

.operation-panel--reports .report-controls {
  gap: 8px;
}

.operation-panel--reports .report-controls label {
  min-width: 135px;
}

.operation-panel--reports .table-wrap + .subhead {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e1eae7;
}

.operation-panel--reports .table-wrap + .subhead::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--ops-primary);
}

.operation-panel--reports .sick-leave-admin-panel {
  border: 1px solid #dfe9e5;
  border-radius: 17px;
  background: #fbfdfc;
  padding: 18px;
}

/* Employee / worker directories */
.directory-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.directory-overview article {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label value" "small value";
  align-items: center;
  min-height: 90px;
  border: 1px solid #dce8e4;
  border-radius: 15px;
  background: linear-gradient(145deg, #f7faf9, #fff);
  padding: 14px 16px;
}

.directory-overview span {
  grid-area: label;
  color: #65756f;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.directory-overview strong {
  grid-area: value;
  color: var(--ops-primary-dark);
  font-size: 2.1rem;
  line-height: 1;
}

.directory-overview small {
  grid-area: small;
  color: #81908c;
  font-weight: 650;
}

.operation-panel--directory .employee-head-actions {
  max-width: 760px;
}

.operation-panel--directory .row-actions {
  gap: 6px;
}

.operation-panel--directory .mini-button {
  border-radius: 9px;
}

/* Buttons and filters */
.operation-panel .button,
.operation-page-hero + .operation-workspace .button {
  border-radius: 10px;
}

.operation-panel .button.primary {
  box-shadow: 0 8px 18px rgba(23, 105, 87, 0.16);
}

.operation-panel input,
.operation-panel select,
.operation-panel textarea {
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 1180px) {
  .operations-tabs .tab-label small { display: none; }
  .operations-tabs .tab { min-height: 52px; }
  .operation-workspace { grid-template-columns: 1fr; }
  .operation-panel--detail { position: static; }
  .operation-page-hero { align-items: flex-start; flex-direction: column; }
  .operation-trust-list { justify-content: flex-start; max-width: none; }
}

@media (max-width: 860px) {
  .operation-hero { flex-direction: column; }
  .operation-page-hero { padding: 22px; }
  .directory-overview { grid-template-columns: 1fr; }
  .operation-panel--reports > .report-head { align-items: stretch; flex-direction: column; }
  .operation-panel--reports .report-controls { width: 100%; }
  .operation-panel--reports .report-controls > * { flex: 1 1 150px; }
}

@media (max-width: 640px) {
  .app-shell { width: min(100% - 18px, 1480px); padding-top: 12px; }
  .operations-tabs { margin-left: -2px; margin-right: -2px; border-radius: 14px; padding: 6px; }
  .operations-tabs .tab { padding: 8px 10px; }
  .tab-icon { width: 30px; height: 30px; flex-basis: 30px; }
  .operation-panel--dashboard,
  .operation-panel--alerts,
  .operation-panel--reports,
  .operation-panel--directory,
  .operation-panel--roster,
  .operation-panel--detail { padding: 15px; border-radius: 16px; }
  .operation-page-hero { border-radius: 16px; padding: 18px; }
  .operation-page-hero h2,
  .operation-hero h2 { font-size: 1.5rem; }
  .operation-trust-list { display: grid; grid-template-columns: 1fr; width: 100%; }
  .operation-trust-list span { justify-content: flex-start; }
  .operation-panel--roster .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-overview article { min-height: 78px; }
  .operation-panel--directory .employee-head-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .operation-panel--directory .employee-head-actions > * { width: 100%; }
}

/* Professional export controls */
.directory-export-format {
  display: inline-flex;
  align-items: center;
  min-width: 118px;
}

.directory-export-format select {
  width: 100%;
  min-height: 42px;
  padding: 0.65rem 2.1rem 0.65rem 0.8rem;
  border: 1px solid rgba(15, 81, 50, 0.2);
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-weight: 700;
}

.directory-export-format select:focus-visible {
  outline: 3px solid rgba(15, 81, 50, 0.18);
  border-color: #0f5132;
}

@media (max-width: 760px) {
  .employee-head-actions .directory-export-format {
    flex: 1 1 120px;
  }

  .employee-head-actions .directory-export-format select,
  .employee-head-actions > .button {
    width: 100%;
  }
}
