/* ============================================================
   ugrsoft Client Portal & Admin Panel — Dashboard Styles
   Kinetic Enterprise Design System
   ============================================================ */

/* ---------- Dashboard Layout ---------- */
.dash-body {
  background: var(--bg-soft);
  min-height: 100vh;
}

.dash-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.dash-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.dash-nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.dash-nav-links {
  display: flex;
  gap: 22px;
}

.dash-nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate);
  padding: 6px 2px;
  position: relative;
  transition: color 0.2s ease;
}

.dash-nav-links a.active,
.dash-nav-links a:hover {
  color: var(--blue);
}

.dash-nav-links a.active:after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--blue);
  border-radius: 3px;
}

.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.notif-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
}

.notif-btn .dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: #fff;
}

.user-chip .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.user-chip .u-name {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Dashboard layout ---------- */
.dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 70px);
}

.dash-sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 24px 18px;
}

.side-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate);
  transition: background 0.2s ease, color 0.2s ease;
}

.side-menu a .ic {
  font-size: 1.1rem;
}

.side-menu a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.side-menu a.active {
  background: var(--blue-light);
  color: var(--blue);
}

.side-sec {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.side-sec .label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--slate);
  padding: 0 14px 10px;
}

.dash-main {
  padding: 30px 34px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.page-sub {
  color: var(--slate);
  font-size: 0.92rem;
  margin-bottom: 26px;
}

/* ---------- KPI cards ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}

.kpi-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.kpi-card .k-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.kpi-card .k-ic {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue-light);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: var(--blue);
}

.kpi-card .k-trend {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 30px;
}

.kpi-card .k-trend.up {
  background: #e6f7ec;
  color: var(--success);
}

.kpi-card .k-trend.down {
  background: #fee2e2;
  color: var(--danger);
}

.kpi-card .k-val {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.kpi-card .k-lbl {
  font-size: 0.82rem;
  color: var(--slate);
}

/* ---------- Progress / budget ---------- */
.progress {
  height: 10px;
  border-radius: 8px;
  background: var(--bg-soft);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--blue), #7aa2ff);
}

.progress-fill.warn {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.progress-fill.crit {
  background: linear-gradient(90deg, var(--danger), #f87171);
}

/* ---------- Panels / cards ---------- */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-head h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.panel-head .link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---------- Budget bars ---------- */
.budget-row {
  margin-bottom: 18px;
}

.budget-row:last-child {
  margin-bottom: 0;
}

.budget-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.budget-top .pct {
  color: var(--blue);
  font-weight: 700;
}

/* ---------- Content calendar ---------- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cal-day {
  min-height: 90px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.75rem;
  position: relative;
}

.cal-day .d {
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 8px;
}

.cal-post {
  font-size: 0.68rem;
  padding: 4px 6px;
  border-radius: 5px;
  margin-bottom: 4px;
  font-weight: 600;
}

.cal-post.draft {
  background: #f3f4f6;
  color: var(--slate);
}

.cal-post.approved {
  background: var(--blue-light);
  color: var(--blue);
}

.cal-post.scheduled {
  background: #e6f7ec;
  color: var(--success);
}

/* ---------- Leads table ---------- */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.table tr:last-child td {
  border-bottom: none;
}

.table .status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 30px;
}

.status.new {
  background: var(--blue-light);
  color: var(--blue);
}

.status.contacted {
  background: #fef3c7;
  color: #b45309;
}

.status.won {
  background: #e6f7ec;
  color: var(--success);
}

.status.closed {
  background: #f3f4f6;
  color: var(--slate);
}

/* ---------- Admin projects ---------- */
.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.project-row:last-child {
  border-bottom: none;
}

.project-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-info .p-ic {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--blue-light);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--blue);
}

.project-info .p-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.project-info .p-meta {
  font-size: 0.8rem;
  color: var(--slate);
}

.project-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.project-right .p-val {
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---------- Member / team ---------- */
.member {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.member:last-child {
  border-bottom: none;
}

.member .m-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.member .m-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.member .m-role {
  font-size: 0.78rem;
  color: var(--slate);
}

/* ---------- Badge / pill ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 30px;
}

.pill.blue {
  background: var(--blue-light);
  color: var(--blue);
}

.pill.green {
  background: #e6f7ec;
  color: var(--success);
}

.pill.amber {
  background: #fef3c7;
  color: #b45309;
}

.pill.purple {
  background: #ede9fe;
  color: #7c3aed;
}

.pill.gray {
  background: #f3f4f6;
  color: var(--slate);
}

.bar-cell {
  width: 120px;
}

/* ---------- Buttons (dashboard) ---------- */
.btn-sm {
  padding: 9px 16px;
  font-size: 0.82rem;
}

.btn-export {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}

.btn-export:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #fff;
}

/* ---------- Filter toolbar ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.toolbar .filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar select,
.toolbar input[type="text"] {
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.toolbar select:focus,
.toolbar input[type="text"]:focus {
  outline: none;
  border-color: var(--blue);
}

/* ---------- Tickets ---------- */
.ticket {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ticket:last-child {
  border-bottom: none;
}

.ticket .t-pri {
  width: 8px;
  height: 40px;
  border-radius: 4px;
}

.ticket .t-pri.high {
  background: var(--danger);
}

.ticket .t-pri.med {
  background: var(--warning);
}

.ticket .t-pri.low {
  background: var(--success);
}

.ticket .t-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.ticket .t-meta {
  font-size: 0.78rem;
  color: var(--slate);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .dash-layout {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    display: none;
  }

  .dash-main {
    padding: 24px 20px;
  }
}

@media (max-width: 768px) {
  .dash-nav-links {
    display: none;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .calendar-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .dash-nav-right .user-chip .u-name {
    display: none;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .kpi-card {
    padding: 16px;
  }

  .kpi-card .k-val {
    font-size: 1.4rem;
  }
}
</content>
