:root {
  --primary: #a06ee6;
  --primary-deep: #6e45c7;
  --primary-soft: #f2e9ff;
  --accent: #157a6e;
  --accent-soft: #dff7f1;
  --ink: #24153f;
  --muted: #6a6081;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #fffdfc;
  --surface-dark: #281a48;
  --line: rgba(78, 53, 128, 0.12);
  --danger: #c74d6f;
  --warning: #cc8a2c;
  --success: #1e8d65;
  --shadow-soft: 0 24px 60px rgba(76, 44, 140, 0.12);
  --shadow-strong: 0 28px 90px rgba(49, 23, 94, 0.22);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content-width: 1360px;
  --font-ui: "BYekan", Tahoma, sans-serif;
  --font-display: "BYekan", Tahoma, sans-serif;
}

@font-face {
  font-family: "BYekan";
  src: url("/public/fonts/Yekan.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.75;
  background:
    radial-gradient(
      circle at 12% 16%,
      rgba(160, 110, 230, 0.2),
      transparent 24%
    ),
    radial-gradient(
      circle at 84% 12%,
      rgba(21, 122, 110, 0.12),
      transparent 20%
    ),
    radial-gradient(
      circle at 88% 92%,
      rgba(160, 110, 230, 0.1),
      transparent 22%
    ),
    linear-gradient(135deg, #fbf7ff 0%, #fffdf9 52%, #f4fbfa 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

body::before {
  inset: auto auto -140px -110px;
  width: 320px;
  height: 320px;
  background: radial-gradient(
    circle,
    rgba(160, 110, 230, 0.18),
    transparent 70%
  );
}

body::after {
  inset: 80px -140px auto auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(
    circle,
    rgba(21, 122, 110, 0.12),
    transparent 72%
  );
}

body,
input,
button,
select,
textarea {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

hr {
  border: 0;
  height: 1px;
  margin: 14px 0 18px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(160, 110, 230, 0.22),
    transparent
  );
}

.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  max-width: 1700px;
  margin: 0 auto;
  padding: 22px;
}

#sidebar-root {
  flex: 0 0 320px;
  width: 320px;
  min-width: 320px;
}

.app-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 0 24px;
}

.sidebar {
  position: sticky;
  top: 22px;
  min-height: calc(100vh - 44px);
  padding: 28px 24px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(40, 26, 72, 0.97), rgba(56, 31, 104, 0.94)),
    linear-gradient(135deg, rgba(160, 110, 230, 0.18), transparent 55%);
  color: #f8f2ff;
  box-shadow: var(--shadow-strong);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
}

.sidebar::before,
.sidebar::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.sidebar::before {
  top: -40px;
  left: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.12),
    transparent 68%
  );
}

.sidebar::after {
  bottom: -60px;
  right: -20px;
  width: 220px;
  height: 220px;
  background: radial-gradient(
    circle,
    rgba(160, 110, 230, 0.22),
    transparent 70%
  );
}

.brand-mark,
.topbar,
.inline-actions,
.form-actions,
.card-actions,
.table-actions,
.filter-row,
.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.form-actions {
  display: flex;
  justify-content: center;
  display: flex;
  justify-content: center;
}

.brand-mark {
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    #caa3ff 0%,
    var(--primary) 45%,
    var(--primary-deep) 100%
  );
  box-shadow: 0 18px 40px rgba(160, 110, 230, 0.35);
}

.brand-copy h1,
.brand-copy p,
.topbar h2,
.topbar p,
.hero-card h2,
.hero-card p,
.panel h3,
.panel p,
.login-panel h1,
.login-panel p,
.stat-card p,
.empty-state p,
.notice p,
.metric-tile span,
.metric-tile strong {
  margin: 0;
}

.brand-copy h1,
.topbar h2,
.hero-card h2,
.panel h3,
.login-panel h1,
.modal-header h3,
.stat-card strong {
  font-family: var(--font-display);
  font-weight: 800;
}

.brand-copy p,
.sidebar-note,
.nav-link small,
.muted {
  color: rgba(248, 242, 255, 0.72);
}

.sidebar-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.nav-link {
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.nav-link span {
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
  transform: translateX(-4px);
  background: linear-gradient(
    135deg,
    rgba(160, 110, 230, 0.3),
    rgba(255, 255, 255, 0.08)
  );
  border-color: rgba(227, 211, 252, 0.24);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.sidebar-footer {
  margin-top: auto;
}

.content-grid {
  display: grid;
  gap: 20px;
  max-width: var(--content-width);
  width: 100%;
  margin: 0 auto;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topbar {
  justify-content: space-between;
  align-items: flex-start;
  margin: 0 auto 22px;
  max-width: var(--content-width);
}

.topbar > div:first-child {
  display: grid;
  gap: 6px;
}

.topbar h2 {
  font-size: clamp(1.7rem, 2vw, 2.4rem);
  line-height: 1.35;
}

.topbar p {
  max-width: 760px;
  color: var(--muted);
}

.kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(160, 110, 230, 0.09);
  color: var(--primary-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.panel,
.hero-card,
.stat-card,
.login-panel,
.info-card,
.table-card,
.progress-card,
.empty-state,
.metric-tile,
.issue-card,
.log-item {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.info-card {
  text-align: center;
  background: linear-gradient(
    160deg,
    rgba(109, 53, 231, 0.98),
    rgba(122, 105, 163, 0.98) 56%
  );
  border: #281a48;
}

.panel,
.table-card,
.progress-card,
.info-card,
.empty-state {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.hero-card {
  padding: 30px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.92),
      rgba(249, 242, 255, 0.84)
    ),
    linear-gradient(145deg, rgba(160, 110, 230, 0.08), rgba(21, 122, 110, 0.08));
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 36px;
  pointer-events: none;
}

.hero-card::before {
  width: 230px;
  height: 230px;
  inset: -40px auto auto -60px;
  background: radial-gradient(
    circle,
    rgba(160, 110, 230, 0.18),
    transparent 70%
  );
}

.hero-card::after {
  width: 180px;
  height: 180px;
  inset: auto -50px -50px auto;
  background: radial-gradient(
    circle,
    rgba(21, 122, 110, 0.14),
    transparent 72%
  );
}

.hero-card h2 {
  font-size: clamp(1.6rem, 2vw, 2.6rem);
  line-height: 1.45;
  max-width: 760px;
  margin-top: 14px;
}

.hero-card p {
  max-width: 720px;
  color: var(--muted);
  margin-top: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  padding: 22px;
  border-radius: 26px;
  display: grid;
  gap: 8px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.94),
    rgba(245, 239, 255, 0.9)
  );
}

.stat-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-card strong {
  font-size: 2rem;
  line-height: 1.15;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-panel {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  border-radius: 36px;
}

.login-cover {
  text-align: center;
  padding: 42px;
  color: #fbf7ff;
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.16),
      transparent 22%
    ),
    linear-gradient(
      160deg,
      rgba(27, 17, 51, 0.98),
      rgba(67, 42, 122, 0.98) 56%,
      rgba(21, 122, 110, 0.9)
    );
  display: grid;
  gap: 18px;
}

.login-cover h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.5;
}

.login-cover p {
  color: rgba(255, 249, 255, 0.78);
  max-width: 580px;
}

.login-form-wrap {
  text-align: center;
  padding: 42px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(250, 246, 255, 0.96)
  );
}

.form-grid {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(108, 87, 151, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #9b8eb7;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(160, 110, 230, 0.72);
  background: #fff;
  box-shadow: 0 0 0 5px rgba(160, 110, 230, 0.12);
  transform: translateY(-1px);
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    filter 180ms ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-2px);
  filter: saturate(1.04);
}

button:disabled {
  opacity: 0.72;
  cursor: progress;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 18px 34px rgba(160, 110, 230, 0.28);
}

.btn-secondary {
  color: var(--primary-deep);
  background: rgba(160, 110, 230, 0.12);
}

#sidebar-logout {
  color: var(--accent-soft);
}

.btn-accent {
  color: #0f5f56;
  background: rgba(21, 122, 110, 0.14);
}

.btn-danger {
  color: var(--danger);
  background: rgba(199, 77, 111, 0.12);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
}

.pill.success,
.status-success {
  color: var(--success);
  background: rgba(30, 141, 101, 0.12);
}

.pill.warning,
.status-processing,
.status-partial {
  color: var(--warning);
  background: rgba(204, 138, 44, 0.14);
}

.pill.error,
.status-failed {
  color: var(--danger);
  background: rgba(199, 77, 111, 0.12);
}

.pill.info {
  color: var(--primary-deep);
  background: rgba(160, 110, 230, 0.12);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  gap: 20px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.info-card,
.issue-card {
  border-radius: 22px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 10px;
  text-align: right;
  vertical-align: top;
  border-bottom: 1px solid rgba(89, 61, 144, 0.1);
}

.data-table thead th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.data-table tbody tr:hover {
  background: rgba(160, 110, 230, 0.035);
}

.progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(36, 21, 63, 0.08);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--primary-deep),
    var(--primary),
    var(--accent)
  );
  transition: width 260ms ease;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric-tile {
  padding: 18px;
  border-radius: 22px;
}

.metric-tile span {
  color: var(--muted);
  display: block;
}

.metric-tile strong {
  display: block;
  font-size: 1.8rem;
  margin-top: 10px;
}

.log-feed {
  display: grid;
  gap: 12px;
  max-height: 480px;
  overflow: auto;
  padding-left: 2px;
}

.log-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.log-item strong,
.issue-card strong,
.pay-slip-card strong {
  display: block;
  margin-bottom: 4px;
}

.issue-card,
.pay-slip-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.issue-card.error {
  border-color: rgba(199, 77, 111, 0.28);
  background: linear-gradient(
    180deg,
    rgba(255, 246, 249, 0.95),
    rgba(255, 255, 255, 0.9)
  );
}

.issue-card.warning {
  border-color: rgba(204, 138, 44, 0.28);
  background: linear-gradient(
    180deg,
    rgba(255, 249, 240, 0.95),
    rgba(255, 255, 255, 0.9)
  );
}

.notice,
.message-box {
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid transparent;
}

.notice.info,
.message-box.info {
  color: var(--primary-deep);
  background: rgba(160, 110, 230, 0.08);
  border-color: rgba(160, 110, 230, 0.16);
}

.notice.error,
.message-box.error {
  color: var(--danger);
  background: rgba(199, 77, 111, 0.08);
  border-color: rgba(199, 77, 111, 0.16);
}

.notice.success,
.message-box.success {
  color: var(--success);
  background: rgba(30, 141, 101, 0.08);
  border-color: rgba(30, 141, 101, 0.16);
}

.modal-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 12, 35, 0.66);
  z-index: 90;
}

.modal-root.open {
  display: flex;
}

.modal-panel {
  width: min(1100px, 100%);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-strong);
}

.modal-header,
.modal-body {
  padding: 18px 20px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(89, 61, 144, 0.1);
  background: linear-gradient(
    180deg,
    rgba(249, 244, 255, 0.95),
    rgba(255, 255, 255, 0.95)
  );
}

.modal-body {
  overflow: auto;
  background: #faf7ff;
}

.modal-body iframe,
.modal-body img {
  width: 100%;
  min-height: 72vh;
  border: 0;
  border-radius: 18px;
  background: #fff;
}

.hidden {
  display: none !important;
}

.empty-state {
  text-align: center;
}

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

.content-grid > *,
.stat-card,
.panel,
.table-card,
.progress-card,
.info-card,
.hero-card,
.metric-tile {
  animation: riseIn 420ms ease both;
}

@media (max-width: 1200px) {
  .page-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar {
    position: relative;
    top: 0;
    min-height: auto;
  }

  #sidebar-root {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .login-panel,
  .split-layout,
  .summary-row,
  .two-up,
  .three-up {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell,
  .login-shell {
    padding: 14px;
  }

  .sidebar,
  .login-cover,
  .login-form-wrap,
  .panel,
  .table-card,
  .progress-card,
  .hero-card,
  .info-card,
  .empty-state {
    padding: 18px;
  }

  .topbar {
    align-items: stretch;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }

  .modal-root {
    padding: 12px;
  }

  .modal-body iframe,
  .modal-body img {
    min-height: 60vh;
  }
}

/* === Approval Details Modal Styles === */

/* General Modal Root & Panel */
.modal-root {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.modal-root.open {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease-in-out;
}

.modal-root.open .modal-panel {
  transform: translateY(0);
}

/* Modal Header */
.approval-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
  background-color: #f9f9f9;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.approval-modal-header__text {
  flex-grow: 1;
  margin-right: 16px;
}

.approval-modal-title {
  font-size: 1.4em;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.approval-modal-subtitle {
  font-size: 0.9em;
  color: #666;
  margin-top: 4px;
}

.approval-modal-close {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #888;
  transition: color 0.2s ease;
}

.approval-modal-close:hover {
  color: #333;
}

/* Modal Body & Sections */
.approval-modal-body {
  padding: 24px;
  flex-grow: 1;
}

.approval-section {
  margin-bottom: 24px;
}

.approval-section__title {
  font-size: 1.2em;
  font-weight: 600;
  color: #444;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

/* Approval Details Grid */
.approval-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.approval-detail-card {
  background-color: #fdfdfd;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
}

.approval-detail-card__label {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.approval-detail-card__value {
  font-size: 1em;
  color: #333;
  font-weight: 500;
}

/* Status Specific Styles */
.status-approved {
  color: #28a745;
  font-weight: bold;
}

.status-pending {
  color: #ffc107;
  font-weight: bold;
}

.status-rejected,
.status-declined,
.status-cancelled {
  color: #dc3545;
  font-weight: bold;
}

/* Approval Description */
.approval-description {
  font-size: 1em;
  color: #444;
  line-height: 1.6;
  white-space: pre-wrap; /* Preserve line breaks from description */
}

/* Action History Styles */
.approval-history-list {
  margin-top: 16px;
}

.approval-history-item {
  background-color: #fefefe;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.approval-history-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.approval-history-item__action {
  font-weight: 600;
  color: #555;
}

.approval-history-item__date {
  font-size: 0.85em;
  color: #888;
}

.approval-history-item__meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 8px;
}

.approval-history-item__label {
  font-weight: 500;
  color: #777;
  margin-left: 8px;
}

.approval-history-item__comment p {
  margin: 8px 0 0 0;
  font-size: 0.95em;
  color: #444;
  line-height: 1.5;
}

/* Empty State for History */
.approval-empty-state {
  text-align: center;
  padding: 30px 20px;
  color: #888;
  border: 2px dashed #e0e0e0;
  border-radius: 8px;
  background-color: #fcfcfc;
}

.approval-empty-state__title {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 8px;
}

.approval-empty-state__text {
  font-size: 0.95em;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .approval-modal-header {
    padding: 12px 16px;
  }
  .approval-modal-title {
    font-size: 1.2em;
  }
  .approval-details-grid {
    grid-template-columns: 1fr;
  }
  .modal-panel {
    width: 95%;
  }
}

/* Styling for table status in admin-approvals.html */
td.status-approved {
  color: #28a745;
  font-weight: bold;
}

td.status-pending {
  color: #ffc107;
  font-weight: bold;
}

td.status-rejected,
td.status-declined,
td.status-cancelled {
  color: #dc3545;
  font-weight: bold;
}

/* استایل Modal */
.modal-root {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none; /* JS با تغییر به block نمایش میده */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-root.open { display: flex; }

.modal-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* استایل وضعیت‌ها */
.approval-status { padding: 4px 8px; border-radius: 4px; font-size: 0.85em; }
.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }

/* استایل تاریخچه */
.approval-history-item { border-bottom: 1px solid #eee; padding: 10px 0; }
.approval-history-item__header { display: flex; justify-content: space-between; }

.dashboard-wrapper {
  display: flex ;
  flex-direction: row;
  min-height: 100vh;
}

.page-container {
  flex-grow: 1;
  min-width: 0;
  padding: 2% 5%; 
}


.dashboard-wrapper {
    display: flex !important;
    flex-direction: row !important;
    min-height: 100vh;
    margin-right: 10%; 
    gap: 20px;    
}


/* Employee approvals modal fix */
#approval-modal-root.modal-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
}

#approval-modal-root.modal-root.open {
  display: flex;
}

#approval-modal-root .modal-content {
  width: min(1000px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  margin: auto;
}

.deadline-container {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.deadline-col-right {
  width: 100% !important;
  flex: 1 1 auto !important;
}


.deadline-prefix-input {
  width: 100%;
  text-align: center;
  background-color: #ffffff;
  cursor: not-allowed;
  padding: 8px;
  border-radius: 15px;
  border: 1px solid #ced4da;
  font-weight: bold;
}

/* استایل‌های اختصاصی برای سلکتور چندگانه فیلتردار */
.custom-multiselect-group {
  position: relative;
}

.search-input-field {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  font-size: 14px;
  transition: border-color 0.15s ease-in-out;
}

.search-input-field:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#approval-responsible {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 5px;
  background-color: #ffffff;
}

#approval-responsible option {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f1f1;
  cursor: pointer;
}

#approval-responsible option:checked {
  background-color: #3498db !important;
  color: white;
}

.multiselect-content {
  display: none; /* پیش‌فرض مخفی */
  position: absolute;
  z-index: 1000;
  width: 100%;
  background: #fff;
  border: 1px solid #3498db;
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  gap: 10px; 
  padding: 10px;
}

.pagination-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}

.pagination-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-total {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}
