/* =========================
   ROOT THEME VARIABLES
========================= */
:root {
  /* Brand colors */
  --primary-color: #2563eb; /* Blue */
  --primary-dark: #1e40af;
  --secondary-color: #64748b; /* Gray */

  /* Task UI specific colors */
  --success-soft: #dcfce7;
  --danger-soft: #fee2e2;
  --warning-soft: #fef9c3;

  --card-hover: #f9fafb;
  --accent-gradient: linear-gradient(135deg, #2563eb, #7c3aed);

  --timeline-line: #e2e8f0;
  --comment-bg: #f8fafc;
  --attachment-bg: #f1f5f9;

  /* Backgrounds */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-light: #f1f5f9;

  /* Text */
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #ffffff;

  /* Borders */
  --border-color: #e5e7eb;
  --border-radius: 8px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08);

  /* Fonts */
  --font-primary: "Inter", sans-serif;
  --font-secondary: "Poppins", sans-serif;

  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
}
/* =========================
   BASE / RESET STYLES
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border: none;
  transition: var(--transition-fast);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

/* Forms */
.form-control {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.form-control:focus {
  box-shadow: none;
  border-color: var(--primary-color);
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-card);
  overflow: hidden;
}
.card-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

/* =========================
   LOGIN PAGE STYLES
========================= */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 10px 35px;
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.auth-card h3 {
  font-family: var(--font-secondary);
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.auth-card .form-label {
  font-size: 14px;
  color: var(--text-muted);
}
.auth-brand {
  text-align: center;
  margin-bottom: 30px;
}

.brand-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 24px;
  box-shadow: var(--shadow-sm);
}

.auth-brand h3 {
  margin: 10px 0 5px;
  font-family: var(--font-secondary);
  font-weight: 600;
}

.auth-brand p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Form spacing */
.auth-form .form-group {
  margin-bottom: 18px;
}
/* Input with icon */
.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.input-group .form-control {
  height: 44px;
}

/* Button emphasis */
.auth-btn {
  margin-top: 10px;
  height: 44px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.auth-footer {
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* =========================
   ADMIN LAYOUT
========================= */

.admin-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
}
.employee-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  transition: 0.3s ease;
  z-index: 1000;
}

/* Collapsed Sidebar (desktop toggle future ready) */
.sidebar.collapsed {
  width: 70px;
}

.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .sidebar-nav span {
  display: none;
}
/* emeployee-layout */
.employee-layout .sidebar {
  border-right: 1px solid var(--border-color);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.employee-layout .sidebar-brand {
  color: var(--primary-dark);
}

.employee-layout .topbar {
  background: linear-gradient(90deg, #ffffff, #f8fafc);
}

/* =========================
   MOBILE SIDEBAR ROD
========================= */

.sidebar-rod {
  position: fixed;
  left: 0;
  top: 100px;
  width: 6px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  z-index: 1100;
  transition: var(--transition-fast);
  display: none;
}

.sidebar-rod:hover {
  width: 10px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: var(--border-radius);
  color: var(--text-dark);
  transition: var(--transition-fast);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

/* MAIN */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: 0.3s ease;
}

/* TOPBAR */
.topbar {
  background-color: var(--bg-card);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--primary-color);
}

/* OVERLAY (Mobile) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 900;
}

.sidebar-overlay.active {
  display: block;
}

.topbar h1 {
  font-size: 1.4rem;
  font-weight: 600;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

/* CONTENT */
.dashboard-content {
  padding: 1.5rem;
}
/* ========================= */
/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
/* STAT CARD */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  border: 1px solid var(--border-color);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-card h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card p {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-dark);
}
/* ICON COLORS */
.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}

/* Use soft gradient feel */
.bg-blue {
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.bg-green {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.bg-orange {
  background: linear-gradient(135deg, #ea580c, #c2410c);
}

.bg-purple {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.chart-wrapper {
  position: relative;
  width: 100%;
  min-height: 300px;
  flex: 1;
}

.recent-employee-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-employee-item {
  background: var(--bg-light);
  padding: 12px 16px;
  border-radius: var(--border-radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.recent-employee-item:hover {
  background: var(--card-hover);
}

.recent-employee-name {
  font-weight: 500;
}

.recent-employee-email {
  font-size: 0.85rem;
  color: var(--text-muted);
}
/* ================= EMPLOYEE LIST RESPONSIVE ================= */

.table-responsive {
  border-radius: var(--border-radius);
}

.table thead th {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.table tbody td {
  vertical-align: middle;
}

/* Action buttons */
.action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Pagination spacing */
.pagination .page-link {
  border-radius: 6px;
  margin: 0 2px;
  color: var(--primary-color);
}

.pagination .page-item.active .page-link {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* ------------------------------------- TASK CARD--------------------------- */
.task-card {
  transition: 0.2s ease;
}

.task-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.task-card.border-danger {
  border: 1px solid #dc2626 !important;
}

.task-comments {
  max-height: 280px;
  overflow-y: auto;
}

/* ================= TASK HEADER ================= */

.task-header-card {
  border-left: 4px solid var(--primary-color);
}

.task-title {
  font-weight: 600;
  font-size: 1.4rem;
}

.task-meta .badge {
  margin-right: 6px;
}

.status-badge {
  background: var(--bg-light);
  color: var(--text-dark);
}

.task-description {
  color: var(--text-muted);
  line-height: 1.6;
}

.info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.info-value {
  font-weight: 500;
}

.progress-modern {
  height: 10px;
  background: var(--bg-light);
  border-radius: 20px;
}

.progress-modern .progress-bar {
  background: var(--accent-gradient);
  border-radius: 20px;
}

/* ================= COMMENTS ================= */

.task-comments {
  max-height: 350px;
  overflow-y: auto;
  padding-right: 6px;
}

.comment-item {
  background: var(--comment-bg);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  transition: var(--transition-fast);
}

.comment-item:hover {
  background: var(--card-hover);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.comment-body {
  font-size: 0.9rem;
  color: var(--text-dark);
}

.comment-actions button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.8rem;
  padding: 0;
}

/* ================= ATTACHMENTS ================= */

.attachment-item {
  background: var(--attachment-bg);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: var(--transition-fast);
}

.attachment-item:hover {
  background: #e2e8f0;
}

/* ================= TIMELINE ================= */

.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--timeline-line);
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
  padding-left: 20px;
}

.timeline-dot {
  position: absolute;
  left: -1px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--primary-color);
  border-radius: 50%;
}

.timeline-content {
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.employee-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.employee-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: 0.2s ease;
  background: #fff;
}

.employee-card:hover {
  border-color: var(--primary-color);
  background: #f8fbff;
}

.employee-card input {
  margin-right: 8px;
}
/* .task-completed {
  border-left: 4px solid #16a34a;
  animation: completedPulse 1.2s ease-in-out;
}

@keyframes completedPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
} */

.task-completed {
  border: 2px solid #16a34a !important;
  animation: bounceTask 1.5s infinite alternate;
}

@keyframes bounceTask {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-6px);
  }
}
.task-card.removing {
  opacity: 0;
  transform: scale(0.9);
  transition: 0.3s ease;
}

/* ================= NOTIFICATIONS ================= */
.notification-wrapper {
  position: relative;
}

.notification-bell {
  position: relative;
  cursor: pointer;
  margin-left: 15px;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--primary-color);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 50px;
}

.notification-dropdown {
  position: absolute;
  right: 0;
  top: 40px;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  display: none;
  max-height: 400px;
  overflow-y: auto;
  z-index: 9999;
}

.notification-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.notification-item a {
  color: var(--text-dark);
  text-decoration: none;
  display: block;
}

.notification-item:hover {
  background: var(--card-hover);
}

.notification-item.unread {
  background: var(--bg-light);
  animation: fadeHighlight 0.8s ease;
}

@keyframes fadeHighlight {
  from {
    background: var(--primary-color);
    color: white;
  }
  to {
    background: var(--bg-light);
  }
}

/* =========================
   RESPONSIVE LOGIN UI
========================= */

/* =========================
   MOBILE MODE
========================= */

@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    width: 260px;
    background: var(--bg-card);
    transition: 0.3s ease;
  }

  .sidebar.active {
    left: 0;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 900;
  }

  .sidebar-overlay.active {
    display: block;
  }

  /* ROD */
  .sidebar-rod {
    display: block;
    position: fixed;
    left: 0;
    top: 100px;
    width: 6px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 0 6px 6px 0;
    z-index: 1100;
    transition: 0.3s ease;
  }

  /* When sidebar open → rod moves */
  .sidebar.active + .sidebar-rod {
    left: 260px;
    /* border-radius: 6px 0 0 6px; */
  }
}
/* Small devices (phones) */
@media (max-width: 576px) {
  .auth-wrapper {
    padding: 20px;
  }

  .auth-card {
    padding: 30px 22px;
    max-width: 100%;
    border-radius: 10px;
  }

  .brand-icon {
    width: 52px;
    height: 52px;
    font-size: 20px;
  }

  .auth-brand h3 {
    font-size: 20px;
  }

  .auth-brand p {
    font-size: 13px;
  }

  .form-label {
    font-size: 13px;
  }

  .input-group .form-control {
    height: 42px;
    font-size: 14px;
  }

  .auth-btn {
    height: 42px;
    font-size: 15px;
  }

  .auth-footer {
    font-size: 12px;
  }
}

/* Medium devices (tablets) */
@media (max-width: 768px) {
  .auth-card {
    padding: 35px 30px;
  }
}
@media (max-width: 768px) {
  /* .chart-wrapper {
    min-height: 240px;
  } */
  canvas {
    width: 100% !important;
    height: 100% !important;
  }
  .dashboard-content {
    padding: 1rem;
  }
  .hideHeader {
    display: none;
  }
  /* Table */
  .action-buttons {
    flex-direction: column;
    gap: 4px;
  }

  .table thead {
    display: none;
  }

  .table tbody tr {
    display: block;
    margin-bottom: 1rem;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius);
    padding: 1rem;
  }

  .table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border: none;
  }

  .table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
  }
}
