* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fb, #dfe9f3);
  min-height: 100vh;
  color: #1f2937;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.login-card h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: #1d3557;
  text-align: center;
}

.subtitle {
  color: #5c677d;
  margin-bottom: 24px;
}

.login-card .subtitle {
  text-align: center;
}

.login-form,
.crm-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form label,
.crm-form label {
  font-size: 14px;
  color: #344054;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.login-form input,
.crm-form input,
.crm-form textarea,
.crm-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  background: #ffffff;
}

.crm-form select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%231d3557' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.login-form input:focus,
.crm-form input:focus,
.crm-form textarea:focus,
.crm-form select:focus {
  border-color: #1d3557;
}

.login-form button,
.logout-btn,
.nav-btn {
  margin-top: 12px;
  background: #1d3557;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.login-form button:hover,
.logout-btn:hover,
.nav-btn:hover {
  background: #16324f;
}

.message {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: #c1121f;
  min-height: 20px;
}

.dashboard-page {
  min-height: 100vh;
  padding: 24px;
}

.topbar {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.topbar-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.topbar-title h1 {
  font-size: 32px;
  color: #1d3557;
  margin-bottom: 8px;
}

.topbar-subtitle {
  color: #5c677d;
  font-size: 16px;
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.dashboard-header h1 {
  font-size: 30px;
  color: #1d3557;
  margin-bottom: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.summary-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.summary-card h3 {
  font-size: 16px;
  color: #5c677d;
  margin-bottom: 12px;
}

.summary-card p {
  font-size: 28px;
  font-weight: bold;
  color: #1d3557;
}

.dashboard-section {
  margin-top: 24px;
}

.section-header {
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 24px;
  color: #1d3557;
}

.table-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.dashboard-table th {
  background: #f8fafc;
  color: #475467;
  font-weight: 700;
}

.dashboard-table td {
  color: #1f2937;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-full {
  width: 100%;
}

@media (max-width: 768px) {
  .dashboard-page {
    padding: 16px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-nav {
    justify-content: flex-start;
  }
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.stat-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 24px;
  padding: 26px 24px;
  min-height: 150px;
  box-shadow: 0 16px 40px rgba(29, 53, 87, 0.10);
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #1d3557 0%, #457b9d 100%);
}

.stat-card h3 {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 700;
  color: #355070;
  letter-spacing: 0.02em;
}

.stat-card p {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  color: #16324f;
}

#employeeDashboardSection .stat-card:nth-child(1)::before,
#adminDashboardSection .stat-card:nth-child(1)::before {
  background: linear-gradient(90deg, #1d3557 0%, #457b9d 100%);
}

#employeeDashboardSection .stat-card:nth-child(2)::before,
#adminDashboardSection .stat-card:nth-child(2)::before {
  background: linear-gradient(90deg, #2a9d8f 0%, #52b788 100%);
}

#employeeDashboardSection .stat-card:nth-child(3)::before,
#adminDashboardSection .stat-card:nth-child(3)::before {
  background: linear-gradient(90deg, #f4a261 0%, #e76f51 100%);
}

#employeeDashboardSection .stat-card:nth-child(4)::before,
#adminDashboardSection .stat-card:nth-child(4)::before {
  background: linear-gradient(90deg, #d62828 0%, #ba181b 100%);
}

#employeeDashboardSection .stat-card:nth-child(5)::before,
#adminDashboardSection .stat-card:nth-child(5)::before {
  background: linear-gradient(90deg, #6c757d 0%, #495057 100%);
}

#employeeDashboardSection .stat-card:nth-child(6)::before,
#adminDashboardSection .stat-card:nth-child(6)::before {
  background: linear-gradient(90deg, #3a86ff 0%, #4361ee 100%);
}

.message {
  margin-top: 28px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-card {
    min-height: 130px;
    padding: 22px 20px;
  }

  .stat-card p {
    font-size: 2rem;
  }
}
.leads-filter-card {
  background: linear-gradient(180deg, #49536f 0%, #3f4963 100%);
  color: #ffffff;
}

.leads-filter-card label {
  color: #ffffff;
}

.lead-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.lead-filter-actions {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.secondary-btn {
  background: #6c757d;
}

.secondary-btn:hover {
  background: #5c6770;
}

.section-note {
  margin: 6px 0 0;
  color: #5b6b80;
  font-size: 0.95rem;
}

.lead-row {
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lead-row:hover {
  background-color: #f1f6fb;
}

.lead-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  color: #1d3557;
}

.lead-summary-grid div {
  background: #f8fbff;
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
}


.leads-filter-card {
  background: linear-gradient(180deg, #49536f 0%, #3f4963 100%);
  color: #ffffff;
}

.leads-filter-card label {
  color: #ffffff;
}

.lead-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.lead-filter-actions {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.secondary-btn {
  background: #6c757d;
}

.secondary-btn:hover {
  background: #5c6770;
}

.section-note {
  margin: 6px 0 0;
  color: #5b6b80;
  font-size: 0.95rem;
}

.lead-row {
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lead-row:hover {
  background-color: #f1f6fb;
}

.lead-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  color: #1d3557;
}

.lead-summary-grid div {
  background: #f8fbff;
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 20px rgba(29, 53, 87, 0.05);
}

.dashboard-table tbody tr td {
  vertical-align: top;
}

.dashboard-table tbody tr:hover {
  background: #f7fbff;
}

#leadHistoryTable td,
#leadsTable td {
  font-size: 0.95rem;
}

#leadHistoryTable td {
  line-height: 1.45;
}

.form-full textarea {
  min-height: 110px;
}

@media (max-width: 768px) {
  .lead-filter-grid {
    grid-template-columns: 1fr;
  }

  .lead-summary-grid {
    grid-template-columns: 1fr;
  }

  .lead-filter-actions {
    flex-direction: column;
  }

  .lead-filter-actions .nav-btn {
    width: 100%;
  }
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.status-open,
.status-new-lead,
.status-follow-up {
  background: #e8f1ff;
  color: #1d4ed8;
}

.status-won,
.status-converted {
  background: #e7f8ee;
  color: #1f7a3d;
}

.status-lost {
  background: #fdecec;
  color: #b42318;
}

.status-hold {
  background: #fff4db;
  color: #a15c07;
}

.status-pending-punch-out {
  background: #eef2ff;
  color: #4338ca;
}
.lead-filter-actions {
  margin-top: 24px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.lead-filter-actions .nav-btn {
  min-width: 150px;
}

#downloadExcelBtn {
  background: linear-gradient(135deg, #1f7a3d 0%, #2a9d55 100%);
  color: #ffffff;
}

#downloadExcelBtn:hover {
  background: linear-gradient(135deg, #196533 0%, #228447 100%);
}

.dashboard-table th,
.dashboard-table td {
  white-space: nowrap;
}

.dashboard-table td:nth-child(5),
.dashboard-table td:nth-child(6) {
  max-width: 220px;
  white-space: normal;
  word-break: break-word;
}

.table-card {
  overflow-x: auto;
}

.leads-filter-card .lead-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (max-width: 768px) {
  .lead-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-filter-actions .nav-btn {
    width: 100%;
    min-width: unset;
  }
}
.leads-table-compact {
  width: 100%;
  table-layout: fixed;
}

.leads-table-compact th,
.leads-table-compact td {
  padding: 12px 10px;
  font-size: 0.92rem;
  vertical-align: middle;
}

.leads-table-compact th:nth-child(1),
.leads-table-compact td:nth-child(1) {
  width: 12%;
}

.leads-table-compact th:nth-child(2),
.leads-table-compact td:nth-child(2) {
  width: 13%;
}

.leads-table-compact th:nth-child(3),
.leads-table-compact td:nth-child(3) {
  width: 8%;
}

.leads-table-compact th:nth-child(4),
.leads-table-compact td:nth-child(4) {
  width: 7%;
}

.leads-table-compact th:nth-child(5),
.leads-table-compact td:nth-child(5) {
  width: 8%;
}

.leads-table-compact th:nth-child(6),
.leads-table-compact td:nth-child(6) {
  width: 8%;
}

.leads-table-compact th:nth-child(7),
.leads-table-compact td:nth-child(7) {
  width: 8%;
}

.leads-table-compact th:nth-child(8),
.leads-table-compact td:nth-child(8) {
  width: 8%;
}

.leads-table-compact th:nth-child(9),
.leads-table-compact td:nth-child(9) {
  width: 14%;
}

.leads-table-compact th:nth-child(10),
.leads-table-compact td:nth-child(10) {
  width: 6%;
}

.leads-table-compact th:nth-child(11),
.leads-table-compact td:nth-child(11) {
  width: 8%;
}

.compact-badge {
  min-width: 84px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.leads-table-compact td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.leads-table-compact td[title] {
  cursor: help;
}
.phone-field-group {
  grid-column: span 2;
}

.phone-input-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: center;
}

.phone-country-code {
  min-width: 0;
}

.phone-number-input {
  min-width: 0;
}

@media (max-width: 768px) {
  .phone-field-group {
    grid-column: span 1;
  }

  .phone-input-row {
    grid-template-columns: 1fr;
  }
}
.table-pagination {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-summary {
  color: #44556b;
  font-weight: 600;
}

.page-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-btn {
  border: 1px solid #c7d4e5;
  background: #ffffff;
  color: #1d3557;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.page-btn:hover:not(:disabled) {
  background: #eef4fb;
}

.page-btn.active {
  background: #1d3557;
  color: #ffffff;
  border-color: #1d3557;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

.dashboard-stat-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 26px 22px 28px;
  box-shadow: 0 18px 40px rgba(29, 53, 87, 0.08);
  position: relative;
  overflow: hidden;
  min-height: 170px;
}

.dashboard-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
}

.dashboard-stat-card h3 {
  margin: 0 0 22px;
  font-size: 1.15rem;
  color: #37506f;
  font-weight: 700;
}

.dashboard-stat-card p {
  margin: 0;
  font-size: 3rem;
  line-height: 1;
  font-weight: 800;
  color: #153b6d;
  word-break: break-word;
}

.stat-blue::before {
  background: linear-gradient(90deg, #3f7bb8 0%, #5f97cf 100%);
}

.stat-green::before {
  background: linear-gradient(90deg, #2ca58d 0%, #54c6a6 100%);
}

.stat-orange::before {
  background: linear-gradient(90deg, #f08a4b 0%, #ffb26b 100%);
}

.stat-red::before {
  background: linear-gradient(90deg, #d62839 0%, #ef5d67 100%);
}

.stat-gray::before {
  background: linear-gradient(90deg, #5b6470 0%, #7e8792 100%);
}

.stat-indigo::before {
  background: linear-gradient(90deg, #3b82f6 0%, #638dff 100%);
}

@media (max-width: 1400px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-stat-card p {
    font-size: 2.4rem;
  }
}

@media (max-width: 640px) {
  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }
}
.month-year-group {
  grid-column: span 1;
}

.month-year-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 768px) {
  .month-year-row {
    grid-template-columns: 1fr;
  }
}
.performance-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.performance-metric-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(40, 69, 110, 0.08);
  border-radius: 24px;
  padding: 24px 24px 22px;
  box-shadow: 0 16px 36px rgba(29, 53, 87, 0.08);
  overflow: hidden;
}

.metric-topline {
  width: 72px;
  height: 6px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.metric-label {
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #5a6a85;
}

.performance-metric-card h3 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.1;
  font-weight: 800;
  color: #173764;
  letter-spacing: -0.02em;
}

.metric-footnote {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.88rem;
  color: #7b8ba5;
}

.metric-employees .metric-topline {
  background: linear-gradient(90deg, #315f9b 0%, #4c84c7 100%);
}

.metric-target .metric-topline {
  background: linear-gradient(90deg, #8367c7 0%, #5b8def 100%);
}

.metric-done .metric-topline {
  background: linear-gradient(90deg, #1f9d78 0%, #41c59b 100%);
}

.metric-profit .metric-topline {
  background: linear-gradient(90deg, #dc8a2d 0%, #f2b24e 100%);
}

@media (max-width: 1200px) {
  .performance-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .performance-overview-grid {
    grid-template-columns: 1fr;
  }

  .performance-metric-card h3 {
    font-size: 1.9rem;
  }
}
.performance-filters-card {
  background: linear-gradient(135deg, #31476f 0%, #4f5d80 100%);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 42px rgba(29, 53, 87, 0.12);
  color: #ffffff;
}

.performance-filters-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.performance-filters-header p {
  margin: 8px 0 0;
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.78);
}

.performance-filters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 22px;
  margin-top: 24px;
}

.performance-filters-card label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
}

.performance-filters-card input,
.performance-filters-card select {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.96);
  color: #1f355c;
  font-size: 1rem;
  padding: 0 16px;
  outline: none;
}

.performance-filters-card input::placeholder {
  color: #6c7a92;
}

.performance-filters-card input:focus,
.performance-filters-card select:focus {
  border-color: #bcd3ff;
  box-shadow: 0 0 0 4px rgba(188, 211, 255, 0.18);
}

.performance-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 28px;
}

.performance-filter-actions .nav-btn,
.performance-filter-actions .secondary-btn {
  min-width: 180px;
}

@media (max-width: 1100px) {
  .performance-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .performance-filters-card {
    padding: 22px;
  }

  .performance-filters-grid {
    grid-template-columns: 1fr;
  }

  .performance-filter-actions {
    justify-content: stretch;
  }

  .performance-filter-actions .nav-btn,
  .performance-filter-actions .secondary-btn {
    width: 100%;
  }
}
.clickable-performance-row {
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.clickable-performance-row:hover {
  background: #f4f8ff;
}

.performance-detail-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(40, 69, 110, 0.08);
}

.performance-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.performance-detail-header h3 {
  margin: 0;
  font-size: 1.45rem;
  color: #183963;
}

.performance-detail-header p {
  margin: 8px 0 0;
  color: #667791;
  font-size: 0.95rem;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #e9f2ff;
  color: #1f4677;
  font-weight: 700;
  white-space: nowrap;
}

.performance-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.detail-metric {
  background: #ffffff;
  border: 1px solid rgba(40, 69, 110, 0.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 20px rgba(29, 53, 87, 0.05);
}

.detail-label {
  display: block;
  margin-bottom: 10px;
  color: #697a94;
  font-size: 0.92rem;
  font-weight: 700;
}

.detail-metric strong {
  font-size: 1.3rem;
  color: #163760;
}

@media (max-width: 1100px) {
  .performance-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .performance-detail-header {
    flex-direction: column;
  }

  .performance-detail-grid {
    grid-template-columns: 1fr;
  }
}
.performance-detail-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 42px rgba(29, 53, 87, 0.08);
}

.performance-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 26px;
}

.performance-detail-header h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 800;
  color: #173764;
}

.performance-detail-header p {
  margin: 10px 0 0;
  font-size: 1rem;
  color: #667791;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e7f0ff 0%, #d7e7ff 100%);
  color: #224a7d;
  font-size: 0.96rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(34, 74, 125, 0.08);
}

.performance-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.detail-metric {
  background: #ffffff;
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 22px;
  padding: 20px 22px;
  box-shadow: 0 10px 24px rgba(29, 53, 87, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(29, 53, 87, 0.08);
}

.detail-label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #6c7c95;
}

.detail-metric strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1.1;
  font-weight: 800;
  color: #173764;
  letter-spacing: -0.02em;
}

.clickable-performance-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.clickable-performance-row:hover {
  background: #f4f8ff;
}

@media (max-width: 1100px) {
  .performance-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .performance-detail-card {
    padding: 22px;
  }

  .performance-detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .performance-detail-header h3 {
    font-size: 1.7rem;
  }

  .detail-metric strong {
    font-size: 1.6rem;
  }
}

@media (max-width: 640px) {
  .performance-detail-grid {
    grid-template-columns: 1fr;
  }
}
.leave-detail-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid rgba(29, 53, 87, 0.08);
}

.leave-detail-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 6px 4px 24px;
}

.leave-banner-label {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #6d7d96;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.leave-detail-banner h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 800;
  color: #173764;
}

.leave-banner-meta {
  margin: 10px 0 0;
  font-size: 1rem;
  color: #667791;
}

.leave-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

.leave-status-pending {
  background: #fff4d8;
  color: #9a6a00;
}

.leave-status-approved {
  background: #ddf7e8;
  color: #13653c;
}

.leave-status-rejected {
  background: #ffe0e0;
  color: #a02121;
}

.leave-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.leave-overview-card {
  background: #ffffff;
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(29, 53, 87, 0.05);
}

.leave-overview-label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #6d7d96;
}

.leave-overview-card strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 800;
  color: #173764;
}

.leave-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.leave-note-card {
  background: #ffffff;
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(29, 53, 87, 0.05);
}

.leave-note-card label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #173764;
}

.leave-note-card textarea {
  width: 100%;
  min-height: 130px;
  border: 1px solid rgba(29, 53, 87, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  resize: vertical;
  background: #f9fbfe;
  color: #173764;
}

.leave-note-card textarea:disabled {
  opacity: 1;
  color: #173764;
}

@media (max-width: 1100px) {
  .leave-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .leave-detail-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .leave-detail-banner h3 {
    font-size: 1.7rem;
  }

  .leave-note-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .leave-overview-grid {
    grid-template-columns: 1fr;
  }

  .leave-overview-card strong {
    font-size: 1.35rem;
  }
}
.attendance-override-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid rgba(29, 53, 87, 0.08);
}

.attendance-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 6px 4px 24px;
}

.attendance-hero-label {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #6d7d96;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.attendance-hero h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 800;
  color: #173764;
}

.attendance-hero-meta {
  margin: 10px 0 0;
  font-size: 1rem;
  color: #667791;
}

.attendance-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

.attendance-status-present {
  background: #ddf7e8;
  color: #13653c;
}

.attendance-status-halfday {
  background: #fff1d9;
  color: #9c6500;
}

.attendance-status-absent {
  background: #ffe0e0;
  color: #a02121;
}

.attendance-status-leave {
  background: #e5edff;
  color: #214a86;
}

.attendance-status-pending {
  background: #e9f2ff;
  color: #224a7d;
}

.attendance-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.attendance-overview-card {
  background: #ffffff;
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(29, 53, 87, 0.05);
}

.attendance-overview-label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #6d7d96;
}

.attendance-overview-card strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 800;
  color: #173764;
  word-break: break-word;
}

.attendance-note-card {
  background: #ffffff;
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(29, 53, 87, 0.05);
  margin-top: 22px;
}

.attendance-note-card label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #173764;
}

.attendance-note-card textarea {
  width: 100%;
  min-height: 130px;
  border: 1px solid rgba(29, 53, 87, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  resize: vertical;
  background: #f9fbfe;
  color: #173764;
}

.attendance-note-card textarea:disabled {
  opacity: 1;
  color: #173764;
}

@media (max-width: 1100px) {
  .attendance-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .attendance-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .attendance-hero h3 {
    font-size: 1.7rem;
  }
}

@media (max-width: 640px) {
  .attendance-overview-grid {
    grid-template-columns: 1fr;
  }

  .attendance-overview-card strong {
    font-size: 1.35rem;
  }
}
.daily-report-detail-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid rgba(29, 53, 87, 0.08);
}

.daily-report-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 6px 4px 24px;
}

.daily-report-banner-label {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #6d7d96;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.daily-report-banner h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 800;
  color: #173764;
}

.daily-report-banner-meta {
  margin: 10px 0 0;
  font-size: 1rem;
  color: #667791;
}

.daily-report-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

.daily-report-pill-good {
  background: #ddf7e8;
  color: #13653c;
}

.daily-report-pill-mid {
  background: #fff0d8;
  color: #9a6500;
}

.daily-report-pill-low {
  background: #ffe0e0;
  color: #a02121;
}

.daily-report-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.daily-report-overview-card,
.daily-report-metric-card {
  background: #ffffff;
  border: 1px solid rgba(29, 53, 87, 0.08);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(29, 53, 87, 0.05);
}

.daily-report-overview-label,
.daily-report-metric-label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #6d7d96;
}

.daily-report-overview-card strong,
.daily-report-metric-card strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 800;
  color: #173764;
  word-break: break-word;
}

.daily-report-section-block {
  margin-top: 24px;
}

.daily-report-section-block h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  color: #173764;
}

.daily-report-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.daily-report-detail-actions {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .daily-report-overview-grid,
  .daily-report-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .daily-report-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .daily-report-banner h3 {
    font-size: 1.7rem;
  }
}

@media (max-width: 640px) {
  .daily-report-overview-grid,
  .daily-report-metrics-grid {
    grid-template-columns: 1fr;
  }

  .daily-report-overview-card strong,
  .daily-report-metric-card strong {
    font-size: 1.35rem;
  }

  .daily-report-detail-actions {
    justify-content: stretch;
  }

  .daily-report-detail-actions .nav-btn {
    width: 100%;
  }
}
.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 8px 4px;
  flex-wrap: wrap;
}

.page-summary {
  font-size: 0.96rem;
  font-weight: 600;
  color: #5b6f8f;
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(29, 53, 87, 0.14);
  background: #ffffff;
  color: #1d3557;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(29, 53, 87, 0.06);
}

.page-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(29, 53, 87, 0.28);
  background: #f4f8ff;
}

.page-btn.active {
  background: #1d3557;
  color: #ffffff;
  border-color: #1d3557;
  box-shadow: 0 10px 22px rgba(29, 53, 87, 0.18);
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 768px) {
  .table-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .page-controls {
    justify-content: center;
  }

  .page-summary {
    text-align: center;
  }
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at top left, rgba(76, 114, 176, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(29, 53, 87, 0.14), transparent 30%),
    linear-gradient(135deg, #eef4fb 0%, #dde8f6 100%);
}

.login-card-professional {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 44px 42px 36px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(29, 53, 87, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 800;
  color: #183b6b;
  letter-spacing: -0.03em;
}

.login-header p {
  margin: 0;
  font-size: 1.18rem;
  color: #5f7394;
}

.login-form {
  display: grid;
  gap: 22px;
}

.login-field {
  display: grid;
  gap: 10px;
}

.login-field label {
  font-size: 1.02rem;
  font-weight: 700;
  color: #1d3557;
}

.login-field input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid #c9d7ea;
  background: #fff;
  font-size: 1.05rem;
  color: #1d3557;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.login-field input:focus {
  outline: none;
  border-color: #365f96;
  box-shadow: 0 0 0 4px rgba(54, 95, 150, 0.12);
  transform: translateY(-1px);
}

.login-submit-btn {
  width: 100%;
  height: 56px;
  margin-top: 6px;
  border-radius: 16px;
  font-size: 1.08rem;
  font-weight: 700;
}

.login-message {
  margin-top: 22px;
  text-align: center;
  min-height: 24px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .login-shell {
    padding: 20px 14px;
  }

  .login-card-professional {
    padding: 30px 22px 24px;
    border-radius: 22px;
  }

  .login-header {
    margin-bottom: 24px;
  }

  .login-header h1 {
    font-size: 2rem;
  }

  .login-header p {
    font-size: 1rem;
  }

  .login-field input,
  .login-submit-btn {
    height: 52px;
  }
}

.status-lost-approval-pending {
  background: #fff4db;
  color: #9a6700;
  border: 1px solid #f3d28b;
}
.stat-yellow {
  background: linear-gradient(135deg, #fff4d6 0%, #ffe7a8 100%);
  color: #7a5400;
}



