/* شهد تك – لوحة الحسابات */
.shd {
  --pink: #f2327a; --violet: #7b5cff; --cyan: #12b5cf; --amber: #f59e0b; --green: #16b67a;
  --grad: linear-gradient(120deg, #6d4bff 0%, #c13bd8 45%, #ff4f81 75%, #ff9a3c 100%);
  --bg: #ffffff; --panel: #ffffff; --line: rgba(20, 20, 40, .10); --fg: #1d1b26; --muted: #6b6878;
  direction: rtl; text-align: right; display: grid; gap: 20px; max-width: 1080px; margin: 0 auto; padding: 8px 16px 40px;
  color: var(--fg); font-size: 16px; line-height: 1.6; box-sizing: border-box;
}
.shd *, .shd *::before, .shd *::after { box-sizing: border-box; }
.shd h2, .shd h3 { margin: 0; line-height: 1.3; color: inherit; letter-spacing: 0; text-transform: none; }
.shd h3 { font-size: 1.05em; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.shd p { margin: 0; }
.shd a { color: #8a3fd6; text-decoration: none; }
.shd a:hover { text-decoration: underline; }
.shd-muted { color: var(--muted); font-size: .9em; }
.shd-ok { color: #16803c; font-weight: 600; } .shd-bad { color: #c0262d; font-weight: 600; }

/* hero */
.shd-hero { position: relative; overflow: hidden; border-radius: 24px; padding: clamp(20px, 4vw, 38px); background: var(--grad); color: #fff; display: grid; gap: 10px; box-shadow: 0 18px 40px -22px rgba(193, 59, 216, .8); }
.shd-hero::after { content: ""; position: absolute; inset: auto -70px -110px auto; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.28), rgba(255,255,255,0) 70%); pointer-events: none; }
.shd-hero h2 { font-size: clamp(1.5em, 4vw, 2.1em); color: #fff; position: relative; z-index: 1; }
.shd-eyebrow { font-size: .85em; opacity: .9; position: relative; z-index: 1; }
.shd-lede { max-width: 70ch; position: relative; z-index: 1; }
.shd-lede b { background: rgba(255,255,255,.22); padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.shd-sync { font-size: .8em; opacity: .85; position: relative; z-index: 1; }
.shd-userbar { margin: 0; font-size: .9em; color: var(--muted); }
.shd-userbar a { color: #c13bd8; }

/* account tabs */
.shd-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.shd-tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg); font-size: .9em; }
.shd-tabs a.is-on { background: var(--grad); color: #fff; border-color: transparent; }

/* KPI tiles */
.shd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.shd-tile { --c: var(--violet); display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); background: color-mix(in srgb, var(--c) 8%, var(--panel)); transition: transform .2s ease; }
.shd-tile:hover { transform: translateY(-2px); }
.shd-tile.t-cyan { --c: var(--cyan); } .shd-tile.t-pink { --c: var(--pink); } .shd-tile.t-green { --c: var(--green); } .shd-tile.t-amber { --c: var(--amber); }
.shd-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--c); color: #fff; }
.shd-ico svg { width: 19px; height: 19px; }
.shd-tlabel { font-size: .85em; color: var(--muted); }
.shd-big { font-size: 1.9em; font-weight: 700; line-height: 1.1; direction: ltr; text-align: right; color: color-mix(in srgb, var(--c) 80%, var(--fg)); font-variant-numeric: tabular-nums; }

/* cards */
.shd-card { border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: var(--panel); display: grid; gap: 14px; min-width: 0; }

/* bar chart */
.shd-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85em; color: var(--muted); }
.shd-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-inline-end: 6px; vertical-align: middle; }
.shd-legend .l-x { background: var(--pink); } .shd-legend .l-n { background: color-mix(in srgb, var(--violet) 45%, #fff); }
.shd-bars { height: 190px; display: flex; align-items: flex-end; gap: 4px; direction: ltr; padding-top: 6px; border-bottom: 1px solid var(--line); }
.shd-bar { flex: 1; min-width: 4px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--violet) 45%, #fff); }
.shd-bar.is-x { background: var(--pink); }

/* tool cards */
.shd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.shd-x { --c: var(--violet); display: grid; gap: 10px; align-content: start; padding: 16px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); background: color-mix(in srgb, var(--c) 7%, var(--panel)); min-width: 0; }
.shd-x.x-pink { --c: var(--pink); } .shd-x.x-amber { --c: var(--amber); } .shd-x.x-cyan { --c: var(--cyan); }
.shd-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.shd-rows li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel); }
.shd-rows li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.shd-rows small { display: block; color: var(--muted); font-size: .8em; }
.shd-tone { font-size: .8em; padding: 2px 10px; border-radius: 999px; white-space: nowrap; flex: none; }
.shd-tone.t-good { background: color-mix(in srgb, var(--green) 20%, transparent); color: #11804f; }
.shd-tone.t-mid { background: color-mix(in srgb, var(--amber) 22%, transparent); color: #9a5b00; }
.shd-tone.t-bad { background: color-mix(in srgb, var(--pink) 20%, transparent); color: #c01f5e; }
.shd-track { height: 12px; border-radius: 999px; background: rgba(0,0,0,.07); overflow: hidden; }
.shd-track span { display: block; height: 100%; border-radius: 999px; background: var(--grad); }

/* table */
.shd-scroll { overflow-x: auto; }
.shd-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92em; font-variant-numeric: tabular-nums; margin: 0; }
.shd-table th, .shd-table td { text-align: right; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); white-space: nowrap; background: transparent; }
.shd-table th { font-weight: 600; color: var(--muted); font-size: .85em; background: color-mix(in srgb, var(--violet) 9%, var(--panel)); }
.shd-table td.shd-tt { white-space: normal; min-width: 200px; max-width: 380px; }
.shd-table tbody tr:hover td { background: color-mix(in srgb, var(--violet) 5%, transparent); }
.shd-pill { display: inline-block; font-size: .8em; padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,.06); color: var(--muted); }
.shd-pill.is-yes { background: var(--grad); color: #fff; }

/* accounts + forms */
.shd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shd-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--cyan) 7%, var(--panel)); }
.shd-list form { margin: 0; margin-inline-start: auto; }
.shd-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; text-transform: uppercase; }
.shd-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; align-items: end; }
.shd-form label { display: grid; gap: 4px; font-size: .9em; color: var(--muted); }
.shd-form input, .shd-form select { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(0,0,0,.2); width: 100%; font: inherit; color: var(--fg); background: #fff; }
.shd-btn { display: inline-block; border: 0; border-radius: 999px; padding: 11px 24px; background: var(--grad); color: #fff !important; text-decoration: none !important; cursor: pointer; font-weight: 700; font: inherit; box-shadow: 0 8px 20px -10px rgba(193, 59, 216, .8); }
.shd-btn:hover { filter: brightness(1.06); }
.shd-ghost { border: 1px solid rgba(0,0,0,.2); background: transparent; border-radius: 999px; padding: 4px 12px; cursor: pointer; font: inherit; font-size: .85em; color: var(--muted); }

@media (max-width: 520px) {
  .shd { padding: 4px 12px 32px; }
  .shd-big { font-size: 1.6em; }
  .shd-bars { height: 140px; gap: 2px; }
}

/* tools */
.shd-x p.shd-muted { margin: 0; }
.shd-x textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(0,0,0,.2); width: 100%; font: inherit; color: var(--fg); background: #fff; resize: vertical; min-height: 54px; }
.shd-x.x-green { --c: var(--green); }
.shd-score { display: flex; align-items: baseline; gap: 8px; }
.shd-score b { font-size: 2em; line-height: 1.1; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--c) 80%, var(--fg)); }
.shd-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.shd-facts > div { display: grid; gap: 2px; padding: 8px; border-radius: 10px; background: var(--panel); min-width: 0; }
.shd-facts b { font-size: 1.1em; font-variant-numeric: tabular-nums; }
.shd-tip { font-size: .85em; color: var(--muted); border-inline-start: 3px solid var(--c); padding-inline-start: 8px; }
.shd-x .shd-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 8px; }
.shd-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.shd-actions form { margin: 0; }

/* growth chart + goal */
.shd-line { width: 100%; height: auto; display: block; color: var(--c, var(--cyan)); margin: 6px 0 10px; }
.shd-inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.shd-inline input { flex: 1 1 120px; min-width: 0; }
.shd-sr { position: relative; display: contents; font-size: 0; }
.shd-sr input { font-size: 1rem; }
