/*
 * Merit HR Portal'ın eski genel stilleri. Vuexy'nin (vendor/css/core.css) üstüne yazılır.
 *
 * GEÇİCİ DOSYA. Ekranlar yeni tasarıma geçtikçe içerik parça parça taşınacak ve dosya silinecek:
 *   - Taşınabilir (HR'ye özel olmayan) kısımlar css/core/ altına,
 *   - HR'ye özel ortak kısımlar css/app.css dosyasına,
 *   - Tek ekrana ait kısımlar css/pages/ altına.
 * Tasarım token'ları css/core/tokens.css içinde.
 *
 * 1. Eski demo.css: Vuexy demo yardımcıları (logo alanı, navbar genişliği, boşluk sınıfları).
 * 2. Eski site.css: uygulamanın genel stilleri.
 *
 * 1. ve 2. bölüm taşınırken içerik ve sıra değiştirilmedi.
 */

/* 1. Eski demo.css ------------------------------------------------------------ */

/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.menu .app-brand.demo {
  padding: 0px;
  margin-left: -5px;
  margin-top: 5px;
}

.app-brand-logo.demo svg {
  width: 34px;
  height: 24px;
}

.app-brand-text.demo {
  font-size: 1.375rem;
}

/* ! For .layout-navbar-fixed added fix padding top to .layout-page */
/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 72px !important;
}
/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 254px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

/* 2. Eski site.css ------------------------------------------------------------ */

/* Custom styles goes here */


:root {
  --m-p: #131D62;
  --m-a: #bf9d6c;
  --m-h: #0000000f;
  --m-s: #131d6214;
  --m-r: 8px;
  --m-t: .25s cubic-bezier(.4,0,.2,1);
  --g-p: #131D62;
  --g-a: #bf9d6c;
  --g-bg: #fff;
  --g-alt: #f8f9fb;
  --g-hover: #f1f3f9;
  --g-border: #e5e7eb;
  --g-text: #1e293b;
  --g-text-muted: #64748b;
  --g-radius: 8px;
  --g-shadow: 0 1px 3px rgba(0,0,0,.05);
  --g-t: .2s ease;
}

/* Base */
#layout-menu {
  box-shadow: 2px 0 12px var(--m-s);
}

.app-brand.demo {
  height: 85px !important;
  border-block-end: 1px solid var(--m-s);
  padding: 1rem;
  margin-block-end: .5rem;

  &:hover svg { transform: scale(1.05); }
}

/* Menu Items */
.menu-item {
  margin: .25rem .75rem;
}

.menu-link {
  border-radius: var(--m-r);
  padding: .75rem 1rem;
  position: relative;
  transition: all var(--m-t);

  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--m-h);
    border-radius: inherit;
    opacity: 0;
    transition: inherit;
  }

  &:hover::before { opacity: 1; }
  &:hover .menu-icon { transform: scale(1.1); }
}

.menu-unread-badge {
  background: linear-gradient(135deg, var(--m-p), #1a2575) !important;
  color: #fff !important;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(19, 29, 98, 0.25);
  animation: pulseBadge 2s infinite;
}

/* Active State */
.menu-item.active > .menu-link {
  background: linear-gradient(135deg, var(--m-p), #1a2575);
  box-shadow: 0 4px 12px var(--m-s);
  color: white;

  &::before { display: none; }
}
  .menu-item.active > .menu-link .menu-unread-badge {
    background: var(--m-a) !important;
    color: var(--m-p) !important;
    box-shadow: 0 2px 6px rgba(191, 157, 108, 0.3);
  }

@keyframes pulseBadge {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

/* Accent Bar (Non-toggle only) */
.menu-link:not(.menu-toggle)::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block: 15%;
  width: 3px;
  background: linear-gradient(var(--m-p), var(--m-a));
  border-radius: 0 3px 3px 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: inherit;
}

.menu-link:not(.menu-toggle):hover::after,
.menu-item.active > .menu-link:not(.menu-toggle)::after {
  transform: scaleX(1);
}

.menu-item.active > .menu-link:not(.menu-toggle)::after {
  background: var(--m-a);
}

/* Toggle Arrow */
.menu-toggle::after {
  transition: transform .3s var(--m-t);
}

.menu-item.open > .menu-toggle::after {
  transform: rotate(90deg);
}

/* Icon */
.menu-icon {
  transition: transform var(--m-t);
}

/* Submenu */
.menu-sub {
  background: var(--m-h);
  border-radius: var(--m-r);
  margin: .25rem .75rem;
  padding: .25rem 0 !important;

  .menu-item { margin: .15rem .5rem; }

  .menu-link {
    padding-inline-start: 2.5rem;
    font-size: .9rem;

    &::before {
      inset-inline-start: 1.1rem;
      inset-block: auto;
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: currentColor;
      opacity: .25;
      box-shadow: 0 0 0 2px transparent;
    }

    &:hover::before {
      opacity: .6;
      box-shadow: 0 0 0 2px #00000008;
    }
  }

  .menu-item.active > .menu-link {
    background: #bf9d6c1f;
    color: var(--m-p);
    font-weight: 600;

    &::before {
      background: var(--m-a);
      opacity: 1;
      box-shadow: 0 0 0 2px #bf9d6c26;
    }
  }
}

/* Scrollbar */
.menu-inner::-webkit-scrollbar {
  width: 6px;
  &-thumb {
    background: var(--m-s);
    border-radius: 10px;
  }
}

/* Responsive */
@media (width < 576px) {
  .menu-item { margin-inline: .5rem; }
}




/*  Grid         */

/* Card Container */
.devextremeGrid .applicants-card {
  border-radius: var(--g-radius);
  box-shadow: var(--g-shadow);
  overflow: hidden;
}

/* Toolbar */
.applicants-toolbar {
  background: var(--g-bg);
  padding: 1rem;

  .btn-primary {
    background: var(--g-p);
    color: white;
    padding: .5rem 1rem;
    border-radius: 6px;
    border: none;
    font-size: .875rem;
    font-weight: 500;
    transition: all var(--g-t);

    &:hover {
      background: var(--g-a);
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(19,29,98,.15);
    }
  }
}

/* DevExtreme Grid Base: eski sayfaların tabloları; yeni tasarım tabloları (.merit-grid) kendi stillerini grid.css'ten alır */
#applicantsGrid,
#applicantsGrid2,
.dx-datagrid:not(.merit-grid *) {
  border: none !important;


  /* Header */
  .dx-header-row > td {
    background: var(--g-bg) !important;
    border-bottom: 2px solid var(--g-border) !important;
    border-left: none !important;
    padding: .875rem 1rem !important;
    color: var(--g-text-muted);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
  }

  /* Rows */
  .dx-data-row {
    transition: background var(--g-t);

    > td {
      border-bottom: 1px solid var(--g-border) !important;
      border-left: none !important;
      padding: 1rem !important;
      color: var(--g-text);
    }

    /* Zebra Striping */
    &.dx-row-alt > td {
      background: var(--g-alt) !important;
    }

    /* Hover */
    &:hover > td {
      background: var(--g-hover) !important;
      cursor: pointer;
    }
  }

  /* Pager */
  .dx-pager {
    background: var(--g-bg);
    border-top: 1px solid var(--g-border);
    padding: .75rem 1rem;

    .dx-page {
      background: transparent;
      color: var(--g-text-muted);
      border-radius: 6px;
      padding: .375rem .75rem;
      margin: 0 .125rem;
      transition: all var(--g-t);

      &:hover {
        background: var(--g-hover);
      }

      &.dx-selection {
        background: var(--g-p) !important;
        color: white;
      }
    }
  }
}

/* Badges */
.badge {
  padding: .375rem .75rem;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 500;

  &--pending {
    background: #fef3c7;
    color: #92400e;
  }

  &--approved {
    background: #d1fae5;
    color: #065f46;
  }

  &--rejected {
    background: #fee2e2;
    color: #991b1b;
  }

  &--info {
    background: #dbeafe;
    color: #1e40af;
  }
}

.cell-list {
  display: flex;
  align-items: center;
  gap: .375rem;
  max-width: 14rem;

  .cell-list-first {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cell-list-more {
    flex-shrink: 0;
    padding: .125rem .5rem;
    border-radius: 6px;
    background: var(--m-s);
    color: var(--g-p);
    font-size: .75rem;
    font-weight: 600;
  }
}

.rich-content {
  overflow-wrap: anywhere;

  img,
  video {
    max-width: 100%;
    height: auto;
  }

  iframe {
    max-width: 100%;
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

/* Durum rozetleri */
.status-badge {
  display: inline-block;
  min-width: 8rem;
  max-width: 100%;
  padding: .375rem .75rem;
  border-radius: 6px;
  background: #6d6f7c;
  color: #fff;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.status-badge--success { background: #28c76f; }
.status-badge--warning { background: #ff9f43; }
.status-badge--danger { background: #ff4c51; }
.status-badge--info { background: #00bad1; }
.status-badge--completed { background: var(--g-p); }
.status-badge--neutral { background: #6d6f7c; }

/* Search & Filters */
#gridSearch .dx-texteditor {
  border-radius: 6px;
  border-color: var(--g-border);

  &:focus-within {
    border-color: var(--g-p);
    box-shadow: 0 0 0 3px rgba(19,29,98,.1);
  }
}

/* Select Boxes */
#selPageSize,
#selLoc,
#depLoc,
#posLoc,
#stLoc {
  .dx-selectbox {
    border-radius: 6px;
    border-color: var(--g-border);
  }
}

/* Loading Overlay */
.dx-loadpanel-content {
  border-radius: var(--g-radius);
  box-shadow: 0 10px 25px rgba(0,0,0,.1);
}

/* Empty State */
.dx-datagrid-nodata {
  padding: 3rem 1rem;
  color: var(--g-text-muted);
  font-size: .875rem;
}

/*  Grid Header  */
.devextremeGrid #applicantsGrid .dx-datagrid-headers .dx-header-row > td,
.devextremeGrid #applicantsGrid2 .dx-datagrid-headers .dx-header-row > td {
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%) !important;
  border-bottom: 2px solid #e5e7eb !important;
  border-left: none !important;
  padding: 1rem !important;
  color: #1e293b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  text-transform: capitalize !important;
  position: relative;
  transition: all .2s ease;
}

.devextremeGrid #applicantsGrid .dx-header-row > td::after,
.devextremeGrid #applicantsGrid2 .dx-header-row > td::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, #131D62, #bf9d6c);
  transform: scaleX(0);
  transition: transform .3s ease;
}

.devextremeGrid #applicantsGrid .dx-header-row > td:hover,
.devextremeGrid #applicantsGrid2 .dx-header-row > td:hover {
  background: linear-gradient(180deg, #f1f3f9 0%, #fafbfc 100%) !important;
  color: #131D62 !important;
}

.devextremeGrid #applicantsGrid .dx-header-row > td:hover::after,
.devextremeGrid #applicantsGrid2 .dx-header-row > td:hover::after {
  transform: scaleX(1);
}
/* Card Title Size */
.card-title {
  font-size: .875rem !important;
  font-weight: 600;
}
.devextremeGrid #applicantsGrid .dx-gridbase-container,
.devextremeGrid #applicantsGrid2 .dx-gridbase-container {
  border-radius: 0px !important;
  overflow: hidden;
}

#selectedLangFlag,
.dropdown-menu img[src*="flags"] {
  border-radius: 35px;
  width: 35px;
}

.unread-applicant-row {
  background-color: rgba(19, 29, 98, 0.03) !important;
  font-weight: 600 !important;
}

  .unread-applicant-row > td {
    color: var(--m-p) !important;
    position: relative;
  }

    .unread-applicant-row > td:first-child::before {
      content: '';
      position: absolute;
      left: 0;
      top: 15%;
      bottom: 15%;
      width: 4px;
      background: var(--m-a);
      border-radius: 0 4px 4px 0;
    }

.devextremeGrid .dx-datagrid .dx-data-row.unread-applicant-row:hover > td {
  background-color: rgba(19, 29, 98, 0.06) !important;
}

/* Bulk Action Bar (çoklu seçim) */
.bulk-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 0 1rem .75rem;
  padding: .625rem 1rem;
  background: var(--g-hover);
  border: 1px solid var(--g-border);
  border-left: 4px solid var(--g-a);
  border-radius: var(--g-radius);
  color: var(--g-text);
  font-size: .875rem;
  font-weight: 500;

  .bulk-action-info,
  .bulk-action-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
  }

  .bulk-action-count {
    min-width: 1.75rem;
    padding: .125rem .5rem;
    border-radius: 6px;
    background: var(--g-p);
    color: #fff;
    font-weight: 600;
    text-align: center;
  }

  .bulk-action-clear {
    padding: 0 .25rem;
    color: var(--g-text-muted);
    text-decoration: underline;

    &:hover { color: var(--g-p); }
  }

  .btn-bulk,
  .btn-bulk-outline {
    border: 1px solid var(--g-p);
    border-radius: 6px;
    font-weight: 500;
    transition: all var(--g-t);

    &:disabled { opacity: .65; }
  }

  .btn-bulk {
    background: var(--g-p);
    color: #fff;

    &:hover:not(:disabled) {
      background: var(--g-a);
      border-color: var(--g-a);
      color: #fff;
    }
  }

  .btn-bulk-outline {
    background: transparent;
    color: var(--g-p);

    &:hover:not(:disabled) {
      background: var(--g-p);
      color: #fff;
    }
  }
}

/* Seçili satır ve seçim kutuları */
.devextremeGrid #applicantsGrid .dx-data-row.dx-selection > td,
.devextremeGrid #applicantsGrid .dx-data-row.dx-selection:hover > td {
  background: rgba(19, 29, 98, 0.08) !important;
}

#applicantsGrid .dx-checkbox-checked .dx-checkbox-icon {
  border-color: var(--g-p);
  color: var(--g-p);
}

#applicantsGrid .dx-checkbox-indeterminate .dx-checkbox-icon::before {
  background-color: var(--g-p);
}

.perm-tree {
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  background: var(--g-bg);
  padding: .75rem;
}

.perm-tree-toolbar {
  display: flex;
  justify-content: flex-end;
  min-height: 1.25rem;
  margin-bottom: .5rem;
  color: var(--g-text-muted);
  font-size: .8125rem;
  font-weight: 500;
}

.perm-tree-empty {
  padding: 1.5rem 1rem;
  color: var(--g-text-muted);
  font-size: .875rem;
  text-align: center;
}

.perm-tree .dx-treeview-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--g-text);
}

.perm-tree .dx-treeview-item-content {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  min-width: 0;
}

.perm-tree-group {
  font-weight: 600;
}

.perm-tree-count {
  margin-left: auto;
  padding: .125rem .5rem;
  border-radius: 6px;
  background: var(--m-s);
  color: var(--g-p);
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.perm-tree-description {
  overflow: hidden;
  color: var(--g-text-muted);
  font-size: .8125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perm-tree-description::before {
  content: "·";
  margin-right: .5rem;
}

.perm-tree .dx-checkbox-checked .dx-checkbox-icon {
  border-color: var(--g-p);
  color: var(--g-p);
}

.perm-tree .dx-checkbox-indeterminate .dx-checkbox-icon::before {
  background-color: var(--g-p);
}

.perm-tree--readonly .dx-checkbox {
  pointer-events: none;
}

.session-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(19, 29, 98, 0.45);
}

.session-overlay.is-visible {
  display: flex;
}

.session-dialog {
  width: 100%;
  max-width: 26rem;
  padding: 1.5rem;
  border-radius: var(--g-radius);
  border-top: 4px solid var(--g-a);
  background: var(--g-bg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
}

.session-dialog-title {
  margin-bottom: .5rem;
  color: var(--g-p);
  font-weight: 600;
}

.session-dialog-text {
  margin-bottom: 1.5rem;
  color: var(--g-text-muted);
}

.session-dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}

.btn-export {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--g-p);
  --bs-btn-border-color: var(--g-p);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--g-a);
  --bs-btn-hover-border-color: var(--g-a);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0d1447;
  --bs-btn-active-border-color: #0d1447;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--g-p);
  --bs-btn-disabled-border-color: var(--g-p);
  --bs-btn-disabled-opacity: .65;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 38px;
  padding: 0 1rem;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--g-t);
}

.devextremeGrid .toolbar-actions #gridSearch {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 280px;
}

@media (max-width: 575.98px) {
  .devextremeGrid .toolbar-actions {
    flex-wrap: wrap;
  }

  .devextremeGrid .toolbar-actions .btn-export,
  .devextremeGrid .toolbar-actions #gridSearch {
    flex: 1 1 100%;
    max-width: none;
  }
}
