/* =============================================================
   Uygun Web Tasarım — Panel Core (polish pass)
   Shared design system for the Müşteri Paneli + Yönetim Paneli
   frontend prototype. Bootstrap 5 = structure only (grid, modal,
   dropdown, offcanvas). This file = the Uygun Web Tasarım
   software identity: layered light surfaces, border-defined
   hierarchy, gradient as a small accent, a custom status system.

   SCOPE: everything is nested under `.panel` (on <body>).
   Nothing here touches the public site.
   ============================================================= */

:root {
  /* --- brand (values shared with the marketing site) --- */
  --brand-primary: #142b51;
  --brand-accent: #faa41a;
  --brand-accent-secondary: #f47521;
  --brand-gradient: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-secondary));
  --accent-ink: #dd6412;
  --brand-soft: rgba(20, 43, 81, .055);      /* navy wash for tints */
  --brand-soft-2: rgba(20, 43, 81, .09);

  /* --- surfaces / neutrals (layered, not shadowed) --- */
  --p-bg: #f6f7f9;                 /* app canvas */
  --p-surface: #ffffff;            /* primary cards */
  --p-surface-soft: #f8f9fb;       /* inner panels, table hover, headers */
  --p-surface-sink: #f2f4f7;       /* a recessed tone (kv blocks) */
  --p-surface-warm: #fdfaf4;       /* internal-note warmth */
  --p-border: #e7e9ee;
  --p-border-strong: #d5dae2;
  --p-line: #edeff3;               /* faint dividers inside cards */

  --p-text: #303c56;
  --p-text-strong: var(--brand-primary);
  --p-text-muted: #69748a;
  --p-text-faint: #98a1b1;

  /* --- status system tokens (fg / dot / border / soft surface) --- */
  --st-ok-fg: #1c7a4c;    --st-ok-dot: #29a563;  --st-ok-bd: #cfe8db;    --st-ok-sf: #f1faf5;
  --st-warn-fg: #a5670f;  --st-warn-dot: #e0912f;--st-warn-bd: #f0ddbd;  --st-warn-sf: #fdf6ea;
  --st-danger-fg: #b13c38;--st-danger-dot: #d0544f;--st-danger-bd: #efd3d1;--st-danger-sf: #fdf1f0;
  --st-info-fg: #33589f;  --st-info-dot: #5480d4; --st-info-bd: #d3ddf1;  --st-info-sf: #f2f5fc;
  --st-neutral-fg: #56617a;--st-neutral-dot: #98a1b2;--st-neutral-bd: #e2e5ea;--st-neutral-sf: #f6f7f9;
  --st-active-fg: #4b45b0;--st-active-dot: #6f67dd;--st-active-bd: #d9d7f4;--st-active-sf: #f4f3fd; /* indigo — support "İşlemde" */

  /* --- shape --- */
  --p-radius-xs: 8px;
  --p-radius-sm: 11px;
  --p-radius: 16px;               /* standard card */
  --p-radius-lg: 20px;            /* hero / feature component */

  /* --- elevation: whisper only (large blur, very low opacity) --- */
  --p-shadow-card: 0 4px 18px -10px rgba(20, 43, 81, .10);
  --p-shadow-pop: 0 22px 46px -22px rgba(20, 43, 81, .30);

  --sidebar-w: 262px;
  --topbar-h: 64px;
  --main-max: 1120px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* =============================================================
   Base
   ============================================================= */
.panel *, .panel *::before, .panel *::after { box-sizing: border-box; }
.panel {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--p-text);
  background: var(--p-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.panel h1, .panel h2, .panel h3, .panel h4, .panel h5 {
  margin: 0; color: var(--p-text-strong); font-weight: 600; line-height: 1.25;
  letter-spacing: -.01em;
}
.panel p { margin: 0; }
.panel a { color: inherit; text-decoration: none; }
.panel img, .panel svg { max-width: 100%; }
.panel ul, .panel ol { margin: 0; }
.panel :focus-visible { outline: 2px solid rgba(20, 43, 81, .45); outline-offset: 2px; border-radius: 4px; }
.panel-visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =============================================================
   Shell
   ============================================================= */
.panel-shell { display: flex; min-height: 100vh; }
.panel-sidebar {
  flex: none; width: var(--sidebar-w);
  position: sticky; top: 0; align-self: flex-start; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--p-surface);
  border-right: 1px solid var(--p-border);
  z-index: 40;
}
.panel-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel-main { flex: 1; padding: clamp(1.15rem, .6rem + 1.7vw, 2.1rem); }
.panel-main__inner { max-width: var(--main-max); margin-inline: auto; }

/* =============================================================
   Sidebar
   ============================================================= */
.panel-brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.2rem 1.3rem 1.1rem;
  border-bottom: 1px solid var(--p-line);
}
.panel-brand img { display: block; width: auto; max-width: 100%; }

.panel-nav { flex: 1; overflow-y: auto; padding: .9rem .7rem; }
.panel-nav__list { list-style: none; margin: 0; padding: 0; }
.panel-nav__sep {
  margin: 1rem .55rem .4rem;
  font-size: .64rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--p-text-faint);
}
.panel-nav a {
  position: relative;
  display: flex; align-items: center; gap: .72rem;
  padding: .64rem .75rem;
  margin-bottom: 2px;
  border-radius: var(--p-radius-sm);
  font-size: .885rem; font-weight: 500;
  color: var(--p-text-muted);
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.panel-nav a .ic { flex: none; width: 18px; height: 18px; color: currentColor; opacity: .9; }
.panel-nav a:hover { color: var(--p-text-strong); background: var(--p-surface-soft); }
.panel-nav a.is-active {
  color: var(--p-text-strong); font-weight: 600;
  background: var(--brand-soft);
}
.panel-nav a.is-active .ic { opacity: 1; }
.panel-nav a.is-active::before {
  content: ""; position: absolute; left: -.7rem; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 1.4rem; border-radius: 0 3px 3px 0;
  background-image: var(--brand-gradient);
}
.panel-nav__badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  font-size: .68rem; font-weight: 700;
  background: var(--st-neutral-sf); color: var(--st-neutral-fg);
  border: 1px solid var(--st-neutral-bd);
}
.panel-nav a.is-active .panel-nav__badge,
.panel-nav a:hover .panel-nav__badge { background: var(--brand-soft-2); color: var(--brand-primary); border-color: transparent; }

.panel-support {
  margin: .55rem;
  padding: .95rem;
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  background: var(--p-surface-soft);
}
.panel-support__title { font-size: .78rem; font-weight: 600; color: var(--p-text-strong); margin-bottom: .15rem; }
.panel-support__text { font-size: .75rem; color: var(--p-text-muted); margin-bottom: .65rem; }
.panel-support__wa {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 600; color: var(--brand-primary);
}
.panel-support__wa svg { width: 15px; height: 15px; color: #25d366; }

/* =============================================================
   Topbar
   ============================================================= */
.panel-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  min-height: var(--topbar-h);
  padding: .5rem clamp(1.15rem, .6rem + 1.7vw, 2.1rem);
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--p-border);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .panel-topbar { background: #fff; }
}
.panel-topbar__toggle {
  display: none; flex: none; width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border: 1px solid var(--p-border); border-radius: var(--p-radius-sm);
  background: #fff; color: var(--p-text-strong); cursor: pointer;
}
.panel-topbar__title { min-width: 0; }
.panel-topbar__title h1 {
  font-size: 1.02rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel-topbar__title p { font-size: .77rem; color: var(--p-text-muted); }
.panel-topbar__actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.panel-iconbtn {
  position: relative; width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--p-border); border-radius: var(--p-radius-sm);
  background: #fff; color: var(--p-text-muted); cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.panel-iconbtn:hover { color: var(--p-text-strong); border-color: var(--p-border-strong); }
.panel-iconbtn svg { width: 18px; height: 18px; }
.panel-iconbtn__dot {
  position: absolute; top: 7px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background-image: var(--brand-gradient); box-shadow: 0 0 0 2px #fff;
}
.panel-user {
  display: flex; align-items: center; gap: .55rem;
  padding: .3rem .55rem .3rem .3rem;
  border: 1px solid var(--p-border); border-radius: 999px;
  background: #fff; cursor: pointer;
  transition: border-color .16s var(--ease);
}
.panel-user:hover { border-color: var(--p-border-strong); }
.panel-user__avatar {
  flex: none; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--brand-soft-2); color: var(--brand-primary);
  font-size: .76rem; font-weight: 700;
}
.panel-user__name {
  font-size: .82rem; font-weight: 600; color: var(--p-text-strong);
  white-space: nowrap; max-width: 22ch; overflow: hidden; text-overflow: ellipsis;
}
.panel-user__caret { width: 14px; height: 14px; color: var(--p-text-faint); flex: none; }
@media (max-width: 560px) { .panel-user__name { display: none; } }

/* dropdown */
.panel .dropdown-menu {
  --bs-dropdown-bg: #fff;
  --bs-dropdown-border-color: var(--p-border);
  --bs-dropdown-link-color: var(--p-text);
  --bs-dropdown-link-hover-color: var(--brand-primary);
  --bs-dropdown-link-hover-bg: var(--p-surface-soft);
  --bs-dropdown-link-active-color: var(--brand-primary);
  --bs-dropdown-link-active-bg: var(--p-surface-soft);
  padding: .3rem; border-radius: var(--p-radius-sm);
  box-shadow: var(--p-shadow-pop); font-size: .85rem;
  animation: p-pop .16s var(--ease);
}
@keyframes p-pop { from { opacity: 0; transform: translateY(-4px); } }
.panel .dropdown-item { border-radius: var(--p-radius-xs); padding: .5rem .65rem; font-weight: 500; }
.panel .dropdown-item.text-danger { color: var(--st-danger-fg) !important; }
.panel .dropdown-divider { border-color: var(--p-line); margin: .25rem 0; }

/* =============================================================
   Page header
   ============================================================= */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: clamp(1.15rem, .8rem + 1vw, 1.7rem);
}
.page-head__titles { min-width: 0; }
.page-head h2 { font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem); font-weight: 700; }
.page-head__sub { margin-top: .3rem; font-size: .87rem; color: var(--p-text-muted); }
.page-head__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.p-crumbs {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .1rem .45rem; margin-bottom: .6rem;
  font-size: .77rem; color: var(--p-text-faint); list-style: none;
}
.p-crumbs li { display: inline-flex; align-items: center; gap: .45rem; }
.p-crumbs li + li::before { content: "›"; color: var(--p-border-strong); }
.p-crumbs a { transition: color .15s var(--ease); }
.p-crumbs a:hover { color: var(--p-text-strong); }
.p-crumbs [aria-current="page"] { color: var(--p-text-muted); font-weight: 500; }

/* =============================================================
   Cards
   ============================================================= */
.p-card {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow-card);
  padding: clamp(1.05rem, .8rem + .8vw, 1.4rem);
}
.p-card--lg { border-radius: var(--p-radius-lg); padding: clamp(1.2rem, .9rem + 1vw, 1.65rem); }
.p-card--flush { padding: 0; overflow: hidden; }
.p-card--plain { box-shadow: none; }
.p-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.05rem;
}
.p-card--flush .p-card__head {
  margin: 0; padding: 1rem clamp(1.05rem, .8rem + .8vw, 1.4rem);
  border-bottom: 1px solid var(--p-line);
}
.p-card__title {
  font-size: .95rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: .5rem;
}
.p-card__title--sm { font-size: .88rem; }
.p-card__title .ic {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand-primary);
}
.p-card__title .ic svg { width: 15px; height: 15px; }
.p-card__link {
  font-size: .8rem; font-weight: 600; color: var(--brand-primary);
  display: inline-flex; align-items: center; gap: .3rem;
  transition: gap .16s var(--ease), color .16s var(--ease);
}
.p-card__link svg { width: 13px; height: 13px; }
.p-card__link:hover { color: var(--brand-accent-secondary); gap: .45rem; }
.p-card__foot { margin-top: 1.05rem; padding-top: .95rem; border-top: 1px solid var(--p-line); }
.p-card__pad { padding: clamp(1.05rem, .8rem + .8vw, 1.4rem); }

.p-grid { display: grid; gap: clamp(.85rem, .6rem + .8vw, 1.2rem); }
.p-grid > *, .u-stack > *, .p-grid--sidebar > *, .p-tabpanel > *, .panel-body { min-width: 0; }
.p-grid--2 { grid-template-columns: repeat(2, 1fr); }
.p-grid--3 { grid-template-columns: repeat(3, 1fr); }
.p-grid--4 { grid-template-columns: repeat(4, 1fr); }
.p-grid--sidebar { grid-template-columns: minmax(0, 1fr) 344px; align-items: start; }
@media (max-width: 1120px) {
  .p-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .p-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .p-grid--sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .p-grid--2, .p-grid--3, .p-grid--4 { grid-template-columns: 1fr; } }

/* =============================================================
   Metric modules  (dashboard KPI cards)
   ============================================================= */
.metric {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.15rem 1.25rem 1.05rem;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow-card);
  overflow: hidden;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
a.metric:hover, .metric--link:hover { border-color: var(--p-border-strong); transform: translateY(-2px); }
.metric__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.metric__ic {
  flex: none; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 11px;
  background: var(--brand-soft); color: var(--brand-primary);
}
.metric__ic svg { width: 17px; height: 17px; }
.metric--grad .metric__ic { background-image: var(--brand-gradient); color: #fff; }
.metric__trend {
  display: inline-flex; align-items: center; gap: .2rem;
  font-size: .72rem; font-weight: 600;
  padding: .1rem .4rem; border-radius: 999px;
  background: var(--st-ok-sf); color: var(--st-ok-fg); border: 1px solid var(--st-ok-bd);
}
.metric__trend--warn { background: var(--st-warn-sf); color: var(--st-warn-fg); border-color: var(--st-warn-bd); }
.metric__trend svg { width: 12px; height: 12px; }
.metric__label { margin-top: .95rem; font-size: .78rem; font-weight: 500; color: var(--p-text-muted); }
.metric__value {
  margin-top: .15rem;
  font-size: 1.7rem; font-weight: 700; letter-spacing: -.025em;
  color: var(--p-text-strong); line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.metric__value small { font-size: .78rem; font-weight: 600; color: var(--p-text-muted); }
.metric__value .unit { font-size: .8rem; font-weight: 600; color: var(--p-text-muted); margin-left: .15rem; }
.metric__hint {
  margin-top: .7rem; padding-top: .55rem;
  border-top: 1px solid var(--p-line);
  font-size: .74rem; color: var(--p-text-faint);
  display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
}
.metric__hint b { color: var(--p-text-muted); font-weight: 600; }
.metric__hint--warn b { color: var(--st-warn-fg); }
.metric__hint--danger b { color: var(--st-danger-fg); }
.metric--accent { border-color: rgba(250, 164, 26, .4); }
.metric--accent::before {
  content: ""; position: absolute; top: 0; left: 1.25rem; right: 1.25rem;
  height: 3px; border-radius: 0 0 3px 3px; background-image: var(--brand-gradient);
}

/* =============================================================
   Status system — three shapes
   ============================================================= */

/* 1 — inline state: dot + text (no surface) */
.st-dot {
  display: inline-flex; align-items: center; gap: .42rem;
  font-size: .82rem; font-weight: 600; color: var(--p-text-strong);
  white-space: nowrap;
}
.st-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.st-dot--ok      { color: var(--st-ok-fg); }      .st-dot--ok::before      { background: var(--st-ok-dot); }
.st-dot--warn    { color: var(--st-warn-fg); }    .st-dot--warn::before    { background: var(--st-warn-dot); }
.st-dot--danger  { color: var(--st-danger-fg); }  .st-dot--danger::before  { background: var(--st-danger-dot); }
.st-dot--info    { color: var(--st-info-fg); }    .st-dot--info::before    { background: var(--st-info-dot); }
.st-dot--neutral { color: var(--st-neutral-fg); } .st-dot--neutral::before { background: var(--st-neutral-dot); }
.st-dot--active  { color: var(--st-active-fg); }  .st-dot--active::before  { background: var(--st-active-dot); }
.st-dot--check::before { display: none; }
.st-dot--check { gap: .3rem; }
.st-dot--check svg { width: 15px; height: 15px; }

/* 2 — compact badge for tables: bordered soft capsule (not a solid pill) */
.st {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .22rem .55rem .22rem .5rem;
  border: 1px solid; border-radius: 8px;
  font-size: .725rem; font-weight: 600; line-height: 1.4;
  white-space: nowrap;
}
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.st--ok      { color: var(--st-ok-fg);      border-color: var(--st-ok-bd);      background: var(--st-ok-sf); }
.st--ok::before      { background: var(--st-ok-dot); }
.st--warn    { color: var(--st-warn-fg);    border-color: var(--st-warn-bd);    background: var(--st-warn-sf); }
.st--warn::before    { background: var(--st-warn-dot); }
.st--danger  { color: var(--st-danger-fg);  border-color: var(--st-danger-bd);  background: var(--st-danger-sf); }
.st--danger::before  { background: var(--st-danger-dot); }
.st--info    { color: var(--st-info-fg);    border-color: var(--st-info-bd);    background: var(--st-info-sf); }
.st--info::before    { background: var(--st-info-dot); }
.st--neutral { color: var(--st-neutral-fg); border-color: var(--st-neutral-bd); background: var(--st-neutral-sf); }
.st--neutral::before { background: var(--st-neutral-dot); }
.st--active  { color: var(--st-active-fg);  border-color: var(--st-active-bd);  background: var(--st-active-sf); }
.st--active::before  { background: var(--st-active-dot); }

/* 3 — status panel: prominent block for service / renewal / payment */
.st-panel {
  display: flex; align-items: center; gap: .9rem;
  padding: .9rem 1.05rem;
  border: 1px solid; border-radius: 14px;
}
.st-panel__ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; }
.st-panel__ic svg { width: 17px; height: 17px; }
.st-panel__label { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.st-panel__value { font-size: .95rem; font-weight: 700; color: var(--p-text-strong); }
.st-panel--ok     { border-color: var(--st-ok-bd);     background: var(--st-ok-sf); }
.st-panel--ok .st-panel__ic     { background: #fff; color: var(--st-ok-fg); border: 1px solid var(--st-ok-bd); }
.st-panel--ok .st-panel__label  { color: var(--st-ok-fg); }
.st-panel--warn   { border-color: var(--st-warn-bd);   background: var(--st-warn-sf); }
.st-panel--warn .st-panel__ic   { background: #fff; color: var(--st-warn-fg); border: 1px solid var(--st-warn-bd); }
.st-panel--warn .st-panel__label { color: var(--st-warn-fg); }
.st-panel--danger { border-color: var(--st-danger-bd); background: var(--st-danger-sf); }
.st-panel--danger .st-panel__ic { background: #fff; color: var(--st-danger-fg); border: 1px solid var(--st-danger-bd); }
.st-panel--danger .st-panel__label { color: var(--st-danger-fg); }

/* =============================================================
   Filter toolbar — one surface
   ============================================================= */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
  padding: .6rem .7rem;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: 14px;
  box-shadow: var(--p-shadow-card);
  margin-bottom: 1rem;
}
.toolbar__sep { width: 1px; align-self: stretch; background: var(--p-line); margin: .1rem .2rem; }
.toolbar__spacer { flex: 1; }
.p-search { position: relative; flex: 1 1 220px; min-width: 170px; max-width: 340px; }
.p-search svg {
  position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--p-text-faint); pointer-events: none;
}
.p-search input { padding-left: 2.1rem !important; }

.p-input, .p-select, .p-search input, .p-textarea {
  width: 100%;
  padding: .52rem .8rem;
  font-family: inherit; font-size: .85rem;
  color: var(--p-text-strong);
  background: #fff;
  border: 1px solid var(--p-border-strong);
  border-radius: var(--p-radius-xs);
  -webkit-appearance: none; appearance: none;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.toolbar .p-input, .toolbar .p-select, .toolbar .p-search input { border-color: var(--p-border); background: var(--p-surface-soft); }
.toolbar .p-input:focus, .toolbar .p-select:focus, .toolbar .p-search input:focus { background: #fff; }
.p-textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.p-select {
  padding-right: 2.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2369748a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .65rem center;
}
.p-input::placeholder, .p-textarea::placeholder, .p-search input::placeholder { color: var(--p-text-faint); }
.p-input:focus, .p-select:focus, .p-search input:focus, .p-textarea:focus {
  outline: none; border-color: var(--brand-accent-secondary);
  box-shadow: 0 0 0 3px rgba(250, 164, 26, .16);
}
.p-select--auto { width: auto; min-width: 140px; }

/* segmented control (Bekleyen / Geçmiş etc.) */
.p-seg {
  display: inline-flex; padding: 3px;
  background: var(--p-surface-sink);
  border: 1px solid var(--p-border);
  border-radius: 10px;
}
.p-seg button {
  border: 0; background: none; cursor: pointer;
  padding: .4rem .85rem; border-radius: 8px;
  font-family: inherit; font-size: .8rem; font-weight: 600;
  color: var(--p-text-muted);
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.p-seg button.is-active { color: var(--p-text-strong); background: #fff; box-shadow: 0 1px 3px rgba(20, 43, 81, .08); }
.p-seg button .n { color: var(--p-text-faint); font-weight: 700; margin-left: .3rem; }
.p-seg button.is-active .n { color: var(--brand-accent-secondary); }

/* filter chips */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .65rem; border-radius: 999px;
  border: 1px solid var(--p-border); background: #fff;
  font-size: .78rem; font-weight: 500; color: var(--p-text-muted);
  cursor: pointer; white-space: nowrap;
  transition: color .16s var(--ease), border-color .16s var(--ease), background-color .16s var(--ease);
}
.chip:hover { color: var(--p-text-strong); border-color: var(--p-border-strong); }
.chip.is-active {
  color: var(--brand-primary); font-weight: 600;
  border-color: rgba(20, 43, 81, .26); background: var(--brand-soft);
}
.chip__count { color: var(--p-text-faint); font-weight: 600; }
.chip.is-active .chip__count { color: var(--brand-accent-secondary); }

/* =============================================================
   Buttons
   ============================================================= */
.p-btn {
  --_shine: rgba(255, 255, 255, .42);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: .45rem;
  padding: .56rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--p-radius-xs);
  font-family: inherit; font-size: .84rem; font-weight: 600; line-height: 1.2;
  white-space: nowrap; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: transform .16s var(--ease), filter .16s var(--ease), border-color .16s var(--ease),
              background-color .16s var(--ease), color .16s var(--ease);
}
.p-btn > * { position: relative; z-index: 1; }
.p-btn svg { width: 16px; height: 16px; }
.p-btn--sm { padding: .4rem .72rem; font-size: .8rem; }
.p-btn--lg { padding: .7rem 1.25rem; font-size: .88rem; }
.p-btn--block { width: 100%; }
.p-btn:active { transform: translateY(1px); }

.p-btn--primary { color: #fff; background-image: var(--brand-gradient); text-shadow: 0 1px 2px rgba(90, 34, 0, .3); }
.p-btn--primary::after {
  content: ""; position: absolute; inset: 0 auto 0 -70%; width: 42%; z-index: 0;
  background: linear-gradient(90deg, transparent, var(--_shine), transparent);
  transform: skewX(-18deg); transition: left .55s var(--ease);
}
.p-btn--primary:hover { filter: brightness(1.05); }
.p-btn--primary:hover::after { left: 130%; }

.p-btn--ghost { color: var(--p-text-strong); background: #fff; border-color: var(--p-border-strong); }
.p-btn--ghost:hover { border-color: rgba(20, 43, 81, .26); background: var(--p-surface-soft); }

.p-btn--subtle { color: var(--p-text-muted); background: transparent; }
.p-btn--subtle:hover { color: var(--p-text-strong); background: var(--p-surface-soft); }

.p-btn--danger { color: var(--st-danger-fg); background: #fff; border-color: var(--st-danger-bd); }
.p-btn--danger:hover { background: var(--st-danger-sf); }

.p-btn--wa .btn-wa__icon, .btn-wa__icon { color: #25d366; display: inline-flex; }
.btn-wa__icon svg { width: 17px; height: 17px; }

@media (prefers-reduced-motion: reduce) { .p-btn--primary::after { display: none; } }

/* icon-only row actions */
.act-btn {
  width: 30px; height: 30px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--p-border); border-radius: 8px;
  background: #fff; color: var(--p-text-muted); cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease), background-color .16s var(--ease);
}
.act-btn:hover { color: var(--p-text-strong); border-color: var(--p-border-strong); background: var(--p-surface-soft); }
.act-btn svg { width: 15px; height: 15px; }
.act-group { display: inline-flex; align-items: center; gap: .3rem; justify-content: flex-end; }
.row-view {
  display: inline-flex; align-items: center; gap: .28rem;
  font-size: .78rem; font-weight: 600; color: var(--brand-primary);
  transition: gap .16s var(--ease), color .16s var(--ease);
}
.row-view svg { width: 13px; height: 13px; }
.row-view:hover { color: var(--brand-accent-secondary); gap: .42rem; }

/* =============================================================
   Tables — custom, roomy, no boxed cells
   ============================================================= */
.p-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.p-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.p-table thead th {
  padding: .7rem .85rem .6rem;
  text-align: left;
  font-size: .68rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--p-text-faint);
  border-bottom: 1px solid var(--p-border);
  white-space: nowrap;
}
.p-table tbody td {
  padding: .82rem .85rem;
  border-bottom: 1px solid var(--p-line);
  vertical-align: middle;
  color: var(--p-text);
}
.p-table thead th:first-child, .p-table tbody td:first-child { padding-left: clamp(1rem, .8rem + .6vw, 1.4rem); }
.p-table thead th:last-child,  .p-table tbody td:last-child  { padding-right: clamp(1rem, .8rem + .6vw, 1.4rem); }
.p-table tbody tr:last-child td { border-bottom: 0; }
.p-table tbody tr { transition: background-color .13s var(--ease); }
.p-table tbody tr:hover { background: var(--p-surface-soft); }
.p-table tbody tr.is-clickable { cursor: pointer; }
.p-table .cell-strong { font-weight: 600; color: var(--p-text-strong); }
.p-table .cell-muted { color: var(--p-text-muted); }
.p-table .cell-domain { color: var(--brand-primary); font-weight: 500; }
.p-table .cell-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-table .cell-actions { text-align: right; white-space: nowrap; }
.p-table__id { font-variant-numeric: tabular-nums; color: var(--p-text-muted); font-weight: 600; letter-spacing: .01em; }

.p-table__entity { display: flex; align-items: center; gap: .65rem; }
.p-table__entity .avatar {
  flex: none; width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--brand-soft-2); color: var(--brand-primary);
  font-size: .72rem; font-weight: 700;
}
.p-table__entity .avatar--svc { background-image: var(--brand-gradient); color: #fff; }
.p-table__entity .avatar--svc svg { width: 15px; height: 15px; }
.p-table__entity .who { min-width: 0; }
.p-table__entity .who b { display: block; font-weight: 600; color: var(--p-text-strong); font-size: .84rem; }
.p-table__entity .who span { display: block; font-size: .74rem; color: var(--p-text-muted); }
.cell-2 b { display: block; font-weight: 600; color: var(--p-text-strong); }
.cell-2 span { display: block; font-size: .76rem; color: var(--p-text-muted); margin-top: .05rem; }

/* mobile: card rows */
@media (max-width: 780px) {
  .p-table--stack thead { display: none; }
  .p-table--stack tbody tr {
    display: block; padding: 1rem;
    border: 1px solid var(--p-border); border-radius: var(--p-radius-sm);
    box-shadow: var(--p-shadow-card);
    margin-bottom: .7rem;
  }
  .p-table--stack tbody tr:hover { background: var(--p-surface); }
  .p-table--stack tbody td {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .32rem 0; border: 0; text-align: right;
  }
  .p-table--stack tbody td:first-child, .p-table--stack tbody td:last-child { padding-inline: 0; }
  .p-table--stack tbody td::before {
    content: attr(data-label);
    font-size: .68rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
    color: var(--p-text-faint); text-align: left; flex: none;
  }
  .p-table--stack tbody td.cell-actions { justify-content: flex-end; padding-top: .65rem; margin-top: .3rem; border-top: 1px solid var(--p-line); }
  .p-table--stack tbody td.cell-actions::before { content: ""; }
  .p-table--stack tbody td.cell-hero { padding-bottom: .55rem; margin-bottom: .35rem; border-bottom: 1px solid var(--p-line); }
  .p-table--stack tbody td.cell-hero::before { content: ""; }
}

/* =============================================================
   Forms
   ============================================================= */
.p-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.p-field > label { font-size: .82rem; font-weight: 600; color: var(--p-text-strong); }
.p-field__hint { font-size: .76rem; color: var(--p-text-muted); }
.p-field .req { color: var(--st-danger-fg); font-weight: 600; }
.p-form-grid { display: grid; gap: 0 1.1rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 620px) { .p-form-grid { grid-template-columns: 1fr; } }
.p-form-grid .p-field--full { grid-column: 1 / -1; }
.p-form-section { margin-bottom: 1.4rem; }
.p-form-section__title {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--p-text-faint); margin-bottom: .85rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--p-line);
}

.p-check { display: inline-flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--p-text); cursor: pointer; }
.p-check input { width: 17px; height: 17px; flex: none; accent-color: var(--brand-accent-secondary); }

.p-upload {
  display: flex; align-items: center; gap: .8rem;
  padding: 1rem 1.1rem;
  border: 1.5px dashed var(--p-border-strong);
  border-radius: var(--p-radius-sm);
  background: var(--p-surface-soft);
  font-size: .82rem; color: var(--p-text-muted); cursor: pointer;
  transition: border-color .16s var(--ease), background-color .16s var(--ease), color .16s var(--ease);
}
.p-upload__ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--p-border); color: var(--p-text-faint); }
.p-upload__ic svg { width: 17px; height: 17px; }
.p-upload b { color: var(--p-text-strong); font-weight: 600; display: block; }
.p-upload:hover { border-color: var(--brand-accent-secondary); background: #fff; color: var(--p-text); }

/* charge breakdown (payment request) */
.charge { border: 1px solid var(--p-border); border-radius: var(--p-radius-sm); overflow: hidden; }
.charge__row { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; font-size: .86rem; border-bottom: 1px solid var(--p-line); }
.charge__row span { color: var(--p-text-muted); }
.charge__row b { font-weight: 600; color: var(--p-text-strong); font-variant-numeric: tabular-nums; }
.charge__row--total { background: var(--p-surface-soft); border-bottom: 0; }
.charge__row--total span { color: var(--p-text-strong); font-weight: 600; }
.charge__row--total b { font-size: 1.05rem; color: var(--brand-primary); }

/* =============================================================
   Tabs
   ============================================================= */
.p-tabs {
  display: flex; gap: .1rem;
  border-bottom: 1px solid var(--p-border);
  overflow-x: auto; scrollbar-width: none;
}
.p-tabs::-webkit-scrollbar { display: none; }
.p-tab {
  position: relative; padding: .72rem .9rem;
  font-size: .85rem; font-weight: 500; color: var(--p-text-muted);
  white-space: nowrap; background: none; border: 0; cursor: pointer;
  transition: color .16s var(--ease);
}
.p-tab::after {
  content: ""; position: absolute; left: .55rem; right: .55rem; bottom: -1px;
  height: 2px; border-radius: 2px; background-image: var(--brand-gradient);
  transform: scaleX(0); transition: transform .2s var(--ease);
}
.p-tab:hover { color: var(--p-text-strong); }
.p-tab.is-active { color: var(--p-text-strong); font-weight: 600; }
.p-tab.is-active::after { transform: scaleX(1); }
.p-tab .n {
  margin-left: .4rem; font-size: .7rem; font-weight: 700;
  padding: .05rem .35rem; border-radius: 999px;
  background: var(--p-surface-sink); color: var(--p-text-muted);
}
.p-tab.is-active .n { background: var(--brand-soft-2); color: var(--brand-primary); }
.p-tabpanel { padding-top: 1.3rem; }
.p-tabpanel[hidden] { display: none; }

/* =============================================================
   Description lists / key-value
   ============================================================= */
.p-dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: .7rem 1.4rem; font-size: .86rem; }
.p-dl dt { color: var(--p-text-muted); }
.p-dl dd { margin: 0; font-weight: 600; color: var(--p-text-strong); }
.p-dl--lines dt, .p-dl--lines dd { padding-bottom: .7rem; border-bottom: 1px solid var(--p-line); }
.p-dl--lines dt:last-of-type, .p-dl--lines dd:last-of-type { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 520px) {
  .p-dl { grid-template-columns: 1fr; gap: .15rem; }
  .p-dl dd { margin-bottom: .6rem; }
  .p-dl--lines dt { padding-bottom: 0; border-bottom: 0; }
}

.p-kv-cards { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.p-kv { padding: .8rem .9rem; border: 1px solid var(--p-line); border-radius: var(--p-radius-xs); background: var(--p-surface-sink); }
.p-kv dt { font-size: .73rem; color: var(--p-text-muted); }
.p-kv dd { margin: .22rem 0 0; font-size: 1rem; font-weight: 700; color: var(--p-text-strong); font-variant-numeric: tabular-nums; }
.p-kv--danger dd { color: var(--st-danger-fg); }
.p-kv--ok dd { color: var(--st-ok-fg); }

/* checklist (package contents) */
.p-checklist { list-style: none; display: grid; gap: .6rem; font-size: .86rem; }
.p-checklist li { display: flex; align-items: flex-start; gap: .55rem; }
.p-checklist svg { flex: none; width: 16px; height: 16px; color: var(--st-ok-dot); margin-top: .12rem; }

/* =============================================================
   Renewal component — premium service-status card
   ============================================================= */
.renew-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.4rem;
  align-items: center;
  padding: clamp(1.15rem, .9rem + 1vw, 1.6rem);
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  box-shadow: var(--p-shadow-card);
}
.renew-card__eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--p-text-faint); }
.renew-card__name { margin-top: .3rem; font-size: 1.12rem; font-weight: 700; }
.renew-card__meta { margin-top: .75rem; display: grid; gap: .5rem 1.4rem; grid-template-columns: repeat(2, minmax(0, max-content)); font-size: .82rem; }
.renew-card__meta div { min-width: 0; }
.renew-card__meta dt { color: var(--p-text-muted); font-size: .73rem; }
.renew-card__meta dd { margin: .1rem 0 0; font-weight: 600; color: var(--p-text-strong); }
.renew-card__meta .is-domain dd { color: var(--brand-primary); }
.renew-card__cta { margin-top: 1.1rem; display: flex; gap: .5rem; flex-wrap: wrap; }

.renew-ring {
  --pct: 90;
  --ring: linear-gradient(135deg, #4f7fd0, #7ea6e2);
  position: relative;
  width: 108px; height: 108px; flex: none;
  border-radius: 50%;
  background:
    conic-gradient(from -90deg, var(--ring-color, #4f7fd0) calc(var(--pct) * 1%), var(--p-surface-sink) 0);
  display: grid; place-items: center;
}
.renew-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--p-surface); }
.renew-ring__num { position: relative; text-align: center; line-height: 1; }
.renew-ring__num b { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; color: var(--p-text-strong); font-variant-numeric: tabular-nums; }
.renew-ring__num span { font-size: .68rem; color: var(--p-text-muted); }
.renew-ring--soon   { --ring-color: #e0912f; }
.renew-ring--urgent { --ring-color: var(--brand-accent-secondary); }
.renew-ring--over    { --ring-color: #d0544f; }
.renew-ring--over .renew-ring__num b { color: var(--st-danger-fg); }
@media (max-width: 560px) {
  .renew-card { grid-template-columns: 1fr; justify-items: start; }
  .renew-ring { order: -1; }
}

/* thin segmented meter (compact use) */
.renew-seg { display: flex; gap: 3px; }
.renew-seg i {
  flex: 1; height: 6px; border-radius: 2px;
  background: var(--p-surface-sink);
}
.renew-seg i.on { background: #4f7fd0; }
.renew-seg--soon i.on { background: #e0912f; }
.renew-seg--urgent i.on { background-image: var(--brand-gradient); }
.renew-seg--over i.on { background: #d0544f; }

/* =============================================================
   Service card (customer) — structured
   ============================================================= */
.svc-card {
  display: flex; flex-direction: column;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow-card);
  overflow: hidden;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.svc-card:hover { border-color: var(--p-border-strong); transform: translateY(-2px); }
.svc-card__top {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem .75rem;
  flex-wrap: wrap;
  padding: 1rem 1.15rem .85rem;
}
.svc-card__pkg { display: flex; align-items: center; gap: .6rem; min-width: 0; flex: 1 1 auto; }
.svc-card__top > .st { flex: none; }
.svc-card__pkg .ic { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background-image: var(--brand-gradient); color: #fff; }
.svc-card__pkg .ic svg { width: 15px; height: 15px; }
.svc-card__name { font-size: .95rem; font-weight: 600; min-width: 0; }
.svc-card__domain { padding: 0 1.15rem .85rem; }
.svc-card__domain a { font-size: .92rem; font-weight: 600; color: var(--brand-primary); display: inline-flex; align-items: center; gap: .35rem; }
.svc-card__domain a svg { width: 13px; height: 13px; opacity: .6; }
.svc-card__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--p-line);
}
.svc-card__grid div { padding: .7rem 1.15rem; }
.svc-card__grid div:nth-child(odd) { border-right: 1px solid var(--p-line); }
.svc-card__grid div:nth-child(n+3) { border-top: 1px solid var(--p-line); }
.svc-card__grid dt { font-size: .71rem; color: var(--p-text-muted); }
.svc-card__grid dd { margin: .15rem 0 0; font-size: .84rem; font-weight: 600; color: var(--p-text-strong); }
.svc-card__grid .is-days dd { color: var(--st-warn-fg); }
.svc-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1.15rem;
  border-top: 1px solid var(--p-line);
  background: var(--p-surface-soft);
}
.svc-card__price { font-size: .9rem; font-weight: 700; color: var(--p-text-strong); font-variant-numeric: tabular-nums; }
.svc-card__price small { font-size: .72rem; font-weight: 500; color: var(--p-text-muted); }
@media (prefers-reduced-motion: reduce) { .svc-card:hover, .metric:hover, .qa-tile:hover { transform: none; } }

/* =============================================================
   Service detail header (integrated summary)
   ============================================================= */
.svc-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.2rem, .9rem + 1vw, 1.7rem);
  background:
    radial-gradient(120% 130% at 0% 0%, var(--brand-soft), transparent 55%),
    var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-lg);
  box-shadow: var(--p-shadow-card);
}
.svc-head__id { display: flex; align-items: center; gap: .9rem; }
.svc-head__id .ic { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background-image: var(--brand-gradient); color: #fff; }
.svc-head__id .ic svg { width: 21px; height: 21px; }
.svc-head__id h2 { font-size: 1.3rem; font-weight: 700; }
.svc-head__id .dom { font-size: .88rem; font-weight: 600; color: var(--brand-primary); }
.svc-head__facts { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .6rem 2rem; font-size: .82rem; }
.svc-head__facts div span { color: var(--p-text-muted); }
.svc-head__facts div b { color: var(--p-text-strong); font-weight: 600; }
.svc-head__renew {
  flex: none; min-width: 172px;
  padding: .9rem 1rem;
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  background: var(--p-surface-soft);
  text-align: left;
}
.svc-head__renew-num { display: block; font-size: .84rem; color: var(--st-warn-fg); font-weight: 600; }
.svc-head__renew-num b { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.svc-head__renew .renew-seg { margin: .6rem 0 .5rem; }
.svc-head__renew-date { display: block; font-size: .74rem; color: var(--p-text-muted); }
@media (max-width: 620px) { .svc-head { grid-template-columns: 1fr; } .svc-head__renew { order: -1; } }

/* =============================================================
   Quick action tiles
   ============================================================= */
.qa-list { display: grid; gap: .55rem; }
.qa-tile {
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem .95rem;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: 14px;
  transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.qa-tile:hover { border-color: var(--p-border-strong); transform: translateY(-1px); box-shadow: var(--p-shadow-card); }
.qa-tile__ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--brand-soft); color: var(--brand-primary); }
.qa-tile__ic svg { width: 17px; height: 17px; }
.qa-tile--grad .qa-tile__ic { background-image: var(--brand-gradient); color: #fff; }
.qa-tile__body { flex: 1; min-width: 0; }
.qa-tile__title { display: block; font-size: .86rem; font-weight: 600; color: var(--p-text-strong); }
.qa-tile__sub { display: block; font-size: .75rem; color: var(--p-text-muted); margin-top: .05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-tile__go { flex: none; color: var(--p-text-faint); transition: transform .18s var(--ease), color .18s var(--ease); }
.qa-tile__go svg { width: 16px; height: 16px; }
.qa-tile:hover .qa-tile__go { color: var(--brand-accent-secondary); transform: translateX(3px); }

/* admin quick actions grid */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.quick-actions button, .quick-actions a {
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem .85rem;
  border: 1px solid var(--p-border); border-radius: 12px;
  background: #fff; font-size: .82rem; font-weight: 600; color: var(--p-text-strong);
  cursor: pointer; text-align: left;
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.quick-actions button:hover, .quick-actions a:hover { border-color: var(--brand-accent-secondary); background: var(--p-surface-soft); }
.quick-actions .qa-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-primary); }
.quick-actions .qa-ic svg { width: 15px; height: 15px; }

/* =============================================================
   Support thread
   ============================================================= */
.thread { display: flex; flex-direction: column; gap: 1rem; }
.msg { border: 1px solid var(--p-border); border-radius: var(--p-radius-sm); background: var(--p-surface); overflow: hidden; box-shadow: var(--p-shadow-card); }
.msg__head { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--p-line); background: var(--p-surface-soft); }
.msg__avatar { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: .7rem; font-weight: 700; }
.msg--staff .msg__avatar { background-image: var(--brand-gradient); color: #fff; }
.msg--customer .msg__avatar { background: var(--brand-soft-2); color: var(--brand-primary); }
.msg__who { font-size: .84rem; font-weight: 600; color: var(--p-text-strong); }
.msg__role { font-size: .66rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .12rem .45rem; border-radius: 6px; }
.msg--staff .msg__role { background: var(--st-warn-sf); color: var(--st-warn-fg); border: 1px solid var(--st-warn-bd); }
.msg--customer .msg__role { background: var(--st-info-sf); color: var(--st-info-fg); border: 1px solid var(--st-info-bd); }
.msg__time { margin-left: auto; font-size: .73rem; color: var(--p-text-faint); white-space: nowrap; }
.msg__body { padding: .95rem 1rem; font-size: .88rem; line-height: 1.62; color: var(--p-text); }
.msg__body p + p { margin-top: .7rem; }
.msg__attach { margin: 0 1rem .9rem; display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .7rem; border: 1px solid var(--p-border); border-radius: var(--p-radius-xs); font-size: .8rem; color: var(--p-text-strong); }
.msg__attach svg { width: 15px; height: 15px; color: var(--brand-accent-secondary); }
.msg--staff { border-left: 3px solid transparent; border-image: var(--brand-gradient) 1; }

/* =============================================================
   Activity timeline
   ============================================================= */
.timeline { list-style: none; position: relative; padding-left: 1.45rem; }
.timeline::before { content: ""; position: absolute; left: 5px; top: .4rem; bottom: .4rem; width: 2px; background: var(--p-line); }
.timeline li { position: relative; padding: 0 0 1.15rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -1.45rem; top: .28rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--p-border-strong);
}
.timeline li.is-accent::before { border-color: transparent; background-image: var(--brand-gradient); }
.timeline__title { font-size: .86rem; font-weight: 600; color: var(--p-text-strong); }
.timeline__meta { font-size: .75rem; color: var(--p-text-muted); margin-top: .1rem; }

/* workflow strip (payment → invoice) */
.flow {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem;
  padding: .8rem 1rem; border: 1px solid var(--p-line); border-radius: var(--p-radius-sm);
  background: var(--p-surface-soft);
}
.flow__step { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 600; color: var(--p-text-faint); }
.flow__step svg { width: 14px; height: 14px; }
.flow__step.is-done { color: var(--st-ok-fg); }
.flow__step.is-now { color: var(--brand-accent-secondary); }
.flow__arr { color: var(--p-border-strong); }

/* =============================================================
   Internal note (admin only)
   ============================================================= */
.p-note { border: 1px solid #eadfce; background: var(--p-surface-warm); border-radius: var(--p-radius-sm); padding: 1rem 1.1rem; }
.p-note__flag { display: inline-flex; align-items: center; gap: .35rem; font-size: .68rem; font-weight: 700; letter-spacing: .03em; color: #97702f; margin-bottom: .55rem; }
.p-note__flag svg { width: 13px; height: 13px; }
.p-note__item { font-size: .85rem; line-height: 1.55; color: var(--p-text); }
.p-note__item + .p-note__item { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid #eadfce; }
.p-note__item time { display: block; font-size: .73rem; color: var(--p-text-faint); margin-bottom: .1rem; }

/* =============================================================
   Empty / loading states
   ============================================================= */
.p-empty { text-align: center; padding: clamp(2.2rem, 1.6rem + 2.4vw, 3.5rem) 1.25rem; }
.p-empty__icon {
  width: 52px; height: 52px; margin: 0 auto .95rem;
  display: grid; place-items: center; border-radius: 15px;
  background: var(--brand-soft); color: var(--brand-primary);
}
.p-empty__icon svg { width: 24px; height: 24px; }
.p-empty--ok .p-empty__icon { background: var(--st-ok-sf); color: var(--st-ok-fg); border: 1px solid var(--st-ok-bd); }
.p-empty h3 { font-size: 1rem; margin-bottom: .35rem; }
.p-empty p { font-size: .86rem; color: var(--p-text-muted); max-width: 38ch; margin: 0 auto .95rem; }

.sk { background: linear-gradient(90deg, var(--p-line) 25%, #f3f5f8 37%, var(--p-line) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-row { display: flex; align-items: center; gap: .9rem; padding: .9rem clamp(1rem, .8rem + .6vw, 1.4rem); border-bottom: 1px solid var(--p-line); }
.sk-row .sk-a { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.sk-row .sk-b { flex: 1; height: 12px; }
.sk-row .sk-c { width: 80px; height: 12px; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* =============================================================
   Modal
   ============================================================= */
.panel .modal-content { border: 1px solid var(--p-border); border-radius: var(--p-radius-lg); box-shadow: var(--p-shadow-pop); }
.panel .modal-header { border-bottom: 1px solid var(--p-line); padding: 1.1rem 1.35rem; }
.panel .modal-title { font-size: 1rem; font-weight: 600; }
.panel .modal-body { padding: 1.35rem; }
.panel .modal-footer { border-top: 1px solid var(--p-line); padding: .95rem 1.35rem; gap: .5rem; }
.panel .modal-backdrop { background: rgba(18, 28, 50, .5); }
.panel .modal-backdrop.show { --bs-backdrop-opacity: 1; }
.panel .btn-close { --bs-btn-close-focus-shadow: 0 0 0 3px rgba(250,164,26,.16); }

.modal-confirm__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--st-warn-sf); color: var(--st-warn-fg); border: 1px solid var(--st-warn-bd); margin-bottom: .9rem; }
.modal-confirm__icon--danger { background: var(--st-danger-sf); color: var(--st-danger-fg); border-color: var(--st-danger-bd); }
.modal-confirm__icon svg { width: 20px; height: 20px; }

/* =============================================================
   Toast
   ============================================================= */
.p-toast-wrap { position: fixed; right: 1rem; bottom: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; max-width: min(360px, calc(100vw - 2rem)); }
.p-toast { display: flex; align-items: flex-start; gap: .6rem; padding: .8rem .95rem; background: var(--brand-primary); color: #fff; border-radius: var(--p-radius-sm); font-size: .84rem; box-shadow: var(--p-shadow-pop); animation: p-toast-in .22s var(--ease); }
.p-toast svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--brand-accent); }
@keyframes p-toast-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .p-toast { animation: none; } }

/* =============================================================
   Auth screens
   ============================================================= */
.auth { min-height: 100vh; display: grid; background: var(--p-bg); }
.auth__panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 1rem + 4vw, 3.5rem); }
.auth__inner { width: 100%; max-width: 384px; margin-inline: auto; }
.auth__brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 2.35rem; }
.auth__brand img { height: 34px; width: auto; }
.auth__eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--p-text-faint); }
.auth h1 { margin: .55rem 0 .45rem; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); font-weight: 700; }
.auth__lead { font-size: .9rem; color: var(--p-text-muted); margin-bottom: 1.85rem; }
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .35rem 0 1.3rem; font-size: .82rem; }
.auth__link { font-weight: 600; color: var(--brand-primary); }
.auth__link:hover { color: var(--brand-accent-secondary); }
.auth__pw { position: relative; }
.auth__pw-toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: var(--p-text-faint); cursor: pointer; }
.auth__pw-toggle svg { width: 17px; height: 17px; }
.auth__support { margin-top: 1.85rem; padding-top: 1.3rem; border-top: 1px solid var(--p-line); font-size: .82rem; color: var(--p-text-muted); }
.auth__support a { font-weight: 600; color: var(--brand-primary); }
.auth__aside { position: relative; display: none; overflow: hidden; color: #fff; padding: clamp(2rem, 1rem + 4vw, 4rem); isolation: isolate; }
.auth__aside::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(150deg, #142b51, #1d3c6e 55%, #24406f); }
.auth__aside::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    radial-gradient(58% 58% at 85% 12%, rgba(250, 164, 26, .22), transparent 60%),
    repeating-linear-gradient(to right, rgba(255, 255, 255, .05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, .04) 0 1px, transparent 1px 64px);
}
.auth__aside-inner { max-width: 430px; margin-block: auto; }
.auth__aside h2 { color: #fff; font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.auth__aside p { margin-top: .9rem; font-size: .95rem; color: rgba(255, 255, 255, .82); line-height: 1.6; }
.auth__aside-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .8rem; }
.auth__aside-list li { display: flex; gap: .6rem; font-size: .88rem; color: rgba(255, 255, 255, .9); }
.auth__aside-list svg { width: 18px; height: 18px; flex: none; color: var(--brand-accent); margin-top: 1px; }
@media (min-width: 900px) { .auth { grid-template-columns: 1fr 1fr; } .auth__aside { display: flex; flex-direction: column; } }
@media (min-width: 1200px) { .auth { grid-template-columns: 464px 1fr; } }

/* =============================================================
   Offcanvas sidebar (mobile)
   ============================================================= */
.panel-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(18, 28, 50, .45); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
@media (max-width: 991.98px) {
  .panel-sidebar { position: fixed; left: 0; top: 0; height: 100dvh; transform: translateX(-100%); transition: transform .26s var(--ease); box-shadow: var(--p-shadow-pop); }
  .panel.is-nav-open .panel-sidebar { transform: none; }
  .panel.is-nav-open .panel-scrim { opacity: 1; pointer-events: auto; }
  .panel-topbar__toggle { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) { .panel-sidebar, .panel-scrim { transition: none; } }

/* =============================================================
   Utilities
   ============================================================= */
.u-mt-0 { margin-top: 0 !important; }
.u-mt-1 { margin-top: .75rem !important; }
.u-mt-2 { margin-top: 1.25rem !important; }
.u-mt-3 { margin-top: 2rem !important; }
.u-mb-1 { margin-bottom: .75rem !important; }
.u-muted { color: var(--p-text-muted) !important; }
.u-faint { color: var(--p-text-faint) !important; }
.u-strong { color: var(--p-text-strong) !important; font-weight: 600; }
.u-nowrap { white-space: nowrap; }
.u-right { text-align: right; }
.u-center { text-align: center; }
.u-flex { display: flex; align-items: center; gap: .5rem; }
.u-flex-between { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; }
.u-flex-between > * { min-width: 0; }
.u-flex-col { display: flex; flex-direction: column; gap: .5rem; }
.u-wrap { flex-wrap: wrap; }
.u-grow { flex: 1; }
.u-price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--p-text-strong); }
.u-price small { font-weight: 500; color: var(--p-text-muted); }
.u-divider { height: 1px; background: var(--p-line); margin: 1.15rem 0; border: 0; }
.u-stack { display: grid; gap: clamp(.85rem, .6rem + .8vw, 1.2rem); }
.u-stack--sm { gap: .65rem; }
.file-pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; color: var(--st-ok-fg); white-space: nowrap; }
.file-pill svg { width: 15px; height: 15px; flex: none; }
.file-pill--none { color: var(--p-text-faint); font-weight: 500; }
.file-pill--none svg { color: var(--p-text-faint); }
