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

:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #14233c;
    --muted: #708099;
    --line: #e4ebf5;
    --primary: #2f6fed;
    --primary-soft: #edf3ff;
    --dark: #0f172d;
    --success: #21b479;
    --warning: #f4ab16;
    --danger: #de4e4e;
    --rose: #fef0f0;
    --coral: #fff1ea;
    --radius: 24px;
    --shadow: 0 18px 50px rgba(15, 27, 51, 0.08);
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { margin: 0; font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.narrow { width: min(980px, calc(100% - 32px)); }
.mt-18 { margin-top: 18px; }
.mb-18 { margin-bottom: 18px; }
.full { grid-column: 1 / -1; }
.link-primary { color: var(--primary); font-weight: 700; }
.site-header, .hero-grid, .cards-3, .dashboard-grid, .stats-grid, .details-grid, .form-grid, .role-cards, .financial-grid, .auth-grid { display: grid; gap: 18px; }
.site-header { grid-template-columns: auto 1fr; align-items: center; padding: 24px 0; }
.site-header nav { display: flex; gap: 12px; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
.logo-wrap, .logo-wrap.centered, .brand { display: flex; gap: 12px; align-items: center; }
.logo-wrap.centered { justify-content: center; }
.brand strong { display:block; }
.brand small { color: var(--muted); }
.brand-mark { width: 46px; height: 46px; display: inline-grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, var(--primary), #7ea6ff); color: #fff; font-weight: 700; box-shadow: 0 12px 24px rgba(47,111,237,.25); }
.hero { background: radial-gradient(circle at top left, rgba(47,111,237,.12), transparent 25%), radial-gradient(circle at top right, rgba(244,171,22,.10), transparent 22%), #fff; padding-bottom: 46px; }
.hero-grid { grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero h1 { font-size: 54px; line-height: 1.2; margin: 18px 0; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.9; }
.pill { display: inline-block; padding: 8px 14px; border-radius: 999px; background: #eef4ff; color: var(--primary); font-size: 14px; }
.actions, .trust-row, .inline-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.actions { margin-top: 22px; }
.trust-row span, .inline-meta span { background: #f7f9fd; border: 1px solid var(--line); padding: 10px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; }
.btn { border: 0; border-radius: 14px; padding: 13px 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: inherit; transition: .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 10px 20px rgba(47,111,237,.18); }
.btn.ghost { background: #fff; border: 1px solid var(--line); }
.btn.small { padding: 9px 14px; font-size: 13px; }
.btn.danger { background: #fff1f1; color: var(--danger); border: 1px solid #ffd6d6; }
.mockup-card, .card, .auth-card, .panel, .sidebar, .topbar, .flash { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.mockup-card { padding: 24px; }
.mockup-header { height: 22px; width: 45%; background: #edf2fb; border-radius: 999px; margin-bottom: 20px; }
.mockup-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric, .stat-card { padding: 18px; border-radius: 18px; }
.metric span, .stat-card span { display:block; color: var(--muted); }
.blue { background: #eaf2ff; color: #2f6fed; }
.mint { background: #e9faf4; color: #149f6f; }
.lavender { background: #f3ecff; color: #825ae5; }
.sand { background: #fff7e7; color: #b77b00; }
.rose { background: #fff1f1; color: #b43333; }
.coral { background: #fff1ea; color: #ca6c29; }
.mockup-list div { height: 15px; background: #eff3fa; border-radius: 999px; margin-top: 12px; }
.section { padding: 38px 0 60px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card, .panel, .auth-card { padding: 24px; }
.featured { border: 2px solid var(--primary); }
.simple-page { padding: 48px 0; }
.faq-item { background: #fff; padding: 18px 20px; border-radius: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.auth-wrapper { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(560px, 100%); }
.auth-card--wide { width: min(1100px, 100%); }
.auth-grid { grid-template-columns: 1fr 1fr; align-items: center; }
.auth-copy { padding-inline-end: 24px; }
.auth-copy h1 { font-size: 42px; line-height: 1.25; margin: 16px 0; }
.auth-card h1, .simple-page h1 { font-size: 40px; margin: 10px 0 22px; }
.form-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid label { display: grid; gap: 8px; color: var(--muted); font-weight: 700; }
input, select, textarea { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid #d9dee8; background: #fff; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #94b4ff; box-shadow: 0 0 0 4px rgba(47,111,237,.12); }
.role-cards { grid-template-columns: repeat(2, 1fr); }
.role-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; text-align: center; font-weight: 700; }
.role-card.active { border-color: var(--warning); box-shadow: inset 0 0 0 1px var(--warning); }
.onboarding-card { border: 1px solid var(--line); }
.section-title { font-size: 18px; font-weight: 700; margin-top: 6px; color: var(--dark); }
.stepper { display: flex; gap: 14px; margin-bottom: 18px; }
.stepper span { width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; background: #e7ecf5; color: var(--dark); font-weight: 700; }
.stepper span.active { background: var(--warning); color: #fff; }
.stepper-wide { margin: 26px 0; }
.muted { color: var(--muted); }
.flash { position: fixed; top: 18px; left: 18px; z-index: 50; padding: 14px 18px; }
.flash.success { border-right: 4px solid var(--success); }
.flash.error { border-right: 4px solid var(--danger); }
.dashboard-shell { display: grid; grid-template-columns: 290px minmax(0,1fr); min-height: 100vh; gap: 22px; padding: 22px; }
.sidebar { padding: 22px; position: sticky; top: 22px; height: calc(100vh - 44px); overflow: auto; }
.brand--sidebar { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sidebar nav { display: grid; gap: 8px; margin-top: 18px; }
.sidebar nav a { padding: 12px 14px; border-radius: 14px; color: var(--muted); font-weight: 600; }
.sidebar nav a:hover, .sidebar nav a.active { background: var(--primary-soft); color: var(--primary); }
.sidebar nav .danger { color: var(--danger); margin-top: 10px; }
.main-panel { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px; margin-bottom: 18px; }
.topbar-main { display:flex; align-items:center; gap:16px; }
.topbar h1 { margin:0; font-size: 30px; }
.topbar p { margin:4px 0 0; color: var(--muted); }
.user-chip { background: #f2f5fb; padding: 12px 16px; border-radius: 999px; white-space: nowrap; }
.burger { display:none; width:46px; height:46px; border:0; border-radius:14px; background:var(--dark); padding:12px 10px; cursor:pointer; }
.burger span { display:block; height:2px; border-radius:999px; background:#fff; margin:5px 0; }
.mobile-backdrop { display:none; }
.stats-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.stats-grid.five { grid-template-columns: repeat(5, 1fr); }
.stats-grid.four { grid-template-columns: repeat(4, 1fr); }
.stat-card strong, .metric strong { font-size: 28px; display: block; margin-top: 8px; }
.dashboard-grid { grid-template-columns: 1.25fr .75fr; }
.dashboard-grid--home { align-items: start; }
.panel.wide { grid-column: 1 / -1; }
.hero-panel { overflow: hidden; }
.property-hero { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; }
.compact-hero { grid-template-columns: 280px 1fr; }
.property-hero img { width: 100%; height: 170px; object-fit: cover; border-radius: 18px; }
.clean-list, .list-items { list-style: none; padding: 0; margin: 0; }
.clean-list li, .list-items li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.list-items li { flex-direction: column; align-items: flex-start; }
.list-items small { color: var(--muted); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { text-align: right; padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { color: var(--muted); font-size: 14px; background:#fbfcfe; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap:16px; margin-bottom: 18px; }
.section-head h3 { margin:0; }
.details-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
.details-grid > div { background:#fbfcfe; border:1px solid var(--line); border-radius:18px; padding:18px; }
.details-grid .full { grid-column: 1 / -1; }
.empty-state { text-align:center; color:var(--muted); padding:28px 16px !important; }
.financial-grid { grid-template-columns: repeat(3, 1fr); }
.logo-preview { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.actions-cell { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions-cell form { margin: 0; }
.badge { display:inline-flex; align-items:center; padding: 8px 10px; border-radius:999px; background:#f3f6fb; color:var(--dark); font-size:13px; }
@media (max-width: 1100px) {
  .stats-grid.five { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .hero-grid, .cards-3, .dashboard-grid, .stats-grid, .site-header, .form-grid, .role-cards, .details-grid, .financial-grid, .auth-grid { grid-template-columns: 1fr; }
  .site-header nav { justify-content: flex-start; }
  .hero h1 { font-size: 38px; }
  .property-hero, .compact-hero { grid-template-columns: 1fr; }
  .dashboard-shell { grid-template-columns: 1fr; padding: 14px; }
  .sidebar { position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 84vw); z-index: 70; border-radius: 0; transform: translateX(100%); transition: transform .25s ease; }
  .dashboard-shell.sidebar-open .sidebar { transform: translateX(0); }
  .dashboard-shell.sidebar-open .mobile-backdrop { display:block; position:fixed; inset:0; background: rgba(15,27,51,.35); z-index: 60; }
  .topbar { padding: 18px; }
  .topbar h1 { font-size:24px; }
  .topbar-main { align-items:flex-start; }
  .burger { display:inline-block; }
}
@media (max-width: 640px) {
  .container, .narrow { width: min(100% - 20px, 1180px); }
  .auth-card h1, .simple-page h1, .auth-copy h1 { font-size: 30px; }
  .card, .panel, .auth-card, .topbar, .sidebar, .mockup-card { padding: 18px; }
  .section-head { align-items:flex-start; flex-direction:column; }
  .topbar { flex-direction: column; align-items: stretch; }
  .topbar-main { width:100%; }
  .user-chip { align-self: flex-start; }
}
