/* ============================================================
   IPC HRM – Modern White & Green (Emerald) Theme
   ============================================================ */

:root {
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --sidebar-bg: #ffffff;
  /* White background */
  --sidebar-w: 260px;
  --sidebar-w-c: 68px;
  --sidebar-text: #475569;
  --sidebar-text-active: #10b981;
  --sidebar-active-bg: #f0fdf4;
  --accent: #10b981;
  --accent-light: #ecfdf5;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: 0.25s cubic-bezier(.4, 0, .2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ── APP LAYOUT ── */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left var(--transition);
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: width var(--transition);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.sidebar.collapsed {
  width: var(--sidebar-w-c);
}

.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.logo-text {
  font-size: 18px;
  font-weight: 800;
  color: #10b981 !important;
  letter-spacing: 0.5px;
  transition: 0.3s;
}

.sidebar.collapsed .logo-text {
  display: none;
}

.sidebar-nav {
  flex: 1;
  padding: 0 12px;
  overflow-y: auto;
}

/* Sidebar Menu Groups */
.nav-group-label {
  padding: 24px 16px 8px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  /* Muted gray for white theme */
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar.collapsed .nav-group-label {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.2s;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: #f8fafc;
  color: var(--accent);
}

.nav-item.active {
  background: #f0fdf4;
  color: var(--accent);
  font-weight: 700;
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-label {
  transition: 0.3s;
  white-space: nowrap;
}

.sidebar.collapsed .nav-label {
  display: none;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.collapse-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  background: var(--bg);
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.2s;
}

.collapse-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar.collapsed .collapse-btn {
  justify-content: center;
  padding: 10px 0;
}

/* ── HEADER ── */
.header {
  height: 64px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-header-logo {
  display: none;
  /* Only mobile */
}

.mobile-bottom-nav {
  display: none;
  /* Only mobile */
}

.mobile-search-icon {
  display: none;
  /* Only mobile */
}

.search-box {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 380px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.search-box:focus-within {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  flex: 1;
  color: var(--text);
}

.search-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-btn {
  position: relative;
  cursor: pointer;
  color: var(--text-muted);
  transition: 0.2s;
}

.header-btn:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.header-btn i {
  width: 22px;
  height: 22px;
}

.badge.red {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 800;
  border: 2px solid #fff;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  padding: 4px 8px;
  border-radius: 10px;
  transition: 0.2s;
}

.user-profile:hover {
  background: var(--bg);
}

.user-avatar-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 800;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}

.user-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-detail {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.user-dept {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  padding: 8px;
  animation: slideIn 0.2s ease-out;
}

.user-dropdown.show {
  display: flex;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  transition: 0.2s;
}

.user-dropdown a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.user-dropdown hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 8px;
}

/* ── DASHBOARD ── */
.main-content {
  padding: 32px;
  flex: 1;
  max-width: 100%;
  margin: 0;
  width: 100%;
}


.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.greeting-info h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.greeting-info p {
  font-size: 16px;
  color: var(--text-muted);
}

.weather-widget {
  background: #fff;
  color: var(--text);
  padding: 16px 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.weather-icon i {
  color: #f59e0b;
  width: 32px;
  height: 32px;
}

.weather-temp {
  font-size: 28px;
  font-weight: 800;
}

.weather-detail {
  display: flex;
  flex-direction: column;
}

.weather-desc {
  font-weight: 700;
  color: var(--text);
}

.weather-city {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.stat-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-icon-box i {
  width: 18px;
  height: 18px;
}

.stat-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-icon-box.blue {
  background: #eff6ff;
  color: #3b82f6;
}

.stat-icon-box.emerald {
  background: #ecfdf5;
  color: #10b981;
}

.stat-icon-box.amber {
  background: #fff7ed;
  color: #f59e0b;
}

.stat-icon-box.purple {
  background: #fdf2f8;
  color: #ec4899;
}

.stat-val {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.dashboard-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.main-column {
  min-width: 0;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quick-actions-bar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 40px;
}

.action-btns-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: 0.2s;
}

.action-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}

.action-btn:hover .action-icon-wrap {
  transform: scale(1.1) rotate(4deg);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.5);
}

.action-btn span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-widgets {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.widget-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.widget-box-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget-box-header h4 {
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-box-header h4 i {
  color: var(--accent);
}

.widget-box-content {
  padding: 24px;
}

/* ── NEWS FEED ── */
.feed-item-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 24px;
  transition: 0.2s;
  box-shadow: var(--shadow-sm);
}

.feed-item-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}

.feed-item-card img {
  max-width: 100%;
  border-radius: 16px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}

/* Feed Input Box */
.feed-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.feed-input-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.feed-input-wrap:hover {
  background: #f1f5f9;
}

.mini-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.feed-input-trigger {
  flex: 1;
  color: var(--text-muted);
  font-size: 14px;
}

.feed-input-actions {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
}

.feed-input-actions i:hover {
  color: var(--accent);
}

/* ── COMMON UI COMPONENTS ── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-btn {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: 0.2s;
}

.back-btn:hover {
  background: var(--bg);
  color: var(--accent);
}

/* ── FORMS ── */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input,
.form-control {
  width: 100%;
  padding: 10px 16px;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  transition: 0.2s;
}

.form-input:focus,
.form-control:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
  outline: none;
}

/* ── BUTTONS & ACTIONS ── */
.btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-modern-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-modern-primary:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}

.btn-modern-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn-modern-outline:hover {
  background: #f8fafc;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-modern-danger {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fee2e2;
}

.btn-modern-danger:hover {
  background: #fee2e2;
  transform: translateY(-1px);
}

/* ── SUB-PAGE METRIC CARDS ── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: 0.2s;
}

.metric-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.metric-card .m-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-card .m-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.metric-card.emerald .m-val {
  color: #10b981;
}

.metric-card.blue .m-val {
  color: #3b82f6;
}

.metric-card.amber .m-val {
  color: #f59e0b;
}

/* ── TABLES ── */
.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.modern-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.modern-table td {
  padding: 16px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

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

.modern-table tr:hover td {
  background: #fbfcfd;
}

/* ── BADGES ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.success {
  background: #ecfdf5;
  color: #10b981;
}

.status-badge.warning {
  background: #fff7ed;
  color: #f59e0b;
}

.status-badge.danger {
  background: #fef2f2;
  color: #ef4444;
}

.status-badge.info {
  background: #eff6ff;
  color: #3b82f6;
}

/* ── MODALS (Modern) ── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  width: 90%;
  max-width: 500px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
}

/* Quick Actions Customization Modal */
.action-setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.action-setup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-setup-item:hover {
  background: var(--bg);
}

.action-setup-item.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.action-setup-item .check-mark {
  margin-left: auto;
  color: var(--accent);
  display: none;
}

.action-setup-item.active .check-mark {
  display: block;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ── MOBILE & RESPONSIVE ── */
@media (max-width: 1024px) {
  .dashboard-main {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    z-index: 1500;
    height: 100vh;
  }

  .sidebar.mobile-open {
    left: 0;
  }

  .header {
    padding: 0 16px;
    width: 100%;
  }

  .mobile-toggle {
    display: block;
  }

  .search-box {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .main-content {
    padding: 20px 16px;
  }

  .action-btns-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .sidebar-widgets {
    grid-template-columns: 1fr;
  }

  .greeting-info h1 {
    font-size: 24px;
  }
}

/* ── UTILS ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1400;
}

.sidebar-overlay.show {
  display: block;
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── REFINED SIDEBAR WIDGETS ── */
.widget-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.widget-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.widget-box-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-box-header .view-all {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

/* Birthday Items */
.bday-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.bday-info {
  flex: 1;
}

.bday-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.bday-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* Timeline for Meetings */
.timeline {
  position: relative;
  padding-left: 20px;
  margin-top: 5px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 5px;
  bottom: 5px;
  width: 1px;
  background: #e2e8f0;
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  z-index: 2;
}

.timeline-item.active::before {
  background: var(--accent);
}

.timeline-time {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 2px;
  display: block;
}

.timeline-content {
  padding-left: 12px;
}

.timeline-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0px;
}

.timeline-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

/* Task / Work Items */
.task-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f8fafc;
}

.task-list-item:last-child {
  border-bottom: none;
}

.task-info-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-emerald {
  background: #ecfdf5;
  color: #059669;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.badge-gray {
  background: #f1f5f9;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   RESPONSIVE (MOBILE)
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 240px;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  /* Sidebar Drawer */
  .sidebar {
    position: fixed !important;
    left: -100%;
    width: 280px !important;
    height: 100vh;
    padding-top: env(safe-area-inset-top, 0px);
    box-shadow: var(--shadow-lg);
    transition: left var(--transition);
    z-index: 2000;
  }

  .sidebar.mobile-open {
    left: 0;
  }

  .sidebar-overlay.show {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100%;
    padding-bottom: 74px;
    /* Space for bottom nav */
  }

  /* Header adjustments */
  .header {
    padding: env(safe-area-inset-top, 0px) 16px 0 16px;
    height: auto;
    min-height: calc(52px + env(safe-area-inset-top, 0px));
    border-bottom: none;
  }

  .mobile-toggle {
    display: none !important;
    /* Hide hamburger */
  }

  .mobile-header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
  }

  .mobile-header-logo span {
    color: #10b981;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
  }

  .mobile-search-icon {
    display: flex;
    align-items: center;
    color: #1e293b;
  }

  .search-box {
    display: none !important;
  }

  .header-actions {
    gap: 12px;
  }

  .user-display span {
    display: none;
  }

  .user-name,
  .user-dept {
    display: none;
    /* Hide name text in header */
  }

  .user-profile {
    gap: 0;
    padding: 0;
  }

  .user-profile i {
    display: none;
  }

  /* Hide chevron down */

  /* Dashboard Adjustments */
  .main-content {
    padding: 16px;
    padding-top: 0;
  }

  .dashboard-header {
    flex-direction: row;
    /* Keep greeting and weather in row but adjust */
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-top: -8px;
    margin-bottom: 20px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
  }

  .greeting-info h1 {
    font-size: 15px;
    margin-bottom: 4px;
    display: block;
    line-height: 1.4;
  }

  .greeting-info p {
    font-size: 12px;
    max-width: 160px;
  }

  .weather-widget {
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
    flex-direction: row-reverse;
    /* icon right */
    gap: 8px;
  }

  .weather-icon i {
    width: 32px;
    height: 32px;
  }

  .weather-temp {
    font-size: 20px;
  }

  .weather-desc {
    display: none;
  }

  /* Hide text to save space */
  .weather-city {
    display: block;
    text-align: right;
  }

  /* Horizontal scrolling stats */
  .stats-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 8px;
    margin-right: -16px;
    /* bleed right */
    padding-right: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .stats-grid::-webkit-scrollbar {
    display: none;
  }

  .stat-card {
    padding: 16px;
    flex: 0 0 120px;
    min-width: 120px;
    scroll-snap-align: start;
    border-radius: 20px;
  }

  .stat-icon-box {
    margin-bottom: 8px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: none !important;
  }

  .stat-icon-box.blue {
    color: #3b82f6;
  }

  .stat-icon-box.emerald {
    color: #10b981;
  }

  .stat-icon-box.amber {
    color: #f59e0b;
  }

  .stat-icon-box.purple {
    color: #ec4899;
  }

  .stat-val {
    font-size: 22px;
  }

  .stat-label {
    font-size: 10px;
    white-space: normal;
    line-height: 1.3;
  }

  .dashboard-main {
    flex-direction: column;
    gap: 24px;
    display: flex;
  }

  .quick-actions-bar {
    padding: 24px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
    border: none;
    box-shadow: var(--shadow-sm);
  }

  .action-btns-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 8px;
  }

  .action-btn {
    padding: 0;
  }

  .action-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
  }

  .action-btn span {
    font-size: 11px;
    text-align: center;
  }

  .sidebar-widgets {
    display: flex;
    flex-direction: column;
  }

  /* Mobile Bottom Nav */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #f1f5f9;
    z-index: 1000;
    justify-content: space-around;
    padding: 12px 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    transition: 0.2s;
  }

  .mobile-nav-item.active {
    color: #10b981;
  }

  .mobile-nav-item i {
    width: 24px;
    height: 24px;
  }

  /* Sub-pages layout fixes */
  .page-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .card {
    overflow-x: auto !important;
    padding: 16px !important;
  }

  table th,
  table td {
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .action-btns-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .greeting-info h1 {
    font-size: 20px;
  }
}