/* ISTMARA by TOPDELMON — الهوية البصرية الموحّدة
   يُستدعى بكل صفحات النظام قبل أي CSS آخر. */

@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@400;500;700;900&display=swap');

:root {
  /* الألوان */
  --ist-bg:            #181818;
  --ist-surface:       rgba(255, 255, 255, 0.04);
  --ist-surface-2:     rgba(255, 255, 255, 0.03);
  --ist-border:        rgba(255, 255, 255, 0.07);
  --ist-border-strong: rgba(255, 255, 255, 0.12);
  --ist-text:          #FFFFFF;
  --ist-text-muted:    #AAAAA9;
  --ist-accent:        #FFC725;
  --ist-on-accent:     #111111;

  /* درجات الذهبي المشتقة */
  --ist-accent-08:     rgba(255, 199, 37, 0.08);
  --ist-accent-14:     rgba(255, 199, 37, 0.14);
  --ist-accent-22:     rgba(255, 199, 37, 0.22);
  --ist-accent-45:     rgba(255, 199, 37, 0.45);
  --ist-accent-glow:   0 0 30px rgba(255, 199, 37, 0.07);

  /* الخط */
  --ist-font:          'Noto Kufi Arabic', system-ui, sans-serif;
  --ist-w-title:       900;
  --ist-w-body:        400;

  /* المقاسات */
  --ist-radius:        16px;
  --ist-radius-sm:     10px;
  --ist-radius-pill:   999px;
  --ist-shadow-card:   0 18px 40px rgba(0, 0, 0, 0.45);
  --ist-shadow-float:  0 28px 70px rgba(0, 0, 0, 0.55);
  --ist-grid-dots:     radial-gradient(rgba(255, 199, 37, 0.05) 1px, transparent 1px);
}

html { direction: rtl; }

body {
  margin: 0;
  background: var(--ist-bg);
  color: var(--ist-text);
  font-family: var(--ist-font);
  font-weight: var(--ist-w-body);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, .ist-title { font-weight: var(--ist-w-title); margin: 0; }

a { color: var(--ist-accent); text-decoration: none; }
a:hover { color: #ffd75c; }

/* الأرقام دائمًا إنجليزية داخل النص العربي */
.ist-num { direction: ltr; unicode-bidi: embed; font-variant-numeric: tabular-nums; }

/* --- مكوّنات أساسية قابلة لإعادة الاستخدام --- */

.ist-page-bg {
  min-height: 100vh;
  background-color: var(--ist-bg);
  background-image: var(--ist-grid-dots);
  background-size: 26px 26px;
}

.ist-card {
  background: var(--ist-surface);
  border: 1px solid var(--ist-border);
  border-radius: var(--ist-radius);
}

.ist-card--interactive {
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.ist-card--interactive:hover {
  transform: translateY(-4px);
  border-color: var(--ist-accent-45);
  box-shadow: var(--ist-shadow-card), var(--ist-accent-glow);
}

.ist-btn {
  padding: 14px 30px;
  background: var(--ist-accent);
  color: var(--ist-on-accent);
  border: none;
  border-radius: var(--ist-radius-sm);
  font-family: var(--ist-font);
  font-weight: var(--ist-w-title);
  font-size: 14.5px;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s;
}
.ist-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 199, 37, 0.28);
}

.ist-btn--ghost {
  background: transparent;
  color: var(--ist-text-muted);
  border: 1px solid var(--ist-border-strong);
  box-shadow: none;
}
.ist-btn--ghost:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--ist-accent-45);
  color: var(--ist-accent);
}

.ist-input {
  width: 100%;
  padding: 13px 15px;
  background: var(--ist-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--ist-radius-sm);
  color: var(--ist-text);
  font-family: var(--ist-font);
  font-size: 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.ist-input:focus {
  border-color: rgba(255, 199, 37, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 199, 37, 0.12);
}
.ist-input::placeholder { color: var(--ist-text-muted); opacity: .7; }

.ist-label { font-size: 12.5px; color: var(--ist-text-muted); }

.ist-icon-box {
  width: 52px; height: 52px;
  border-radius: 13px;
  background: var(--ist-accent-08);
  border: 1px solid var(--ist-accent-22);
  display: flex; align-items: center; justify-content: center;
}

.ist-dropzone {
  border: 2px dashed rgba(255, 199, 37, 0.32);
  border-radius: 14px;
  background: rgba(255, 199, 37, 0.02);
  padding: 56px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.ist-dropzone:hover,
.ist-dropzone.is-dragover {
  border-color: rgba(255, 199, 37, 0.7);
  background: rgba(255, 199, 37, 0.05);
}

.ist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 20px;
}
