/* form */
.container-form {
  max-width: 500px;
  margin: 30px auto;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-family: Arial, sans-serif;
}

.container-form label {
  display: block;
  margin-top: 12px;
  font-weight: bold;
  color: #333;
}

.container-form input[type="text"],
.container-form input[type="number"] {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.container-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.container-form select,
.container-form input[type="date"] {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}


.container-form input[type="checkbox"] {
  margin-top: 8px;
}

.container-form input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.3);
}

.container-form .actions-form {
  margin-top: 20px;
  text-align: right;
}

.container-form .actions-form button,
.container-form input[type="submit"] {
  background-color: #007bff;
  color: #fff;
  padding: 8px 14px;
  margin-top: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.container-form .actions-form button:hover,
.container-form input[type="submit"]:hover {
  background-color: #0056b3;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
/* form */

/* teamleader  */
.leader-card {
  flex-grow: 1; 
  border: 2px solid #0073e6;
  background: #f0f8ff;
}

.subordinates {
  margin-left: 24px;
}

.subordinate-card {
  background: #fafafa;
  border-left: 3px solid #ddd;
  margin: 4px 0;
}

.toggle-subordinates {
  cursor: pointer;
}
/* teamleader  */

.wallets-grid {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.wallets-column {
  display: flex;
  flex-direction: column;
}

.wallets-column .label {
  text-align: center;
  font-weight: bold;
  margin-bottom: 8px;
}

/* finance-buttons */
.container-finance-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.finance-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.finance-item {
  min-width: 135px;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6px;
  box-sizing: border-box;
  background: #f0f8ff;
  border: 2px solid #0073e6;
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
  gap: 6px;
}

.finance-item form input[type="file"] {
  width: 100%;
}

.finance-item form input[type="submit"] {
  width: 100%;
}

.finance-button  {
  background: #f0f8ff;
  border: 2px solid #0073e6;
}

.finance-button,
.related-button {
  width: 135px;
  height: 98px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 6px;
  box-sizing: border-box;
  text-align: center;
  transition: 0.2s;
}

.finance-button:hover {
  background: #e6f2ff;
  transform: translateY(-3px);
}

.related-button:hover {
  transform: translateY(-3px);
}

.finance-button .title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
}

.icons-with-values {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-weight: bold;
  border-radius: 6px;
}

.unapproved-bg { background: rgb(238, 88, 88); }
.approved-bg   { background: rgb(100, 233, 100);}
.exchange-bg   { background: rgb(219, 219, 79);}
/* finance-buttons */

/* wallets index */
.wallets-grid {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.wallets-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.wallet-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wallet-button {
  width: 235px;
  height: 130px;
  background: #f0f8ff;
  border: 2px solid #0073e6;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 6px;
  box-sizing: border-box;
  text-align: center;
  transition: 0.2s;
}

.wallet-button:hover {
  background: #e6f0ff;
  transform: translateY(-2px);
}

.wallet-button .title {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 4px;
}

.wallet-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 235px;
}

.wallet-btn {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none !important;
  color: #fff !important;
}

.wallet-btn-advance {
  background-color: #2415c4;
}

.wallet-btn-advance:hover {
  background-color: #1b0db4;
}

.wallet-btn-expenses {
  background-color: #28a745;
}

.wallet-btn-expenses:hover {
  background-color: #218838;
}

/* wallets index */


/* application menu */
#main-menu a.employees::before,
#main-menu a.work-hours::before,
#main-menu a.deposits::before,
#main-menu a.finance-entries::before,
#main-menu a.finance-reports::before,
#main-menu a.salary-employees::before,
#main-menu a.menu-traffic::before,
#main-menu a.leads::before,
#main-menu a.settings::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
}

#main-menu a.employees::before        { background-image: url("/assets/plugin_assets/aff_crm/application_menu/employees-50-b2f09313.png"); }
#main-menu a.work-hours::before       { background-image: url("/assets/plugin_assets/aff_crm/application_menu/iclock-48-6a0b308b.png"); }
#main-menu a.deposits::before         { background-image: url("/assets/plugin_assets/aff_crm/application_menu/headphones-48-15c0b0f1.png"); }
#main-menu a.finance-entries::before  { background-image: url("/assets/plugin_assets/aff_crm/application_menu/wallet-50-8fc7cf25.png"); }
#main-menu a.finance-reports::before  { background-image: url("/assets/plugin_assets/aff_crm/application_menu/reports-50-3fa757db.png"); }
#main-menu a.salary-employees::before { background-image: url("/assets/plugin_assets/aff_crm/application_menu/letter-50-1c952334.png"); }
#main-menu a.settings::before         { background-image: url("/assets/plugin_assets/aff_crm/application_menu/setting-50-13520421.png"); }
#main-menu a.menu-traffic::before     { background-image: url("/assets/plugin_assets/aff_crm/application_menu/chart-50-0721c288.png"); }
#main-menu a.leads::before            { background-image: url("/assets/plugin_assets/aff_crm/application_menu/leads-50-d1d2a238.png"); }
/* application menu */

/* show container */
.show-container-card {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  margin: 10px 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.show-container-field {
  flex: 1 1 45%;
}

.show-sidebar-link-custom {
  display: block;
  flex: 1 1 45%;
  text-decoration: none;
  color: inherit;
}

.show-container-field .label {
  font-size: 10px;
  color: #555;
  margin-bottom: 4px;
}

.show-container-field .value {
  font-size: 12px;
  font-weight: bold;
  color: #222;
  word-break: break-word; 
}
/* show container */

/* container */
.container-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  margin: 10px 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  flex-wrap: nowrap;
}

.container-field {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
}

.container-field .label {
  font-size: 10px;
  color: #555;
  margin-bottom: 4px;
}

.container-field .value {
  font-size: 12px;
  font-weight: bold;
  color: #222;
  word-break: break-word; 
}

.container-card-link {
  display: contents;
  text-decoration: none !important;
  color: inherit !important;
}

@media (max-width: 1050px) {
  .container-card {
    flex-wrap: wrap;
  }
  .container-field {
    flex: 1 1 45%;
  }
    .team-leader-card .leader-card {
    flex-wrap: wrap;
  }
  .team-leader-card .leader-card .container-field {
    flex: 1 1 45%;
  }
}

@media (max-width: 768px) {
  .container-card {
    flex-wrap: wrap;
  }
  .container-field {
    flex: 1 1 100%;
  }
    .team-leader-card .leader-card {
    flex-wrap: wrap;
  }
  .team-leader-card .leader-card .container-field {
    flex: 1 1 100%;
  }
}
/* container */

/* card index */
.card-index {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 15px;
}
/* card index */
/* sidebar links */
.sidebar-link {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  color: #6495ED;
}

.sidebar-link-custom {
  color: inherit !important;
  margin: 5px;
}

.sidebar-link-destroy {
  color: red !important;
  margin: 5px;
}
/* sidebar links */

.text-green { color: green; font-weight: bold; }
.text-red   { color: red;   font-weight: bold; }
.text-gray  { color: gray;  font-weight: bold; }
.text-blue  { color: blue;  font-weight: bold; }

/* report */
.finance-report {
  display: flex;
}

.categories {
  flex: 0 0 200px;
  display: grid;
  grid-auto-rows: 40px;
  border-right: 1px solid #ddd;
  background: #f9f9f9;
}

.categories .header {
  font-weight: bold;
  background: #eee;
  text-align: center;
}

.reports {
  display: flex;
  overflow-x: auto;
}

.report {
  min-width: 250px;
  display: grid;
  grid-auto-rows: 40px;
  border-right: 2px solid #ddd;
  text-align: right;
  padding: 0 8px;
}

.report .header {
  font-weight: bold;
  text-align: center;
  background: #eee;
}

.report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f0f0f0;
}

.total {
  font-weight: bold;
}

.charts-container-pl {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  grid-row: span 4;
}

.chart-with-label {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.diff-label {
  margin-bottom: 4px;
  font-size: 12px;
  color: #333;
}
/* report */

/* bonus grid table */
.bonus-grid-table, 
.bonus-grid-table th, 
.bonus-grid-table td {
  border: 1px solid black;
  border-collapse: collapse;
  padding: 5px;
}

.bonus-grid-table th {
  background-color: #f0f0f0;
}
/* bonus grid table */
/* container bonus grid */
.container-bonus-grid {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
/* container bonus grid */

/* main menu dropdown */
#main-menu li {
  position: relative;
}

#main-menu li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
  list-style: none;
  padding: 0;
  margin: 0;
}

#main-menu li:hover > ul {
  display: block;
}

#main-menu li ul li {
  border-bottom: 1px solid #eee;
}

#main-menu li ul li a {
  display: block;
  padding: 6px 12px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}

#main-menu li ul li a:hover {
  background: #f5f5f5;
  color: #000;
}
/* main menu dropdown */

/* traffic report */
.traffic-report {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  background: #fff;
  font-family: sans-serif;
}

.traffic-header {
  display: flex;
  /* text-align: center; */
  justify-content: center;
  font-weight: bold;
  background: #f9f9f9;
}

.traffic-categories {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 0;
  background: #f9f9f9;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.traffic-category,
.traffic-category-items {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.traffic-category-items {
  height: 140px;
  border-bottom: 1px solid #ddd;
}

.traffic-category, .header {
  font-weight: bold;
  justify-content: center;
}

.traffic-scroll-wrapper,
.traffic-calendar-scroll-wrapper {
  flex: 1;
  overflow-x: auto;
}

.traffic-calendar-scroll-wrapper {
  scrollbar-width: none;
  -ms-overflow-style: none;
}


.traffic-header-items,
.traffic-items {
  display: flex;
  min-width: max-content;
  border-bottom: 1px solid #ddd;
  box-sizing: border-box;
  align-items: center;
  gap: 16px;
  padding: 0 8px;
}

.traffic-items {
  height: 140px;
}

.traffic-date-cell,
.traffic-cell,
.traffic-cell.empty {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 6px;
}

.traffic-date-cell {
  border: 1px solid #ddd;
}

.traffic-cell,
.traffic-cell.empty {
  height: 120px;
}

.traffic-cell {
  background: #fff;
  border: 1px solid #ddd;
}

.traffic-cell.empty {
  background: #fafafa;
  border: 1px solid #ddd;
  box-shadow: none;
}

.traffic-body {
  display: flex;
}

.traffic-field {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  text-align: center;
}

.traffic-field .value {
  font-weight: bold;
  font-size: 14px;
}
/* traffic report */

/* трафік сводка */
.container-traffic-reports {
  margin: 20px;
  display: flex;
  flex-direction: column;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
}

.traffic-report-data {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 768px) {
  .traffic-report-data {
    grid-template-columns: 1fr 1fr;
  }
}

.traffic-report-field {
  font-size: 16px;
  white-space: nowrap;
}

.traffic-report-data hr {
  grid-column: 1 / -1;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 10px 0;
}

.total-leads {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.total-lead-by {
  flex: 1;
  min-width: 120px;
}

.total-lead-by p {
  margin: 0;
  font-size: 12px;
  color: #666;
}

.total-lead-by h6 {
  margin: 0;
  font-size: 12px;
}
/* трафік сводка */

/* adjustment */
.button-adjustment,
.button-reject {
  color: white !important;
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
}

.button-adjustment {
  background-color: #007bff;
}

.button-reject {
  text-align: center;
  background-color: red;
}

.button-adjustment:hover {
  background-color: #0056b3;
}

.button-reject:hover {
  background-color: rgb(158, 5, 5);
}
/* adjustment */

/* manager-employees */
.manager-employees-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.employee-card {
  background-color: #f0f0f0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #ccc;
  min-height: 100px;
}

.employee-name {
  font-weight: bold;
  color: black;
  margin-bottom: 8px;
}

.employee-position {
  color: black;
  font-size: 12px;
  margin-top: auto;
}

@media (max-width: 768px) {
  .manager-employees-grid {
    grid-template-columns: 1fr;
  }
}
/* manager-employees */

/* finance-reconciliation */
.finance-approval-container {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.finance-approval-left-column, .finance-approval-right-column {
  flex: 1;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  max-height: 600px;
  overflow-y: auto;
}

.finance-approval-deposit-entry {
  padding: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid #eee;
}

.radio-button-finance-entry {
  display: none;
}

.radio-button-finance-entry:checked + .finance-entry-label {
  background: #cde8ff;
  border-color: black;
}

.finance-entry-label {
  display: block;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
}

.deposit-entry-label  {
  cursor: pointer;
}

.deposit-label-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.deposit-checkbox {
  cursor: pointer;
}

.deposit-quantity {
  width: 120px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .finance-approval-container {
    flex-direction: column;
  }

  .finance-approval-left-column, .finance-approval-right-column {
    max-height: none;
  }
}

.container-form-payment {
  width: 100%;
  margin-bottom: 20px;
}

#finance-approval-payment-service-select,
.payment-services-select2 {
  width: 100%;
}

.form-approval-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

input.button-approvals[type="submit"],
a.button-approvals {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  color: #fff;
  background-color: #007bff;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1;
  font-family: inherit;
  font-size: inherit;
}

input.button-approvals[type="submit"]:hover,
a.button-approvals:hover {
  background-color: #0056b3;
}

.button-approvals.main-submit {
  flex: 1.5;
}

.button-approvals.secondary {
  flex: 1;
}
/* finance-reconciliation */
/* filter-deposits */
#filter-deposit {
  display:none;
}

.filter-button,
.deposit-details  {
  background: #f0f8ff;
  border: 2px solid #0073e6;
}

.filter-button,
.deposit-details {
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  margin: 10px 50px 20px;
  box-sizing: border-box;
  text-align: center;
  transition: 0.2s;
}

.filter-button:hover,
.deposit-details:hover {
  background: #e6f2ff;
  transform: translateY(-3px);
}

.deposit-details .title,
.finance-button .title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
}
/* filter-deposits */

/* toggle salary details */
.toggle-salary-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  user-select: none;
}

.salary-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.salary-arrow.open {
  transform: rotate(180deg);
}

.toggle-salary-field {
  position: relative;
}

.toggle-salary-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: max-content;
  padding: 12px;
  background: rgb(188, 185, 185);
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 999;
  white-space: nowrap;
}
/* toggle salary details */
