/* =====================================================================
   DENTEX - Brand stylesheet
   Palette: navy #0B1D36 | teal #00C2A8 | light #E6ECF2 | white #FFF
   Font: Manrope | Direction: RTL (Arabic)
   ===================================================================== */

:root{
  --navy:#0B1D36;
  --navy-2:#13294b;
  --teal:#00C2A8;
  --teal-d:#00a892;
  --light:#E6ECF2;
  --white:#ffffff;
  --ink:#1f2a3a;
  --muted:#6b7a90;
  --line:#e2e8f0;
  --bg:#f5f7fa;
  --green:#16a34a;
  --amber:#d97706;
  --red:#dc2626;
  --blue:#2563eb;
  --radius:14px;
  --radius-sm:9px;
  --shadow:0 6px 24px rgba(11,29,54,.08);
  --shadow-lg:0 14px 40px rgba(11,29,54,.14);
  --sidebar-w:248px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Manrope',system-ui,'Segoe UI',Tahoma,sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.6;
  direction:rtl;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font-family:inherit;cursor:pointer}
input,select,textarea{font-family:inherit}

/* ---- Layout helpers ---- */
.container{max-width:1200px;margin:0 auto;padding:0 20px}
.row{display:flex;gap:18px;flex-wrap:wrap}
.grid{display:grid;gap:18px}
.text-muted{color:var(--muted)}
.text-center{text-align:center}
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.hidden{display:none!important}

/* =====================  BRAND LOGO  ===================== */
.logo{display:inline-flex;align-items:center;gap:10px;font-weight:800;font-size:22px;letter-spacing:.5px}
.logo .mark{width:38px;height:38px;flex:0 0 38px}
.logo-text{color:var(--navy)}
.logo-text .x{color:var(--teal)}
.logo.light .logo-text{color:#fff}

/* =====================  BUTTONS  ===================== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 20px;border:none;border-radius:var(--radius-sm);
  font-weight:700;font-size:15px;transition:.18s;white-space:nowrap;
}
.btn-primary{background:var(--teal);color:#fff}
.btn-primary:hover{background:var(--teal-d)}
.btn-navy{background:var(--navy);color:#fff}
.btn-navy:hover{background:var(--navy-2)}
.btn-ghost{background:transparent;border:1.5px solid var(--line);color:var(--ink)}
.btn-ghost:hover{border-color:var(--teal);color:var(--teal)}
.btn-light{background:#fff;color:var(--navy);border:1.5px solid var(--line)}
.btn-danger{background:var(--red);color:#fff}
.btn-success{background:var(--green);color:#fff}
.btn-wa{background:#25D366;color:#fff}
.btn-sm{padding:7px 14px;font-size:13px}
.btn-block{width:100%}
.btn:disabled{opacity:.55;cursor:not-allowed}

/* =====================  CARDS  ===================== */
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.card-pad{padding:22px}
.card h3{font-size:17px;margin-bottom:4px}

/* =====================  BADGES  ===================== */
.badge{display:inline-block;padding:4px 11px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.badge-blue {background:#e0ecff;color:var(--blue)}
.badge-teal {background:#d6f7f1;color:var(--teal-d)}
.badge-green{background:#dcfce7;color:var(--green)}
.badge-amber{background:#fef3c7;color:var(--amber)}
.badge-red  {background:#fee2e2;color:var(--red)}
.badge-gray {background:#eef1f6;color:var(--muted)}

/* =====================  FORMS  ===================== */
.field{margin-bottom:16px}
.field label{display:block;font-weight:600;font-size:14px;margin-bottom:6px;color:var(--navy)}
.field .hint{font-size:12px;color:var(--muted);margin-top:4px}
.input,select.input,textarea.input{
  width:100%;padding:11px 14px;border:1.5px solid var(--line);border-radius:var(--radius-sm);
  font-size:15px;background:#fff;transition:.15s;color:var(--ink)
}
.input:focus,select.input:focus,textarea.input:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px rgba(0,194,168,.15)}
textarea.input{resize:vertical;min-height:90px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
@media(max-width:640px){.form-grid{grid-template-columns:1fr}}

/* =====================  TABLES  ===================== */
.table-wrap{overflow-x:auto;border-radius:var(--radius);border:1px solid var(--line);background:#fff}
table.tbl{width:100%;border-collapse:collapse;font-size:14px;min-width:640px}
table.tbl th,table.tbl td{padding:13px 14px;text-align:right;border-bottom:1px solid var(--line)}
table.tbl th{background:#f8fafc;font-weight:700;color:var(--navy);white-space:nowrap}
table.tbl tbody tr:hover{background:#fafcff}
table.tbl tbody tr:last-child td{border-bottom:none}

/* =====================  ALERTS / FLASH  ===================== */
.alert{padding:13px 16px;border-radius:var(--radius-sm);font-size:14px;font-weight:600;margin-bottom:14px;border:1px solid}
.alert-success{background:#dcfce7;border-color:#bbf7d0;color:#166534}
.alert-error  {background:#fee2e2;border-color:#fecaca;color:#991b1b}
.alert-info   {background:#e0ecff;border-color:#c7dbff;color:#1e40af}

/* =====================  STAT CARDS  ===================== */
.stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px}
.stat{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;box-shadow:var(--shadow)}
.stat .num{font-size:30px;font-weight:800;color:var(--navy);line-height:1.1}
.stat .lbl{font-size:13px;color:var(--muted);margin-top:4px}
.stat .ico{width:42px;height:42px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#eafaf7;color:var(--teal-d);margin-bottom:10px;font-size:20px}

/* =====================  LAYOUT UTILITIES  ===================== */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media(max-width:1000px){.grid-2{grid-template-columns:1fr}}
.filters{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin-bottom:18px}
.filters .field{margin:0}
.filters .input,.filters select{min-width:160px}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.text-end{text-align:left}
.muted-sm{font-size:12px;color:var(--muted)}
.badge-purple{background:#ede9fe;color:#6d28d9}

/* =====================  APP SHELL (dashboard)  ===================== */
.app{display:flex;min-height:100vh}
.sidebar{
  width:var(--sidebar-w);background:var(--navy);color:#cfd8e6;flex:0 0 var(--sidebar-w);
  position:fixed;right:0;top:0;bottom:0;overflow-y:auto;z-index:40;transition:.25s
}
.sidebar .brand{padding:20px 20px 14px;border-bottom:1px solid rgba(255,255,255,.08)}
.sidebar nav{padding:12px 10px}
.sidebar nav a{
  display:flex;align-items:center;gap:11px;padding:11px 14px;border-radius:10px;
  color:#aab8cc;font-weight:600;font-size:14.5px;margin-bottom:3px;transition:.15s
}
.sidebar nav a .i{width:20px;text-align:center}
.sidebar nav a:hover{background:rgba(255,255,255,.06);color:#fff}
.sidebar nav a.active{background:var(--teal);color:#fff}
.sidebar nav .sep{font-size:11px;color:#5d6e86;padding:14px 14px 6px;letter-spacing:1px;text-transform:uppercase}

.main{margin-right:var(--sidebar-w);flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{
  background:#fff;border-bottom:1px solid var(--line);padding:13px 26px;
  display:flex;align-items:center;gap:16px;position:sticky;top:0;z-index:30
}
.topbar h1{font-size:19px;color:var(--navy);font-weight:800}
.topbar .spacer{flex:1}
.topbar .icon-btn{position:relative;width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:center;font-size:18px}
.topbar .dot{position:absolute;top:6px;left:6px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:var(--red);color:#fff;font-size:10px;display:flex;align-items:center;justify-content:center;font-weight:700}
.userchip{display:flex;align-items:center;gap:10px}
.userchip .av{width:38px;height:38px;border-radius:50%;background:var(--teal);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}
.userchip .nm{font-weight:700;font-size:14px}
.userchip .rl{font-size:12px;color:var(--muted)}
.content{padding:26px;flex:1}
.page-head{display:flex;align-items:center;gap:14px;margin-bottom:20px;flex-wrap:wrap}
.page-head h2{font-size:22px;color:var(--navy)}
.page-head .spacer{flex:1}

.hamburger{display:none;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:20px}
@media(max-width:900px){
  .sidebar{transform:translateX(100%)}
  .sidebar.open{transform:translateX(0)}
  .main{margin-right:0}
  .hamburger{display:flex;align-items:center;justify-content:center}
}

/* =====================  TIMELINE  ===================== */
.timeline{position:relative;padding-right:26px}
.timeline::before{content:"";position:absolute;right:8px;top:6px;bottom:6px;width:2px;background:var(--line)}
.tl-item{position:relative;padding-bottom:20px}
.tl-item::before{content:"";position:absolute;right:-22px;top:4px;width:14px;height:14px;border-radius:50%;background:var(--teal);border:3px solid #fff;box-shadow:0 0 0 2px var(--teal)}
.tl-item.muted::before{background:var(--line);box-shadow:0 0 0 2px var(--line)}
.tl-item .tl-title{font-weight:700;font-size:14.5px}
.tl-item .tl-meta{font-size:12.5px;color:var(--muted)}

/* =====================  CHAT / COMMENTS  ===================== */
.chat{display:flex;flex-direction:column;gap:12px;max-height:420px;overflow-y:auto;padding:4px}
.msg{max-width:78%;padding:10px 14px;border-radius:14px;font-size:14px}
.msg .who{font-size:12px;font-weight:700;margin-bottom:3px}
.msg .tm{font-size:11px;color:var(--muted);margin-top:4px}
.msg.them{background:var(--light);align-self:flex-start;border-top-right-radius:4px}
.msg.me{background:var(--navy);color:#fff;align-self:flex-end;border-top-left-radius:4px}
.msg.me .tm{color:#a9b8cf}
.msg.admin{background:#fff7ed;border:1px solid #fed7aa}

/* =====================  PUBLIC SITE  ===================== */
.site-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:50}
.site-header .container{display:flex;align-items:center;gap:20px;padding-top:14px;padding-bottom:14px}
.site-nav{display:flex;gap:6px;margin-right:auto}
.site-nav a{padding:8px 14px;border-radius:8px;font-weight:600;font-size:15px;color:var(--ink)}
.site-nav a:hover{color:var(--teal)}
.hero{background:linear-gradient(135deg,var(--navy) 0%,var(--navy-2) 60%,#0f3b52 100%);color:#fff;padding:90px 0;position:relative;overflow:hidden}
.hero h1{font-size:46px;font-weight:800;line-height:1.2;margin-bottom:18px}
.hero h1 .x{color:var(--teal)}
.hero p{font-size:19px;color:#c4d0e2;max-width:560px;margin-bottom:28px}
.hero .cta{display:flex;gap:14px;flex-wrap:wrap}
.hero::after{content:"";position:absolute;left:-120px;top:-80px;width:420px;height:420px;border:60px solid rgba(0,194,168,.10);border-radius:50%}
@media(max-width:760px){.hero h1{font-size:32px}.hero{padding:60px 0}}

.section{padding:72px 0}
.section h2{font-size:32px;text-align:center;color:var(--navy);margin-bottom:10px}
.section .sub{text-align:center;color:var(--muted);max-width:560px;margin:0 auto 44px;font-size:17px}
.features{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:22px}
.feature{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:26px;box-shadow:var(--shadow);transition:.2s}
.feature:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}
.feature .ico{width:52px;height:52px;border-radius:13px;background:#eafaf7;color:var(--teal-d);display:flex;align-items:center;justify-content:center;font-size:24px;margin-bottom:14px}
.feature h3{font-size:18px;color:var(--navy);margin-bottom:6px}
.feature p{font-size:14.5px;color:var(--muted)}

.steps{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:22px;counter-reset:step}
.step{position:relative;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:26px 22px;box-shadow:var(--shadow)}
.step .n{width:42px;height:42px;border-radius:50%;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px;margin-bottom:12px}
.step h3{font-size:17px;color:var(--navy);margin-bottom:6px}
.step p{font-size:14px;color:var(--muted)}

.alt{background:var(--navy);color:#fff}
.alt h2{color:#fff}.alt .sub{color:#b9c6da}

.price-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:22px;max-width:740px;margin:0 auto}
.price{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:30px;text-align:center;box-shadow:var(--shadow)}
.price .amt{font-size:40px;font-weight:800;color:var(--teal-d)}
.price .amt small{font-size:16px;color:var(--muted);font-weight:600}

.site-footer{background:var(--navy);color:#aab8cc;padding:46px 0 24px}
.site-footer .cols{display:grid;grid-template-columns:2fr 1fr 1fr;gap:30px;margin-bottom:28px}
.site-footer h4{color:#fff;margin-bottom:12px;font-size:16px}
.site-footer a{display:block;padding:4px 0;font-size:14px}
.site-footer a:hover{color:var(--teal)}
.site-footer .copy{border-top:1px solid rgba(255,255,255,.1);padding-top:18px;font-size:13px;text-align:center}
@media(max-width:700px){.site-footer .cols{grid-template-columns:1fr}.site-nav{display:none}}

/* =====================  AUTH PAGES  ===================== */
.auth-wrap{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}
.auth-side{background:linear-gradient(135deg,var(--navy),#0f3b52);color:#fff;padding:60px;display:flex;flex-direction:column;justify-content:center;position:relative;overflow:hidden}
.auth-side h2{font-size:30px;margin:20px 0 12px}
.auth-side p{color:#c4d0e2;font-size:16px}
.auth-side .pts{margin-top:26px;display:flex;flex-direction:column;gap:12px}
.auth-side .pts div{display:flex;align-items:center;gap:10px;font-size:15px}
.auth-side::after{content:"";position:absolute;left:-90px;bottom:-90px;width:300px;height:300px;border:50px solid rgba(0,194,168,.12);border-radius:50%}
.auth-form{display:flex;align-items:center;justify-content:center;padding:40px}
.auth-card{width:100%;max-width:420px}
.auth-card h1{font-size:26px;color:var(--navy);margin-bottom:6px}
.auth-tabs{display:flex;gap:8px;background:var(--light);padding:5px;border-radius:11px;margin-bottom:22px}
.auth-tabs a{flex:1;text-align:center;padding:9px;border-radius:8px;font-weight:700;font-size:14px;color:var(--muted)}
.auth-tabs a.active{background:#fff;color:var(--navy);box-shadow:var(--shadow)}
@media(max-width:860px){.auth-wrap{grid-template-columns:1fr}.auth-side{display:none}}

/* =====================  MISC  ===================== */
.divider{height:1px;background:var(--line);margin:18px 0}
.kv{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px dashed var(--line);font-size:14px}
.kv:last-child{border-bottom:none}
.kv .k{color:var(--muted)}
.kv .v{font-weight:700;color:var(--navy)}
.file-row{display:flex;align-items:center;gap:12px;padding:11px 14px;border:1px solid var(--line);border-radius:10px;margin-bottom:8px;background:#fff}
.file-row .fi{width:38px;height:38px;border-radius:9px;background:#eafaf7;color:var(--teal-d);display:flex;align-items:center;justify-content:center;font-size:18px}
.file-row .meta{flex:1;min-width:0}
.file-row .nm{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-row .sm{font-size:12px;color:var(--muted)}
.empty{text-align:center;padding:50px 20px;color:var(--muted)}
.empty .ico{font-size:46px;margin-bottom:10px;opacity:.5}
