/* Darwaza Portal — Dashboard styles
 * Layered on top of homepage.css for header/prayer/svc-circle re-use
 */

/* ===== HEADER OVERRIDES for dashboard layout ===== */
.site-header .header-logo-left {
  height: 46px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
[data-theme="light"] .site-header .header-logo-left { /* keep white on dark header */ }

.nav-primary .nav-link.active {
  background: rgba(255,255,255,0.12);
  color: white;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-on-navy);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  width: 280px;
  color: var(--fg-on-navy);
}
.header-search svg { width: 16px; height: 16px; opacity: 0.7; }
.header-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--fg-on-navy);
  font-family: inherit;
  font-size: 14px;
  width: 100%;
}
.header-search input::placeholder { color: rgba(255,255,255,0.55); }

.header-icon-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-on-navy);
  color: var(--fg-on-navy);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.header-icon-btn:hover { background: rgba(255,255,255,0.18); }
.header-icon-btn svg { width: 18px; height: 18px; }
.header-icon-btn .badge {
  position: absolute;
  top: 6px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand-orange);
  border: 2px solid var(--bg-header);
}

/* ===== MAIN ===== */
.dash-main {
  padding: var(--space-8) var(--space-6) var(--space-9);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

/* ===== WELCOME BANNER ===== */
.welcome-banner {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  padding: 48px 56px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-8);
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: -120px; left: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--brand-orange) 0%, transparent 70%);
  opacity: 0.10;
  pointer-events: none;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -160px; right: 30%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--brand-blue-mid) 0%, transparent 70%);
  opacity: 0.08;
  pointer-events: none;
}
.welcome-text {
  position: relative;
  z-index: 1;
  max-width: 560px;
}
.welcome-text .eyebrow {
  font-size: 12px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--brand-orange);
  margin-bottom: 10px;
}
.welcome-text h1 {
  font-size: 36px;
  font-weight: var(--fw-extra);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--fg-1);
  margin-bottom: 12px;
}
.welcome-text p {
  font-size: 16px;
  color: var(--fg-2);
  line-height: 1.55;
}
.stat-cards {
  display: flex;
  gap: var(--space-5);
  position: relative;
  z-index: 1;
}
.stat-card {
  width: 220px;
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  transition: transform var(--transition-base);
}
.stat-card:hover { transform: translateY(-3px); }
.stat-head {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.stat-card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
}
.stat-card .icon svg { width: 22px; height: 22px; }
.stat-card.stat-orange .icon { background: rgb(22 163 74 / 0.14); color: var(--brand-orange); }
.stat-card.stat-blue .icon { background: rgba(47, 136, 217, 0.14); color: var(--brand-blue-mid); }
.stat-card .stat-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-section-1);
  border: none;
  color: var(--fg-2);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.stat-card .stat-arrow:hover { background: var(--brand-orange); color: white; }
.stat-card .stat-arrow svg { width: 16px; height: 16px; }
.stat-card .stat-num {
  font-size: 56px;
  font-weight: var(--fw-extra);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-card.stat-orange .stat-num { color: var(--brand-orange); }
.stat-card.stat-blue .stat-num { color: var(--brand-blue-mid); }
.stat-card .stat-label {
  font-size: 14px;
  color: var(--fg-2);
  font-weight: var(--fw-medium);
}

/* ===== QUICK SERVICES on dashboard ===== */
.quick-services-section {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 40px 32px;
}
.qs-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-5);
  justify-items: center;
}
.qs-grid .svc-circle .circle {
  width: 84px;
  height: 84px;
  box-shadow: 0 0 0 4px var(--bg-card), 0 0 0 5px var(--service-circle-bg);
}
.qs-grid .svc-circle .circle svg { width: 34px; height: 34px; }
.qs-grid .svc-circle .label {
  font-size: 11px;
  text-align: center;
  max-width: 130px;
  line-height: 1.3;
}

/* ===== DASH GRID ===== */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-6);
}
.dash-grid.single { grid-template-columns: 1fr; }

.dash-card {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: var(--space-7);
}
.dash-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
}
.dash-card-head .head-left {
  display: flex; gap: 14px; align-items: center;
}
.dash-card-head .head-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: rgba(47, 136, 217, 0.14);
  color: var(--brand-blue-mid);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.dash-card-head .head-icon svg { width: 20px; height: 20px; }
.dash-card-head h2 {
  font-size: 20px;
  font-weight: var(--fw-extra);
  color: var(--fg-1);
}
.dash-card-head p {
  font-size: 13px;
  color: var(--fg-3);
  margin-top: 2px;
}
.view-all-link {
  font-size: 13px;
  color: var(--brand-orange);
  font-weight: var(--fw-bold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.view-all-link svg { width: 14px; height: 14px; }
.view-all-link:hover { color: var(--brand-orange-deep); }

/* ===== REQUEST TABLE ===== */
.req-table {
  width: 100%;
  border-collapse: collapse;
}
.req-table th {
  text-align: left;
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-default);
}
.req-table td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  font-size: 14px;
  color: var(--fg-1);
}
.req-table tr:last-child td { border-bottom: none; }
.req-table tr:hover td { background: var(--bg-section-1); }
.req-table tr td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.req-table tr td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.req-id-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.req-id {
  font-size: 13px;
  font-weight: var(--fw-bold);
  color: var(--brand-blue-mid);
  letter-spacing: 0.02em;
}
.type-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}
.type-it     { background: rgba(47, 136, 217, 0.14); color: var(--brand-blue-mid); }
.type-hr     { background: rgba(168, 85, 247, 0.14); color: #A855F7; }
.type-fin    { background: rgba(43, 182, 115, 0.16); color: var(--success); }
.type-fac    { background: rgb(22 163 74 / 0.14);  color: var(--brand-orange); }
.type-learn  { background: rgba(240, 169, 59, 0.18); color: var(--warning); }

.req-title { font-weight: var(--fw-bold); font-size: 15px; color: var(--fg-1); }
.req-by    { font-size: 12px; color: var(--fg-3); margin-top: 2px; }

.date-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-section-1);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--fg-2);
  font-weight: var(--fw-medium);
}
.date-cell svg { width: 14px; height: 14px; color: var(--fg-3); }

.progress-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.progress-row .pct { font-size: 13px; font-weight: var(--fw-bold); color: var(--fg-1); }
.progress-bar {
  width: 180px;
  height: 6px;
  background: var(--bg-section-1);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  border-radius: 3px;
  transition: width 600ms cubic-bezier(.2,.7,.2,1);
}
.progress-bar .fill.orange { background: linear-gradient(90deg, var(--brand-orange), var(--brand-orange-soft)); }
.progress-bar .fill.green  { background: linear-gradient(90deg, var(--success), #5DD39E); }

.row-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-section-1);
  border: none;
  color: var(--fg-2);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.row-arrow:hover { background: var(--brand-orange); color: white; }
.row-arrow svg { width: 16px; height: 16px; }

/* ===== QUICK ACTIONS ===== */
.qa-card { padding: var(--space-7); }
.qa-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: var(--space-6);
}
.qa-head h2 { font-size: 20px; font-weight: var(--fw-extra); color: var(--fg-1); }
.qa-head p  { font-size: 13px; color: var(--fg-3); margin-top: 2px; }

.qa-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.qa-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.qa-list li:hover {
  background: var(--bg-section-1);
  border-color: var(--brand-orange);
  transform: translateX(4px);
}
.qa-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.qa-icon svg { width: 18px; height: 18px; }
.qa-blue   { background: rgba(47, 136, 217, 0.16); color: var(--brand-blue-mid); }
.qa-violet { background: rgba(168, 85, 247, 0.16); color: #A855F7; }
.qa-teal   { background: rgba(20, 184, 166, 0.16); color: #14B8A6; }
.qa-pink   { background: rgba(236, 72, 153, 0.16); color: #EC4899; }
.qa-grey   { background: var(--bg-section-1);      color: var(--fg-2); }
.qa-text { flex: 1; }
.qa-text .t { font-size: 14px; font-weight: var(--fw-bold); color: var(--fg-1); }
.qa-text .s { font-size: 12px; color: var(--fg-3); margin-top: 2px; }
.qa-arrow { width: 16px; height: 16px; color: var(--fg-3); }
.qa-list li:hover .qa-arrow { color: var(--brand-orange); }

/* ===== FOOTER ===== */
.dash-footer {
  background: var(--bg-section-1);
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
  margin-top: var(--space-9);
}
.dash-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--fg-3);
}
.dash-footer .links { display: flex; gap: var(--space-6); }
.dash-footer .links a:hover { color: var(--brand-orange); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .welcome-banner { grid-template-columns: 1fr; }
  .stat-cards { width: 100%; }
  .stat-card { flex: 1; width: auto; }
  .dash-grid { grid-template-columns: 1fr; }
  .qs-grid { grid-template-columns: repeat(4, 1fr); }
  .header-search { width: 200px; }
}
@media (max-width: 720px) {
  .qs-grid { grid-template-columns: repeat(2, 1fr); }
  .welcome-text h1 { font-size: 26px; }
  .header-search { display: none; }
  .progress-bar { width: 120px; }
}
.qs-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.qs-section-head h2 {
  font-size: 20px;
  font-weight: var(--fw-bold);
  color: var(--fg-1);
  margin-bottom: 4px;
}
.qs-section-head p {
  font-size: 13px;
  color: var(--fg-3);
}