/* wectrl portal — bundled by Frappe build pipeline, fingerprinted, cached forever */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --wc-bg: #ffffff;
  --wc-bg-card: #ffffff;
  --wc-text: #1f2937;
  --wc-text-muted: #64748b;
  --wc-border: #e5e7eb;
  --wc-cyan: #28abe3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wc-bg: #0f172a;
    --wc-bg-card: #1e293b;
    --wc-text: #e5e7eb;
    --wc-text-muted: #94a3b8;
    --wc-border: #334155;
  }
}

body.wc-portal-page {
  background: var(--wc-bg);
  color: var(--wc-text);
  font-family: "Inter", -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Hide Frappe's "Powered by ERPNext" / banner — aesthetics + reduces
   info disclosure about the underlying stack. */
.footer-powered,
.footer-info .footer-powered,
.footer-col-right.footer-powered,
.powered-by,
[class*="Powered"],
.footer-info > div:last-child:not(.footer-col-left) {
  display: none !important;
}

/* ==================== /my-account ==================== */
.ma-wrap { max-width: 560px; margin: 0 auto; }

.ma-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(40,171,227,.22), rgba(6,182,212,.10));
  border: 1px solid var(--wc-border);
  border-radius: 20px;
  padding: 32px 20px 0;
  margin-bottom: 80px;
}
.ma-hero::after { content: ""; display: block; height: 60px; }

.ma-avatar-wrap {
  position: absolute;
  left: 50%; bottom: -60px;
  transform: translateX(-50%);
  width: 120px; height: 120px;
}
.ma-avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 5px solid var(--wc-bg);
  background: linear-gradient(135deg, #28abe3, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 38px;
  box-shadow: 0 8px 28px rgba(40,171,227,.30);
  overflow: hidden;
}
.ma-avatar-inner img { width: 100%; height: 100%; object-fit: cover; }
.ma-avatar-fallback { width: 100%; height: 100%; align-items: center; justify-content: center; }

.ma-edit-avatar {
  position: absolute; right: -2px; bottom: 4px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--wc-cyan);
  border: 3px solid var(--wc-bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .18s ease, background .18s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.20);
  text-decoration: none !important;
  z-index: 3;
}
.ma-edit-avatar:hover { background: #1d97cb; transform: scale(1.08); }
.ma-edit-avatar svg { width: 16px; height: 16px; color: #fff; }

.ma-name {
  text-align: center;
  margin: 16px 0 26px;
  font-size: 26px; font-weight: 700;
  letter-spacing: -.02em;
  color: var(--wc-text);
}

.ma-info, .ma-list {
  border-top: 1px solid var(--wc-border);
}
.ma-row {
  display: flex; align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--wc-border);
  text-decoration: none !important;
  color: var(--wc-text);
  transition: background .15s ease;
}
.ma-row:hover { background: rgba(40,171,227,.04); }
.ma-row .ma-icon {
  width: 28px; height: 28px; margin-right: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ma-row .ma-icon svg { width: 22px; height: 22px; stroke-width: 1.7; }
.ma-row .ma-label {
  flex: 1; min-width: 0;
  font-weight: 500; font-size: 15px;
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
.ma-row .ma-value {
  font-size: 15px;
  color: var(--wc-text-muted);
  margin-left: 12px; max-width: 60%;
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
.ma-row .ma-chevron {
  margin-left: 10px;
  color: var(--wc-text-muted);
  font-size: 22px; line-height: 1;
}

.ma-info .ma-row .ma-label { color: var(--wc-text-muted); font-weight: 400; }
.ma-info .ma-row .ma-value { color: var(--wc-text); font-weight: 500; }

.ma-row-logout, .ma-row-logout .ma-label { color: #ef4444 !important; }

.ma-list + .ma-list { margin-top: 22px; }

@media (max-width: 600px) {
  .ma-hero {
    margin-left: -20px; margin-right: -20px;
    border-radius: 0;
  }
}

/* ==================== /my-project (list + detail) ==================== */
.pj-list, .pj-wrap {
  max-width: 980px; margin: 0 auto;
  color: var(--wc-text);
}
.pj-list h1 {
  font-size: 22px; margin: 0 0 18px;
  padding-bottom: 12px; border-bottom: 3px solid var(--wc-cyan);
  letter-spacing: -.01em;
}
.pj-list-item {
  display: block; padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--wc-bg-card);
  border: 1px solid var(--wc-border); border-radius: 10px;
  text-decoration: none !important; color: inherit;
  transition: all .15s ease;
}
.pj-list-item:hover {
  border-color: var(--wc-cyan);
  box-shadow: 0 2px 12px rgba(40,171,227,.15);
  transform: translateY(-1px);
}
.pj-list-item h3 { margin: 0 0 4px; font-size: 15px; color: var(--wc-text); }
.pj-list-item .pj-meta { font-size: 12px; color: var(--wc-text-muted); }

/* ---- Detail header ---- */
.pj-header {
  border-bottom: 3px solid var(--wc-cyan);
  padding-bottom: 18px; margin-bottom: 28px;
}
.pj-header h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.01em; }
.pj-header .pj-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--wc-text-muted);
  align-items: center;
}

/* ---- Status pill ---- */
.pj-status {
  display: inline-block;
  padding: 3px 10px; border-radius: 999px;
  font-weight: 600; font-size: 11px;
  letter-spacing: .03em; text-transform: uppercase;
}
.pj-status.open       { background: #dbeafe; color: #1e40af; }
.pj-status.active     { background: #fef3c7; color: #92400e; }
.pj-status.completed  { background: #dcfce7; color: #166534; }
.pj-status.in-use     { background: #ccfbf1; color: #0f766e; }
.pj-status.cancelled  { background: #fee2e2; color: #991b1b; }

/* ---- Section card ---- */
.pj-section {
  background: var(--wc-bg-card);
  border: 1px solid var(--wc-border); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 18px;
}
.pj-section h2 {
  margin: 0 0 14px;
  font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--wc-cyan);
  border-bottom: 1px solid var(--wc-border); padding-bottom: 10px;
}
.pj-empty {
  color: var(--wc-text-muted); font-style: italic; font-size: 13px;
}

/* ---- Row inside section ---- */
.pj-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px dashed var(--wc-border);
  font-size: 13px;
}
.pj-row:last-child { border-bottom: 0; }
.pj-row a { color: var(--wc-cyan); text-decoration: none; font-weight: 500; }
.pj-row a:hover { text-decoration: underline; }
.pj-row-date { color: var(--wc-text-muted); font-size: 12px; margin-left: 8px; }
.pj-amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.pj-amount-due { color: #ef4444; }

/* ---- Inline pill (next to doc number) ---- */
.pj-pill {
  display: inline-block;
  padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
  margin-left: 8px;
}
.pj-pill.draft                 { background: #e2e8f0; color: #475569; }
.pj-pill.submitted, .pj-pill.open { background: #dbeafe; color: #1e40af; }
.pj-pill.paid                  { background: #dcfce7; color: #166534; }
.pj-pill.unpaid, .pj-pill.overdue { background: #fee2e2; color: #991b1b; }
.pj-pill.partly                { background: #fef3c7; color: #92400e; }

/* ---- Payment summary stats ---- */
.pj-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 12px;
}
.pj-stat {
  background: var(--wc-bg-soft);
  padding: 12px 14px;
  border: 1px solid var(--wc-border); border-radius: 8px;
}
.pj-stat-label {
  font-size: 11px; color: var(--wc-text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 4px;
}
.pj-stat-value {
  font-size: 18px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pj-stat.paid       .pj-stat-value { color: #16a34a; }
.pj-stat.outstanding .pj-stat-value { color: #ef4444; }
@media (max-width: 600px) {
  .pj-summary { grid-template-columns: 1fr; }
}

/* ---- Progress + tasks ---- */
.pj-progress-row {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 6px;
}
.pj-progress {
  height: 6px; border-radius: 999px;
  background: var(--wc-border); overflow: hidden;
  margin-bottom: 14px;
}
.pj-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--wc-cyan), #06b6d4);
  transition: width .4s ease;
}
.pj-tasks { list-style: none; padding: 0; margin: 0; }
.pj-task { padding: 6px 0; }
.pj-task.subtask {
  padding-left: 22px; margin-left: 6px;
  font-size: 12.5px; color: var(--wc-text-muted);
  border-left: 2px solid var(--wc-border);
}
.pj-task-row {
  display: flex; justify-content: space-between; align-items: center;
}
.pj-task-name { display: flex; align-items: center; gap: 8px; }
.pj-task-group {
  font-weight: 600; margin-top: 14px;
  padding-top: 8px; border-top: 1px solid var(--wc-border);
}
.pj-task-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---- Task check circle ---- */
.pj-check {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--wc-border); border-radius: 50%;
  flex-shrink: 0; position: relative;
}
.pj-check.done {
  background: #16a34a; border-color: #16a34a;
}
.pj-check.done::after {
  content: '✓';
  color: #fff; position: absolute;
  top: -4px; left: 1px;
  font-size: 11px; font-weight: bold;
}
.pj-check.working { background: #d97706; border-color: #d97706; }

/* ---- Error / empty state on detail ---- */
.pj-error {
  text-align: center; padding: 60px 20px;
  color: var(--wc-text);
}
.pj-error h2 { margin: 0 0 16px; font-size: 22px; }
