/* =====================================================================
   دى بانل / دي هوست — الأساس المشترك
   الخط: Rubik متغير محلي — نفس خط دي ستوديوز
   RTL كامل — الخصائص المنطقية في كل حاجة
===================================================================== */

@font-face {
  font-family: 'Rubik';
  src: url('/assets/fonts/rubik.ttf') format('truetype-variations');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Rubik', system-ui, 'Segoe UI', Tahoma, sans-serif;
  font-size: 17px;
  line-height: 28px;
  font-weight: 400;
  direction: rtl;
  text-align: right;
}

h1, h2, h3, h4, h5, h6 { margin: 0 0 12px; font-weight: 500; line-height: 1.3; }
p { margin: 0 0 14px; }
a { text-decoration: none; color: inherit; }
img, svg { max-width: 100%; vertical-align: middle; }
ul, ol { margin: 0; padding: 0; }
code, .mono, textarea.code { direction: ltr; text-align: left; font-family: ui-monospace, Consolas, monospace; }

::selection { background: rgba(38, 140, 241, .35); }

:focus-visible { outline: 2px solid var(--ac, #268CF1); outline-offset: 2px; }

/* الحاوية — زي دي ستوديوز بالظبط */
.wrap { width: min(1320px, 100% - 48px); margin-inline: auto; }

/* الأزرار — بيضاوية بارتفاع ٤٨ زي القالب */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  font: 500 15px/1 'Rubik', sans-serif; border: 2px solid transparent;
  cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.big { min-height: 56px; padding: 0 34px; font-size: 16px; }
.btn.tiny { min-height: 34px; padding: 0 16px; font-size: 13px; border-width: 1px; }
.btn.block { width: 100%; }

/* النماذج */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; opacity: .55; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: transparent; color: var(--tx);
  border: 2px solid var(--muted); border-radius: 12px;
  padding: 10px 18px; font: 400 15px/22px 'Rubik', sans-serif;
  transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ac); color: var(--tx);
}
.field textarea { min-height: 120px; resize: vertical; }
.field .err { color: var(--bad); font-size: 13px; margin-top: 4px; display: block; }
.field input.invalid, .field textarea.invalid { border-color: var(--bad); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: .8; }
.check input { width: 17px; height: 17px; accent-color: var(--ac); }

/* الشارات */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 500;
}

/* رسائل التنبيه */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-radius: 12px; font-size: 14.5px; margin-bottom: 18px;
}
.flash.ok  { background: rgba(46, 158, 107, .12); color: #86dcb3; }
.flash.err { background: rgba(214, 69, 69, .10); color: #ff9d9d; }
.flash.warn{ background: rgba(201, 138, 26, .10); color: #f2c26b; }
.flash.info{ background: rgba(38, 140, 241, .12); color: #8fc4f7; }

/* شبكات عامة */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  body { font-size: 15px; line-height: 24px; }
}
