@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700;800&display=swap');

.portal-scope {
  --portal-primary: #264AFF;
  --portal-primary-soft: rgba(38, 74, 255, 0.12);
  --portal-success: #16a34a;
  --portal-warning: #f59e0b;
  --portal-danger: #ef4444;
  --portal-muted: #707073;
  font-family: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #0f172a;
  background: transparent;
}

.portal-scope .portal-page {
  padding: 0;
  box-sizing: border-box;
}

.portal-scope .portal-title {
  font-weight: 700;
  font-size: 22px;
  color: #0f172a;
}

.portal-scope .portal-subtitle {
  color: var(--portal-muted);
  font-size: 14px;
}

.portal-scope .link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--portal-muted);
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
}

.portal-scope .link-btn:hover {
  color: var(--portal-primary);
}

.portal-scope .btn {
  border-radius: 4px;
  font-weight: 600;
}

.portal-scope .btn.btn-primary {
  background: var(--portal-primary);
  border-color: var(--portal-primary);
}

.portal-scope .btn.btn-outline-secondary {
  color: #475569;
  border-color: #e5e7eb;
  background: transparent;
}

.portal-scope .btn.btn-outline-danger {
  color: #f36b6b;
  border-color: #f36b6b;
}

.portal-scope .btn.btn-outline-secondary:hover,
.portal-scope .btn.btn-outline-secondary:focus {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.portal-scope .btn.btn-outline-danger:hover,
.portal-scope .btn.btn-outline-danger:focus {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.portal-scope .btn.btn-primary:hover,
.portal-scope .btn.btn-primary:focus {
  background: #3357e6;
  border-color: #3357e6;
}

.portal-scope .group-actions .btn {
  min-height: 30px;
  padding: 4px 12px;
}

.portal-scope .card {
  position: relative;
  background: #ffffff;
  border-radius: 4px;
  border: none;
  padding: 20px 16px;
  box-sizing: border-box;
}

.portal-scope .card .card-body {
  padding: 0;
}

.portal-scope .card .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0 0 16px;
  margin-bottom: 16px;
}

.portal-scope .portal-card {
  padding: 0;
}

.portal-scope .portal-card .card-body {
  padding: 16px;
}

.portal-scope .portal-card .card-header {
  padding: 12px 16px 0;
  margin-bottom: 0;
}

.portal-scope .portal-meta {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 12px;
}

.portal-scope .portal-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  /* padding: 0 4px 12px; */
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.portal-scope .portal-tabs-spacer {
  flex: 1;
}

.portal-scope .portal-tab {
  border: none;
  background: transparent;
  color: #707073;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  height: 55px;
  padding: 0px 16px;
}

.portal-scope .portal-tab.active {
  color: var(--portal-primary);
  border-color: var(--portal-primary);
  font-weight: 600;
}

.portal-scope .portal-select,
.portal-scope .portal-search {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  font-size: 14px;
  background-color: #fff;
  color: #0f172a;
}

.portal-scope .portal-search {
  min-width: 220px;
}

.portal-scope select {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 2px 32px 2px 8px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234E5969' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
  font-size: 14px;
}

.portal-scope select.portal-select {
  padding: 8px 32px 8px 10px;
}

.portal-scope select[multiple],
.portal-scope select[size]:not([size="1"]) {
  background-image: none;
  padding-right: 12px;
}

.portal-scope input[type="file"].form-control {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #475569;
}

.portal-scope input[type="file"].form-control::file-selector-button {
  margin-right: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--portal-primary);
  background: var(--portal-primary);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

input[type="file"].form-control::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--portal-primary);
  background: var(--portal-primary);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.portal-scope input[type="file"].form-control::file-selector-button:hover,
input[type="file"].form-control::-webkit-file-upload-button {
  background: #3357e6;
  border-color: #3357e6;
  border-radius: 2px
}

.portal-scope .portal-table {
  overflow-x: auto;
}

.portal-scope .portal-table table {
  width: 100%;
  border-collapse: collapse;
}

.portal-scope .portal-table th,
.portal-scope .portal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  color: #13121a;
}

.portal-scope .portal-table th {
  color: #707073;
  font-weight: 600;
  text-align: left;
}

.portal-scope .state-text {
  color: #7c879b;
  font-weight: 600;
  font-size: 14px;
}

.portal-scope .state-text.error {
  color: #c2410c;
}

.portal-scope .state-text.muted {
  color: #94a3b8;
  font-weight: 500;
}

.portal-scope .portal-empty {
  color: #7c879b;
  font-size: 13px;
  text-align: center;
  padding: 12px;
}

.portal-scope .main-grid .state-text:not(.error):not(.muted),
.portal-scope .notice-hero-slide.is-empty .notice-hero-title,
.portal-scope .notice-hero-slide.is-empty .notice-hero-subtitle {
  color: #C9CDD4;
  font-weight: 400;
}

/* Home */
.portal-scope .main-grid {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.portal-scope .main-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.portal-scope .main-col-left {
  flex: 2.2 1 0;
  min-height: 0;
  height: calc(100vh - 56px - 16px);
}

.portal-scope .main-col-right {
  flex: 1 1 0;
}

.portal-scope .welcome-card {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.portal-scope .welcome-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-scope .welcome-avatar {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 30px;
  color: #1d2b78;
  background: #e0e7ff;
}

.portal-scope .welcome-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-scope .welcome-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portal-scope .welcome-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.portal-scope .welcome-status {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  padding: 4px 10px;
  border-radius: 8px;
  width: fit-content;
  max-width: 100%;
  line-height: 1.3;
  word-break: break-word;
}

.portal-scope .welcome-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--portal-primary);
  box-shadow: 0 0 0 2px var(--portal-primary-soft);
}

.portal-scope .welcome-card.has-status .welcome-inner {
  align-items: flex-start;
}

.portal-scope .welcome-card.has-status .welcome-avatar {
  margin-top: 2px;
}

.portal-scope .welcome-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.portal-scope .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #707073;
}

.portal-scope .meta-item .meta-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.portal-scope .meta-item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  line-height: 1;
}

.portal-scope .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  /* display: none; */
}

.portal-scope .panel-title {
  font-weight: 700;
  font-size: 16px;
  color: #13121a;
}

.portal-scope .quick-card {
  background: transparent;
  padding: 0;
}

.portal-scope .quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.portal-scope .quick-items {
  display: contents;
}

.portal-scope .quick-search {
  flex: 0 0 360px;
  min-width: 360px;
  max-width: 360px;
  padding: 0;
}

.portal-scope .quick-search .employee-search-bar {
  border: none;
  border-radius: 8px;
  border: solid 1px #ffffff;
  background: rgba(255,255,255,.5);
  height: 48px;
}

.portal-scope .quick-search .portal-search-wrap {
  height: 100%;
}

.portal-scope .quick-search .portal-search {
  border: none;
  background: transparent;
  padding: 0 12px 0 4px;
  height: 100%;
  font-size: 14px;
  color: #13121A;
}

.portal-scope .quick-search .portal-search::placeholder {
  color: #C9CDD4;
}

.portal-scope .quick-search .portal-search-clear {
  top: 50%;
  transform: translateY(-50%);
}

.portal-scope .quick-search .btn.btn-primary {
  background: transparent;
  border: none;
  color: #2f53ff;
  font-weight: 400;
  padding: 0 8px 0 20px;
  border-radius: 8px;
  height: 100%;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.portal-scope .quick-search .employee-search-bar .btn.btn-primary {
  height: 100%;
}

.portal-scope .quick-search .btn.btn-primary:hover,
.portal-scope .quick-search .btn.btn-primary:focus {
  background: transparent;
  border: none;
}

.portal-scope .quick-search .employee-search-bar .btn.btn-primary::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 22px;
  background: #E5E6EB;
}

.portal-scope .quick-search .employee-search-bar .btn.btn-primary .mdi {
  font-size: 16px;
  line-height: 1;
}

.portal-scope .quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
      backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.03), inset 0 1.5px 1px rgba(255, 255, 255, 0.8), inset 0 -1px 1px rgba(255, 255, 255, 0.2);
  background: rgba(255,255,255,.5);
  flex: 0 0 auto;
  height: 48px;
  width: fit-content;
}

.portal-scope .quick-chip:hover {
  background: #ffffff;
}

/* .portal-scope .quick-chip--more {
  background: #eef4ff;
  border: 2px solid #ffffff;
  padding: 8px 20px;
  gap: 6px;
} */


.portal-scope .quick-chip--more .quick-label {
  font-weight: 500;
  font-size: 14px;
}

.portal-scope .quick-chip--more .mdi {
  font-size: 18px;
  color: #5b6b86;
}

.portal-scope .quick-grid .state-text {
  flex: 1 1 100%;
}

.portal-scope .quick-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: transparent;
}

.portal-scope .quick-icon-img-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-scope .quick-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.portal-scope .quick-icon-fallback {
  display: none;
}

.portal-scope .quick-icon.quick-icon--fallback .quick-icon-img,
.portal-scope .review-icon.quick-icon--fallback .quick-icon-img {
  display: none;
}

.portal-scope .quick-icon.quick-icon--fallback .quick-icon-fallback,
.portal-scope .review-icon.quick-icon--fallback .quick-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-scope .quick-icon .mdi {
  font-size: 18px;
  line-height: 1;
}

.portal-scope .quick-icon--plain {
  background: transparent;
  color: var(--portal-primary);
}

.portal-scope .quick-label {
  font-weight: 400;
  color: #13121A;
  white-space: nowrap;
}

.portal-scope .review-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: none;
}

.portal-scope .review-icon .mdi {
  font-size: 18px;
  line-height: 1;
}

.portal-scope .leaf-color .mdi {
  font-size: 22px;
  line-height: 1;
}

.portal-scope .review-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #ffffff;
  margin: 0px 16px;
  border-radius: 4px;
  padding: 8px !important;
}

.portal-scope .review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
}

.portal-scope .review-row:hover {
  background: #f7f7fa;
}

.portal-scope .review-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-scope .schedule-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  padding-top: 16px;
}

.portal-scope .schedule-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  box-shadow: 0 0px 0px rgba(0, 0, 0, 0.03), inset 0 1.5px 1px rgba(255, 255, 255, 0.8), inset 0 -1px 1px rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, .5);
  border-radius: 8px;
}

.portal-scope .schedule-card .schedule-grid {
  flex: 1 1 auto;
  background-color: #ffffff;
  border-radius: 4px;
}

.portal-scope .schedule-card .calendar-grid {
  gap: 2px;
  justify-content: start;
}

.portal-scope .date-panel {
  border-right: 1px solid #e5e7eb;
  padding-right: 0px;
}

.portal-scope .calendar-control {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin: 0px 16px 0px 28px;
}

.portal-scope .calendar-nav {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #707073;
  display: grid;
  place-items: center;
  cursor: pointer;
  order: 1;
}

.portal-scope .calendar-nav .mdi {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: #707073;
}

.portal-scope .month-label {
  order: 0;
  margin-right: auto;
}

.portal-scope .calendar-nav:first-of-type {
  margin-left: auto;
}

.portal-scope .calendar-nav + .calendar-nav {
  margin-left: 10px;
}

.portal-scope .calendar-nav:hover {
  background: #f1f5f9;
  color: #707073;
}

.portal-scope .month-label {
  font-weight: 400;
  font-size: 14px;
  color: #13121A;
}

.portal-scope .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 40px);
  gap: 2px;
  margin-top: 12px;
  margin-right: 24px;
  margin-left: 16px;
  justify-content: start;
}

.portal-scope .calendar-header {
  font-size: 12px;
  width: 36px;
  height: 36px;
  color: #707073;
  text-align: center;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portal-scope .calendar-cell {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 4px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 400;
  color: #13121A;
  cursor: pointer;
  line-height: 40px;
}

.portal-scope .calendar-cell--muted {
  color: #cbd5e1;
}

.portal-scope .calendar-cell--active {
  background: #3b64ff;
  color: #fff;
}

.portal-scope .calendar-cell:hover {
  background: #f1f5f9;
}

.portal-scope .calendar-cell--active:hover {
  background: #3b64ff;
  color: #fff;
}

.portal-scope .calendar-cell:focus-visible {
  outline: 2px solid rgba(59, 100, 255, 0.35);
  outline-offset: 2px;
}

.portal-scope .event-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-right: 16px;
}

.portal-scope .event-panel .state-text {
  margin: 12px auto;
  text-align: center;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portal-scope .event-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 6px;
  border-radius: 12px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  min-height: 0;
  box-shadow: none;
  transition: background 0.15s ease;
}

.portal-scope .event-row:hover {
  background: #f7f7fa;
  box-shadow: none;
}

.portal-scope .event-row:active {
  background: #f7f7fa;
  transform: none;
}

.portal-scope .event-row--active {
  background: #f7f7fa;
  box-shadow: none;
}

.portal-scope .event-row:focus-visible {
  outline: 2px solid rgba(59, 100, 255, 0.3);
  outline-offset: 2px;
}

.portal-scope .event-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: grid;
  place-items: center;
}

.portal-scope .event-icon .mdi {
  font-size: 24px;
}

.portal-scope .event-info {
  width: 100%;
}

.portal-scope .event-info .event-title {
  font-weight: 700;
  font-size: 16px;
  color: #13121a;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-scope .event-info .event-time {
  font-size: 14px;
  color: #707073;
  margin-top: 6px;
}

.portal-scope .event-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-scope .event-title-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.portal-scope .event-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.portal-scope .event-panel--compact .event-title-row {
  display: block;
}

.portal-scope .event-panel--compact .event-title-main {
  width: 100%;
}

.portal-scope .event-panel--compact .event-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  margin-top: 6px;
}

.portal-scope .event-panel--compact .event-pill {
  width: fit-content;
}

.portal-scope .event-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--event-accent, #3b64ff);
  background: var(--event-accent-bg, rgba(59, 100, 255, 0.12));
  border: 1px solid rgba(15, 23, 42, 0.08);
}

/* Calendar & Tasks */
.portal-scope .calendar-tasks-page {
  padding: 0;
  display: flex;
  flex-direction: column;
  /* min-height: calc(100vh - 56px); */
}

.portal-scope .calendar-task-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  border: none;
  border-radius: 8px;
  box-shadow: none;
  background: #ffffff;
  overflow: hidden;
  height: calc(100vh - 133px - 16px);
  max-height: calc(100vh - 133px - 16px);
  margin-bottom: 16px;
  flex: 1 1 auto;
}

.portal-scope .calendar-task-side {
  padding: 16px;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portal-scope .calendar-task-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.portal-scope .calendar-task-month {
  font-size: 18px;
  font-weight: 600;
  color: #13121A;
}

.portal-scope .calendar-task-side-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portal-scope .calendar-task-side-nav .calendar-nav {
  order: 0;
}

.portal-scope .calendar-task-side-nav .calendar-nav:first-of-type {
  margin-left: 0;
}

.portal-scope .calendar-task-mini {
  margin: 0;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  gap: 2px;
  justify-content: start;
}

.portal-scope .calendar-task-mini .calendar-header {
  font-size: 12px;
  color: #86909C;
  width: auto;
  height: 32px;
}

.portal-scope .calendar-task-mini .calendar-cell {
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 4px;
  justify-self: center;
}

.portal-scope .calendar-task-mini .calendar-cell--today {
  background: #f1f5f9;
}

.portal-scope .calendar-task-mini .calendar-cell--today.calendar-cell--active {
  background: #3b64ff;
  color: #ffffff;
}

.portal-scope .calendar-task-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.portal-scope .calendar-task-legend-item {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 44px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  color: #111827;
  box-shadow: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.portal-scope .calendar-task-legend-item:hover {
  background: #f3f4f6;
}

.portal-scope .calendar-task-legend-item.is-disabled {
  color: #111827;
  background: #ffffff;
  box-shadow: none;
}

.portal-scope .calendar-task-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid var(--legend-color, #9ca3af);
  flex-shrink: 0;
  position: relative;
}

.portal-scope .calendar-task-legend-item.is-active .calendar-task-legend-swatch::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--legend-color, #9ca3af);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.portal-scope .calendar-task-legend-item.is-disabled .calendar-task-legend-swatch {
  background: #ffffff;
  border-color: var(--legend-color, #9ca3af);
}

.portal-scope .calendar-task-legend-text {
  font-weight: 400;
}

.portal-scope .calendar-task-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.portal-scope .calendar-task-link {
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  color: #13121A;
  padding: 0;
  cursor: pointer;
}

.portal-scope .calendar-task-schedule {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.portal-scope .calendar-task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  --calendar-task-view-height: 36px;
}

.portal-scope .calendar-task-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portal-scope .calendar-task-notify {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portal-scope .calendar-task-notify .form-check {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.portal-scope .calendar-task-notify .form-check-input {
  accent-color: var(--portal-primary);
}

.portal-scope .calendar-task-notify .form-check-input:checked {
  background-color: var(--portal-primary);
  border-color: var(--portal-primary);
}

.portal-scope .calendar-task-notify .form-check-input:focus {
  border-color: var(--portal-primary);
  box-shadow: none;
  outline: none;
}

.portal-scope .calendar-task-notify.is-enabled .form-check-label {
  color: var(--portal-primary);
  font-weight: 600;
}

.portal-scope .calendar-task-notify-hint {
  line-height: 1.2;
  font-weight: 400;
}

.portal-scope .calendar-task-view-group {
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
}

.portal-scope .calendar-task-view-group .calendar-task-add {
  display: inline-flex;
  align-items: center;
  height: var(--calendar-task-view-height);
  min-height: var(--calendar-task-view-height);
  gap: 8px;
  padding: 0 16px;
  box-sizing: border-box;
}

.portal-scope .calendar-task-view-group .calendar-task-add .mdi {
  font-size: 16px;
  line-height: 1;
}

.portal-scope .calendar-task-views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 4px;
  height: var(--calendar-task-view-height);
  box-sizing: border-box;
}

.portal-scope .calendar-view-btn {
  border: none;
  background: transparent;
  color: #111827;
  font-size: 14px;
  padding: 6px 18px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 300;
}

.portal-scope .calendar-view-btn.is-active {
  background: #eef2ff;
  color: var(--portal-primary);
}

.portal-scope .calendar-task-schedule-grid {
  border-radius: 12px;
  overflow: auto;
  background: #fff;
  min-height: 840px;
  flex: 1 1 auto;
  min-height: 0;
}

.portal-scope .schedule-row {
  display: grid;
  grid-template-columns: 64px repeat(var(--schedule-cols, 8), minmax(110px, 1fr));
}

.portal-scope .schedule-row + .schedule-row {
  border-top: 1px solid #e5e7eb;
}

.portal-scope .schedule-cell {
  border-right: 1px solid #e5e7eb;
  min-height: 56px;
  padding: 8px 10px;
  box-sizing: border-box;
}

.portal-scope .schedule-cell:last-child {
  border-right: none;
}

.portal-scope .schedule-header .schedule-cell {
  min-height: 64px;
  background: #ffffff;
}

.portal-scope .calendar-task-schedule-grid.schedule-grid--time .schedule-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #ffffff;
  box-shadow: 0 1px 0 #e5e7eb;
}

.portal-scope .schedule-time-head {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86909C;
  font-size: 12px;
  font-weight: 600;
}

.portal-scope .schedule-tz {
  margin-top: 8px;
}

.portal-scope .schedule-day {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.portal-scope .schedule-day-name {
  font-size: 12px;
  color: #6b7280;
}

.portal-scope .schedule-day-date {
  font-size: 16px;
  font-weight: 600;
  color: #13121A;
}

.portal-scope .schedule-cell.is-active {
  background: rgba(38, 74, 255, 0.06);
}

.portal-scope .schedule-cell.schedule-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.portal-scope .schedule-event {
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--event-bg, rgba(59, 100, 255, 0.08));
  border-left: none;
  color: var(--event-text, #111827);
  font-size: 12px;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.portal-scope .schedule-event-title {
  font-weight: 600;
}

.portal-scope .schedule-event-time {
  color: #475569;
  font-size: 11px;
}

.portal-scope .schedule-time {
  font-size: 12px;
  color: #86909C;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-scope .schedule-grid--month {
  border-radius: 12px;
}

.portal-scope .schedule-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.portal-scope .schedule-month-cell {
  min-height: 96px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px;
  font-size: 13px;
  color: #13121A;
}

.portal-scope .schedule-month-cell:not(.schedule-month-head) {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portal-scope .schedule-month-date {
  font-weight: 600;
}

.portal-scope .schedule-month-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.portal-scope .schedule-month-event {
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--event-bg, rgba(59, 100, 255, 0.08));
  border-left: none;
  color: var(--event-text, #111827);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.schedule-detail-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #13121A;
  margin-bottom: 8px;
}

.schedule-detail-highlight {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 10px 12px;
  margin-bottom: 12px;
  color: #13121A;
}

.schedule-detail-highlight .schedule-detail-link,
.schedule-detail-highlight .schedule-detail-time,
.schedule-detail-highlight .schedule-detail-attendees {
  font-weight: 600;
  margin-bottom: 6px;
}

.schedule-detail-highlight .schedule-detail-attendees {
  margin-bottom: 0;
}

.schedule-detail-highlight a {
  color: #2563eb;
  text-decoration: underline;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: inline-block;
  max-width: 100%;
}

.schedule-detail-visitor {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 12px;
  color: #13121A;
}

.schedule-detail-visitor-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.schedule-detail-visitor-label {
  min-width: 80px;
  font-weight: 600;
  color: #475569;
}

.schedule-detail-visitor-value {
  flex: 1;
  min-width: 0;
  color: #0f172a;
}

.schedule-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.schedule-detail-meta-item {
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.schedule-detail-meta-label {
  font-size: 12px;
  color: #64748b;
  text-transform: none;
}

.schedule-detail-meta-value {
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

@media (max-width: 576px) {
  .schedule-detail-visitor-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .schedule-detail-visitor-label {
    min-width: 0;
  }

  .schedule-detail-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

.portal-scope .schedule-create-tabs {
  margin-bottom: 12px;
  gap: 18px;
  padding: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}


.portal-scope .schedule-create-tabs .portal-tab {
  height: auto;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.portal-scope .schedule-create-tabs .portal-tab:hover,
.portal-scope .schedule-create-tabs .portal-tab:focus {
  color: var(--portal-primary);
}

.portal-scope .schedule-create-tabs .portal-tab.active {
  color: var(--portal-primary);
  border-bottom-color: var(--portal-primary);
}

.schedule-create-modal .schedule-create-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.schedule-create-modal .schedule-create-tabs .portal-tab {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.schedule-create-modal .schedule-create-tabs .portal-tab:hover,
.schedule-create-modal .schedule-create-tabs .portal-tab:focus {
  color: var(--portal-primary, #264AFF);
}

.schedule-create-modal .schedule-create-tabs .portal-tab.active {
  color: var(--portal-primary, #264AFF);
  border-bottom-color: var(--portal-primary, #264AFF);
}

.schedule-create-modal .schedule-create-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #13121A;
  margin-bottom: 12px;
}

.schedule-create-modal .schedule-create-divider {
  border-top: 1px solid #e5e7eb;
  margin: 16px 0;
}

.schedule-type-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-type-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.schedule-type-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schedule-type-section .schedule-type-options {
  margin-top: 10px;
}

.schedule-type-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-type-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.schedule-type-option input {
  margin-top: 3px;
}

.schedule-type-option:hover {
  border-color: #cbd5f5;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.schedule-type-card {
  flex: 1;
}

.schedule-type-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.schedule-type-desc {
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}

.schedule-type-option input:checked + .schedule-type-card .schedule-type-title {
  color: var(--portal-primary, #264AFF);
}

input[type="radio"] {
  accent-color: var(--portal-primary, #264AFF);
}

#teams-link-modal .modal-content {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

#teams-link-modal .modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

#teams-link-modal .modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #13121A;
}

#teams-link-modal .modal-body {
  padding: 16px 20px 8px;
}

#teams-link-modal .modal-body p {
  margin-bottom: 10px;
  color: #475569;
}

#teams-link-modal [data-role="teams-link"] {
  display: inline-block;
  max-width: 100%;
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  word-break: break-all;
}

#teams-link-modal .modal-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid #e5e7eb;
}

#teams-link-modal .btn-outline-secondary {
  border-color: #d1d5db;
}

#teams-link-modal .btn-primary {
  background: var(--portal-primary, #264AFF);
  border-color: var(--portal-primary, #264AFF);
}

.portal-scope .schedule-create-panel {
  padding-top: 4px;
}

.portal-scope .schedule-month-cell:nth-child(7n) {
  border-right: none;
}

.portal-scope .schedule-month-head {
  min-height: 48px;
  font-size: 12px;
  color: #86909C;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.portal-scope .schedule-month-cell.is-muted {
  color: #cbd5e1;
}

.portal-scope .schedule-month-cell.is-active {
  background: rgba(38, 74, 255, 0.06);
}

@media (max-width: 1200px) {
  .portal-scope .calendar-task-shell {
    grid-template-columns: 1fr;
  }
  .portal-scope .calendar-task-side {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
}

@media (max-width: 1100px) {
  .portal-scope .calendar-task-schedule-grid {
    overflow: auto;
    min-height: 0;
  }

  .portal-scope .calendar-task-schedule-grid.schedule-grid--time {
    display: block;
  }

  .portal-scope .calendar-task-schedule-grid.schedule-grid--time .schedule-header {
    min-height: 44px;
  }

  .portal-scope .calendar-task-schedule-grid.schedule-grid--time .schedule-row {
    flex: initial;
  }

  .portal-scope .calendar-task-schedule-grid.schedule-grid--time .schedule-cell {
    min-height: 0;
    padding: 6px 6px;
  }

  .portal-scope .schedule-row {
    grid-template-columns: 48px repeat(var(--schedule-cols, 7), minmax(64px, 1fr));
  }

  .portal-scope .schedule-month-grid {
    grid-template-columns: repeat(7, minmax(64px, 1fr));
  }

  .portal-scope .schedule-month-cell {
    min-height: 56px;
    padding: 6px;
  }
}

@media (max-width: 900px) {
  .portal-scope .calendar-task-schedule-grid {
    overflow: auto;
    max-height: calc(100vh - 260px);
  }

  .portal-scope .calendar-task-schedule-grid.schedule-grid--time {
    display: block;
  }
}

.portal-scope .event-pill--time {
  color: #0f172a;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.portal-scope .event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.portal-scope .event-meta--organizer {
  margin-top: 4px;
}

.portal-scope .event-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.portal-scope .event-meta-item .mdi {
  font-size: 14px;
}

.portal-scope .review-label {
  font-weight: 400;
  color: #1f2937;
}

.portal-scope .review-value {
  font-weight: 700;
  font-size: 14px;
  color: #13121a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.portal-scope .notice-hero {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  /* min-height: calc(170px + 182px + 12px); */
  display: flex;
  flex-direction: column;
  padding: 0;
  /* background: url('../img/portal/notice_bg.png') center/cover no-repeat; */
}

.portal-scope .notice-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  box-sizing: border-box;
  justify-content: flex-start;
  min-height: 0;
  background: url('../img/portal/notice_bg.png') center/cover no-repeat;
  aspect-ratio: 16 / 6;
  overflow: hidden;
  touch-action: pan-y;
}

.portal-scope .notice-hero-track {
  display: flex;
  height: 100%;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}

.portal-scope .notice-hero-slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: none;
  background: transparent;
  text-align: left;
  padding: 18px 20px;
  cursor: pointer;
}

.portal-scope .notice-hero-slide.is-empty {
  cursor: default;
}

.portal-scope .notice-hero-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.portal-scope .notice-hero-subtitle {
  color: #BCBCBF;
  font-size: 14px;
  margin-top: 16px;
}

.portal-scope .notice-hero-indicator {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.portal-scope .notice-hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.portal-scope .notice-hero-dot.is-active {
  background: rgba(255, 255, 255, 0.9);
}

.portal-scope .notice-hero-cta {
  position: absolute;
  right: 16px;
  bottom: 16px;
  border: none;
  background: #fff3;
  color: #fffc;
  border-radius: 4px;
  padding: 6px 16px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  letter-spacing: 0.4px;
  font-size: 12px;
  text-transform: uppercase;
}

.portal-scope .notice-hero-cta .mdi {
  font-size: 18px;
}

.portal-scope .notice-hero-cta:disabled {
  cursor: default;
  opacity: 0.6;
}

.portal-scope .notice-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 182px;
  max-height: 182px;
  overflow: hidden;
}

.portal-scope .notice-items--hero {
  margin: 12px 0px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  padding: 8px 10px;
  min-height: 182px;
  max-height: 182px;
}

.portal-scope .notice-items .state-text {
  margin: auto;
  text-align: center;
  width: 100%;
}

.portal-scope .notice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  height: 30px;
}

.portal-scope .notice-row:hover {
  background: #f7f7fa;
}

.portal-scope .notice-row-title {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 70%;
  font-weight: 400;
  font-size: 14px;
  color: #13121a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-scope .notice-row-date {
  font-weight: 400;
  font-size: 12px;
  color: #bcbcbf;
  flex-shrink: 0;
}

.portal-scope .notice-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.portal-scope .notice-detail-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 56px - 16px);
}

.portal-scope .notice-detail-card {
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
}

.portal-scope .notice-detail-page .notice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.portal-scope .notice-detail-page .notice-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.portal-scope .notice-detail-page .notice-title {
  font-size: 24px;
  font-weight: 700;
  color: #13121a;
  margin: 0;
  text-align: left;
  word-break: break-word;
}

.portal-scope .notice-detail-page .notice-subtitle {
  color: #8a8f9c;
  font-size: 14px;
  line-height: 1.5;
}

.portal-scope .notice-detail-page .notice-meta {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  color: #8a8f9c;
  font-size: 13px;
  white-space: nowrap;
}

.portal-scope .notice-detail-page .notice-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.portal-scope .notice-detail-page .notice-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  border: 1px solid #eceef4;
  border-radius: 4px;
  background: #f9fafc;
  color: #1f2937;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-y: auto;
}

.portal-scope .notice-detail-page .notice-attachments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-scope .notice-detail-page .attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e6e8ee;
  background: #ffffff;
}

.portal-scope .notice-detail-page .attachment-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.portal-scope .notice-detail-page .attachment-info .mdi {
  font-size: 18px;
  color: #94a3b8;
}

.portal-scope .notice-detail-page .attachment-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-scope .notice-detail-page .attachment-item a {
  color: var(--portal-primary);
  font-weight: 600;
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 0;
}

.portal-scope .notice-detail-page .attachment-item a:hover {
  text-decoration: underline;
}

.portal-scope .notice-detail-page .detail-file-preview {
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.2;
}

/* Requests */
.portal-scope .request-page {
  padding: 0;
}

.portal-scope .request-page .header h1 {
  margin: 4px 0 12px;
  color: #0f172a;
  font-size: 22px;
}

.portal-scope .portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.portal-scope .portal-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.portal-scope .portal-header h1 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 22px;
}

.portal-scope .portal-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.portal-scope .category-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portal-scope .category-card {
  background: #fff;
  border-radius: 4px;
  padding: 20px 16px;
  box-sizing: border-box;
}

.portal-scope .category-title {
  font-weight: 700;
  color: #13121a;
  margin-bottom: 16px;
  font-size: 16px;
}

.portal-scope .subgroup-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-scope .subgroup-title {
  font-weight: 400;
  color: #13121a;
  margin-bottom: 16px;
  font-size: 14px;
}

.portal-scope .leaf-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.portal-scope .leaf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
  flex: 0 0 calc(25% - 12px);
  min-width: 180px;
}

.portal-scope .leaf:hover {
  /* transform: translateY(-1px); */
  background: #f8fafc;
}

.portal-scope .leaf-color {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0f172a;
}

.portal-scope .leaf-title {
  color: #13121a;
  font-weight: 400;
}

/* Approvals list */
.portal-scope .portal-layout {
  padding: 12px 4px 16px;
}

.portal-scope .list-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-scope .filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.portal-scope .filter-label {
  font-size: 12px;
  color: #707073;
  margin-bottom: 6px;
  display: block;
}

.portal-scope .list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-scope .item {
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  padding: 8px;
  background: #fff;
  transition: border 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-height: 148px;
  box-sizing: border-box;
}

.portal-scope .item:hover {
  border-color: rgba(59, 100, 255, 0.4);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.portal-scope .item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.portal-scope .item-title {
  font-weight: 700;
  color: #13121a;
  font-size: 14px;
}

.portal-scope .item-body {
  display: grid;
  gap: 4px;
}

.portal-scope .item-row {
  display: flex;
  gap: 6px;
  font-size: 14px;
  line-height: 20px;
  color: #111827;
}

.portal-scope .label {
  color: #707073;
  font-weight: 400;
  font-size: 14px;
}

.portal-scope .value {
  color: #13121a;
  font-weight: 400;
  font-size: 14px;
}

.portal-scope .item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.portal-scope .avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e0e7ff;
  display: grid;
  place-items: center;
  font-weight: 400;
  font-size: 10px;
  color: #4338ca;
  overflow: hidden;
}

.portal-scope .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-scope .submitted {
  color: #6b7280;
  font-size: 12px;
}

.portal-scope .footer-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111827;
  font-weight: 600;
}

.portal-scope .applicant-name {
  font-size: 12px;
  color: #707073;
}

.portal-scope .pill {
  padding: 0 4px;
  line-height: 20px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 400;
  color: #0f172a;
}

.portal-scope .pill-pending { background: #fef9c3; color: #92400e; }
.portal-scope .pill-approved { background: #dcfce7; color: #166534; }
.portal-scope .pill-rejected { background: #fee2e2; color: #991b1b; }
.portal-scope .pill-withdrawn { background: #e2e8f0; color: #475569; }
.portal-scope .pill-review { background: #e0e7ff; color: #4338ca; }

.portal-scope .ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Approvals tabs */
.portal-scope .approvals-page {
  padding: 0;
  background-color: #ffffff;
}

.portal-scope .approvals-page .item-row {
  min-width: 0;
}

.portal-scope .approvals-page .item-row .label {
  flex: 0 1 auto;
  max-width: 50%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-scope .approvals-page .item-row .value {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-scope .approvals-page .portal-tabs {
  background: transparent;
  border: none;
  border-bottom: 1px solid #e6e8ee;
  border-radius: 0;
  /* padding: 10px 16px; */
  gap: 0px;
  margin: 0;
  height: 56px;
  line-height: 56px;
}

.portal-scope .approvals-page .portal-tab {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: #13121a;
}

.portal-scope .approvals-page .portal-tab.active {
  font-weight: 400;
  color: #13121a;
}

/* Approvals layout */
.portal-scope .approvals-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  padding: 0;
  height: calc(100vh - 56px - 149px);
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  min-height: 0;
}

.portal-scope .approvals-layout .list-panel {
  min-height: 0;
  border-right: 1px solid #eef0f4;
  background: #fff;
  gap: 0;
  width: 320px;
}

.portal-scope .approvals-layout .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0;
    padding: 16px;
    border-bottom: none;
    background: #fff;
  gap: 8px;
}

.portal-scope .approvals-layout .filter-label {
  display: none;
}

.portal-scope .approvals-layout .portal-select {
  height: 32px;
  padding: 4px 28px 4px 8px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  color: #13121a;
}

.portal-scope .approvals-layout .portal-select:focus,
.portal-scope .approvals-layout .portal-select:focus-visible {
  outline: none;
  box-shadow: none;
}

.portal-scope .approvals-layout .list {
  flex: 1;
  overflow: auto;
  padding: 0 8px 8px;
}

.portal-scope .approvals-layout .list .state-text {
  margin: auto;
  text-align: center;
  width: 100%;
}

.portal-scope .approvals-layout .list-footer {
  padding: 12px 4px 0;
  text-align: center;
}

.portal-scope .approvals-layout .portal-select__control {
  border: none;
}

.portal-scope .approvals-layout .portal-select__caret {
  margin-left: 4px;
}

.portal-scope .item.active {
  border-color: var(--portal-primary);
}

.portal-scope .detail-panel {
  background: transparent;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.portal-scope .approvals-layout .detail-panel .detail-card {
  border: none;
  border-radius: 0;
  height: 100%;
}

.portal-scope .approvals-layout .detail-panel .card-top {
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid #eef0f4;
  color: #707073;
  font-size: 12px;
}

.portal-scope .approvals-layout .detail-panel .card-body {
  padding: 16px;
}

.portal-scope .approvals-layout .detail-panel .opinion-footer {
  padding: 12px 20px;
  border-top: 1px solid #eef0f4;
}

.portal-scope .approvals-layout .detail-panel .footer-actions {
  padding: 12px 20px 16px;
  border-top: 1px solid #eef0f4;
}

.portal-scope .approvals-layout .detail-file-preview {
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.2;
}

.portal-scope .list-empty,
.portal-scope .detail-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #94a3b8;
}

.portal-scope .empty-img {
  max-width: 240px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.portal-scope .empty-text {
  font-weight: 600;
  color: #94a3b8;
}

/* Payslips */
.portal-scope.salary-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  min-height: 0;
  overflow: hidden;
  color: #13121A;
}

.portal-scope.salary-shell .admin-page-head {
  flex: 0 0 auto;
  align-items: flex-end;
}

.portal-scope.salary-shell .salary-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.portal-scope.salary-shell {
  color: #13121A;
}

.portal-scope .salary-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 16px;
}

.portal-scope .salary-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-left: auto;
}

.portal-scope .salary-visibility-btn {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: var(--portal-primary);
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.portal-scope .salary-visibility-btn .mdi {
  font-size: 18px;
  line-height: 1;
  color: inherit;
}

.portal-scope .salary-visibility-btn:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
}

.portal-scope .salary-visibility-btn:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}

.portal-scope .salary-calendar {
  padding: 14px 0;
}

.portal-scope .salary-calendar-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.portal-scope .salary-year {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.portal-scope .salary-year-value {
  background: transparent;
  padding: 4px 8px;
  border-radius: 2px;
  font-weight: 400;
  color: #13121A;
  letter-spacing: 0.4px;
}

.portal-scope .salary-year:hover .salary-year-value,
.portal-scope .salary-year-value:hover {
  background: #F2F2F5;
}

.portal-scope .salary-year-nav {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.portal-scope .salary-year-nav:hover {
  background: #F2F2F5;
  color: #13121A;
}

.portal-scope .salary-year-divider {
  width: 1px;
  height: 40px;
  background: #e5e7eb;
}

.portal-scope .salary-months {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
}

.portal-scope .salary-month {
  border: none;
  background: transparent;
  border-radius: 2px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #13121A;
  width: 56px;
  height: 56px;
  text-align: center;
  cursor: pointer;
}

.portal-scope .salary-month .month-number {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #13121A;
}

.portal-scope .salary-month .month-label {
  font-size: 12px;
  color: #86909C;
  line-height: 1;
  margin-right: inherit;
}

.portal-scope .salary-month.is-active {
  background: var(--portal-primary);
  color: #fff;
  box-shadow: none;
}

.portal-scope .salary-month.is-active .month-label {
  color: #fff;
}

.portal-scope .salary-month.is-active .month-number {
  color: #fff;
}

.portal-scope .salary-month.has-data {
  box-shadow: none;
}

.portal-scope .salary-month.is-active.has-data {
  box-shadow: none;
}

.portal-scope .salary-month:hover {
  background: #F2F2F5;
}

.portal-scope .salary-month.is-active:hover {
  background: var(--portal-primary);
}

.portal-scope .salary-divider {
  height: 1px;
  width: 100%;
  background: #e5e7eb;
}

.portal-scope .salary-sheet-panel {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  flex: 1 1 auto;
  height: auto;
}

.portal-scope .salary-inner-divider {
  height: 1px;
  width: 100%;
  background: #e5e7eb;
  margin: 16px 0;
}

.portal-scope .salary-empty-state {
  flex: 1 1 auto;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.portal-scope .salary-sheet {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.portal-scope .salary-sheet.salary-sheet-state {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-scope .salary-sheet-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-scope .salary-sheet-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #13121A;
}

.portal-scope .salary-sheet-company {
  display: inline-flex;
  align-items: center;
  border-radius: 0;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 400;
  color: #86909C;
  border: solid 1px #E5E6EB;
  border-radius: 15px;
  background: transparent;
}

.portal-scope .salary-sheet-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  margin-top: 12px;
  color: #475569;
  font-size: 14px;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.portal-scope .salary-sheet-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-scope .salary-sheet-row--privacy {
  flex: 1 1 auto;
  flex-wrap: wrap;
  row-gap: 10px;
}

.portal-scope .salary-sheet-row--privacy .salary-visibility-btn {
  margin-left: auto;
}

.portal-scope .salary-sheet-row .label {
  color: #6b7280;
  white-space: nowrap;
}

.portal-scope .salary-sheet-row .value {
  color: #13121A;
}

.portal-scope .salary-table {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  margin-top: 24px;
}

.portal-scope .salary-sheet-panel > .salary-calendar,
.portal-scope .salary-sheet-panel > .salary-empty-state,
.portal-scope .salary-sheet-panel > .salary-sheet,
.portal-scope .salary-sheet-panel > .salary-table {
  padding: 0 16px;
}

.portal-scope .salary-toolbar {
  padding: 0;
  border: none;
  border-radius: 8px;
}

.portal-scope .salary-toolbar .card-body {
  padding: 16px;
}

.portal-scope .salary-toolbar .admin-toolbar {
  margin: 0;
}

.portal-scope .salary-toolbar .admin-filters {
  align-items: center;
}

.portal-scope .salary-toolbar .admin-toolbar .form-control,
.portal-scope .salary-toolbar .admin-toolbar .form-select,
.portal-scope .salary-toolbar .admin-toolbar input[type="month"] {
  height: 40px;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--md-border-default, #c9cdd4);
  background: var(--md-fill-surface, #ffffff);
  color: var(--md-text-primary, #13121A);
}

.portal-scope .salary-toolbar .admin-toolbar .btn {
  height: 40px;
  min-height: 40px;
  line-height: 38px;
  font-weight: 400;
}

.portal-scope .salary-toolbar .admin-toolbar .btn[type="reset"],
.portal-scope .salary-toolbar .admin-toolbar .btn[data-action*="reset"],
.portal-scope .salary-toolbar .admin-toolbar .btn[id*="reset"] {
  background: transparent;
  border-color: transparent;
}

.portal-scope .salary-toolbar .admin-toolbar .btn[type="reset"]:hover,
.portal-scope .salary-toolbar .admin-toolbar .btn[data-action*="reset"]:hover,
.portal-scope .salary-toolbar .admin-toolbar .btn[id*="reset"]:hover {
  background: transparent;
  border-color: transparent;
  color: var(--md-brand-primary, #264AFF);
}

.portal-scope .salary-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  grid-auto-rows: calc((100% - 32px) / 3);
  overflow: hidden;
}

.portal-scope .salary-list .state-text {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: center;
  text-align: center;
}

.portal-scope .salary-page .list-empty {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.portal-scope .salary-slip-card {
  border: 1px solid transparent;
  border-radius: 4px;
  background: #fff;
  padding: 18px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: flex-start;
  align-content: start;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  transition: border 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
  text-align: left;
  cursor: pointer;
  height: 100%;
}

.portal-scope .salary-slip-card:hover {
  /* border-color: rgba(59, 100, 255, 0.4); */
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.portal-scope .salary-slip-icon {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 2px;
}

.portal-scope .salary-slip-icon .brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--portal-primary, #264AFF);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-scope .salary-slip-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-scope .salary-slip-title {
  font-weight: 700;
  color: #13121a;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-scope .salary-slip-company {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-scope .salary-slip-meta {
  display: grid;
  gap: 10px;
  font-size: 13px;
  padding-top: 8px;
  border-top: 1px solid #eef0f4;
}

.portal-scope .salary-slip-row {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
  padding-top: 6px;
  line-height: 1.4;
}

/* .portal-scope .salary-slip-row + .salary-slip-row {
  border-top: 1px dashed #f1f5f9;
} */

@media (max-height: 900px) {
  .portal-scope .salary-slip-row:nth-child(3) {
    display: none;
  }
}

.portal-scope .salary-slip-row .label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.portal-scope .salary-slip-row .value {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-scope .salary-slip-actions {
  align-self: center;
}

@media (max-width: 1200px) {
  .portal-scope .salary-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .portal-scope .salary-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .portal-scope .salary-list {
    grid-template-columns: 1fr;
  }
}

.portal-scope .salary-detail-page {
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portal-scope .salary-detail-card {
  padding: 0;
  border: 1px solid #eef0f4;
}

.portal-scope .salary-detail-card .card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portal-scope .salary-summary {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: start;
}

.portal-scope .salary-summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eef2ff;
  color: #1d4ed8;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.portal-scope .salary-summary-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.portal-scope .salary-summary-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

.portal-scope .salary-summary-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 10px;
  font-size: 13px;
  grid-column: 1 / -1;
}

.portal-scope .salary-summary-row {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.portal-scope .salary-summary-row .label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.portal-scope .salary-summary-row .value {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-scope .salary-summary-actions {
  display: flex;
  align-items: flex-start;
}

.portal-scope .salary-mask-btn {
  white-space: nowrap;
}

.portal-scope .salary-table-wrap {
  border: none;
  border-radius: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  background: transparent;
  position: relative;
}

.portal-scope .salary-table-wrap::after {
  content: none;
}

.portal-scope .salary-watermark-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--wm-cols, 3), minmax(0, 1fr));
  grid-template-rows: repeat(var(--wm-rows, 3), 1fr);
  grid-auto-rows: 1fr;
  align-items: center;
  justify-items: center;
  gap: 32px;
  align-content: stretch;
  pointer-events: none;
  z-index: 3;
}

.portal-scope .salary-watermark-grid span {
  font-size: 28px;
  color: #13121A;
  opacity: 0.06;
  transform: rotate(-15deg);
  white-space: nowrap;
}

.portal-scope .salary-detail-table-grid {
  position: relative;
  z-index: 1;
}

.portal-scope .salary-detail-table-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 860px;
}

.portal-scope .salary-detail-table-grid th,
.portal-scope .salary-detail-table-grid td {
  border: 1px solid #e5e7eb;
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  line-height: 1.5;
}

.portal-scope .salary-detail-table-grid td {
  background: #ffffff;
}

.portal-scope .salary-table-info th,
.portal-scope .salary-table-meta th {
  background: #f8fafc;
  font-weight: 600;
}

.portal-scope .salary-table-meta th {
  font-weight: 500;
}

.portal-scope .salary-section {
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.2px;
  border-radius: 0;
}

.portal-scope .salary-section-earnings {
  background: #fdecc8;
}

.portal-scope .salary-section-deductions {
  background: #dbeafe;
}

.portal-scope .salary-section-net {
  background: #fef9c3;
}

.portal-scope .salary-group {
  font-weight: 600;
  background: #f8fafc;
  text-align: center;
  min-width: 110px;
}

.portal-scope .salary-label {
  color: #13121A;
}

.portal-scope .salary-value {
  color: #13121A;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.portal-scope .salary-value--left {
  text-align: left;
}

.portal-scope .salary-empty {
  background: #fff;
}

.portal-scope .salary-table-total th {
  background: #f8fafc;
  font-weight: 700;
}

.portal-scope .salary-table-total td {
  background: #f8fafc;
  font-weight: 700;
}

.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite th,
.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite td {
  border: none;
  border-bottom: 1px solid #eef2f7;
  padding: 16px;
}

.portal-scope .salary-slip-table .salary-item-label {
  font-weight: 600;
  color: #13121A;
}

.portal-scope .salary-slip-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.portal-scope .salary-slip-table .salary-section {
  text-align: center;
}

.portal-scope .salary-slip-table th,
.portal-scope .salary-slip-table td {
  border: 1px solid #eef2f7;
}

.portal-scope .salary-table-total .salary-total-label,
.portal-scope .salary-table-total .salary-total-value {
  background: #f3f5ff;
  font-weight: 700;
}

.portal-scope .salary-table-total .salary-total-value {
  text-align: right;
}

.portal-scope .salary-table-total .salary-total-label.is-warning,
.portal-scope .salary-table-total .salary-total-value.is-warning {
  background: #fff4df;
}

.portal-scope .salary-table-total .salary-total-value.is-warning {
  color: #f97316;
}

.portal-scope .salary-net-row th,
.portal-scope .salary-net-row td {
  background: #eef1ff;
  font-weight: 700;
}

.portal-scope .salary-net-row .salary-net-value {
  color: #2563eb;
  text-align: right;
}

.portal-scope .salary-note-row td {
  background: #ffffff;
  color: #13121A;
}

.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite tr:last-child th,
.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite tr:last-child td {
  border-bottom: none;
}

.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite .salary-section-earnings {
  background: #eef1ff;
}

.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite .salary-section-deductions {
  background: #fff4df;
}

.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite .salary-section-net {
  background: #fdf7d7;
}

.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite .salary-group {
  background: #fff;
}

.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite .salary-table-total th,
.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite .salary-table-total td {
  font-weight: 700;
}

.portal-scope .salary-detail-table-grid.salary-detail-table-grid--lite {
  min-width: 0;
  width: 100%;
}

@media (max-width: 960px) {
  .portal-scope .salary-slip-card {
    grid-template-columns: 1fr;
  }
  .portal-scope .salary-slip-actions {
    justify-self: flex-start;
  }
  .portal-scope .salary-summary {
    grid-template-columns: 1fr;
  }
  .portal-scope .salary-summary-actions {
    justify-self: flex-start;
  }
  .portal-scope .salary-detail-table-grid th,
  .portal-scope .salary-detail-table-grid td {
    padding: 10px 12px;
  }
}

@media (max-width: 1100px) {
  .portal-scope .salary-calendar-row {
    flex-direction: column;
    align-items: stretch;
  }
  .portal-scope .salary-year-divider {
    width: 100%;
    height: 1px;
  }
  .portal-scope .salary-months {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .portal-scope .salary-month {
    flex: 0 0 56px;
  }
}

@media (max-width: 640px) {
  .portal-scope .salary-topbar {
    justify-content: flex-start;
  }
  .portal-scope .salary-month {
    flex: 0 0 56px;
  }
}

/* Request form */
.portal-scope .request-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.portal-scope .request-detail-card {
  margin-top: 0;
  border-radius: 4px;
  height: 100%;
  overflow-y: auto;
}

.portal-scope .request-detail-card .detail-body {
  width: 50%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 60px;
}

.portal-scope .request-detail-card .card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 0;
  border-bottom: none;
}

.portal-scope .request-detail-page h2 {
  margin: 0;
  color: #0f172a;
}

.portal-scope .request-detail-page h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #0f172a;
}

.portal-scope .request-detail-page .meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #475569;
  font-size: 14px;
}

.portal-scope .request-detail-page .section {
  margin-top: 0px;
  padding-top: 0px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-scope .request-detail-page .muted {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.portal-scope .request-detail-page .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 18px;
  margin-top: 12px;
  align-items: stretch;
}

.portal-scope .request-detail-page .form-grid.nested {
  grid-template-columns: 1fr;
}

.portal-scope .request-detail-page .form-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.portal-scope .request-detail-page .form-item.full {
  grid-column: 1 / -1;
}

.portal-scope .request-detail-page .field-label {
  font-weight: 400;
  color: #13121A;
  font-size: 14px;
}

.portal-scope .request-detail-page .field-help-inline {
  margin-left: 6px;
  color: #6b7280;
  font-weight: 500;
  font-size: 12px;
}

.portal-scope .request-detail-page .field-help {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.portal-scope .request-detail-page .required {
  color: #ef4444;
  margin-left: 4px;
}

.portal-scope .request-detail-page .field-control {
    width: 100%;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    font-size: 14px;
  }

  .portal-scope .request-detail-page .date-field {
    position: relative;
  }

  .portal-scope .request-detail-page .date-field .date-input {
    padding-right: 40px;
    cursor: pointer;
  }

  .portal-scope .request-detail-page .date-field .date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #94a3b8;
    pointer-events: none;
  }

  .portal-scope .request-detail-page .date-field input::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
  }

.portal-scope .request-detail-page .field-display {
  border: none;
  background: transparent;
  padding: 10px 12px;
}

.portal-scope .request-detail-page .field-control::placeholder {
  color: #C9CDD4;
}

.portal-scope .request-detail-page textarea.form-control {
  resize: vertical;
  min-height: 96px;
  overflow: auto;
}

.portal-scope .request-detail-page .portal-select__control {
  border-radius: 4px;
}

.portal-scope .request-detail-page .portal-select__input::placeholder {
  color: #C9CDD4;
}

.portal-scope .portal-select {
  position: relative;
  width: 100%;
}

.portal-scope .portal-select__control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  background: #fff;
  cursor: text;
}

.portal-scope .portal-select__control.is-invalid {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

.portal-scope .portal-select__chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-scope .portal-select__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eef2ff;
  color: #1f2937;
  font-size: 12px;
}

.portal-scope .portal-select__chip button {
  border: none;
  background: transparent;
  padding: 0;
  color: #64748b;
  cursor: pointer;
}

.portal-scope .portal-select__input {
  border: none;
  outline: none;
  flex: 1 1 80px;
  min-width: 80px;
  padding: 4px 0;
  font-size: 14px;
  background: transparent;
  color: #0f172a;
}

.portal-scope .portal-select__caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #94a3b8;
  pointer-events: none;
}

.portal-scope .portal-select__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  max-height: 220px;
  overflow: auto;
  z-index: 20;
  display: none;
}

.portal-scope .portal-select.is-open .portal-select__menu {
  display: block;
}

.portal-scope .portal-select__option {
  padding: 8px 10px;
  font-size: 14px;
  color: #0f172a;
  cursor: pointer;
}

.portal-scope .portal-select__option:hover {
  background: #f8fafc;
}

.portal-scope .portal-select__option.is-selected {
  background: #eef2ff;
  font-weight: 600;
}

.portal-scope .portal-select__option.is-hidden {
  display: none;
}

.portal-scope .portal-select__empty {
  padding: 8px 10px;
  color: #94a3b8;
  font-size: 13px;
}

.portal-scope .portal-select--disabled .portal-select__control {
  background: #f8fafc;
  cursor: not-allowed;
}

.portal-scope .portal-select--disabled .portal-select__input {
  cursor: not-allowed;
}

.portal-scope .portal-select--disabled .portal-select__menu {
  display: none !important;
}

.portal-scope .request-detail-page .field-control:focus {
  border-color: rgba(59, 100, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(59, 100, 255, 0.15);
  outline: none;
}

.portal-scope .request-detail-page .field-control.is-invalid {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

.portal-scope .request-detail-page .group-block {
  grid-column: 1 / -1;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
}

.portal-scope .request-detail-page .group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 22px;
  background: #f2f3ff;
}

.portal-scope .request-detail-page .group-actions {
  display: flex;
  align-items: center;
}

.portal-scope .request-detail-page .group-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-scope .request-detail-page .group-row {
  border: 1px solid #E5E6EB;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.portal-scope .request-detail-page .group-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.portal-scope .request-detail-page .form-grid.nested {
  margin-top: 0;
  gap: 24px;
  padding: 24px;
}

.portal-scope .request-detail-page .group-actions .btn-link {
  color: var(--portal-primary);
}

.portal-scope .request-detail-page .group-actions .btn-link:hover {
  color: var(--portal-primary);
}

.portal-scope .request-detail-page .actions {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid #E5E6EB;
  padding: 16px;
  width: 50%;
  background: #ffffff;
  box-sizing: border-box;
}

.portal-scope .request-detail-page .actions .btn {
  border-radius: 4px;
}

.portal-scope .request-detail-page .group-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0;
}

.portal-scope .request-detail-page .group-footer .btn {
  padding: 8px 16px;
  border-radius: 4px;
  color: var(--portal-primary);
  border-color: var(--portal-primary);
}

.portal-scope .request-detail-page .chip-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0f172a;
  font-weight: 700;
  font-size: 12px;
}

.portal-scope .request-detail-page .file-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-scope .request-detail-page .file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.portal-scope .request-detail-page .file-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px dashed #cbd5f5;
  background: #f8fafc;
  cursor: pointer;
}

.portal-scope .request-detail-page .file-picker:hover {
  border-color: #c7d2fe;
  background: #f1f5f9;
}

.portal-scope .request-detail-page .file-picker__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.portal-scope .request-detail-page .file-picker__meta {
  color: #64748b;
  font-size: 12px;
}

.portal-scope .request-detail-page .file-picker.is-uploading {
  opacity: 0.75;
  cursor: progress;
}

.portal-scope .request-detail-page .file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-scope .request-detail-page .file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #eef2ff;
  color: #1f2937;
  font-size: 12px;
}

.portal-scope .request-detail-page .file-chip a {
  color: inherit;
  text-decoration: none;
}

.portal-scope .request-detail-page .file-chip .mdi {
  font-size: 14px;
}

.portal-scope .request-detail-page .file-chip button {
  margin-left: auto;
}

.portal-scope .request-detail-page .error-text {
  color: #b91c1c;
  font-size: 12px;
  margin: 0;
}

.portal-scope .request-detail-page .approval-process {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 8px;
}

.portal-scope .request-detail-page .approval-step {
  display: flex;
  gap: 16px;
  position: relative;
}

.portal-scope .request-detail-page .approval-rail {
  position: relative;
  width: 20px;
  display: flex;
  justify-content: center;
}

.portal-scope .request-detail-page .approval-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #c7d2fe;
  background: #ffffff;
  margin-top: 4px;
}

.portal-scope .request-detail-page .approval-line {
  position: absolute;
  top: 20px;
  bottom: -20px;
  width: 2px;
  background: #e2e8f0;
}

.portal-scope .request-detail-page .approval-step.is-last .approval-line {
  display: none;
}

.portal-scope .request-detail-page .approval-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-scope .request-detail-page .approval-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.portal-scope .request-detail-page .approval-assignees {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.portal-scope .request-detail-page .approval-assignees[data-action="open-approver-modal"] {
  flex-wrap: nowrap;
  align-items: center;
}

.portal-scope .request-detail-page .approval-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.portal-scope .request-detail-page .approval-assignees[data-action="open-approver-modal"] .approval-chip-list {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}

.portal-scope .request-detail-page .approval-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #F2F2F5;
  color: #13121A;
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
}

.portal-scope .request-detail-page .approval-chip-avatar {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 12px;
  color: #1f2937;
  overflow: hidden;
}

.portal-scope .request-detail-page .approval-chip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-scope .request-detail-page .approval-chip-name {
  white-space: nowrap;
}

.portal-scope .request-detail-page .approval-chip-remove {
  border: none;
  background: transparent;
  color: #4E5969;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.portal-scope .request-detail-page .approval-chip-remove .mdi {
  font-size: 16px;
}

.portal-scope .request-detail-page .approval-placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.portal-scope .request-detail-page .approval-assignees[data-action="open-approver-modal"] {
  cursor: pointer;
}

.portal-scope .request-detail-page .approval-add {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 2px solid #3b64ff;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3b64ff;
  cursor: pointer;
}

.portal-scope .request-detail-page .approval-add .mdi {
  font-size: 22px;
}

.portal-scope .request-detail-page .approval-add:hover {
  background: #e5edff;
}

.portal-scope .portal-approver-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
  z-index: 2000;
}

.portal-scope .portal-approver-modal.is-open {
  display: flex;
}

.portal-scope .portal-approver-card {
  width: 980px;
  max-width: calc(100vw - 48px);
  height: 72vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portal-scope .portal-approver-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.portal-scope .portal-approver-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.portal-scope .portal-approver-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

.portal-scope .portal-approver-left {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e5e7eb;
  min-width: 0;
  min-height: 0;
}

.portal-scope .portal-approver-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.portal-scope .portal-approver-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #ffffff;
}

.portal-scope .portal-approver-search input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
  color: #111827;
}

.portal-scope .portal-approver-search input::placeholder {
  color: #9ca3af;
}

.portal-scope .portal-approver-search .mdi {
  color: #94a3b8;
}

.portal-scope .portal-approver-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-top: solid 1px #E5E6EB;
  overflow-x: hidden;
}

.portal-scope .portal-approver-tree,
.portal-scope .portal-approver-search-results {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: auto;
  overflow-x: hidden;
  flex: 1;
}

.portal-scope .approver-tree-node {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.portal-scope .approver-dept-row {
  display: block;
  padding: 16px 24px;
  border-radius: 0;
  cursor: pointer;
}

.portal-scope .approver-dept-row:hover {
  background: #f2f2f5;
}

.portal-scope .approver-dept-row.is-selected {
  background: #f2f3ff;
}

.portal-scope .approver-dept-select {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  cursor: pointer;
}

.portal-scope .approver-row-content {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - var(--indent, 0px));
  box-sizing: border-box;
}

.portal-scope .approver-row-content .approver-avatar{
  border-radius: 4px;
  width:40px;
  height: 40px;
}

.portal-scope .approver-tree-name {
  font-weight: 400;
  color: #13121A;
  font-size: 14px;
  text-indent: 4px;
}

.portal-scope .approver-tree-node.is-root >.approver-dept-row .approver-tree-name {
  font-weight: 700;
  font-size: 16px;
}

.portal-scope .approver-tree-count {
  margin-left: 6px;
  font-weight: 400;
  color: #86909C;
  font-size: 14px;
}

.portal-scope .approver-tree-path {
  font-size: 12px;
  color: #94a3b8;
}

.portal-scope .approver-dept-children {
  border: none;
  background: transparent;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.portal-scope .approver-dept-divider {
  width: 1px;
  height: 16px;
  background: #d1d5db;
  display: inline-block;
}

.portal-scope .approver-tree-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 0;
}

.portal-scope .approver-tree-body.is-collapsed {
  display: none;
}


.portal-scope .approver-employee {
  display: block;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 0;
  cursor: pointer;
  border: 1px solid transparent;
}

.portal-scope .approver-employee .approver-row-content {
  display: inline-grid;
  grid-template-columns: 20px 32px 1fr;
  align-items: center;
  gap: 8px;
  width: calc(100% - var(--indent, 0px));
  box-sizing: border-box;
}

.portal-scope .approver-selected-item {
  display: grid;
  grid-template-columns: 40px 1fr 24px;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-radius: 0;
  cursor: default;
}

.portal-scope .approver-employee:hover {
  background: #f2f2f5;
}

.portal-scope .approver-employee.is-selected {
  background: #f2f3ff;
  border-color: #f2f3ff;
}

.portal-scope .approver-checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid #86909C;
  border-radius: 2px;
  background: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
}

.portal-scope .approver-checkbox::after {
  content: '';
  width: 8px;
  height: 4px;
  border: 2px solid #ffffff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg);
  opacity: 0;
}

.portal-scope .approver-checkbox.is-indeterminate {
  background: var(--portal-primary);
  border-color: var(--portal-primary);
}

.portal-scope .approver-checkbox.is-indeterminate::after {
  width: 10px;
  height: 0;
  border: none;
  border-top: 2px solid #ffffff;
  transform: none;
  opacity: 1;
}

.portal-scope .approver-checkbox:checked {
  background: #3b64ff;
  border-color: #3b64ff;
}

.portal-scope .approver-checkbox:checked::after {
  opacity: 1;
}

.portal-scope .approver-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  overflow: hidden;
}

.portal-scope .approver-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-scope .approver-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 40px;
}

.portal-scope .approver-name {
  font-size: 14px;
  color: #111827;
  text-indent: 8px;
}

.portal-scope .approver-path {
  font-size: 12px;
  color: #94a3b8;
  display: block;
}

.portal-scope .portal-approver-selected-header {
  padding: 0px 24px;
  height: 72px;
  line-height: 72px;
  font-weight: 600;
  color: #111827;
  font-size: 14px;
}

.portal-scope .portal-approver-selected-list {
  flex: 1;
  overflow: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.portal-scope .approver-selected-item {
  border: none;
}

.portal-scope .approver-selected-item:hover {
  background: #f2f2f5;
}

.portal-scope .approver-selected-item .approver-avatar {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: none;
}

.portal-scope .approver-remove {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.portal-scope .portal-approver-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
}

.portal-scope .approver-empty {
  padding: 16px;
  color: #94a3b8;
  font-size: 14px;
}

.portal-scope .request-detail-page .approver-row {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.portal-scope .request-detail-page .approver-label {
  font-weight: 600;
  color: #0f172a;
}

.portal-scope .request-detail-page .approver-select,
.portal-scope .request-detail-page .approver-row .portal-select {
  max-width: 480px;
}

.portal-scope .request-detail-page .approver-row .portal-select__menu {
  z-index: 40;
}

.portal-scope .request-detail-page .approver-row .error-text {
  grid-column: 2 / -1;
}

.portal-scope .request-detail-page .loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 14px;
}

.portal-scope .request-detail-page .loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(59, 100, 255, 0.2);
  border-top-color: #3b64ff;
  animation: portal-spin 0.8s linear infinite;
}

.portal-scope .request-detail-page .actions .btn[data-action="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portal-scope .request-detail-page .submit-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portal-scope .request-detail-page .submit-loading .loading-spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
}

.portal-scope .request-detail-page .submit-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.2);
  z-index: 10;
}

.portal-scope .request-detail-page .submit-overlay__content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  color: #0f172a;
  font-weight: 600;
}

@keyframes portal-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
  .portal-scope .request-detail-card .detail-body {
    width: 100%;
  }
  .portal-scope .request-detail-page .actions {
    width: 100%;
  }
  .portal-scope .request-detail-page .form-grid {
    grid-template-columns: 1fr;
  }
  .portal-scope .request-detail-page .group-block {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .portal-scope .request-detail-page .form-grid {
    grid-template-columns: 1fr;
  }
  .portal-scope .request-detail-page .form-grid.nested {
    grid-template-columns: 1fr;
  }
  .portal-scope .request-detail-page .group-block {
    grid-column: span 1;
  }
  .portal-scope .request-detail-page .approver-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
  .portal-scope .request-detail-page .approver-select,
  .portal-scope .request-detail-page .approver-row .portal-select {
    max-width: none;
    width: 100%;
  }
  .portal-scope .request-detail-page .approval-step {
    gap: 12px;
  }
  .portal-scope .portal-approver-card {
    width: 100%;
    height: 80vh;
    border-radius: 10px;
  }
  .portal-scope .portal-approver-body {
    grid-template-columns: 1fr;
  }
  .portal-scope .portal-approver-left {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
}

.portal-scope .detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.portal-scope .portal-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
  margin-top: 12px;
  align-items: stretch;
}

.portal-scope .portal-form-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  background: #f8fafc;
}

.portal-scope .portal-form-item.full {
  grid-column: 1 / -1;
}

.portal-scope .portal-form-label {
  font-weight: 600;
  color: #0f172a;
  font-size: 14px;
}

.portal-scope .portal-form-help {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.portal-scope .portal-form-error {
  color: #b91c1c;
  font-size: 12px;
}

.portal-scope .portal-group-card {
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 12px;
  background: #f9fafb;
}

.portal-scope .portal-group-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  margin-bottom: 12px;
}

.portal-scope .portal-file-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-scope .portal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #eef2ff;
  color: #1f2937;
  font-size: 12px;
}

.portal-scope .actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.portal-scope.portal-requests-scroll {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  min-height: 0;
  overflow: hidden;
}

.portal-scope.portal-requests-scroll .admin-page-head {
  flex: 0 0 auto;
}

.portal-scope.portal-requests-scroll .portal-page.request-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.portal-scope.portal-detail-scroll {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.portal-scope.portal-detail-scroll .admin-page-head {
  flex: 0 0 auto;
}

.portal-scope.portal-detail-scroll .portal-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  height: calc(100vh - 147px);
}

.portal-scope .form-control,
.portal-scope .form-select {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  background-color: #fff;
}

.portal-scope .form-control {
  padding: 10px 12px;
}

.portal-scope .form-select {
  padding: 10px 36px 10px 12px;
}

.portal-scope .form-control:focus,
.portal-scope .form-select:focus {
  border-color: rgba(59, 100, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(59, 100, 255, 0.15);
}

/* Approval detail */
.portal-scope .detail-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.portal-scope .detail-card {
  background: #ffffff;
  border: 1px solid #e6e8ee;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.portal-scope .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 12px;
  color: #8a8f9c;
  font-size: 13px;
  border-bottom: 1px solid #eceef4;
}

.portal-scope .card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  overflow-y: auto;
}

.portal-scope .title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.portal-scope .task-title {
  align-items: center;
  gap: 16px;
  margin: 0 0 8px;
}

.portal-scope .task-title span {
  font-size: 24px;
  font-weight: 700;
  color: #13121a;
}

.portal-scope .title-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-scope .avatar-lg {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cde2ff, #e7e9ff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  font-size: 12px;
  color: #2d1f7a;
  overflow: hidden;
  flex-shrink: 0;
}

.portal-scope .avatar-lg span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-transform: uppercase;
}

.portal-scope .avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-scope .meta-text {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-scope .name {
  font-weight: 400;
  color: #13121a;
  font-size: 14px;
}

.portal-scope .submitted {
  color: #707073;
  font-size: 14px;
}

.portal-scope .status-pill {
  font-weight: 400;
  font-size: 14px;
}

.portal-scope .portal-pill {
  padding: 4px 4px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 400;
  color: #0f172a;
}

.portal-scope .portal-pill-approved { background: #dcfce7; color: #166534; }
.portal-scope .portal-pill-rejected { background: #fee2e2; color: #991b1b; }
.portal-scope .portal-pill-withdrawn { background: #e2e8f0; color: #475569; }
.portal-scope .portal-pill-review { background: #e0e7ff; color: #4338ca; }
.portal-scope .portal-pill-pending { background: #fef9c3; color: #92400e; }

.portal-scope .section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-scope .section-title {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #13121a;
  font-weight: 500;
  font-size: 16px;
}

.portal-scope .accent {
  width: 4px;
  height: 12px;
  border-radius: 1px;
  background: var(--portal-primary);
}

.portal-scope .detail-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  row-gap: 8px;
  column-gap: 8px;
}

.portal-scope .field {
  display: contents;
}

.portal-scope .field-label {
  color: #707073;
  font-weight: 400;
  font-size: 14px;
}

.portal-scope .field-value {
  color: #13121a;
  font-size: 14px;
  line-height: 22px;
}

.portal-scope .field-value.long {
  white-space: pre-wrap;
}

.portal-scope .group-display {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-scope .group-row {
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  padding: 10px;
  background: #f9fafb;
}

.portal-scope .group-row-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.portal-scope .chip-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--portal-primary-soft);
  color: #13121a;
  font-weight: 700;
  font-size: 12px;
}

.portal-scope .group-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.portal-scope .mini-field {
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.portal-scope .mini-label {
  font-size: 12px;
  color: #707073;
}

.portal-scope .mini-value {
  font-size: 13px;
  color: #13121a;
  word-break: break-word;
}

.portal-scope .opinion-box {
  border: 1px solid #e6e7ed;
  border-radius: 12px;
  min-height: 88px;
  display: flex;
  align-items: stretch;
  background: #ffffff;
  overflow: hidden;
  margin-top: 8px;
}

.portal-scope .opinion-box textarea {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 14px;
  resize: none;
  font-size: 14px;
  color: #1f1f1f;
}

.portal-scope .opinion-footer {
  padding: 12px 20px;
  border-top: 1px solid #eceef4;
  background: #ffffff;
}

.portal-scope .footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 12px;
}

.portal-scope .left-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.portal-scope .right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-scope .process-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.portal-scope .process-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.portal-scope .group-nodes {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: center;
}

.portal-scope .group-nodes.group-nodes-aggregate {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 40px;
  row-gap: 12px;
  align-items: center;
  width: 100%;
}

.portal-scope .group-nodes.group-nodes-aggregate .process-item,
.portal-scope .group-nodes.group-nodes-aggregate .node-meta {
  min-width: 0;
}

.portal-scope .process-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}

.portal-scope .process-item.has-pill {
  margin-right: 36px;
}

.portal-scope .node {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-scope .node-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f4f4f6;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #3c3c46;
  overflow: hidden;
}

.portal-scope .node-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-scope .node-avatar.completed { border: 1px solid #40c563; color: #1e8c3a; }
.portal-scope .node-avatar.current { border: 1px solid var(--portal-primary); color: var(--portal-primary); }
.portal-scope .node-avatar.pending { border: 1px solid #e3e4e8; color: #8b8f98; }
.portal-scope .node-avatar.initiator { border: 1px solid #d7d9e0; color: #3c3c46; }
.portal-scope .node-avatar.rejected { border: 1px solid #f87171; color: #b91c1c; }
.portal-scope .node-avatar.withdrawn { border: 1px solid #a3a3a3; color: #525252; }
.portal-scope .node-avatar.skipped { border: 1px solid #94a3b8; color: #475569; }
.portal-scope .node-avatar.aggregated {
  background: var(--portal-primary-soft);
  color: var(--portal-primary);
  border-color: var(--portal-primary);
  font-weight: 800;
}

.portal-scope .badge {
  position: absolute;
  bottom: 2px;
  right: 4px;
  background: #40c563;
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #fff;
  font-size: 11px;
  line-height: 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-scope .node-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.portal-scope .node-title {
  font-weight: 400;
  font-size: 14px;
  color: #707073;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.portal-scope .node-flag {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
  line-height: 1.2;
}

.portal-scope .node-flag-skip {
  background: #e2e8f0;
  color: #475569;
}

.portal-scope .node-title.completed { color: #00b22a; }
.portal-scope .node-title.rejected { color: #b91c1c; }
.portal-scope .node-title.withdrawn { color: #525252; }
.portal-scope .node-title.skipped { color: #475569; }
.portal-scope .node-title.current { color: var(--portal-primary); }
.portal-scope .node-title.initiator { color: #3c3c46; }
.portal-scope .node-title.aggregated { color: #707073; font-weight: 400; }

.portal-scope .node-comment.completed { color: #00b22a; }
.portal-scope .node-comment.rejected { color: #b91c1c; }
.portal-scope .node-comment.withdrawn { color: #525252; }
.portal-scope .node-comment.skipped { color: #475569; }

.portal-scope .node-comment {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.4;
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 8px;
  max-width: 320px;
  white-space: pre-wrap;
}

.portal-scope .node-time {
  color: #bcbcbf;
  font-size: 12px;
  white-space: pre;
}

.portal-scope .node-name {
  color: #13121a;
  font-weight: 400;
  font-size: 14px;
  gap: 8px;
  align-items: center;
}

.portal-scope .node-name.aggregated {
  flex-wrap: nowrap;
  max-width: 100%;
}

.portal-scope .aggregate-users {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  max-width: 100%;
}

.portal-scope .aggregate-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.portal-scope .aggregate-user .mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #def0ff, #e9e7ff);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #2d1f7a;
  overflow: hidden;
}

.portal-scope .aggregate-user .mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-scope .aggregate-name {
  color: #13121a;
  font-weight: 400;
  font-size: 14px;
  white-space: nowrap;
}

.portal-scope .group-nodes.group-nodes-aggregate .node-name.aggregated {
  flex-wrap: wrap;
}

.portal-scope .group-nodes.group-nodes-aggregate .aggregate-users {
  flex-wrap: wrap;
  row-gap: 8px;
  overflow-x: hidden;
}

.portal-scope .connector {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 20px;
}

.portal-scope .connector-inline {
  position: absolute;
  top: 20px;
  left: calc(100% + 8px);
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  pointer-events: none;
}

.portal-scope .connector-line {
  width: 2px;
  height: 30px;
  background: #e4e4eb;
}

.portal-scope .connector-line.dashed {
  width: 20px;
  height: 2px;
  border-bottom: 2px dashed #e5e6eb;
  background: transparent;
  flex-shrink: 0;
}

.portal-scope .connector-pill {
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--portal-primary-soft);
  color: var(--portal-primary);
  font-weight: 700;
  font-size: 11px;
}

.portal-scope .cc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  color: #1f1f1f;
}

.portal-scope .cc-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--portal-primary-soft);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.portal-scope .cc-text {
  font-weight: 600;
}

.portal-scope .cc-people {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.portal-scope .cc-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.portal-scope .cc-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #def0ff, #e9e7ff);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #2d1f7a;
  overflow: hidden;
}

.portal-scope .cc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-scope .cc-name {
  color: #1f1f1f;
  font-weight: 600;
}

.portal-scope .dismiss-btn {
  border-color: #f36b6b !important;
  color: #f36b6b !important;
}

.portal-scope .agree-btn {
  color: #ffffff !important;
}
.portal-scope .agree-btn:disabled,
.portal-scope .agree-btn[disabled] {
  background: #b9c4ff;
  border-color: #b9c4ff;
  color: #ffffff !important;
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}
.portal-scope .notice-card,.review-card{
  padding: 20px 0px !important;
}
.notice-card .panel-head{
  padding: 0px 16px;
}
.review-card .panel-head{
  padding: 0px 16px;
}
.notice-card .notice-items{
  padding: 0px 8px;
}
.review-card .review-list{
    padding: 0px 8px;
    flex: 1;
  }
.review-card{
    flex: 1;
    display: flex;
    flex-direction: column;
        backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.03), inset 0 1.5px 1px rgba(255, 255, 255, 0.8), inset 0 -1px 1px rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, .5) !important;
    border-radius: 8px !important;
  }
.review-card .review-list .state-text{
    margin: auto;
    text-align: center;
    width: 100%;
  }

.portal-scope .employee-search-card {
  padding: 20px 16px;
}

.portal-scope .employee-search-card--inline {
  margin-left: auto;
  padding: 12px;
  border-radius: 4px;
  min-width: 260px;
  max-width: 320px;
  box-shadow: none;
}

.portal-scope .employee-search-card--hero {
  padding: 14px;
  border-radius: 4px;
}


.portal-scope .employee-search-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-scope .employee-search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
}

.portal-scope .employee-search-bar .portal-search-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.portal-scope .employee-search-bar .portal-search {
  border-radius: 4px;
  padding: 8px 34px 8px 14px;
  width: 100%;
}

.portal-scope .employee-search-bar .portal-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #94a3b8;
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
}

.portal-scope .employee-search-bar .portal-search-wrap.has-value:hover .portal-search-clear,
.portal-scope .employee-search-bar .portal-search-wrap.has-value:focus-within .portal-search-clear {
  display: inline-flex;
}

.portal-scope .employee-search-bar .portal-search-clear:hover {
  color: #64748b;
  background: rgba(148, 163, 184, 0.2);
}

.portal-scope .employee-search-bar .portal-search:focus,
.portal-scope .employee-search-bar .portal-search:focus-visible {
  outline: none;
  box-shadow: none;
}

.portal-scope .employee-search-bar .btn {
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
}

.portal-scope .employee-search-results {
  display: none;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 10;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.portal-scope .employee-search-card--hero .employee-search-results {
  left: -16px;
  right: -16px;
}

.portal-scope .employee-search-results.is-open {
  display: flex;
}

.portal-scope .employee-search-results .state-text {
  margin: 0;
}

.portal-scope .employee-search-results.is-empty {
  min-height: 72px;
  align-items: center;
  justify-content: center;
}

.portal-scope .employee-search-results.is-empty .state-text {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-scope .employee-result {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.portal-scope .employee-result__avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--portal-primary-soft);
  color: var(--portal-primary);
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 auto;
}

.portal-scope .employee-result__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-scope .employee-result__info {
  flex: 1 1 auto;
  min-width: 0;
}

.portal-scope .employee-result__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.portal-scope .employee-result__name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.portal-scope .employee-result__alias {
  font-size: 12px;
  color: #64748b;
}

.portal-scope .employee-result__badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.portal-scope .employee-result__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #475569;
}

.portal-scope .employee-result__meta--secondary {
  color: #64748b;
}

.portal-scope .employee-result__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.portal-scope .employee-result__meta .mdi {
  font-size: 14px;
  color: #94a3b8;
}


@media (max-width: 1024px) {
  .portal-scope .main-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-scope .main-col {
    flex: 1 1 auto;
  }

  .portal-scope .main-col-left {
    height: calc(100vh - 56px - 16px);
    max-height: calc(100vh - 56px - 16px);
    overflow: hidden;
  }

  .portal-scope .main-col-left .schedule-card {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .portal-scope .main-col-left .schedule-card .schedule-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    scrollbar-width: none;
  }

  .portal-scope .main-col-left .schedule-card .schedule-grid::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .portal-scope .portal-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1400px) {
  .portal-scope .main-col-left {
    height: calc(100vh - 56px - 16px);
    max-height: calc(100vh - 56px - 16px);
    overflow: hidden;
  }

  .portal-scope .main-col-left .schedule-card {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .portal-scope .main-col-left .schedule-card .schedule-grid {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: auto;
    scrollbar-width: none;
  }

  .portal-scope .main-col-left .schedule-card .schedule-grid::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .portal-scope .event-title-row {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .portal-scope .event-title-main {
    width: 100%;
  }

  .portal-scope .event-badges {
    align-self: flex-start;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .portal-scope .event-pill {
    width: fit-content;
  }
}

@media (max-width: 900px) {
  .portal-scope .leaf-grid {
    gap: 10px;
  }

  .portal-scope .detail-grid {
    grid-template-columns: 140px 1fr;
  }

  .portal-scope .group-row-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .portal-scope .portal-form-grid {
    grid-template-columns: 1fr;
  }

  .portal-scope .quick-grid {
    gap: 12px;
  }

  .portal-scope .quick-search {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }

  .portal-scope .quick-chip {
    height: 48px;
  }

  .portal-scope .employee-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-scope .employee-search-bar .btn {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .portal-scope .approvals-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .portal-scope .approvals-layout .list-panel {
    border-right: none;
    border-bottom: 1px solid #eef0f4;
    width: 100%;
  }
}

.portal-notice-alert {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.portal-notice-alert.is-open {
  display: flex;
}

.portal-notice-alert__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}

.portal-notice-alert__card {
  position: relative;
  width: 560px;
  max-width: 100%;
  background: #ffffff;
  border-radius: 10px;
  border: none;
  z-index: 1;
  overflow: hidden;
  max-height: 80vh;
  min-height: 48vh;
  display: flex;
  flex-direction: column;
  background-image: url("../img/portal/home/notify_bg.png");
  background-repeat: no-repeat;
  background-position: top;
  background-size: 100%;
}

.portal-notice-alert__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: right;
  gap: 12px;
  padding: 0 60px;
  height: 51px !important;
  min-height: 51px !important;
  max-height: 51px !important;
  flex: 0 0 51px !important;
  color: #e2edff;
}

.portal-notice-alert__header > * {
  position: relative;
  z-index: 1;
}

.portal-notice-alert__header-title {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  font-size: 36px;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}

.portal-notice-alert__view {
  border: none;
  background: transparent;
  color: #eaf2ff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px 6px;
}

.portal-notice-alert__body {
  padding: 18px 60px 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

.portal-notice-alert__title {
  margin: 6px 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-height: 30px;
  max-height: none;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-notice-alert__content {
  color: #4E5969;
  font-size: 14px;
  line-height: 1.9;
  overflow: auto;
  padding-right: 4px;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: none;
}

.portal-notice-alert__content p {
  margin: 10px 0;
}

.portal-notice-alert__content .ql-align-center {
  text-align: center;
}

.portal-notice-alert__content .ql-align-right {
  text-align: right;
}

.portal-notice-alert__content .ql-align-left {
  text-align: left;
}

.portal-notice-alert__content .ql-align-center img {
  display: block;
  margin: 0 auto;
}

.portal-scope .notice-detail-page .notice-content .ql-align-center {
  text-align: center;
}

.portal-scope .notice-detail-page .notice-content .ql-align-right {
  text-align: right;
}

.portal-scope .notice-detail-page .notice-content .ql-align-left {
  text-align: left;
}

.portal-scope .notice-detail-page .notice-content .ql-align-center img {
  display: block;
  margin: 0 auto;
}

.portal-notice-alert__content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.portal-notice-alert__meta-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  margin-top: 16px;
  color: #86909c;
  font-size: 14px;
}

.portal-notice-alert__time {
  width: 100%;
  text-align: right;
}

.portal-notice-alert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 60px 24px;
  justify-content: center;
}

.portal-notice-alert__actions .btn {
  border-radius: 2px;
  padding: 5px 16px;
  font-weight: 400;
}

.notice-preview-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.notice-preview-title {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
  display: block;
}

.notice-preview-header {
  max-width: 100%;
  flex-wrap: nowrap;
}

.notice-preview-header .badge {
  flex: 0 0 auto;
}

.notice-preview-content .ql-align-center {
  text-align: center;
}

.notice-preview-content .ql-align-right {
  text-align: right;
}

.notice-preview-content .ql-align-left {
  text-align: left;
}

@media (max-width: 576px) {
  .portal-notice-alert__card {
    border-radius: 8px;
  }
  .portal-notice-alert__header-title {
    font-size: 24px;
  }
  .portal-notice-alert__body {
    padding: 16px 18px 0;
  }
  .portal-notice-alert__title {
    font-size: 18px;
  }
  .portal-notice-alert__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .portal-notice-alert__actions .btn {
    width: 100%;
  }
}
