/* ═══════════════════════════════════════════════
   Qlclick Inventory SaaS — Styles
   qlclick.com | v1.0.0
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  --ql-teal:       #0F6E56;
  --ql-teal-mid:   #1D9E75;
  --ql-teal-light: #E1F5EE;
  --ql-teal-dark:  #085041;
  --ql-red:        #A32D2D;
  --ql-red-light:  #FCEBEB;
  --ql-amber:      #BA7517;
  --ql-amber-light:#FAEEDA;
  --ql-purple:     #534AB7;
  --ql-purple-light:#EEEDFE;
  --ql-gray:       #F4F3EF;
  --ql-border:     #E0DDD6;
  --ql-text:       #1A1A18;
  --ql-muted:      #6B6B66;
  --ql-white:      #FFFFFF;
  --ql-shadow:     0 1px 4px rgba(0,0,0,.06);
  --ql-shadow-md:  0 4px 20px rgba(0,0,0,.08);
  --ql-radius:     14px;
  --ql-radius-sm:  9px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  background: var(--ql-gray);
  color: var(--ql-text);
  direction: rtl;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════
   PAGE WRAPPER
══════════════════════════════════════════════ */
.ql-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, #E8F5EF 0%, #F4F3EF 50%, #EEF0FD 100%);
}

/* ══════════════════════════════════════════════
   AUTH CARD
══════════════════════════════════════════════ */
.ql-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--ql-white);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
  border: 1px solid var(--ql-border);
}

.ql-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.ql-logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--ql-teal-dark), var(--ql-teal-mid));
  border-radius: 18px;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 6px 20px rgba(15,110,86,.3);
}

.ql-logo h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ql-teal-dark);
  margin-bottom: 4px;
}

.ql-logo p {
  font-size: 13px;
  color: var(--ql-muted);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════════════════ */
.ql-form { display: flex; flex-direction: column; gap: 14px; }

.ql-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ql-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ql-field input,
.ql-field select {
  width: 100%;
  border: 1.5px solid var(--ql-border);
  border-radius: var(--ql-radius-sm);
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ql-text);
  background: var(--ql-white);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  direction: rtl;
}

.ql-field input:focus,
.ql-field select:focus {
  border-color: var(--ql-teal-mid);
  box-shadow: 0 0 0 3px rgba(29,158,117,.1);
}

/* Phone input */
.ql-phone-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ql-border);
  border-radius: var(--ql-radius-sm);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}

.ql-phone-input:focus-within {
  border-color: var(--ql-teal-mid);
  box-shadow: 0 0 0 3px rgba(29,158,117,.1);
}

.ql-flag {
  padding: 11px 12px;
  background: var(--ql-gray);
  font-size: 13px;
  white-space: nowrap;
  color: var(--ql-text);
  border-left: 1.5px solid var(--ql-border);
  flex-shrink: 0;
}

.ql-phone-input input {
  border: none;
  border-radius: 0;
  flex: 1;
  box-shadow: none !important;
  padding: 11px 12px;
  font-size: 16px;
  direction: ltr;
  text-align: left;
}

/* Buttons */
.ql-btn {
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: var(--ql-radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ql-btn-primary {
  background: linear-gradient(135deg, var(--ql-teal-dark), var(--ql-teal-mid));
  color: #fff;
  box-shadow: 0 4px 14px rgba(15,110,86,.28);
}

.ql-btn-primary:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); }
.ql-btn-primary:active:not(:disabled) { transform: translateY(0); }
.ql-btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.ql-btn-ghost {
  background: var(--ql-gray);
  color: var(--ql-muted);
  border: 1px solid var(--ql-border);
}

.ql-btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

.ql-hint {
  font-size: 12px;
  color: var(--ql-muted);
  text-align: center;
  line-height: 1.5;
}

.ql-hint a { color: var(--ql-teal); text-decoration: none; font-weight: 500; }
.ql-hint a:hover { text-decoration: underline; }

.ql-error {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 7px;
  background: var(--ql-red-light);
  display: none;
}

/* ══════════════════════════════════════════════
   OTP BOXES
══════════════════════════════════════════════ */
.ql-otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  direction: ltr;
}

.ql-otp-box {
  width: 48px;
  height: 56px;
  border: 2px solid var(--ql-border);
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--ql-text);
  background: var(--ql-white);
  outline: none;
  transition: all .15s;
}

.ql-otp-box:focus {
  border-color: var(--ql-teal-mid);
  box-shadow: 0 0 0 3px rgba(29,158,117,.1);
  transform: scale(1.05);
}

/* ══════════════════════════════════════════════
   PLAN SELECTOR
══════════════════════════════════════════════ */
.ql-plan-selector { margin: 4px 0; }
.ql-plan-title { font-size: 12px; font-weight: 600; color: var(--ql-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }

.ql-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.ql-plan {
  border: 2px solid var(--ql-border);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}

.ql-plan:hover { border-color: var(--ql-teal-mid); }

.ql-plan.selected {
  border-color: var(--ql-teal-mid);
  background: var(--ql-teal-light);
}

.ql-plan.ql-plan-popular { border-color: var(--ql-teal); }
.ql-plan.ql-plan-popular.selected { background: var(--ql-teal-light); }

.ql-plan-badge { font-size: 9px; color: var(--ql-teal-dark); font-weight: 600; margin-bottom: 4px; }
.ql-plan-name  { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.ql-plan-price { font-size: 14px; font-weight: 700; color: var(--ql-teal-dark); }
.ql-plan-price span { font-size: 10px; font-weight: 400; color: var(--ql-muted); }
.ql-plan-features { font-size: 10px; color: var(--ql-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════════ */
.ql-dashboard {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem 1rem 5rem;
}

.ql-dash-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 0 1.25rem;
}

.ql-dash-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--ql-teal-dark), var(--ql-teal-mid));
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ql-dash-title { flex: 1; }
.ql-dash-title h1 { font-size: 17px; font-weight: 700; }
.ql-dash-title p  { font-size: 12px; color: var(--ql-muted); margin-top: 2px; }

.ql-avatar-btn {
  background: var(--ql-gray);
  border: 1px solid var(--ql-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  color: var(--ql-muted);
}

.ql-plan-banner {
  border: 1.5px solid;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  background: var(--ql-white);
}

.ql-client-id {
  font-size: 11px;
  font-weight: 400;
  color: var(--ql-muted);
  font-family: monospace;
}

/* Quick Actions */
.ql-quick-actions { margin-bottom: 1rem; }

.ql-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--ql-teal-dark), var(--ql-teal-mid));
  color: #fff;
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(15,110,86,.28);
  transition: transform .15s, opacity .15s;
}

.ql-action-card:hover { transform: translateY(-2px); opacity: .95; }

.ql-action-icon  { font-size: 28px; }
.ql-action-label { flex: 1; font-size: 16px; font-weight: 600; }
.ql-action-arrow { font-size: 20px; opacity: .7; }

/* Stats */
.ql-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1rem;
}

.ql-stat-card {
  background: var(--ql-white);
  border-radius: var(--ql-radius);
  border: 1px solid var(--ql-border);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--ql-shadow);
}

.ql-stat-icon { font-size: 22px; margin-bottom: 6px; }
.ql-stat-val  { font-size: 22px; font-weight: 700; color: var(--ql-teal-dark); margin-bottom: 3px; }
.ql-stat-lbl  { font-size: 11px; color: var(--ql-muted); }

/* Card */
.ql-card {
  background: var(--ql-white);
  border-radius: var(--ql-radius);
  border: 1px solid var(--ql-border);
  margin-bottom: 1rem;
  box-shadow: var(--ql-shadow);
  overflow: hidden;
}

.ql-card-header {
  padding: .9rem 1.25rem;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--ql-border);
  background: var(--ql-gray);
}

.ql-card-body { padding: 1rem 1.25rem; }

/* Menu Grid */
.ql-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1rem;
}

.ql-menu-item {
  background: var(--ql-white);
  border-radius: var(--ql-radius);
  border: 1px solid var(--ql-border);
  padding: 1rem 8px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ql-text);
  box-shadow: var(--ql-shadow);
}

.ql-menu-item:hover {
  border-color: var(--ql-teal-mid);
  background: var(--ql-teal-light);
  transform: translateY(-2px);
  box-shadow: var(--ql-shadow-md);
}

.ql-menu-item span:first-child { font-size: 24px; }

/* Spinner */
.ql-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--ql-teal-light);
  border-top-color: var(--ql-teal-mid);
  border-radius: 50%;
  animation: ql-spin .7s linear infinite;
  margin: 1rem auto;
}

@keyframes ql-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 400px) {
  .ql-auth-card    { padding: 2rem 1.25rem; }
  .ql-otp-box      { width: 42px; height: 50px; font-size: 20px; }
  .ql-plans        { grid-template-columns: 1fr; gap: 6px; }
  .ql-stats-grid   { grid-template-columns: repeat(3, 1fr); }
  .ql-menu-grid    { grid-template-columns: repeat(3, 1fr); }
}

/* ══════════════════════════════════════════════
   WORDPRESS PAGE CLEANUP
══════════════════════════════════════════════ */
.ql-dashboard ~ .site-footer,
.ql-page ~ .site-footer { display: none; }

/* إخفاء header وfooter في صفحات التطبيق — اختياري */
body.page-template-default .site-header { display: none; }
