/* =====================================================================
   Dawayr — Application UI (client portal, admin panel, auth)
   Builds on the tokens defined in dawayr.css
   ===================================================================== */

.app-body { background: var(--bg-soft); min-height: 100vh; }

/* ===== Flash & alerts ===== */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 12px; font-size: 14.5px; line-height: 1.55;
  border: 1px solid transparent; margin-bottom: 20px;
}
.alert .i { width: 18px; height: 18px; margin-top: 2px; }
.alert--success { background: var(--success-bg); color: #166534; border-color: #C6EBD3; }
.alert--error { background: #FDECEC; color: #9F1D1D; border-color: #F6CACA; }
.alert--info { background: var(--brand-50); color: var(--brand-600); border-color: #CDE6E4; }
.alert--warning { background: var(--warning-bg); color: #8A5300; border-color: #F3DDB2; }
.alert ul { list-style: disc; padding-inline-start: 18px; }

/* ===== Badges ===== */
.badge-s {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.badge-s::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-s--info { background: #EAF1FE; color: #2952B3; }
.badge-s--brand { background: var(--brand-50); color: var(--brand); }
.badge-s--warning { background: var(--warning-bg); color: var(--warning); }
.badge-s--success { background: var(--success-bg); color: var(--success); }
.badge-s--muted { background: #EEF0F4; color: var(--text-3); }
.badge-s--danger { background: #FDECEC; color: #C02626; }
.count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--brand); color: #fff; font: 600 11.5px/1 var(--font-en);
}

/* ===== Page header ===== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(24px, 2.4vw, 30px); }
.page-head p { color: var(--text-3); margin-top: 6px; font-size: 15px; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-3); margin-bottom: 12px; }
.back-link:hover { color: var(--text); }
.back-link .i { width: 16px; height: 16px; }

/* ===== Panels ===== */
.panel-c { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.panel-c + .panel-c { margin-top: 20px; }
.panel-c__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.panel-c__head h2, .panel-c__head h3 { font-size: 16px; display: flex; align-items: center; gap: 10px; }
.panel-c__head h2 .i, .panel-c__head h3 .i { width: 18px; height: 18px; color: var(--text-3); }
.panel-c__body { padding: 22px; }
.panel-c__body--flush { padding: 0; }
.panel-c__foot { padding: 14px 22px; border-top: 1px solid var(--line-2); background: #FAFCFC; border-radius: 0 0 var(--r-lg) var(--r-lg); }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cols--even { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .cols, .cols--even { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }

/* ===== Stat tiles ===== */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }
.tile { display: flex; gap: 14px; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.tile .icon-box { width: 44px; height: 44px; }
.tile__k { font-size: 13px; color: var(--text-3); }
.tile__v { font: 700 24px/1.15 var(--font-en); letter-spacing: -0.02em; margin-top: 2px; }
a.tile:hover { border-color: #C8D5D5; }

/* ===== Tables ===== */
.table-scroll { overflow-x: auto; }
.tbl { width: 100%; font-size: 14.5px; }
.tbl th { text-align: start; font-size: 12.5px; font-weight: 600; color: var(--text-3); padding: 12px 18px; background: #FAFCFC; border-bottom: 1px solid var(--line); white-space: nowrap; }
html[dir="ltr"] .tbl th { text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; }
.tbl td { padding: 14px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FAFCFC; }
.tbl .strong { font-weight: 600; color: var(--text); }
.tbl .sub { display: block; font-size: 13px; color: var(--text-3); margin-top: 2px; }
.tbl .num { font-family: var(--font-en); white-space: nowrap; }
.tbl .actions { text-align: end; white-space: nowrap; }
.row-link { font-weight: 600; color: var(--text); }
.row-link:hover { color: var(--brand); }
.mono { font-family: var(--font-en); font-size: 13.5px; letter-spacing: .01em; }

/* ===== Toolbar / filters ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { position: relative; flex: 1; min-width: 200px; }
.toolbar .search .i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.toolbar input, .toolbar select {
  height: 40px; border-radius: 9px; border: 1px solid #D3DDDD; background: #fff; padding: 0 12px; font-size: 14px; color: var(--text);
}
.toolbar .search input { width: 100%; padding-inline-start: 36px; }
.toolbar select { padding-inline-end: 32px; appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E778D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; }
html[dir="rtl"] .toolbar select { background-position: left 10px center; }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(63, 163, 166, .15); }

/* ===== Tabs (pill filters) ===== */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a, .tabs button { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--text-2); border: 1px solid var(--line); background: #fff; }
.tabs a:hover, .tabs button:hover { border-color: #C5D2D2; }
.tabs a.is-active, .tabs button.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ===== Forms ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.field .error { font-size: 13px; color: #C02626; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #E59393; }
.field input[type="file"] { height: auto; padding: 10px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.bi-field { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .bi-field { grid-template-columns: 1fr; } }
.bi-field__lang { position: relative; }
.bi-field__lang > span { position: absolute; top: 10px; inset-inline-end: 10px; font: 600 10.5px/1 var(--font-en); color: var(--text-3); background: var(--bg-soft); border: 1px solid var(--line); padding: 3px 6px; border-radius: 5px; pointer-events: none; }
.bi-field__lang input { padding-inline-end: 44px; }
.form-section { padding: 22px; border-bottom: 1px solid var(--line-2); }
.form-section:last-child { border-bottom: 0; }
.form-section > h3 { font-size: 15px; margin-bottom: 4px; }
.form-section > p { font-size: 13.5px; color: var(--text-3); margin-bottom: 18px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line-2); background: #FAFCFC; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.btn--danger { background: #fff; color: #C02626; border-color: #F1C4C4; }
.btn--danger:hover { background: #FDECEC; }
.btn--icon { width: 36px; height: 36px; padding: 0; border-radius: 9px; }
.btn--xs { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.inline-form { display: inline; }

/* ===== Description list ===== */
.dl { display: grid; gap: 14px; }
.dl > div { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; font-weight: 600; text-align: end; overflow-wrap: anywhere; }

/* ===== Progress ===== */
.progress { height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-400)); }
.progress-row { display: flex; align-items: center; gap: 12px; font: 600 13px/1 var(--font-en); color: var(--text-2); }
.progress-row .progress { flex: 1; }

/* ===== Stage list ===== */
.stages { display: grid; }
.stage { position: relative; display: grid; grid-template-columns: 32px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; }
.stage:not(:last-child)::after { content: ""; position: absolute; top: 44px; bottom: -12px; inset-inline-start: 15px; width: 2px; background: var(--line-2); }
.stage__dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); background: #fff; color: var(--text-3); font: 700 12px/1 var(--font-en); }
.stage__dot .i { width: 16px; height: 16px; }
.stage--done .stage__dot { background: var(--success); border-color: var(--success); color: #fff; }
.stage--done:not(:last-child)::after { background: #B9E4C8; }
.stage--in_progress .stage__dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.stage__name { font-size: 14.5px; font-weight: 600; }
.stage--pending .stage__name { color: var(--text-3); font-weight: 500; }
.stage__meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.stage__actions { display: flex; gap: 6px; }

/* ===== Order cards (portal) ===== */
.order-list { display: grid; gap: 14px; }
.order-card { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .2s ease, box-shadow .2s ease; }
.order-card:hover { border-color: #C8D5D5; box-shadow: var(--shadow); }
.order-card__title { font-weight: 600; font-size: 15.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-card__meta { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.order-card .progress-row { margin-top: 12px; max-width: 420px; }
@media (max-width: 640px) { .order-card { grid-template-columns: 1fr; } .order-card .icon-box { display: none; } }

/* ===== Chat thread ===== */
.thread { display: grid; gap: 14px; max-height: 520px; overflow-y: auto; padding: 22px; background: #FAFCFC; }
.msg { display: flex; gap: 10px; max-width: 82%; }
.msg__avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--line-2); color: var(--text-2); font: 700 11.5px/1 var(--font-en); }
.msg__bubble { padding: 11px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 14.5px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.msg__meta { font-size: 12px; color: var(--text-3); margin-top: 4px; padding-inline: 4px; }
.msg--mine { margin-inline-start: auto; flex-direction: row-reverse; }
.msg--mine .msg__bubble { background: var(--ink); color: #fff; border-color: var(--ink); }
.msg--mine .msg__meta { text-align: end; }
.msg--team .msg__avatar { background: linear-gradient(140deg, #3FA3A6, var(--brand)); color: #fff; }
.composer { display: flex; gap: 10px; align-items: flex-end; padding: 14px 18px; border-top: 1px solid var(--line-2); }
.composer textarea { flex: 1; min-height: 46px; max-height: 180px; padding: 12px 14px; border-radius: 12px; border: 1px solid #D3DDDD; resize: vertical; font-size: 14.5px; line-height: 1.5; }
.composer textarea:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(63, 163, 166, .15); }

/* ===== Documents ===== */
.docs { display: grid; }
.doc { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.doc:last-child { border-bottom: 0; }
.doc__ext { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-50); color: var(--brand); font: 700 10.5px/1 var(--font-en); }
.doc--team .doc__ext { background: var(--ink); color: #fff; }
.doc__main { flex: 1; min-width: 0; }
.doc__title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc__meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.doc__actions { display: flex; gap: 6px; }
.upload { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; align-items: end; padding: 16px 22px; border-top: 1px solid var(--line-2); background: #FAFCFC; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.upload .field { margin: 0; }
.upload > button { grid-column: 1 / -1; justify-self: end; }
.upload input[type="text"], .upload input[type="file"] { height: 44px; }
.upload input[type="file"] { padding: 8px 10px; font-size: 13.5px; background: #fff; }
@media (max-width: 720px) { .upload { grid-template-columns: 1fr; } }

/* ===== Timeline ===== */
.timeline { display: grid; gap: 0; }
.tl { position: relative; display: flex; gap: 12px; padding-bottom: 16px; font-size: 13.5px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; top: 14px; bottom: 0; inset-inline-start: 4px; width: 1px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl__dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--brand-400); flex-shrink: 0; box-shadow: 0 0 0 3px var(--brand-50); }
.tl__time { font-size: 12px; color: var(--text-3); }

/* ===== Empty state ===== */
.empty { text-align: center; padding: 48px 24px; }
.empty .icon-box { margin: 0 auto 16px; width: 52px; height: 52px; }
.empty h3 { font-size: 16px; }
.empty p { font-size: 14px; color: var(--text-3); margin-top: 6px; max-width: 360px; margin-inline: auto; }
.empty .btn { margin-top: 18px; }

/* ===== Pagination ===== */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line-2); font-size: 13.5px; color: var(--text-3); }
.pager__links { display: flex; gap: 6px; }
.pager__links a, .pager__links span { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--text-2); font: 500 13px/1 var(--font-en); }
.pager__links a:hover { border-color: #C5D2D2; }
.pager__links .is-current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager__links .is-disabled { opacity: .45; }

/* ===== Dropdown (details) ===== */
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd__menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; min-width: 230px;
  background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px;
}
.dd__menu a, .dd__menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; text-align: start; background: none; border: 0; color: inherit; }
.dd__menu a:hover, .dd__menu button:hover { background: var(--bg-soft); }
.dd__menu .i { width: 16px; height: 16px; color: var(--text-3); }
.dd__head { padding: 10px 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.dd__head strong { display: block; font-size: 14px; }
.dd__head span { font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: linear-gradient(140deg, #3FA3A6, var(--brand) 60%, var(--ink)); color: #fff; font: 700 13px/1 var(--font-en); }
.avatar--lg { width: 48px; height: 48px; font-size: 16px; }

/* ===== Notifications list ===== */
.notes { display: grid; }
.note { display: flex; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.note:last-child { border-bottom: 0; }
.note.is-unread { background: #F7FBFE; }
.note .icon-box { width: 38px; height: 38px; }
.note__title { font-weight: 600; font-size: 14.5px; }
.note__body { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.note__time { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* =====================================================================
   Client portal (inside the website)
   ===================================================================== */
.hdr.is-solid { background: rgba(255, 255, 255, .96); color: var(--text); border-bottom-color: var(--line); }
.hdr.is-solid .nav__link:hover { background: var(--bg-soft); }
.hdr.is-solid .lang-btn, .hdr.is-solid .burger { border-color: var(--line); }
.hdr.is-solid .lang-btn:hover { background: var(--bg-soft); }
.hdr-icon { position: relative; width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .22); color: inherit; }
.hdr.is-scrolled .hdr-icon, .hdr.is-solid .hdr-icon { border-color: var(--line); }
.hdr-icon .dot { position: absolute; top: 8px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: #EF4444; box-shadow: 0 0 0 2px #fff; }

.portal { padding: calc(var(--header-h) + 32px) 0 80px; }
.portal__grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.portal__side { position: sticky; top: calc(var(--header-h) + 24px); }
.me { display: flex; align-items: center; gap: 12px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 12px; }
.me strong { display: block; font-size: 14.5px; line-height: 1.3; }
.me > div span { display: block; font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
.side-nav { display: grid; gap: 2px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; font-size: 14.5px; font-weight: 500; color: var(--text-2); background: none; border: 0; width: 100%; text-align: start; }
.side-nav a:hover, .side-nav button:hover { background: var(--bg-soft); color: var(--text); }
.side-nav a.is-active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.side-nav .i { width: 18px; height: 18px; }
.side-nav .count { margin-inline-start: auto; }
.side-nav hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 4px; }
.side-cta { margin-top: 12px; }
@media (max-width: 960px) {
  .portal { padding-top: calc(var(--header-h) + 16px); }
  .portal__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .portal__side { position: static; }
  .me, .side-cta { display: none; }
  .side-nav { display: flex; overflow-x: auto; scrollbar-width: none; padding: 6px; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a, .side-nav button { width: auto; flex-shrink: 0; white-space: nowrap; padding: 8px 12px; font-size: 14px; }
  .side-nav hr { display: none; }
}

.welcome {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 28px 30px; margin-bottom: 24px; border-radius: var(--r-xl); background: var(--ink); color: #fff;
}
.welcome::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px 220px at 100% 0%, rgba(63, 163, 166, .5), transparent 70%); }
.welcome h1 { font-size: clamp(22px, 2.2vw, 28px); }
.welcome p { color: rgba(255, 255, 255, .7); margin-top: 6px; }

.service-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 720px) { .service-pick { grid-template-columns: 1fr; } }
.service-pick label { position: relative; display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.service-pick label:hover { border-color: #C5D2D2; }
.service-pick input { position: absolute; opacity: 0; pointer-events: none; }
.service-pick input:checked + .service-pick__inner { --on: 1; }
.service-pick label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 94, 102, .14); }
.service-pick label:has(input:focus-visible) { outline: 2px solid var(--brand-400); outline-offset: 2px; }
.service-pick__title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.service-pick__desc { font-size: 13.5px; color: var(--text-3); margin-top: 4px; line-height: 1.55; }
.service-pick__meta { font-size: 13px; color: var(--text-2); margin-top: 8px; font-weight: 600; }

.invoice-sheet { padding: 36px; }
@media (max-width: 640px) { .invoice-sheet { padding: 22px; } }
.invoice-sheet__top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.invoice-sheet__amount { font: 700 34px/1.1 var(--font-en); letter-spacing: -0.03em; }
.invoice-lines { width: 100%; margin-top: 24px; font-size: 14.5px; }
.invoice-lines th { text-align: start; color: var(--text-3); font-weight: 600; font-size: 13px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.invoice-lines td { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.invoice-lines .amt { text-align: end; font-family: var(--font-en); white-space: nowrap; }
.invoice-lines tfoot td { font-weight: 700; border-bottom: 0; padding-top: 18px; font-size: 16px; }
.bank-box { margin-top: 24px; padding: 18px; border-radius: 12px; background: var(--bg-soft); border: 1px dashed #CBD4E1; font-size: 14px; white-space: pre-line; line-height: 1.7; }

/* =====================================================================
   Admin panel shell
   ===================================================================== */
.admin { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.aside {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; background: var(--ink); color: rgba(255, 255, 255, .72);
  padding: 20px 14px;
}
.aside .brand { color: #fff; padding: 4px 8px 22px; }
.aside__label { font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .4); padding: 18px 12px 8px; }
html[dir="ltr"] .aside__label { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.aside__nav { display: grid; gap: 2px; }
.aside__nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; font-size: 14.5px; font-weight: 500; transition: background-color .15s ease, color .15s ease; }
.aside__nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.aside__nav a.is-active { background: rgba(143, 211, 207, .14); color: #fff; }
.aside__nav a.is-active .i { color: var(--brand-300); }
.aside__nav .i { width: 18px; height: 18px; }
.aside__nav .count { margin-inline-start: auto; background: rgba(255, 255, 255, .14); }
.aside__nav .count--hot { background: var(--brand); }
.aside__foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; gap: 2px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: 68px;
  display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.topbar__search { position: relative; flex: 1; max-width: 420px; }
.topbar__search .i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.topbar__search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); padding: 0 12px; padding-inline-start: 36px; font-size: 14px; }
.topbar__search input:focus { outline: none; background: #fff; border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(63, 163, 166, .15); }
.topbar__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--text-2); }
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn .dot { position: absolute; top: 8px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: #EF4444; box-shadow: 0 0 0 2px #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
html[dir="rtl"] .user-chip { padding: 4px 4px 4px 10px; }
.user-chip .avatar { width: 32px; height: 32px; font-size: 12px; }
.user-chip span { font-size: 14px; font-weight: 600; }
.content { padding: 28px; max-width: 1360px; width: 100%; }
.aside-toggle { display: none; }
.aside-backdrop { display: none; }

@media (max-width: 1024px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .aside { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 90; width: 280px; transform: translateX(-100%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  html[dir="rtl"] .aside { transform: translateX(100%); }
  body.aside-open .aside { transform: none; visibility: visible; }
  body.aside-open .aside-backdrop { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(12, 44, 49, .45); }
  .aside-toggle { display: grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
  .user-chip span { display: none; }
}
@media (max-width: 560px) { .topbar__search { display: none; } }

/* =====================================================================
   Auth pages
   ===================================================================== */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; background: #fff; }
.auth__panel { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; }
.auth__panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 30% 20%, #000 30%, transparent 100%);
          mask-image: radial-gradient(ellipse 90% 80% at 30% 20%, #000 30%, transparent 100%);
}
.auth__panel::after { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(520px 380px at 90% 10%, rgba(63, 163, 166, .42), transparent 70%), radial-gradient(420px 300px at 0% 100%, rgba(14, 94, 102, .3), transparent 70%); }
.auth__panel .brand { color: #fff; }
.auth__pitch { margin-top: auto; max-width: 460px; }
.auth__pitch h2 { font-size: clamp(28px, 3vw, 38px); }
.auth__pitch p { color: rgba(255, 255, 255, .7); margin-top: 14px; font-size: 16.5px; line-height: 1.7; }
.auth__pitch .checks { margin-top: 28px; }
.auth__copy { margin-top: 48px; font-size: 13px; color: rgba(255, 255, 255, .45); }
.auth__form { display: flex; flex-direction: column; padding: 32px 48px; }
.auth__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth__top .lang-btn { border-color: var(--line); color: var(--text); }
.auth__box { width: 100%; max-width: 420px; margin: auto; padding: 32px 0; }
.auth__box h1 { font-size: 30px; }
.auth__box > p { color: var(--text-3); margin-top: 8px; margin-bottom: 28px; }
.auth__alt { margin-top: 24px; text-align: center; font-size: 14.5px; color: var(--text-3); }
.auth__alt a, .link { color: var(--brand); font-weight: 600; }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 14px; }
.auth__mobile-brand { display: none; }
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth__panel { display: none; }
  .auth__form { padding: 20px; }
  .auth__mobile-brand { display: inline-flex; color: var(--text); }
}

/* ===== Mixed-direction user content ===== */
.msg__bubble, .prewrap, .note__body, .doc__title { unicode-bidi: plaintext; text-align: start; }

/* ===== Utilities ===== */
.text-muted { color: var(--text-3); }
.text-sm { font-size: 13.5px; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 10px; } .gap-3 { gap: 16px; } .wrap { flex-wrap: wrap; } .justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-line; }
.service-pick .icon-box { flex-shrink: 0; width: 44px; height: 44px; }

/* =====================================================================
   Request wizard
   ===================================================================== */
.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 1180px) { .wizard { grid-template-columns: minmax(0, 1fr); } }
.wizard__aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 16px; }
.admin .wizard__aside { top: 92px; }

.stepper { display: flex; gap: 0; margin-bottom: 24px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.stepper a, .stepper span.stepper__item { flex: 1 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text-3); }
.stepper a:hover { background: var(--bg-soft); color: var(--text); }
.stepper__num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 1.5px solid var(--line); font: 600 12px/1 var(--font-en); background: #fff; }
.stepper__num .i { width: 14px; height: 14px; }
.stepper .is-done .stepper__num { background: var(--success); border-color: var(--success); color: #fff; }
.stepper .is-current { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.stepper .is-current .stepper__num { border-color: var(--brand); background: var(--brand); color: #fff; }

.step-card__head { padding: 24px 26px 20px; border-bottom: 1px solid var(--line-2); }
.step-card__head h2 { font-size: 21px; }
.step-card__head p { font-size: 14.5px; color: var(--text-3); margin-top: 6px; }
.step-card__body { padding: 24px 26px 8px; }
.step-card .form-actions { justify-content: space-between; }
@media (max-width: 640px) { .step-card__head, .step-card__body { padding-inline: 18px; } }

.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.choice-cards label { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.choice-cards label:hover { border-color: #C5D2D2; }
.choice-cards input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.choice-cards label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 94, 102, .12); background: #FBFDFF; }
.choice-cards strong { display: block; font-size: 14.5px; }
.choice-cards small { display: block; font-size: 13px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }

.names-list { display: grid; gap: 8px; }
.names-list__row { display: flex; align-items: center; gap: 10px; }
.names-list__rank { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: var(--ink); color: #fff; font: 700 13px/1 var(--font-en); }
.names-list__row:nth-child(2) .names-list__rank { background: var(--ink-3); }
.names-list__row:nth-child(3) .names-list__rank { background: #5B6A92; }
.names-list__row input { flex: 1; }

.uploader { display: grid; gap: 8px; }
.uploader__existing { display: grid; gap: 6px; }
.file-pill { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--success-bg); color: #166534; font-size: 13.5px; }
.file-pill .i { width: 16px; height: 16px; }
.file-pill a { margin-inline-start: auto; font-weight: 600; }
.dropzone { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed #C8D4D4; border-radius: 12px; background: #FAFCFC; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--brand-400); background: var(--brand-50); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone .icon-box { width: 38px; height: 38px; background: #fff; box-shadow: var(--shadow-sm); }
.dropzone__text strong { display: block; font-size: 14px; }
.dropzone__text span { font-size: 12.5px; color: var(--text-3); }
.dropzone.has-file { border-style: solid; border-color: var(--success); background: var(--success-bg); }
.field.has-error .dropzone { border-color: #E59393; background: #FFF7F7; }

.person { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 14px; }
.person__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: #FAFCFC; border-radius: 14px 14px 0 0; }
.person__title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.person__num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font: 700 12px/1 var(--font-en); }
.person__body { padding: 18px 16px 4px; }
.person__body .form-grid { gap: 0 14px; }
.person__docs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px 16px; }
@media (max-width: 720px) { .person__docs { grid-template-columns: 1fr; } }
.person__toggles { display: flex; gap: 18px; flex-wrap: wrap; padding: 4px 0 14px; }
.add-person { width: 100%; height: 52px; border: 1.5px dashed #C8D4D4; border-radius: 14px; background: transparent; color: var(--brand); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.add-person:hover { background: var(--brand-50); border-color: var(--brand-400); }
.ownership-meter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 14px; border-radius: 12px; background: var(--bg-soft); font-size: 14px; }
.ownership-meter strong { font-family: var(--font-en); }
.ownership-meter.is-ok { background: var(--success-bg); color: #166534; }
.ownership-meter.is-off { background: var(--warning-bg); color: #8A5300; }

.addon-list { display: grid; gap: 10px; }
.addon { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.addon:hover { border-color: #C5D2D2; }
.addon input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; }
.addon:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 94, 102, .12); }
.addon__main { flex: 1; }
.addon__main strong { display: block; font-size: 15px; }
.addon__main span { font-size: 13.5px; color: var(--text-3); }
.addon__price { font: 600 15px/1.4 var(--font-en); white-space: nowrap; }

.estimate { display: grid; gap: 10px; font-size: 14px; }
.estimate > div { display: flex; justify-content: space-between; gap: 12px; }
.estimate span { color: var(--text-3); }
.estimate .estimate__total { padding-top: 12px; border-top: 1px solid var(--line-2); font-weight: 700; font-size: 16px; }
.estimate .estimate__total span { color: var(--text); }

.summary-sec + .summary-sec { margin-top: 18px; }
.summary-sec__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.summary-sec__head h3 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
@media (max-width: 720px) { .summary-grid { grid-template-columns: 1fr; } }
.summary-grid .full { grid-column: 1 / -1; }
.summary-item dt { font-size: 12.5px; color: var(--text-3); }
.summary-item dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 500; unicode-bidi: plaintext; overflow-wrap: anywhere; }
.summary-item dd.is-text { white-space: pre-line; }
.ranked { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ranked li { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.ranked li span { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 11px/1 var(--font-en); }
.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .people-grid { grid-template-columns: 1fr; } }
.person-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #FAFCFC; }
.person-card__name { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 10px; }
.person-card dl { display: grid; gap: 6px; margin: 0; font-size: 13.5px; }
.person-card dl div { display: flex; justify-content: space-between; gap: 12px; }
.person-card dt { color: var(--text-3); flex-shrink: 0; }
.person-card dd { margin: 0; text-align: end; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.person-card__docs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.doc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #fff; border: 1px solid var(--line); }
.doc-chip .i { width: 14px; height: 14px; }
.doc-chip--ok { color: #166534; border-color: #C6EBD3; background: var(--success-bg); }
.doc-chip--missing { color: #9F1D1D; border-color: #F6CACA; background: #FDECEC; }

/* ===== Service catalogue (portal) ===== */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 500; color: var(--text-2); }
.cat-tab .i { width: 16px; height: 16px; }
.cat-tab:hover { border-color: #C5D2D2; }
.cat-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat-panel { display: none; }
.cat-panel.is-active { display: block; }
.cat-group + .cat-group { margin-top: 22px; }
.cat-group__title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-3); margin-bottom: 10px; }
.svc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .svc-list { grid-template-columns: 1fr; } }
.svc-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.svc-item:hover { border-color: #C8D5D5; box-shadow: var(--shadow); transform: translateY(-1px); }
.svc-item .icon-box { width: 42px; height: 42px; flex-shrink: 0; }
.svc-item__main { flex: 1; min-width: 0; }
.svc-item__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 15px; }
.svc-item__desc { font-size: 13.5px; color: var(--text-3); margin-top: 4px; line-height: 1.55; }
.svc-item__meta { display: flex; gap: 14px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.svc-item__meta strong { font-family: var(--font-en); }
.form-code { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); font: 600 11.5px/1 var(--font-en); color: var(--text-2); white-space: nowrap; }

.start-hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .start-hero { grid-template-columns: minmax(0, 1fr); } }
.need-list { display: grid; gap: 12px; counter-reset: need; }
.need-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.6; }
.need-list li::before { counter-increment: need; content: counter(need); width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font: 700 13px/1 var(--font-en); }

/* ===== Payment proofs ===== */
.proof { display: flex; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line-2); }
.proof:last-child { border-bottom: 0; }
.proof__preview { width: 120px; height: 120px; flex-shrink: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); display: grid; place-items: center; }
.proof__preview img { width: 100%; height: 100%; object-fit: cover; }
.proof__preview .doc__ext { width: 56px; height: 56px; font-size: 13px; }
.proof__main { flex: 1; min-width: 0; }
.proof__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 12px 0 0; font-size: 13.5px; }
.proof__meta dt { color: var(--text-3); font-size: 12.5px; }
.proof__meta dd { margin: 2px 0 0; font-weight: 600; }
.proof__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.proof__reject { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.proof__reject input { flex: 1; height: 40px; border: 1px solid #D3DDDD; border-radius: 9px; padding: 0 12px; font-size: 14px; }
@media (max-width: 640px) { .proof { flex-direction: column; } .proof__preview { width: 100%; height: 180px; } .proof__meta { grid-template-columns: 1fr; } }

/* ===== Blog editor ===== */
.post-editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1180px) { .post-editor { grid-template-columns: minmax(0, 1fr); } }
.post-editor__side { position: sticky; top: 88px; }
@media (max-width: 1180px) { .post-editor__side { position: static; } }
.post-title-input { font-size: 20px !important; font-weight: 600; height: 54px !important; }
.editor-wrap .tox-tinymce { border: 1px solid #D3DDDD; border-radius: 12px; }
.editor-wrap .tox .tox-toolbar__primary { background: #FAFCFC; }
.editor-wrap .tox .tox-edit-area::before { border-color: var(--brand-400); border-radius: 0 0 11px 11px; }
.editor-wrap textarea[data-editor] { width: 100%; min-height: 420px; padding: 14px; border: 1px solid #D3DDDD; border-radius: 12px; font: inherit; }

.serp { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-family: Arial, var(--font-ar), sans-serif; }
.serp__site { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.serp__fav { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font: 700 9px/1 var(--font-en); flex-shrink: 0; }
.serp__site strong { display: block; font-size: 14px; color: #202124; font-weight: 400; }
.serp__site small { display: block; font-size: 12px; color: #4D5156; direction: ltr; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.serp__site > span { min-width: 0; }
.serp__title { font-size: 20px; line-height: 1.3; color: #1A0DAB; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp__desc { margin-top: 4px; font-size: 14px; line-height: 1.58; color: #4D5156; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.counter { font: 600 12px/1 var(--font-en); color: var(--text-3); }
.counter.is-good { color: var(--success); }
.counter.is-bad { color: var(--warning); }

.seo-check { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; margin-top: 8px; padding: 18px; border-radius: 12px; background: var(--bg-soft); }
@media (max-width: 860px) { .seo-check { grid-template-columns: 1fr; } }
.seo-check__score { display: flex; align-items: center; gap: 14px; }
.seo-check__score strong { display: block; }
.seo-ring { --p: 0; --c: var(--text-3); width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); }
.seo-ring b { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-soft); font: 700 19px/1 var(--font-en); color: var(--text); }
.seo-ring--good { --c: var(--success); }
.seo-ring--ok { --c: #E0A21B; }
.seo-ring--bad { --c: #DC4A4A; }
.seo-check__list { display: grid; gap: 6px; font-size: 13.5px; }
.seo-check__list li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.seo-check__list li::before { content: ""; width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; border-radius: 50%; background: #F6CACA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C02626' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 9px no-repeat; }
.seo-check__list li.is-pass { color: var(--text-2); }
.seo-check__list li.is-pass::before { background: #C6EBD3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316A34A' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat; }
.seo-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font: 600 11.5px/1 var(--font-en); background: var(--line-2); color: var(--text-3); }
.cat-tab .seo-pill { margin-inline-start: 4px; }
.cat-tab.is-active .seo-pill { background: rgba(255, 255, 255, .18); color: #fff; }
.seo-pill--good { background: var(--success-bg); color: var(--success); }
.seo-pill--ok { background: var(--warning-bg); color: var(--warning); }
.seo-pill--bad { background: #FDECEC; color: #C02626; }
.seo-pill--off { background: transparent; border: 1px dashed var(--line); }
.cover-preview { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 10px; margin-bottom: 12px; border: 1px solid var(--line); }
details.panel-c > summary::-webkit-details-marker { display: none; }
.aside .brand { flex-direction: column; align-items: flex-start; gap: 8px; }
.brand__role { font-size: 12px; color: rgba(255, 255, 255, .6); padding-inline-start: 49px; }

/* ===== Quote builder ===== */
.quote-form .choice-cards label.is-checked { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.quote-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.quote-picker select { flex: 1 1 320px; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; }
.quote-lines { margin-top: 16px; display: grid; gap: 8px; }
.quote-line { display: grid; grid-template-columns: minmax(0, 1fr) 70px 120px 100px 40px; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; transition: background-color .6s ease, border-color .6s ease; }
.quote-line.is-new { background: var(--brand-50); border-color: var(--brand-300); }
.quote-line--head { padding: 0 10px; border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--text-3); }
.quote-line input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; font-size: 14px; }
.quote-line input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.quote-line__desc { display: grid; gap: 6px; }
.quote-line__desc .quote-line__details { height: 36px; font-size: 13px; color: var(--text-2); }
.quote-line__total { height: 42px; display: flex; align-items: center; justify-content: flex-end; font-weight: 600; }
.quote-line__remove { width: 40px; height: 42px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--text-3); display: grid; place-items: center; }
.quote-line__remove:hover { color: #C02626; border-color: #F6CACA; background: #FDECEC; }
.quote-line__remove .i { width: 17px; height: 17px; }
@media (max-width: 760px) {
  .quote-line { grid-template-columns: 70px minmax(0, 1fr) 40px; }
  .quote-line__desc { grid-column: 1 / -1; }
  .quote-line__total { justify-content: flex-start; }
  .quote-line--head { display: none; }
}
.quote-aside { position: sticky; top: 84px; }
.quote-discount { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.quote-discount select, .quote-discount input { height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; }
.quote-total { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: #fff; }
.quote-total strong { font-size: 22px; }
@media (max-width: 1024px) { .quote-aside { position: static; } }

/* Quote page */
.quote-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); }
.quote-hero > div { background: #fff; padding: 16px 18px; }
.quote-hero small { display: block; font-size: 12px; color: var(--text-3); }
.quote-hero strong { display: block; margin-top: 4px; font-size: 17px; }
.quote-hero .is-total { background: var(--ink); color: #fff; }
.quote-hero .is-total small { color: rgba(255, 255, 255, .65); }
@media (max-width: 760px) { .quote-hero { grid-template-columns: 1fr 1fr; } }
.send-tile { display: grid; gap: 10px; }
.send-tile textarea, .send-tile input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; background: #fff; }
.send-tile textarea { min-height: 170px; line-height: 1.7; }
.btn--wa { background: #25D366; border-color: #25D366; color: #fff; }
.btn--wa:hover { background: #1EBE5A; border-color: #1EBE5A; }
.pdf-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 12px; background: #F3F7F6; }
.send-tile.cat-panel:not(.is-active) { display: none; }

/* ===== Admin DataTables in the Dawayr style ===== */
.dt-wrap { padding: 0 0 6px; }
.dt-wrap .dt-container { font-size: 14px; }
.dt-wrap div.dt-container div.dt-layout-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 14px 18px; }
.dt-wrap div.dt-container div.dt-layout-row.dt-layout-table { padding: 0; display: block; overflow-x: auto; }
.dt-wrap div.dt-container div.dt-layout-cell { padding: 0; }
.dt-wrap .dt-search { flex: 1; }
.dt-wrap .dt-search input { width: min(420px, 100%); height: 40px; border-radius: 9px; border: 1px solid #D3DDDD; padding: 0 12px 0 36px; margin: 0; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A8789' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center / 16px; font-size: 14px; }
html[dir="rtl"] .dt-wrap .dt-search input { padding: 0 36px 0 12px; background-position: right 12px center; }
.dt-wrap .dt-search input:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(63, 163, 166, .15); }
.dt-wrap .dt-length { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.dt-wrap .dt-length select { height: 36px; border-radius: 8px; border: 1px solid #D3DDDD; padding: 0 8px; background: #fff; }
.dt-wrap .dt-length .select2-container { min-width: 76px; }
.dt-wrap .dt-length .select2-container .select2-selection--single { height: 36px; box-shadow: none; font-size: 13.5px; }
.dt-wrap .dt-info { color: var(--text-3); font-size: 13px; }
.dt-wrap table.dataTable { width: 100% !important; margin: 0; border-collapse: collapse; }
.dt-wrap table.dataTable thead th { text-align: start !important; border-bottom: 1px solid var(--line-2) !important; }
.dt-wrap table.dataTable thead th.dt-orderable-asc, .dt-wrap table.dataTable thead th.dt-orderable-desc { cursor: pointer; }
.dt-wrap table.dataTable thead th:hover { color: var(--text); }
.dt-wrap table.dataTable thead > tr > th .dt-column-order { inset-inline-end: 6px; }
html[dir="rtl"] .dt-wrap table.dataTable thead > tr > th.dt-orderable-asc, html[dir="rtl"] .dt-wrap table.dataTable thead > tr > th.dt-ordering-asc, html[dir="rtl"] .dt-wrap table.dataTable thead > tr > th.dt-ordering-desc, html[dir="rtl"] .dt-wrap table.dataTable thead > tr > th.dt-orderable-desc { padding-left: 30px; padding-right: 16px; }
.dt-wrap table.dataTable > tbody > tr > td { border-top: 1px solid var(--line-2); }
.dt-wrap table.dataTable td.num, .dt-wrap table.dataTable th.num { text-align: start; }
.dt-wrap table.dataTable td.dt-empty { padding: 48px 16px; color: var(--text-3); text-align: center; }
.dt-wrap .dt-paging { display: flex; gap: 4px; }
.dt-wrap .dt-paging nav { display: flex; gap: 4px; }
.dt-wrap div.dt-container .dt-paging .dt-paging-button { min-width: 36px; height: 36px; padding: 0 10px !important; margin: 0 !important; border-radius: 8px !important; border: 1px solid var(--line) !important; background: #fff !important; color: var(--text-2) !important; font-size: 13.5px; }
.dt-wrap div.dt-container .dt-paging .dt-paging-button:hover:not(.disabled) { border-color: var(--brand-400) !important; color: var(--brand) !important; }
.dt-wrap div.dt-container .dt-paging .dt-paging-button.current { background: var(--ink) !important; border-color: var(--ink) !important; color: #fff !important; }
.dt-wrap div.dt-container .dt-paging .dt-paging-button.disabled { opacity: .4; }
.dt-wrap div.dt-processing { top: 72px; margin-top: 0; padding: 10px 18px; width: auto; transform: translateX(-50%); border-radius: 999px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 13px; }
.dt-wrap div.dt-processing > div:last-child { display: none; }
.dt-wrap .dt-container.dt-processing table tbody { opacity: .5; transition: opacity .15s ease; }
.toolbar[data-filters-form]:empty { display: none; }

.dt-wrap div.dt-container div.dt-layout-cell { display: flex; align-items: center; gap: 10px; }
.dt-wrap div.dt-container div.dt-layout-cell.dt-layout-start { flex: 1; justify-content: flex-start; }
.dt-wrap div.dt-container div.dt-layout-cell.dt-layout-end { justify-content: flex-end; }
.dt-wrap div.dt-container div.dt-layout-cell.dt-layout-full { display: block; }
.dt-wrap div.dt-container .dt-search label { display: none; }
@media (max-width: 640px) { .dt-wrap div.dt-container div.dt-layout-row { flex-direction: column; align-items: stretch; } .dt-wrap div.dt-container div.dt-layout-cell { justify-content: center !important; } }
