/* Vutacloud - Leave Management Style Extensions */

#leave-panel {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  background: transparent;
  --border-color: rgba(14, 15, 12, 0.06);
}

/* Tab Navigation */
.leave-tabs-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.leave-tabs {
  display: flex;
  gap: 8px;
}

.leave-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 8px 18px;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.leave-tab-btn:hover {
  color: var(--text-main);
  background: rgba(14, 15, 12, 0.04);
}

.leave-tab-btn.active {
  color: var(--primary-dark);
  background: var(--primary-color);
  box-shadow: 0 4px 12px rgba(159, 232, 112, 0.15);
}

.employee-viewer-select {
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-viewer-select label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.viewer-dropdown {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.viewer-dropdown:focus {
  border-color: var(--primary-color);
}

/* Leave Balance Cards */
.leave-balances-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.leave-balance-card {
  background: #b1f08a;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 30px; /* Upgraded to medium card radius as per DESIGN.md */
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.leave-balance-card:hover {
  transform: scale(1.05); /* Symmetrical physical growth hover animation as per DESIGN.md */
  box-shadow: var(--shadow-md);
  border-color: #000000; /* Nature-inspired black border accent */
}

.leave-balance-card-title {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #000000;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  font-feature-settings: "calt" 1;
}

.balance-circle-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.balance-ring {
  transform: rotate(-90deg);
}

.balance-ring-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.08);
  stroke-width: 8;
}

.balance-ring-progress {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.balance-circle-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.balance-circle-num {
  font-family: "Wise Sans", "Inter", sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #000000;
  letter-spacing: -0.03em;
  font-feature-settings: "calt" 1;
}

.balance-circle-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.6);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.leave-balance-card-footer {
  font-size: 11px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.7);
  display: flex;
  gap: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  width: 100%;
  justify-content: center;
  padding-top: 10px;
  margin-top: 4px;
}

.leave-balance-card-footer span strong {
  color: #000000;
}

/* Split Grid for Dashboard */
.leave-dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.premium-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 40px; /* Large card border radius as per DESIGN.md */
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.premium-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.premium-card-title {
  font-family: "Wise Sans", "Inter", sans-serif;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 0;
  font-feature-settings: "calt" 1;
}

/* Premium Tables */
.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.premium-table th {
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-color);
}

.premium-table td {
  padding: 16px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid rgba(14, 15, 12, 0.06); /* Solid table separator as per DESIGN.md guidelines */
  color: var(--text-main);
}

.premium-table tr:last-child td {
  border-bottom: none;
}

/* Premium Badges */
.premium-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.premium-status-badge.applied,
.premium-status-badge.availed,
.premium-status-badge.rejected,
.premium-status-badge.cancelled {
  background: #e2f6d5 !important; /* Premium Light Mint Green */
  color: #163300 !important;       /* Dark Green text */
  border: 1px solid rgba(22, 51, 0, 0.15) !important;
}

.cr-dr-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.cr-dr-badge.credit {
  background: rgba(5, 77, 40, 0.08); /* Positive Green tint */
  color: #054d28;
}

.cr-dr-badge.debit {
  background: rgba(208, 50, 56, 0.08); /* Danger Red tint */
  color: #d03238;
}

/* Sidebar lists */
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(14, 15, 12, 0.02);
  border: 1px solid rgba(14, 15, 12, 0.04);
  border-radius: 16px; /* Small card radius as per DESIGN.md */
}

.sidebar-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.sidebar-item-desc {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 600;
}

.sidebar-item-right {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Directory Filter Bar */
.directory-filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 120px;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-input-pill {
  background: #f5f6f4;
  border: 1px solid transparent;
  border-radius: 9999px; /* Capsule pill inputs for elegant Wise style */
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.filter-input-pill:focus {
  background: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(159, 232, 112, 0.25);
}

/* Leave Adjustment Modal Layout */
.adjustment-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 10px;
}

/* Quick Avatars */
.avatar-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e4e4e7 !important;
  color: #27272a !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Pagination container */
.table-pagination-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.pagination-info {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
}

.pagination-btn-group {
  display: flex;
  gap: 6px;
}

.pagination-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: rgba(14, 15, 12, 0.04);
}

.pagination-btn.active {
  background: var(--primary-color);
  color: var(--primary-dark);
  border-color: var(--primary-color);
}

@media (max-width: 992px) {
  .leave-dashboard-grid {
    grid-template-columns: 1fr;
  }
}


/* Adjustments to the view member select and request button in the sub-nav */
#leave-sub-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

#leave-sub-nav-right .employee-viewer-select {
  display: flex;
  align-items: center;
  gap: 10px;
}

#leave-sub-nav-right .employee-viewer-select label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin: 0;
}

#leave-sub-nav-right .viewer-dropdown {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 9999px; /* Make it capsule-styled! */
  padding: 6px 16px;
  font-weight: 800;
  font-size: 12px;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-transform: none;
}

#leave-sub-nav-right .viewer-dropdown:hover {
  border-color: rgba(14, 15, 12, 0.2);
  background-color: #fafafa;
  transform: scale(1.05); /* Symmetrical grow */
}

#leave-sub-nav-right .viewer-dropdown:active {
  transform: scale(0.95); /* Physical compression */
}

#leave-sub-nav-right .viewer-dropdown:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(159, 232, 112, 0.2);
}

#leave-sub-nav-right .btn-pill-primary {
  padding: 10px 22px !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  border-radius: 9999px !important;
  background: var(--primary-color) !important;
  color: var(--primary-dark) !important;
  box-shadow: 0 4px 12px rgba(159, 232, 112, 0.15) !important;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; /* Snappy Wise springs */
  border: none !important;
  cursor: pointer !important;
}

#leave-sub-nav-right .btn-pill-primary:hover {
  background: #b1f08a !important;
  transform: scale(1.05) !important; /* Physical grow as per DESIGN.md */
  box-shadow: 0 6px 16px rgba(159, 232, 112, 0.25) !important;
}

#leave-sub-nav-right .btn-pill-primary:active {
  transform: scale(0.95) !important; /* Physical compress as per DESIGN.md */
  box-shadow: 0 2px 6px rgba(159, 232, 112, 0.15) !important;
}

/* Helper classes for responsive text swapping in Leave sub-nav */
.leave-desktop-text {
  display: inline !important;
}
.leave-mobile-text {
  display: none !important;
}

/* Mobile responsive overrides for Leave sub-nav capsule controls */
@media (max-width: 1024px) {
  .leave-desktop-text {
    display: none !important;
  }
  .leave-mobile-text {
    display: inline !important;
  }

  /* Hide tabs/sub-left on mobile to only show the request button */
  #sub-nav-leave .sub-left,
  #leave-sub-nav-tabs.pill-toggle {
    display: none !important;
  }

  #leave-sub-nav-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 0 !important;
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* Hide the View Member dropdown viewer select completely on mobile */
  #leave-sub-nav-right .employee-viewer-select {
    display: none !important;
  }

  #leave-sub-nav-right .btn-pill-primary {
    width: 100% !important;
    height: 44px !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    border-radius: 9999px !important;
    background: var(--primary-color) !important;
    color: var(--primary-dark) !important;
    box-shadow: 0 4px 12px rgba(159, 232, 112, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    margin: 0 !important;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  }
}

/* Table Badge and Column Overrides */
.premium-table td .badge-premium {
  background: #e4e4e7 !important;
  color: #000000 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}
