/* https://dribbble.com/shots/26062430-PolicyPilot-Auto-Insurance-Dashboard-Design */

/* Reset and base */
* {
  margin: 0; padding: 0; box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body, html {
  height: 100%;
  background: #f0f4f8;
  color: #222;
}

.container {
  display: flex;
  height: 100vh;
  /* overflow: hidden; */
}

/* Sidebar */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #ddd;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

.logo {
  font-weight: 700;
  font-size: 1.8rem;
  color: #0f4c81;
  margin-bottom: 40px;
  user-select: none;
}

.nav-main {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.nav-link {
  color: #555;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
  user-select: none;
}

.nav-link:hover,
.nav-link.active {
  background-color: #0f4c81;
  color: white;
}

/* Main content */
.main-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 30px 40px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
}

.search {
  flex: 1;
  min-width: 220px;
  padding: 10px 15px;
  font-size: 1rem;
  border-radius: 20px;
  border: 1px solid #ddd;
  outline-offset: 3px;
  transition: border-color 0.3s ease;
}

.search:focus {
  border-color: #0f4c81;
  outline: none;
}

/* Header buttons */
.actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-filter,
.btn-add {
  background-color: #0f4c81;
  border: none;
  padding: 10px 18px;
  border-radius: 30px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  user-select: none;
}

.btn-filter:hover,
.btn-add:hover {
  background-color: #0b3a61;
  transform: scale(1.05);
}

/* Stats Section */
.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 25px;
  margin-bottom: 40px;
}

/* Stat cards */
.stat-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 25px 30px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.12);
  text-align: center;
  color: #0f4c81;
  user-select: none;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.stat-card:hover {
  box-shadow: 0 15px 45px rgb(0 0 0 / 0.18);
  transform: translateY(-8px);
}

.stat-card h3 {
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.stat-value {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 6px;
}

/* Cards section for details */
.cards-section {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(350px,1fr));
  gap: 30px;
}

/* Section cards */
.section-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border-radius: 14px;
  padding: 30px 30px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.12);
  color: #222;
  user-select: none;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.section-card:hover {
  box-shadow: 0 15px 45px rgb(0 0 0 / 0.18);
  transform: translateY(-6px);
}

.section-card h4 {
  font-weight: 700;
  margin-bottom: 25px;
  color: #0f4c81;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  user-select: none;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #0f4c81;
  color: white;
}

tr:hover {
  background-color: #f0f8ff;
}

/* Attendance list */
.attendance-list {
  list-style: none;
  font-size: 1rem;
  color: #333;
}

/* Attendance Chart Glass Card Enhancement */
.attendance-glass {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0.15)
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 18px;
  padding: 35px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Attendance page: force vertical layout */
.attendance-vertical {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.attendance-glass:hover {
  transform: translateY(-6px);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* Chart Canvas */
.attendance-chart {
  margin-top: 20px;
}

.attendance-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

/* Documents list */
.document-list {
  list-style: none;
  margin-bottom: 15px;
  color: #444;
  font-weight: 600;
}

.document-list li {
  padding: 6px 0;
  border-bottom: 1px solid #ddd;
}

/* Buttons */
.btn-add-doc {
  padding: 10px 18px;
  background-color: #0f4c81;
  border: none;
  color: white;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-add-doc:hover {
  background-color: #0b3a61;
  transform: scale(1.05);
}

/* Leave request status */
.status {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 5px 8px;
  border-radius: 12px;
  width: max-content;
  color: white;
  user-select: none;
}

.status.approved {
  background-color: #4caf50;
}

.status.pending {
  background-color: #ff9800;
}

.status.rejected {
  background-color: #f44336;
}

/* Scrollbars */
.sidebar::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
  width: 7px;
}

.sidebar::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb {
  background-color: rgba(15, 76, 129, 0.3);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track {
  background-color: transparent;
}

/* Responsive */
@media (max-width: 1100px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #ddd;
  }

  .main-content {
    padding: 20px 15px;
  }

  .stats-section {
    grid-template-columns: repeat(auto-fit,minmax(140px,1fr));
  }

  .cards-section {
    grid-template-columns: 1fr;
  }
}

