@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;600;700&family=Manrope:wght@300;400;500;600;700;800&display=swap");
@import url("mobile-overrides.css");

* {
  box-sizing: border-box;
}

:root {
  --topbar-height: 64px;
  --side-menu-offset: var(--topbar-height);
  --side-menu-footer-height: 100px; 
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

body {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  background: #f4f7fe;
  color: #2b3674;
  transition: margin-left 0.2s ease;
  padding-top: 64px;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  box-sizing: border-box;
}

.dashboard, .main-content {
  min-height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 30px;
}

.dashboard::-webkit-scrollbar, .main-content::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.side-menu-wrapper {
  position: fixed;
  left: 0;
  top: var(--topbar-height);
  bottom: 0;
  width: 50px;
  height: calc(100vh - var(--topbar-height));
  background: #ffffff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 0 0 12px 0;
  pointer-events: auto;
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.04);
}

.side-menu-wrapper::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(17, 37, 50, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 999;
}
.menu-toggle {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  margin-top: 5px;
  margin-left: 5px;
}
.menu-toggle:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.menu-toggle span {
  width: 28px;
  height: 2.5px;
  background: #1e90ff;
  border-radius: 2px;

  align-self: flex-start;
}

.menu-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #0da4d6;
  border-radius: 2px;
  transition: background 0.2s ease;
}
.menu-toggle.open .menu-bar {
  background: #ff7a1a;
}
.side-menu {
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fe 100%);
  color: #1b254b;
  padding: 0;
  width: 240px; /* Fixed width matching wrapper */
  min-width: 240px;
  max-width: 240px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  border-left: none;
  border-right: 1px solid rgba(15, 31, 42, 0.06);
  border-bottom: none;
  box-shadow: 0 18px 40px rgba(15, 31, 42, 0.06);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--side-menu-offset));
  margin-bottom: 0;
  border-top-right-radius: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1001;
  opacity: 1; /* Ensure visible by default */
  transform: none; /* Remove translation that might hide it */
  pointer-events: auto; /* Enable clicks */
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
  overflow: hidden;
}
.side-menu-inner {
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.side-menu.is-open {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.side-menu-main-content {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
  min-height: 0;
  max-height: calc(100% - var(--side-menu-footer-height));
  box-sizing: border-box;
}
.side-menu-footer {
  flex: 0 0 var(--side-menu-footer-height);
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  margin-top: auto;
  box-sizing: border-box;
}
.side-menu-main-content::-webkit-scrollbar {
  width: 6px;
}
.side-menu-main-content::-webkit-scrollbar-thumb {
  background: rgba(13, 164, 214, 0.35);
  border-radius: 999px;
}
.side-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  margin: 0 10px;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.side-menu-link::before {
  content: "";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(13, 164, 214, 0.12);
  flex-shrink: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}
.side-menu-link:hover {
  background: rgba(13, 164, 214, 0.08);
  color: #0b1437;
  transform: translateX(4px);
}
.side-menu-link:hover::before {
  background: #0da4d6;
  box-shadow: 0 0 6px rgba(13, 164, 214, 0.6);
}
.side-menu-link.active {
  background: #0da4d6;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(13, 164, 214, 0.35);
}
.side-menu-link.active::before {
  background: #ff7a1a;
  box-shadow: 0 0 6px rgba(255, 122, 26, 0.6);
}
.side-menu-section {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 0;
}
.side-menu-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  padding: 0 16px;
  margin-bottom: 2px;
}
@media (max-width: 1024px) {
  .side-menu-wrapper {
    padding: 0 0 20px 12px;
    height: calc(100vh - var(--topbar-height));
  }
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px 12px 70px; /* Added left padding for toggle button */
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: 64px;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-logo {
  height: 42px;
}

.company-name {
  font-weight: 700;
  color: #0da4d6;
}

.company-sub {
  font-size: 12px;
  color: #6b6b6b;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.datetime {
  font-size: 13px;
  color: #6b6b6b;
}
.name-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #4A90E2;
  color: white;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 8px;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #0da4d6;
  color: white;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid #e0e0e0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.profile-menu .menu-item {
  display: block;
  padding: 10px 14px;
  width: 160px;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
}

.profile-menu .menu-item:hover {
  background: #f7f7f7;
}

.btn {
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
 background: transparent;
  border: 2px solid #ff7a1a;
  color: #ff7a1a;
}

.btn.ghost {
  background: transparent;
  border: 1px solid #eee;
}

.btn.outline {
  background: transparent;
  border: 2px solid #ff7a1a;
  color: #ff7a1a;
}

.btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.btn.primary:hover,
.btn.outline:hover {
  background: #ff7a1a;
  color: #ffffff;
  border-color: #ff7a1a;
}
.btn.ghost:hover {
  background: #f7f7f7;
  border-color: #e9e9e9;
}

.attendance-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.apply-btn {
  width: 120px;
  margin-top: 15px;
}
.dashboard {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 24px;
  padding: 24px;
  margin-left: 60px;
  transition: margin-left 0.2s ease, width 0.2s ease;
  width: calc(100% - 60px);
  background: transparent;
}

body.menu-open .dashboard {
  margin-left: 240px;
  width: calc(100% - 240px);
}

.main-content {
  margin-left: 60px;
  width: calc(100% - 60px);
  transition: margin-left 0.2s ease, width 0.2s ease;
}

body.menu-open .main-content {
  margin-left: 240px;
  width: calc(100% - 240px);
}

/* Always-open side menu layout - REFACTORED */

/* Default State (Desktop): Menu Open */
body {
    padding-left: 240px; /* Space for sidebar */
    transition: padding-left 0.3s ease;
}

.side-menu-wrapper {
    width: 240px;
    transition: width 0.3s ease;
    overflow: hidden; /* Hide content when collapsed */
}

/* Sidebar inner content needs to stay fixed width to avoid squishing */
.side-menu {
    width: 240px;
    min-width: 240px;
    transition: opacity 0.3s ease;
    opacity: 1; /* Always visible in default state */
}

/* Collapsed State (Toggled by JS) */
body.menu-collapsed {
    padding-left: 0; /* Fully hidden on desktop collapse */
}

body.menu-collapsed .side-menu-wrapper {
    width: 0;
}

body.menu-collapsed .side-menu {
    opacity: 0;
    pointer-events: none;
}

/* Toggle Button is always visible */
.menu-toggle {
    display: flex !important;
    position: fixed; /* Fixed position so it stays even when menu is gone */
    top: 10px; /* Aligned with topbar */
    left: 15px;
    z-index: 2000; /* Ensure it's on top of everything */
    background: transparent;
    margin: 0; /* Reset margins */
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    body {
        padding-left: 0; /* No padding on mobile */
    }

    body.menu-collapsed {
        padding-left: 0;
    }

    .side-menu-wrapper {
        width: 0; /* Hidden by default on mobile */
        left: 0;
    }

    /* Open State on Mobile (Reusing menu-open class logic or new one) */
    body.mobile-menu-open .side-menu-wrapper {
        width: 240px;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    
    body.mobile-menu-open .side-menu {
        opacity: 1;
        pointer-events: auto;
    }

    /* Overlay */
    body.mobile-menu-open .side-menu-wrapper::before {
        opacity: 1;
        pointer-events: auto;
        width: 100vw; /* Full screen overlay */
    }
}

/* Dashboard & Main Content Adjustment */
.dashboard, .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 24px; /* Reduced padding to fill more space */
    box-sizing: border-box;
    max-width: 100%; /* Strict width limit */
    overflow-x: hidden;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 24px;
    align-items: start; /* Prevent stretching */
}

/* Fix Card Layouts */
.card, .admin-card, .stat-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 28px; /* Consistent card padding */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); /* Softer shadow */
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.04); /* Subtle border */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.calendar-card {
  padding: 16px;
  min-width: 280px;
  width: 100%;
}
.leave-card {
  padding: 16px;
}
.big-circle {
  height: 130px;
  width: 130px;
  margin: 6px auto 8px;
  border-radius: 50%;
  border: 10px solid rgba(255, 122, 26, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  transition: border-color 0.3s ease;
}

.big-circle::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #ffffff;
  z-index: 1;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.05);
}

.progress-fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--progress-color, #0da4d6) var(--progress, 0deg), rgba(13, 164, 214, 0.08) var(--progress, 0deg));
  transition: background 0.4s ease;
  z-index: 0;
}

.big-circle.status-pending {
  border-color: rgba(107, 107, 107, 0.2);
}

.big-circle.status-working {
  border-color: rgba(13, 164, 214, 0.3);
}

.big-circle.status-halfday {
  border-color: rgba(255, 193, 7, 0.4);
}

.big-circle.status-fullday {
  border-color: rgba(76, 175, 80, 0.4);
}

.big-circle.status-overtime {
  border-color: rgba(255, 122, 26, 0.5);
}

.status-indicators {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 2;
}

.circle-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.big-circle #workTimer {
  font-size: 18px;
  font-weight: 700;
  color: #0da4d6;
}

.big-circle .small-label {
  position: relative;
  z-index: 2;
}

.small-label {
  font-size: 12px;
  color: #6b6b6b;
}

.punch-info {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
}

.punch-info small {
  color: #6b6b6b;
}

punch-info div {
  font-weight: 600;
}
.greeting-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  box-sizing: border-box;
}

.greet-left h2 {
  margin: 0;
  font-size: 16px;
  color: #0da4d6;
}

.greet-left p {
  margin: 4px 0 0;
  color: #6b6b6b;
  font-size: 11px;
}

.greet-ill img {
  width: 50px;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  box-sizing: border-box;
}

.small-card {
  background: linear-gradient(180deg, #fff8f6, #fff);
  padding: 8px;
  border-radius: 8px;
  border-left: 5px solid #ff7a1a;
  font-size: 12px;
  margin: 20px 0 10px 0;
  margin-right: 20px;
}
.right-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-right: 0;
  margin-left: 0;
  width: 100%;
  box-sizing: border-box;
}
.calendar-container {
  padding: 2px;
}

.calendar-card .cal-head {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.cal-head h4 {
  margin: 0;
}

.cal-head small {
  color: #6b6b6b;
}

.cal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-controls select {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fff;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.month-year {
  font-weight: 700;
}

#calendarTable {
  width: 100%;
  min-width: 260px;
  border-collapse: collapse;
  font-size: 10px;
  table-layout: fixed;
}

#calendarTable thead th {
  color: #ff7a1a;
  font-weight: 700;
  padding: 2px 0;
  font-size: 9px;
}

#calendarTable thead th:last-child {
  font-size: 8px;
  padding: 2px 1px;
}

#calendarTable tbody td {
  width: 12.5%;
  height: 34px;
  text-align: center;
  vertical-align: middle;
  padding: 2px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #f2f2f2;
  position: relative;
}

#calendarTable tbody td.weekly-hours {
  width: 12.5%;
  font-size: 9px;
  font-weight: 600;
  color: #0da4d6;
  cursor: default;
  background: #f0f9ff;
  border: 1px solid #e0f2fe;
}

#calendarTable tbody td:hover {
  background: #ffeedb;
}

#calendarTable tbody td[data-holiday] {
  background: #ef9a9a;
  color: #600000;
  cursor: default;
}

#calendarTable tbody td[data-holiday]:hover {
  background: #ef9a9a;
}

#calendarTable tbody td[data-holiday]::after {
  content: attr(data-holiday);
  display: block;
  font-size: 8px;
  margin-top: 2px;
  color: inherit;
}

#calendarTable tbody td.weekly-hours:hover {
  background: #f0f9ff;
}
.present {
  background: #c8e6c9;
}

.half {
  background: #ffe0b2;
}

.leave {
  background: #66bb6a; /* Darker Green */
  color: #1b5e20;
  cursor: default;
}

#calendarTable tbody td.leave:hover {
  background: #66bb6a !important;
}

.weekend {
  background: #bdbdbd; /* Darker Grey */
  color: #333;
  cursor: default;
}

#calendarTable tbody td.weekend:hover {
  background: #bdbdbd !important;
}

.holiday {
  background: #ef5350; /* Darker Red */
  color: #fff;
  cursor: default;
}

#calendarTable tbody td.holiday:hover {
  background: #ef5350 !important;
}

.today {
  background: #ff7a1a;
  color: #ffffff;
  font-weight: 700;
  border-radius: 50%;
}
.today:hover {
  background: #ff7a1a !important;
  color: #ffffff;
}
.leave-circle {
  height: 76px;
  width: 76px;
  border-radius: 50%;
  border: 6px solid rgba(255, 122, 26, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto;
}

.leave-circle #leaveDays {
  font-size: 16px;
  font-weight: 700;
  color: #0da4d6;
}

.leave-ratio {
  text-align: center;
  color: #6b6b6b;
  margin-bottom: 6px;
}
.page-wrap {
  display: flex;
  min-height: 100vh;
}

.brand-panel {
  flex: 0 0 300px;
  background: linear-gradient(180deg, #e6f8ff, #fff);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  max-width: 140px;
  margin-bottom: 10px;
}

.brand-sub {
  color: #6b6b6b;
}

.login-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 420px;
  background: #ffffff;
  padding: 22px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(20, 20, 20, 0.06);
  text-align: left;
}

.login-card h2 {
  margin-bottom: 6px;
}

.login-card input {
  width: 100%;
  padding: 10px;
  margin: 8px 0 12px;
  border-radius: 8px;
  border: 1px solid #eee;
}
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 3000;
  width: 100%;
  height: 100%;
}

.modal.show {
  display: flex;
}

.modal-box {
  width: 420px;
  max-width: 90%;
  background: #ffffff;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
  position: relative;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-box h3 {
  margin: 0 0 20px;
  font-size: 18px;
  color: #0da4d6;
  font-weight: 700;
}

.modal-box label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
  color: #222;
  font-size: 14px;
}

.modal-box label:first-of-type {
  margin-top: 0;
}

.modal-box input,
.modal-box textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 0;
  border-radius: 8px;
  border: 1.5px solid #e0e0e0;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.modal-box input:focus,
.modal-box textarea:focus {
  outline: none;
  border-color: #0da4d6;
  box-shadow: 0 0 0 3px rgba(13, 164, 214, 0.1);
}

.modal-box textarea {
  resize: vertical;
  min-height: 80px;
}

#profileMsg {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: none;
}

#profileMsg.error {
  background: #ffebee;
  color: #c62828;
  border-left: 3px solid #c62828;
  display: block;
}

#profileMsg.success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 3px solid #2e7d32;
  display: block;
}

#profileMsg:not(.error):not(.success) {
  display: none;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

.modal-actions .btn {
  min-width: 100px;
  padding: 10px 16px;
  font-weight: 600;
  border-radius: 8px;
}

.modal-actions .btn.primary {
  background: #ff7a1a;
  color: #ffffff;
  border: 2px solid #ff7a1a;
}

.modal-actions .btn.primary:hover {
  background: #e66a0a;
  border-color: #e66a0a;
  box-shadow: 0 4px 12px rgba(255, 122, 26, 0.3);
}

.modal-actions .btn.ghost {
  background: transparent;
  border: 2px solid #e0e0e0;
  color: #666;
}

.modal-actions .btn.ghost:hover {
  background: #f5f5f5;
  border-color: #bbb;
}
.punchin-card {
  padding: 8px;
  margin-left: 0;
  margin-right: 0;
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
}

.punchin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  margin-top: -10px;
}

.punchin-header h4 {
  margin: 0;
  font-size: 14px;
  color: #0da4d6;
  text-align: center;
  flex: 1;
}

.nav-arrows {
  display: flex;
  gap: 8px;
  z-index: 20;
}

.btn-arrow {
  border: none;
  background: transparent;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 30px;
  color: #ff7a1a;
  transition: background 0.2s ease, color 0.2s ease;
  position: relative;
  z-index: 21;
}

.btn-arrow:hover {
  background: rgba(255, 122, 26, 0.1);
  color: #ff7a1a;
}

.btn-arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #ccc;
}

/* Admin Layout & Components */
.main-content {
  margin-left: 60px;
  padding: 30px 40px;
  min-height: calc(100vh - 64px);
  transition: margin-left 0.2s ease, width 0.2s ease;
  width: calc(100% - 60px);
}

body.menu-open .main-content {
  margin-left: 240px;
  width: calc(100% - 240px);
}

.page-header {
  margin-bottom: 30px;
}

.page-header h1 {
  margin: 0 0 8px 0;
  color: #0da4d6;
  font-size: 28px;
}

.page-header p {
  margin: 0;
  color: #6b6b6b;
}

/* Tabs */
.report-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.tab-btn {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-weight: 600;
  color: #6b6b6b;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #0da4d6;
  background: rgba(13, 164, 214, 0.05);
}

.tab-btn.active {
  color: #0da4d6;
  border-bottom-color: #0da4d6;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Admin Stats & Grid */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid #eee;
}

.stat-label {
  color: #6b6b6b;
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #0da4d6;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.admin-card {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid #eee;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}

.admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.admin-card h3 {
  margin: 0 0 10px;
  color: #333;
}

.admin-card p {
  color: #666;
  font-size: 14px;
  margin: 0 0 20px;
  flex: 1;
}

/* Tables */
.users-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #eee;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.users-table th,
.users-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.users-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #444;
  font-size: 13px;
}

.users-table td {
  font-size: 14px;
  color: #333;
}

.users-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #eee;
  color: #555;
}

.badge.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge.warning {
  background: #fff3e0;
  color: #ef6c00;
}

.badge.danger {
  background: #ffebee;
  color: #c62828;
}

.badge.info {
  background: #e1f5fe;
  color: #0288d1;
}

@media (max-width: 768px) {
  .main-content {
    padding: 20px;
  }
  body.menu-open .main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
  }
}

/* Dashboard Page Styles */
.profile-header {
  display: flex;
  gap: 14px;
  align-items: center;
}

.profile-img {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #0da4d6;
  display: block;
}

.profile-placeholder {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0da4d6, #007bb5);
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #e0f7fa;
  text-transform: uppercase;
}

.upload-btn {
  font-size: 12px;
  margin-top: 6px;
}

.info-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  font-size: 13px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.info-row span:first-child {
  font-weight: 600;
  color: #555;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.day-box {
  background: linear-gradient(135deg,#e3f6ff,#fff);
  padding: 16px;
  border-radius: 14px;
  text-align: center;
  font-size: 13px;
  border: 1px solid #e1f5fe;
}

.day-box strong {
  display: block;
  font-size: 18px;
  color: #0288d1;
}

@media(max-width:1200px){
  .dashboard {
    grid-template-columns: 1fr 1.2fr;
  }
  .other-col {
    grid-column: 1 / -1;
  }
}

@media(max-width:900px){
  .dashboard {
    grid-template-columns: 1fr;
  }
}

#punchInContainer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 400px;
  overflow-y: auto;
}

.punchin-day {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: linear-gradient(180deg, #fff8f6, #fff);
  border-radius: 6px;
  border-left: 4px solid #ff7a1a;
  font-size: 12px;;
}

.day-date {
  font-weight: 600;
  color: #0da4d6;
  min-width: 70px;
}

.day-date-label {
  font-size: 10px;
  color: #6b6b6b;
  margin-top: 2px;
}

.day-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.time-block {
  text-align: center;
}

.time-label {
  font-size: 10px;
  color: #6b6b6b;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.time-value {
  font-weight: 600;
  color: #222;
  font-size: 12px;
}

.day-duration {
  text-align: center;
  padding: 4px 8px;
  background: rgba(13, 164, 214, 0.1);
  border-radius: 6px;
  min-width: 60px;
}

.duration-label {
  font-size: 9px;
  color: #6b6b6b;
  display: block;
  margin-bottom: 2px;
}

.duration-value {
  font-weight: 600;
  color: #0da4d6;
  font-size: 12px;
}

.day-overtime {
  text-align: center;
  padding: 4px 8px;
  background: rgba(255, 122, 26, 0.1);
  border-radius: 6px;
  min-width: 60px;
}

.overtime-label {
  font-size: 9px;
  color: #6b6b6b;
  display: block;
  margin-bottom: 2px;
}

.overtime-value {
  font-weight: 600;
  color: #ff7a1a;
  font-size: 12px;
}

.day-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}

.day-status.present {
  background: #c8e6c9;
  color: #2e7d32;
}

.day-status.halfday {
  background: #ffe0b2;
  color: #f57c00;
}

.day-status.leave {
  background: #c8e6c9;
  color: #2e7d32;
}

.day-status.absent, .day-status.missedout {
  background: #ffcdd2;
  color: #c62828;
  font-weight: bold;
  border: 2px solid #c62828;
}
@media (max-width: 980px) {
  .dashboard {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .brand-panel {
    display: none;
  }

  .login-card {
    width: 92%;
  }

  .punchin-day {
    grid-template-columns: 1fr;
  }

  .day-times {
    grid-template-columns: 1fr 1fr;
  }
}

.page-header {
  margin-bottom: 30px;
}

.page-header h1 {
  font-size: 28px;
  color: #0da4d6;
  margin: 0 0 5px 0;
}

.page-header p {
  color: #888;
  margin: 0;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-label {
  font-size: 13px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #0da4d6;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.admin-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.admin-card h3 {
  color: #0da4d6;
  margin: 0 0 10px 0;
  font-size: 18px;
}

.admin-card p {
  color: #666;
  margin: 0 0 20px 0;
  font-size: 14px;
}

.management-toolbar {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input,
.filter-select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  flex: 1;
  min-width: 150px;
}

.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #0da4d6;
  box-shadow: 0 0 0 3px rgba(13, 164, 214, 0.1);
}

.users-table-wrapper {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.users-table thead {
  background: #f5f5f5;
  border-bottom: 2px solid #e0e0e0;
}

.users-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: #333;
}

.users-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
}

.users-table tbody tr:hover {
  background: #f9f9f9;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: #e3f2fd;
  color: #1a73e8;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge.success {
  background: #e8f5e9;
  color: #4caf50;
}

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
  margin-right: 5px;
}

.btn.danger {
  background: #f44336;
  color: white;
}

.btn.danger:hover {
  background: #d32f2f;
}

.btn.secondary {
  background: #757575;
  color: white;
  margin-right: 10px;
  margin-bottom: 10px;
}

.btn.secondary:hover {
  background: #616161;
}

.modal-box {
  min-width: 400px;
}

.modal-box label {
  display: block;
  margin: 15px 0 5px 0;
  font-weight: 600;
  color: #333;
}

.modal-box input,
.modal-box select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.modal-box input:focus,
.modal-box select:focus {
  outline: none;
  border-color: #0da4d6;
  box-shadow: 0 0 0 3px rgba(13, 164, 214, 0.1);
}

.report-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #0da4d6;
}

.tab-btn.active {
  color: #0da4d6;
  border-bottom-color: #0da4d6;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.settings-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.settings-card h3 {
  color: #0da4d6;
  margin: 0 0 20px 0;
  font-size: 16px;
}

.settings-card label {
  display: block;
  margin: 15px 0 8px 0;
  color: #333;
  font-weight: 500;
}

.settings-card input[type="number"],
.settings-card input[type="time"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.settings-card input[type="checkbox"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.info-box {
  background: #e3f2fd;
  border-left: 4px solid #0da4d6;
  padding: 20px;
  border-radius: 6px;
}

.info-box h4 {
  color: #0da4d6;
  margin: 0 0 10px 0;
}

.info-box p {
  margin: 5px 0;
  color: #333;
  font-size: 14px;
}

.main-content {
  margin-left: 60px;
  padding: 30px 40px;
  min-height: calc(100vh - 64px);
  background: linear-gradient(180deg, #f7fbff, #ffffff);
  transition: margin-left 0.2s ease, width 0.2s ease;
  width: calc(100% - 60px);
}

body.menu-open .main-content {
  margin-left: 240px;
  width: calc(100% - 240px);
}

@media (max-width: 768px) {
  .main-content {
    padding: 20px;
  }
  body.menu-open .main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
  }
}

/* Leave Page Additional Styles */
.center-col {
  display: flex;
  flex-direction: column;
}

.greeting-card.compact {
  padding: 16px;
}

.greeting-card.compact h3 {
  font-size: 16px;
  color: #0da4d6;
}

.attendance-card h3,
.calendar-card h3 {
  font-size: 16px;
  color: #0da4d6;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 5px;
}

.attendance-card {
  padding: 14px 16px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.attendance-card .big-circle {
  height: 110px;
  width: 110px;
  margin: 4px auto 6px;
}

.attendance-card .punch-info {
  padding: 6px 20px 8px;
  width: 100%;
  max-width: 260px;
  display: flex;
  justify-content: space-between;
}

.attendance-card .punch-info small {
  font-size: 11px;
}

.attendance-card .punch-info div {
  font-size: 12px;
}

.attendance-card .big-circle #workTimer {
  font-size: 16px;
}

.attendance-card .small-label {
  font-size: 11px;
}

.attendance-card .attendance-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
}

/* Task Session Styles */
.task-session-section {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e9e9e9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.task-timer-circle {
  height: 100px;
  width: 100px;
  border-radius: 50%;
  border: 6px solid rgba(13, 164, 214, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.task-progress-fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--task-progress-color, #0da4d6) var(--task-progress, 0deg), rgba(13, 164, 214, 0.08) var(--task-progress, 0deg));
  transition: background 0.4s ease;
  z-index: 0;
}

.task-timer-circle::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #ffffff;
  z-index: 1;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-timer-circle #taskTimer {
  font-size: 16px;
  font-weight: 700;
  color: #0da4d6;
  position: relative;
  z-index: 2;
}

.task-timer-circle .small-label {
  font-size: 10px;
  color: #6b6b6b;
  position: relative;
  z-index: 2;
}

.task-time-info {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  width: 100%;
  max-width: 260px;
  padding: 0 4px;
  position: relative;
  z-index: 2;
}

.task-time-info .task-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.task-time-info .task-col small {
  font-size: 9px;
  color: #6b6b6b;
}

.task-time-info .task-col #taskStartTime,
.task-time-info .task-col #taskEndTime {
  font-size: 11px;
  font-weight: 600;
  color: #333;
}

.task-time-info .task-col .task-btn {
  box-sizing: border-box;
  width: 120px;
  height: 34px;
  line-height: 34px;
  padding: 0;
  font-size: 12px;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}

.task-time-info .task-col #btnCreateTask {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.35);
}

.task-time-info .task-col #btnEndTask {
  background: rgba(37, 99, 235, 0.12);
  color: #da0303;
  border: 1px solid rgba(238, 8, 8, 0.4);
}

.task-actions .btn.secondary {
  background: #e3f2fd;
  color: #0da4d6;
  border: 1px solid #0da4d6;
}

.task-actions .btn.secondary:hover {
  background: #0da4d6;
  color: white;
}

.task-actions .btn.danger {
  background: #ffebee;
  color: #d32f2f;
  border: 1px solid #d32f2f;
}

.task-actions .btn.danger:hover {
  background: #d32f2f;
  color: white;
}

/* Responsive adjustments for dashboard grid */
@media (max-width: 1400px) {
  .dashboard {
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 14px;
    padding: 14px;
  }
}

@media (max-width: 1200px) {
  .dashboard {
    grid-template-columns: 1fr 1.2fr;
    gap: 14px;
  }
}

@media (max-width: 1024px) {
  .dashboard {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px;
  }
  
  body.menu-open .dashboard {
    margin-left: 240px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard {
    margin-left: 60px;
    width: calc(100% - 60px);
    padding: 10px;
    gap: 12px;
  }
  
  body.menu-open .dashboard {
    margin-left: 60px;
    width: calc(100% - 60px);
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .topbar {
    padding: 8px 12px;
  }
  
  .company-name {
    font-size: 14px;
  }
  
  .company-sub {
    display: none;
  }
  
  .card {
    padding: 16px;
    border-radius: 12px;
  }
}

@media (max-width: 600px) {
  .dashboard {
    padding: 8px;
    gap: 10px;
  }
  
  .card {
    padding: 14px;
  }
}

/* Accuracy Meter */
.accuracy-wrapper {
  margin-top: 15px;
  width: 100%;
  padding: 0 5px;
  box-sizing: border-box;
}
.accuracy-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 14px;
  color: #555;
  font-weight: 600;
}
.accuracy-track {
  background: #eee;
  border-radius: 8px;
  height: 10px;
  width: 100%;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.accuracy-fill {
  width: 0%;
  background: linear-gradient(90deg, #0da4d6, #00c6ff);
  height: 100%;
  border-radius: 8px;
  transition: width 1s ease-in-out;
}

/* =========================
   Enterprise Refresh
   ========================= */
:root {
  /* Design tokens (WCAG AA contrast-friendly) */
  --ds-font: "Manrope", sans-serif;
  --ds-display-font: "Fraunces", serif;

  /* Background + surface */
  --ds-bg: #f3f5f7; /* App background */
  --ds-surface: #ffffff; /* Base card surface */
  --ds-surface-2: #f6f8fa; /* Elevated sections, table headers */
  --ds-surface-3: #eef2f5; /* Subtle panels */

  /* Text */
  --ds-ink: #0f1b24; /* Primary text */
  --ds-muted: #566470; /* Secondary text */
  --ds-muted-2: #7a8792; /* Metadata text */

  /* Brand palette */
  --ds-primary: #0a7c83; /* Primary actions */
  --ds-primary-strong: #075e63; /* Hover state */
  --ds-secondary: #2563eb; /* Secondary actions */
  --ds-accent: #f59e0b; /* Accent highlights */

  /* Borders + shadows */
  --ds-border: #d5dde5; /* Default borders */
  --ds-border-strong: #c2ccd6; /* Emphasis borders */
  --ds-shadow: 0 18px 36px rgba(12, 23, 31, 0.12);
  --ds-shadow-soft: 0 10px 22px rgba(12, 23, 31, 0.08);
  --ds-card-gradient: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  --ds-card-glow: 0 0 0 1px rgba(15, 27, 36, 0.03) inset;

  /* Radius + focus */
  --ds-radius-lg: 18px;
  --ds-radius-md: 12px;
  --ds-radius-sm: 8px;
  --ds-focus: 0 0 0 3px rgba(10, 124, 131, 0.2);
}

html, body {
  font-family: var(--ds-font);
  color: var(--ds-ink);
}

body {
  background: radial-gradient(circle at 15% 10%, rgba(10, 124, 131, 0.08), transparent 45%),
              radial-gradient(circle at 85% 0%, rgba(245, 158, 11, 0.12), transparent 35%),
              linear-gradient(180deg, #f6f8fb 0%, #edf2f6 100%);
  letter-spacing: -0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(18, 33, 43, 0.04) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, h4 {
  font-family: var(--ds-display-font);
  color: var(--ds-ink);
  letter-spacing: -0.02em;
}

p {
  color: var(--ds-muted);
}

.topbar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(18, 33, 43, 0.08);
  box-shadow: 0 8px 24px rgba(18, 33, 43, 0.04);
}

.company-name {
  color: var(--ds-accent);
  font-weight: 700;
}

.side-menu {
  background: linear-gradient(180deg, #0b1f2a 0%, #122f3e 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.side-menu-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}

.side-menu-link.active {
  background: #ffffff;
  color: #0b1f2a;
}

.side-menu-link::before {
  background: rgba(255, 255, 255, 0.8);
}

.menu-toggle span,
.menu-bar {
  background: var(--ds-primary);
}

.main-content {
  background: transparent;
  padding: 24px;
  min-height: calc(100vh - 64px);
  max-width: 100%;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

body.menu-open .main-content {
  padding-left: 24px;
  width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--ds-border);
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 28px;
  margin: 0;
}

.page-header p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ds-muted-2);
}

.dashboard {
  gap: 24px;
}

.card,
.admin-card,
.stat-card,
.device-table,
.users-table-wrapper,
.agents-table-container,
.chart-container,
.data-table,
.card-grid > * {
  background: var(--ds-card-gradient);
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-border);
  box-shadow: var(--ds-shadow-soft), var(--ds-card-glow);
}

.card {
  padding: 22px 24px;
}

.card h3,
.card h4 {
  color: var(--ds-ink);
}

.stat-card {
  padding: 18px 20px;
}

.stat-label {
  color: var(--ds-muted-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  color: var(--ds-ink);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.admin-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-card p {
  color: var(--ds-muted);
}

.btn {
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn.primary {
  background: var(--ds-primary);
  color: #ffffff;
  border-color: var(--ds-primary);
}

.btn.primary:hover {
  background: var(--ds-primary-strong);
  border-color: var(--ds-primary-strong);
}

.btn.secondary {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.35);
}

.btn.outline,
.btn.ghost {
  background: transparent;
  color: var(--ds-ink);
  border: 1px solid var(--ds-border-strong);
}

.btn.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #c43d3d;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn.small {
  padding: 4px 10px;
  font-size: 12px;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 124, 131, 0.12);
  color: var(--ds-primary-strong);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge.success {
  background: rgba(34, 197, 94, 0.15);
  color: #17803d;
}

.badge.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #b42318;
}

.users-table,
.device-table,
.agents-table,
.data-table,
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--ds-ink);
}

.users-table th,
.device-table th,
.agents-table th,
.data-table th,
table th {
  background: var(--ds-surface-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--ds-muted-2);
  padding: 12px 14px;
  border-bottom: 1px solid var(--ds-border);
}

.users-table td,
.device-table td,
.agents-table td,
.data-table td,
table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ds-border);
}

.users-table tbody tr:hover,
.device-table tbody tr:hover,
.agents-table tbody tr:hover,
.data-table tbody tr:hover,
table tbody tr:hover {
  background: rgba(10, 124, 131, 0.06);
}

.form-control,
.search-input,
.filter-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  border-radius: var(--ds-radius-md);
  border: 1px solid var(--ds-border-strong);
  background: #ffffff;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--ds-font);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.search-input:focus,
.filter-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--ds-primary);
  box-shadow: var(--ds-focus);
  outline: none;
}

.modal {
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
}

.modal-box,
.modal-content {
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-border);
  box-shadow: var(--ds-shadow);
  position: relative;
  width: 90%;
  max-width: 600px;
  background: #ffffff;
  padding: 20px;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 50px;
  line-height: 1;
  cursor: pointer;
  color: #f80404;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 20;
}

.modal-close-btn:hover {
  background-color: #f1f5f9;
  color: #ef4444;
}

.tabs,
.report-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--ds-border);
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  border-radius: 999px;
  padding: 8px 16px;
  border: 1px solid transparent;
  background: rgba(10, 124, 131, 0.1);
  color: var(--ds-primary-strong);
}

.tab-btn.active {
  background: var(--ds-primary);
  color: #ffffff;
}

.login-container {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--ds-border);
  box-shadow: 0 24px 50px rgba(18, 33, 43, 0.1);
  border-radius: var(--ds-radius-lg);
}

.login-tabs {
  border-bottom: 1px solid var(--ds-border);
}

.login-tab.active {
  color: var(--ds-primary);
  border-bottom-color: var(--ds-primary);
}

.status-badge {
  border-radius: 999px;
  font-weight: 600;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInSoft {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-header,
.card,
.stat-card,
.admin-card,
.users-table-wrapper,
.agents-table-container,
.chart-container {
  animation: riseIn 0.5s ease both;
}

@media (max-width: 1024px) {
  .main-content {
    padding: 22px;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .main-content {
    width: calc(100% - 60px);
  }
  body.menu-open .main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
  }
  .page-header h1 {
    font-size: 24px;
  }
}

/* =========================
   Responsive visual pass
   ========================= */
@media (max-width: 1200px) {
  .main-content {
    max-width: 100%;
    padding: 22px 24px 32px;
  }

  .dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .topbar {
    padding: 10px 16px;
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
  }

  .top-left,
  .top-right {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .profile-info span {
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 64px;
  }

  .main-content {
    padding: 18px 16px 28px;
  }

  .card {
    padding: 18px;
  }

  .page-header {
    gap: 8px;
  }

  .page-header p {
    font-size: 13px;
  }

  .users-table-wrapper,
  .agents-table-container,
  .table-container,
  .chart-container {
    overflow-x: auto;
  }

  .users-table,
  .device-table,
  .agents-table,
  .data-table,
  table {
    min-width: 640px;
  }

  .tabs,
  .report-tabs {
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .tab-btn {
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .main-content {
    padding: 16px 12px 24px;
  }

  .top-logo {
    height: 36px;
  }

  .profile-info {
    gap: 6px;
  }

  .user-avatar {
    width: 34px;
    height: 34px;
  }

  .btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* =========================================
   GLOBAL RESPONSIVE OVERRIDES
   ========================================= */

/* Tablet & Smaller Laptops (Max Width: 1024px) */
@media (max-width: 1024px) {
  /* Dashboard Grid - 2 Columns */
  .dashboard {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  /* Make the middle column (if any) span full width or adjust */
  /* This depends on specific page layout, but flex/column is safer for generic responsiveness */
}

/* Tablets (Max Width: 768px) */
@media (max-width: 768px) {
  /* Reset margins for content when menu is closed/overlay */
  .dashboard, .main-content {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 16px;
  }

  /* Cards */
  .card, .admin-card, .stat-card {
    padding: 16px;
  }

  /* Typography */
  h1, .page-header h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }

  /* Profile Header in Dashboard */
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  
  .info-list {
    text-align: left;
  }

  /* Forms */
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .form-row > div {
    width: 100%;
  }

  /* Modals */
  .modal-box {
    width: 90%;
    max-width: 95%;
    padding: 20px;
    margin: 20px;
  }

  /* Tables - Force horizontal scroll */
  .users-table-wrapper, 
  .table-responsive,
  .data-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
  }

  table {
    min-width: 600px; /* Ensure table doesn't squish too much */
  }

  /* Topbar */
  .topbar {
    padding-left: 60px; /* Space for toggle button */
    padding-right: 16px;
  }
  
  .top-right {
    gap: 8px;
  }
  
  .datetime {
    display: none; /* Hide date on small screens to save space */
  }
  
  .profile-info span {
    display: none; /* Hide name/role on mobile, show only avatar */
  }
  
  .user-avatar {
    width: 36px;
    height: 36px;
  }
}

/* Mobile (Max Width: 600px) - Stack Layout */
@media (max-width: 600px) {
  /* Dashboard - Stack vertically */
  .dashboard {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }

  /* Week Grid */
  .week-grid {
    grid-template-columns: 1fr; /* Stack days */
  }

  .card {
    padding: 14px;
    border-radius: 12px;
  }

  /* Admin Stats */
  .admin-stats {
    grid-template-columns: 1fr; /* Stack stats */
  }

  .stat-value {
    font-size: 24px;
  }

  /* Login Card */
  .login-card {
    width: 100%;
    padding: 20px;
    box-shadow: none;
    border: 1px solid #eee;
  }

  /* Buttons */
  .btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 8px;
  }
  
  .attendance-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .attendance-actions .btn {
    width: 100%;
    margin: 0;
  }

  /* Calendar */
  #calendarTable {
    font-size: 9px;
  }
  
  #calendarTable tbody td {
    height: 30px;
  }

  /* Task Timer */
  .task-time-info {
    flex-direction: column;
    align-items: center;
  }
  
  .task-time-info .task-col {
    width: 100%;
  }
}
