/* [1] Reset */
* { box-sizing: border-box; }
:root {
  --primary: #1877f2;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #65676b;
  --border: #d8dadf;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}
body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.hidden { display: none !important; }

/* [2] Buttons */
.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 700;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-light { background: #eef0f4; color: var(--text); }
.icon-btn {
  border: 0;
  background: #eef0f4;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 20px;
}

/* [3] Login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(140deg, #e7f0ff, #f0f2f5 50%, #ffffff);
}
.login-card {
  width: min(430px, 100%);
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}
.login-logo-wrap { display: flex; justify-content: center; margin-bottom: 12px; }
.login-logo, .brand-logo {
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
}
.login-logo { width: 78px; height: 78px; border-radius: 22px; }
.login-logo-fallback, .brand-fallback {
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.login-logo-fallback { width: 78px; height: 78px; border-radius: 22px; font-size: 26px; }
.login-card h1 { margin: 8px 0 4px; }
.login-card p { margin: 0 0 20px; color: var(--muted); }

/* [4] Shell */
.app-shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: 290px;
  background: var(--card);
  border-left: 1px solid var(--border);
  padding: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.brand-logo, .brand-fallback { width: 48px; height: 48px; border-radius: 14px; }
.brand h2 { margin: 0; font-size: 18px; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.menu { display: grid; gap: 8px; margin-top: 16px; }
.menu-item {
  border: 0;
  text-align: right;
  background: transparent;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}
.menu-item:hover, .menu-item.active { background: #e7f3ff; color: var(--primary); }

.main {
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 66px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.search-pill {
  flex: 1;
  background: #f0f2f5;
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--muted);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

/* [5] Screens */
.screen {
  display: none;
  padding: 18px;
  max-width: 1280px;
  margin: 0 auto;
}
.screen.active { display: block; }
.feed-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
  margin-bottom: 16px;
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.hero h1 { margin: 0 0 6px; }
.hero p { margin: 0; color: var(--muted); }

/* [6] Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}
.stat-card span { color: var(--muted); }
.stat-card strong { display: block; font-size: 30px; margin-top: 8px; color: var(--primary); }

/* [7] Forms */
.form-grid {
  display: grid;
  gap: 14px;
}
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
label {
  display: grid;
  gap: 7px;
  text-align: right;
}
label span {
  font-weight: 700;
  color: var(--muted);
  font-size: 13px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}
textarea { resize: vertical; }
.wide { grid-column: 1 / -1; }
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  font-weight: 700;
  color: var(--muted);
}
.check input { width: auto; }
.message {
  align-self: center;
  color: var(--muted);
  font-weight: 700;
}
.message.ok { color: #0a7a2f; }
.message.err { color: #b00020; }

/* [8] Feed */
.movement-feed {
  display: grid;
  gap: 10px;
}
.feed-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}
.feed-item strong { color: var(--primary); }
.feed-item p { margin: 5px 0 0; color: var(--muted); }

/* [9] Tables */
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}
th, td {
  border-bottom: 1px solid var(--border);
  padding: 11px;
  text-align: right;
  vertical-align: top;
}
th {
  background: #f7f8fa;
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody tr:hover { background: #f8fbff; }

/* [10] Mobile */
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(105%);
    transition: .2s;
    z-index: 50;
    box-shadow: var(--shadow);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .topbar { gap: 8px; padding: 8px; }
  .search-pill { display: none; }
  .user-chip { margin-inline-start: auto; }
  .screen { padding: 12px; }
  .hero { display: grid; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 20px; }
}


/* Phase1 Movement Screen Fix */
#movementForm input[readonly] {
  background: #f3f4f6;
  color: #111827;
  cursor: not-allowed;
  font-weight: 700;
}

#movementForm .wide {
  grid-column: 1 / -1;
}


/* Phase2A Workflow Statuses */
#workflowStatusesScreen .mini-table td,
#workflowStatusesScreen .mini-table th {
  white-space: nowrap;
}

#movementStatus {
  font-weight: 700;
}


/* Dashboard Movement Filters */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}

.filter-chip {
  border: 1px solid #d7dde7;
  background: #fff;
  color: #1c1e21;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
}

.filter-chip:hover {
  background: #eef4ff;
  border-color: #1877f2;
}

.filter-chip.active {
  background: #1877f2;
  color: #fff;
  border-color: #1877f2;
}

.movement-feed .empty-state {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  color: #64748b;
  text-align: center;
}


/* Movement Details View Only */
.movement-card {
  cursor: pointer;
}

.movement-card:hover {
  background: #f8fbff;
}

.movement-card .movement-status-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7dde7;
  border-radius: 999px;
  padding: 4px 10px;
  background: #fff;
  color: #1877f2;
  font-weight: 700;
  margin-inline-start: 6px;
}

.movement-details-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.movement-details-overlay.hidden {
  display: none;
}

.movement-details-panel {
  width: min(780px, 96vw);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  overflow: hidden;
}

.movement-details-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.movement-details-header h2 {
  margin: 0 0 4px;
}

.movement-details-header p {
  margin: 0;
  color: #64748b;
}

.movement-details-body {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.movement-details-item {
  border: 1px solid #e5e7eb;
  background: #fbfdff;
  border-radius: 12px;
  padding: 10px 12px;
}

.movement-details-item span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 4px;
}

.movement-details-item strong {
  color: #111827;
  word-break: break-word;
}

.movement-details-item.wide {
  grid-column: 1 / -1;
}

.movement-details-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 700px) {
  .movement-details-body {
    grid-template-columns: 1fr;
  }
}


/* Movement Approve Button */
#approveMovementFromDetailsBtn.hidden {
  display: none;
}

.movement-details-footer {
  gap: 8px;
  flex-wrap: wrap;
}


/* Movement Reject Button */
#rejectMovementFromDetailsBtn.hidden {
  display: none;
}

.btn-danger {
  background: #e41e3f;
  color: #fff;
  border: 1px solid #e41e3f;
}

.btn-danger:hover {
  background: #c91835;
  border-color: #c91835;
}


/* Movement Return Button */
#returnMovementFromDetailsBtn.hidden {
  display: none;
}

.btn-warning {
  background: #f7b928;
  color: #111827;
  border: 1px solid #f7b928;
}

.btn-warning:hover {
  background: #e5a817;
  border-color: #e5a817;
}


/* Movement Edit In Details */
#editMovementFromDetailsBtn.hidden,
#saveMovementDetailsEditBtn.hidden,
#cancelMovementDetailsEditBtn.hidden {
  display: none;
}

.movement-details-edit-form {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.movement-details-edit-form label {
  display: grid;
  gap: 6px;
}

.movement-details-edit-form label span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.movement-details-edit-form input,
.movement-details-edit-form select,
.movement-details-edit-form textarea {
  width: 100%;
  border: 1px solid #d7dde7;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
}

.movement-details-edit-form textarea {
  min-height: 90px;
  resize: vertical;
}

.movement-details-edit-form .wide {
  grid-column: 1 / -1;
}

.movement-details-edit-form input[readonly] {
  background: #f3f4f6;
  font-weight: 800;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .movement-details-edit-form {
    grid-template-columns: 1fr;
  }
}


/* Workflow Status Actions */
.workflow-status-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.workflow-status-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-secondary {
  background: #64748b;
  color: #fff;
  border: 1px solid #64748b;
}

.btn-secondary:hover {
  background: #475569;
  border-color: #475569;
}


/* Request Type Actions */
.request-type-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.request-type-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-secondary {
  background: #64748b;
  color: #fff;
  border: 1px solid #64748b;
}

.btn-secondary:hover {
  background: #475569;
  border-color: #475569;
}


/* Branch Actions */
.branch-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.branch-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-secondary {
  background: #64748b;
  color: #fff;
  border: 1px solid #64748b;
}

.btn-secondary:hover {
  background: #475569;
  border-color: #475569;
}


/* Reports Viewer Role */
body.reports-viewer-mode .menu-item:not([data-screen="reportsScreen"]) {
  display: none !important;
}

body.reports-viewer-mode [data-jump="movementEntryScreen"] {
  display: none !important;
}


/* Department Actions */
.department-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.department-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}


/* Employee Actions */
.employee-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.employee-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}


/* User Actions */
.user-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.user-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}


/* Mobile Movement Details Approval Panel */
.movement-details-overlay,
.movement-action-overlay {
  overflow-y: auto;
}

.movement-details-panel,
.movement-action-panel {
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
}

.movement-details-body,
.movement-action-details,
.movement-details-edit-form {
  overflow-y: auto;
}

.movement-details-footer,
.movement-action-buttons {
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 3;
}

@media (max-width: 700px) {
  .movement-details-overlay,
  .movement-action-overlay {
    align-items: flex-start;
    justify-content: center;
    padding: 8px;
  }

  .movement-details-panel,
  .movement-action-panel {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: 14px;
    margin-top: 6px;
  }

  .movement-details-header,
  .movement-action-header {
    padding: 12px 14px;
  }

  .movement-details-header h2,
  .movement-action-header h2 {
    font-size: 18px;
  }

  .movement-details-header p,
  .movement-action-header p {
    font-size: 12px;
  }

  .movement-details-body,
  .movement-action-details,
  .movement-details-edit-form {
    grid-template-columns: 1fr !important;
    padding: 12px 14px;
    gap: 8px;
  }

  .movement-details-footer,
  .movement-action-buttons {
    padding: 10px 14px 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .movement-details-footer .btn,
  .movement-action-buttons .btn {
    width: 100%;
    min-height: 42px;
  }

  .movement-details-item,
  .movement-action-item {
    padding: 9px 10px;
  }

  .movement-details-item span,
  .movement-action-item span {
    font-size: 11px;
  }

  .movement-details-item strong,
  .movement-action-item strong {
    font-size: 13px;
  }
}


/* Users Code And New Button Final */
#userCode[readonly] {
  background: #f3f4f6;
  font-weight: 800;
  color: #334155;
}

#newUserBtn {
  border-color: #cbd5e1;
}


/* Final Report PDF XLSX Buttons */
#exportPdfBtn,
#exportXlsxBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

@media (max-width: 700px) {
  #exportPdfBtn,
  #exportXlsxBtn,
  #exportCsvBtn,
  #exportHtmlBtn,
  #printReportBtn {
    width: 100%;
  }
}


/* Real XLSX Table And PDF Fix */
#exportPdfBtn,
#exportXlsxBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

@media (max-width: 700px) {
  #exportPdfBtn,
  #exportXlsxBtn {
    width: 100%;
  }
}


/* Polished Reports View PDF XLSX */
.report-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.report-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.report-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 6px;
}

.report-summary-card strong {
  display: block;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.report-results-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
}

.report-results-title h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.report-results-title span {
  color: #64748b;
  font-size: 13px;
}

#reportTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

#reportTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 900;
  border-bottom: 1px solid #cbd5e1;
  white-space: nowrap;
}

#reportTable th,
#reportTable td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  text-align: right;
}

#reportTable tbody tr:nth-child(even) td {
  background: #f8fafc;
}

#reportTable tbody tr:hover td {
  background: #eef6ff;
}

.report-number-cell,
.report-time-cell,
.report-hours-cell,
.report-code-cell {
  text-align: center !important;
  direction: ltr;
  white-space: nowrap;
}

.report-notes-cell {
  max-width: 260px;
  white-space: normal;
}

#exportPdfBtn,
#exportXlsxBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

@media (max-width: 900px) {
  .report-summary-cards {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .report-results-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .report-summary-cards {
    grid-template-columns: 1fr;
  }

  #exportPdfBtn,
  #exportXlsxBtn,
  #exportCsvBtn,
  #exportHtmlBtn,
  #printReportBtn {
    width: 100%;
  }
}


/* Final Professional Report Layout */
.report-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.report-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.report-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 6px;
}

.report-summary-card strong {
  display: block;
  color: #0f172a;
  font-size: 21px;
  font-weight: 900;
}

.report-results-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 10px;
}

.report-results-title h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  color: #0f172a;
}

.report-results-title span {
  color: #64748b;
  font-size: 13px;
}

#reportTable {
  min-width: 1550px;
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  table-layout: fixed;
}

#reportTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eff6ff;
  color: #0f172a;
  font-weight: 900;
  border-bottom: 1px solid #bfdbfe;
  white-space: nowrap;
  text-align: center;
  padding: 12px 10px;
}

#reportTable th,
#reportTable td {
  padding: 10px 10px;
  border-bottom: 1px solid #e2e8f0;
  border-inline-start: 1px solid #f1f5f9;
  vertical-align: middle;
  text-align: right;
  line-height: 1.55;
}

#reportTable tbody tr:nth-child(even) td {
  background: #f8fafc;
}

#reportTable tbody tr:hover td {
  background: #eef6ff;
}

#reportTable th:nth-child(1),
#reportTable td:nth-child(1) { width: 130px; }

#reportTable th:nth-child(2),
#reportTable td:nth-child(2),
#reportTable th:nth-child(3),
#reportTable td:nth-child(3) { width: 120px; }

#reportTable th:nth-child(4),
#reportTable td:nth-child(4),
#reportTable th:nth-child(5),
#reportTable td:nth-child(5),
#reportTable th:nth-child(6),
#reportTable td:nth-child(6) { width: 90px; }

#reportTable th:nth-child(7),
#reportTable td:nth-child(7) { width: 130px; }

#reportTable th:nth-child(8),
#reportTable td:nth-child(8) { width: 170px; }

#reportTable th:nth-child(9),
#reportTable td:nth-child(9) { width: 190px; }

#reportTable th:nth-child(10),
#reportTable td:nth-child(10) { width: 150px; }

#reportTable th:nth-child(11),
#reportTable td:nth-child(11) { width: 150px; }

#reportTable th:nth-child(12),
#reportTable td:nth-child(12) { width: 130px; }

#reportTable th:nth-child(13),
#reportTable td:nth-child(13) { width: 230px; }

#reportTable th:nth-child(14),
#reportTable td:nth-child(14) { width: 110px; }

.report-code-cell,
.report-date-cell,
.report-time-cell,
.report-hours-cell {
  text-align: center !important;
  direction: ltr;
  white-space: nowrap;
}

.report-text-cell {
  white-space: normal;
  word-break: normal;
}

.report-notes-cell {
  white-space: normal;
  word-break: normal;
  max-width: 230px;
}

#exportPdfBtn,
#exportXlsxBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

@media (max-width: 900px) {
  .report-summary-cards {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .report-results-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .report-summary-cards {
    grid-template-columns: 1fr;
  }

  #exportPdfBtn,
  #exportXlsxBtn,
  #exportCsvBtn,
  #exportHtmlBtn,
  #printReportBtn {
    width: 100%;
  }
}


/* Reports Toolbar Column Manager */
.reports-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  direction: rtl;
}

.reports-toolbar-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-inline-start: auto;
}

.report-tool-btn {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #d8e0ea;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: 0.15s ease;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.04);
}

.report-tool-btn:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  background: #eff6ff;
}

.report-tool-btn.primary {
  background: #1a73e8;
  color: #ffffff;
  border-color: #1a73e8;
}

.report-tool-btn.primary:hover {
  background: #1765cc;
}

.report-tool-btn .tool-icon {
  font-size: 15px;
  line-height: 1;
}

.report-column-panel {
  position: fixed;
  top: 92px;
  left: 24px;
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 130px);
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  z-index: 10000;
  display: none;
  overflow: hidden;
  direction: rtl;
}

.report-column-panel.show {
  display: block;
}

.report-column-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e5eaf2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.report-column-panel-header strong {
  font-size: 16px;
  font-weight: 900;
}

.report-column-panel-close {
  border: none;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-weight: 900;
}

.report-column-panel-body {
  padding: 12px 16px;
  overflow-y: auto;
  max-height: 360px;
}

.report-column-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 700;
}

.report-column-option input {
  width: 16px;
  height: 16px;
}

.report-column-panel-footer {
  padding: 12px 16px;
  border-top: 1px solid #e5eaf2;
  display: flex;
  gap: 8px;
}

.report-column-panel-footer button {
  flex: 1;
}

.report-export-buttons-hidden {
  display: none !important;
}

@media (max-width: 700px) {
  .reports-actions-toolbar,
  .reports-toolbar-left {
    width: 100%;
  }

  .report-tool-btn {
    flex: 1 1 calc(50% - 8px);
  }

  .report-column-panel {
    left: 12px;
    right: 12px;
    top: 70px;
    width: auto;
  }
}


/* Hide old formatted report button */
.report-export-buttons-hidden {
  display: none !important;
}


/* Report Toolbar Buttons Final Fix */
.report-export-buttons-hidden {
  display: none !important;
}

.reports-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  direction: rtl;
}

.reports-toolbar-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-inline-start: auto;
}

.report-tool-btn {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #d8e0ea;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: 0.15s ease;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.04);
}

.report-tool-btn:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  background: #eff6ff;
}

.report-tool-btn.primary {
  background: #1a73e8;
  color: #ffffff;
  border-color: #1a73e8;
}

.report-tool-btn.primary:hover {
  background: #1765cc;
}

.report-tool-btn .tool-icon {
  font-size: 15px;
  line-height: 1;
}

@media (max-width: 700px) {
  .reports-actions-toolbar,
  .reports-toolbar-left {
    width: 100%;
  }

  .report-tool-btn {
    flex: 1 1 calc(50% - 8px);
  }
}


/* Final Report Toolbar Search Print Columns */
.report-export-buttons-hidden {
  display: none !important;
}

.reports-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  direction: rtl;
}

.reports-toolbar-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-inline-start: auto;
}

.report-tool-btn {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 12px;
  border: 1px solid #d8e0ea;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: 0.15s ease;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.04);
}

.report-tool-btn:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  background: #eff6ff;
}

.report-tool-btn.primary {
  background: #1a73e8;
  color: #ffffff;
  border-color: #1a73e8;
}

.report-tool-btn.primary:hover {
  background: #1765cc;
}

.report-tool-btn .tool-icon {
  font-size: 15px;
  line-height: 1;
}

@media (max-width: 700px) {
  .reports-actions-toolbar,
  .reports-toolbar-left {
    width: 100%;
  }

  .report-tool-btn {
    flex: 1 1 calc(50% - 8px);
  }
}


/* Hide Old Report Buttons Final */
.report-export-buttons-hidden,
#showReportBtn,
#reportShowBtn,
#searchReportBtn,
#loadReportBtn {
  display: none !important;
}


/* Employees Excel Import Manual Code */
.employee-code-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  color: #334155;
  font-weight: 700;
}

.employee-code-tools input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.employee-import-panel {
  margin: 14px 0;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
}

.employee-import-panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
}

.employee-import-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.employee-import-actions input[type="file"] {
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  padding: 8px;
  min-height: 38px;
}

.employee-import-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

.employee-import-result {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
}

#employeeCode:not([readonly]) {
  background: #fff7ed;
  border-color: #fb923c;
  font-weight: 900;
}

@media (max-width: 700px) {
  .employee-import-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-import-actions .btn,
  .employee-import-actions input[type="file"] {
    width: 100%;
  }
}


/* =====================================================
   [NexoraHR brand logo styles]
   تنسيق لوجو البرنامج بجانب الاسم
   ===================================================== */
.app-brand,
.brand,
.logo-area,
.company-brand,
.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.app-brand img,
.brand img,
.logo-area img,
.company-brand img,
.header-brand img {
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  vertical-align: middle;
}


/* =====================================================
   [NexoraHR] Dashboard Indicators Styles
   تنسيق شاشة لوحة المؤشرات
   ===================================================== */
.dashboard-indicators-card {
  margin-bottom: 16px;
}

.dashboard-indicator-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.dashboard-indicator-card {
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border: 1px solid #e3edf8;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.dashboard-indicator-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e7f3ff;
  font-size: 22px;
}

.dashboard-indicator-card span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 4px;
}

.dashboard-indicator-card strong {
  display: block;
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
}

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
}

.dashboard-chart-card {
  background: #ffffff;
  border: 1px solid #e3edf8;
  border-radius: 20px;
  padding: 16px;
  min-height: 360px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.dashboard-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-chart-head h3 {
  margin: 0;
  font-size: 17px;
  color: #0f172a;
}

.dashboard-chart-head span {
  color: #64748b;
  font-size: 12px;
}

.dashboard-chart-card canvas {
  width: 100% !important;
  height: 280px !important;
}

.dashboard-chart-fallback-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.dashboard-chart-fallback-table td {
  border-bottom: 1px solid #edf2f7;
  padding: 8px;
}

@media (max-width: 1100px) {
  .dashboard-indicator-summary-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .dashboard-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dashboard-indicator-summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-card {
    min-height: 320px;
  }
}
