/* ==========================================================
   موتورپیک - استایل اصلی
   تم: قرمز (#E63939) + سفید | فونت: Vazirmatn
   ========================================================== */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root{
  --primary:#E63939;
  --primary-dark:#C42D2D;
  --primary-light:#FFEDED;
  --primary-soft:#FFF5F5;
  --text-dark:#242424;
  --text-muted:#8A8A8A;
  --border-color:#F0E4E4;
  --bg:#FAFAFA;
  --white:#ffffff;
  --success:#2FB870;
  --warning:#F0A93C;
  --danger:#E63939;
  --info:#3B82C4;
  --radius:16px;
  --radius-sm:10px;
  --shadow:0 4px 20px rgba(230,57,57,0.08);
  --shadow-lg:0 12px 32px rgba(230,57,57,0.14);
}

*{box-sizing:border-box; margin:0; padding:0;}

html,body{
  font-family:'Vazirmatn', Tahoma, sans-serif;
  background:var(--bg);
  color:var(--text-dark);
  direction:rtl;
  -webkit-tap-highlight-color:transparent;
  scroll-behavior:smooth;
}

body{padding-bottom:78px;}

a{text-decoration:none; color:inherit;}
button{font-family:inherit; cursor:pointer; border:none;}
input, select, textarea{font-family:inherit;}
ul{list-style:none;}

::-webkit-scrollbar{width:6px; height:6px;}
::-webkit-scrollbar-thumb{background:var(--primary-light); border-radius:10px;}

/* ---------------- Layout ---------------- */
.container{max-width:520px; margin:0 auto; padding:0 16px;}
.page{animation:fadeIn .35s ease;}
@keyframes fadeIn{from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);}}

/* ---------------- Top bar ---------------- */
.topbar{
  position:sticky; top:0; z-index:40;
  background:var(--white);
  padding:14px 16px;
  display:flex; align-items:center; justify-content:space-between;
  box-shadow:0 2px 12px rgba(0,0,0,.04);
}
.topbar .brand{display:flex; align-items:center; gap:8px; font-weight:700; font-size:17px; color:var(--primary);}
.topbar .brand img,.topbar .brand svg{width:30px; height:30px;}
.topbar .actions{display:flex; align-items:center; gap:10px;}
.icon-btn{
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--primary-soft); color:var(--primary);
  position:relative; transition:.2s;
}
.icon-btn:active{transform:scale(.92);}
.badge-dot{
  position:absolute; top:4px; left:4px;
  width:9px; height:9px; border-radius:50%;
  background:var(--danger); border:2px solid var(--white);
}
.avatar{width:40px; height:40px; border-radius:50%; object-fit:cover; border:2px solid var(--primary-light); background:var(--primary-light);}

/* ---------------- Cards ---------------- */
.card{
  background:var(--white);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
  margin-bottom:14px;
}
.card-flat{border:1px solid var(--border-color); box-shadow:none;}

.stat-card{
  background:linear-gradient(135deg, var(--primary), var(--primary-dark));
  color:#fff; border-radius:var(--radius); padding:18px;
  box-shadow:var(--shadow-lg);
}
.stat-card .label{font-size:13px; opacity:.85;}
.stat-card .value{font-size:26px; font-weight:800; margin-top:4px;}

.stats-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:12px; margin-bottom:16px;}
.mini-stat{background:var(--white); border-radius:var(--radius-sm); padding:14px; box-shadow:var(--shadow); text-align:center;}
.mini-stat .num{font-size:20px; font-weight:800; color:var(--primary);}
.mini-stat .lbl{font-size:12px; color:var(--text-muted); margin-top:4px;}

/* ---------------- Buttons ---------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 20px; border-radius:12px;
  font-weight:700; font-size:14.5px;
  transition:.2s; width:100%;
}
.btn:active{transform:scale(.97);}
.btn-primary{background:var(--primary); color:#fff; box-shadow:0 6px 18px rgba(230,57,57,.28);}
.btn-primary:disabled{background:#f0b8b8; box-shadow:none;}
.btn-outline{background:var(--white); color:var(--primary); border:1.5px solid var(--primary);}
.btn-ghost{background:var(--primary-soft); color:var(--primary);}
.btn-success{background:var(--success); color:#fff;}
.btn-sm{padding:8px 14px; font-size:13px; width:auto;}
.btn-block{width:100%;}

/* ---------------- Forms ---------------- */
.form-group{margin-bottom:14px;}
.form-label{display:block; font-size:13px; font-weight:600; margin-bottom:6px; color:var(--text-dark);}
.form-control{
  width:100%; padding:13px 14px; border-radius:12px;
  border:1.5px solid var(--border-color); background:var(--white);
  font-size:14.5px; color:var(--text-dark); transition:.2s;
}
.form-control:focus{outline:none; border-color:var(--primary); box-shadow:0 0 0 4px var(--primary-light);}
textarea.form-control{resize:vertical; min-height:80px;}

.otp-inputs{display:flex; gap:8px; justify-content:center; direction:ltr;}
.otp-inputs input{
  width:48px; height:56px; text-align:center; font-size:22px; font-weight:700;
  border-radius:12px; border:1.5px solid var(--border-color);
}
.otp-inputs input:focus{border-color:var(--primary); outline:none;}

/* ---------------- Login screen ---------------- */
.login-wrap{
  min-height:100vh; display:flex; flex-direction:column; justify-content:center;
  padding:24px; background:linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 40%);
}
.login-logo{width:88px; height:88px; margin:0 auto 18px; display:block;}
.login-title{text-align:center; font-size:22px; font-weight:800; color:var(--primary); margin-bottom:4px;}
.login-sub{text-align:center; color:var(--text-muted); font-size:13.5px; margin-bottom:28px;}

/* ---------------- Bottom navigation ---------------- */
.bottom-nav{
  position:fixed; bottom:0; right:0; left:0; z-index:50;
  background:var(--white); box-shadow:0 -4px 20px rgba(0,0,0,.06);
  display:flex; justify-content:space-around; padding:8px 4px 10px;
}
.bottom-nav a{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  font-size:11px; color:var(--text-muted); flex:1; padding:6px 0; border-radius:12px;
}
.bottom-nav a svg{width:22px; height:22px;}
.bottom-nav a.active{color:var(--primary); font-weight:700;}
.bottom-nav a.fab{
  background:var(--primary); color:#fff; width:52px; height:52px; border-radius:50%;
  margin-top:-26px; box-shadow:0 8px 20px rgba(230,57,57,.4); justify-content:center;
}
.bottom-nav a.fab svg{width:26px; height:26px;}

/* ---------------- Status badges ---------------- */
.status{display:inline-block; padding:4px 11px; border-radius:20px; font-size:11.5px; font-weight:700;}
.status-pending{background:#FFF3DE; color:var(--warning);}
.status-assigned{background:#E4F0FB; color:var(--info);}
.status-picked_up{background:#EFE7FB; color:#7C4FD8;}
.status-delivered{background:#E5F8EE; color:var(--success);}
.status-cancelled{background:#FBE7E7; color:var(--danger);}

/* ---------------- Order card ---------------- */
.order-card{background:var(--white); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); margin-bottom:12px;}
.order-card .top-row{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px;}
.order-code{font-weight:800; color:var(--primary); font-size:13.5px;}
.order-addr{display:flex; gap:8px; align-items:flex-start; font-size:13px; color:var(--text-dark); margin-bottom:6px;}
.order-addr .dot{width:8px; height:8px; border-radius:50%; margin-top:5px; flex-shrink:0;}
.order-addr.pickup .dot{background:var(--info);}
.order-addr.dropoff .dot{background:var(--primary);}
.order-meta{display:flex; justify-content:space-between; font-size:12px; color:var(--text-muted); margin-top:10px; border-top:1px dashed var(--border-color); padding-top:10px;}

/* ---------------- List items (users, addresses) ---------------- */
.list-item{display:flex; align-items:center; gap:12px; background:var(--white); border-radius:var(--radius-sm); padding:12px 14px; margin-bottom:8px; box-shadow:var(--shadow);}
.list-item .info{flex:1; min-width:0;}
.list-item .title{font-weight:700; font-size:14px;}
.list-item .sub{font-size:12px; color:var(--text-muted); margin-top:2px;}

/* ---------------- Modal / Bottom sheet ---------------- */
.overlay{position:fixed; inset:0; background:rgba(20,10,10,.45); z-index:90; display:none; align-items:flex-end; justify-content:center;}
.overlay.show{display:flex;}
.sheet{
  background:var(--white); width:100%; max-width:520px; border-radius:22px 22px 0 0;
  padding:20px 18px 26px; max-height:88vh; overflow-y:auto;
  animation:slideUp .28s ease;
}
@keyframes slideUp{from{transform:translateY(40px); opacity:0;} to{transform:translateY(0); opacity:1;}}
.sheet-handle{width:44px; height:5px; background:var(--border-color); border-radius:10px; margin:0 auto 16px;}
.sheet-title{font-weight:800; font-size:16px; margin-bottom:16px;}

/* ---------------- Tabs / filters ---------------- */
.chips{display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; margin-bottom:14px;}
.chip{white-space:nowrap; padding:8px 16px; border-radius:20px; background:var(--white); border:1.5px solid var(--border-color); font-size:13px; font-weight:600; color:var(--text-muted);}
.chip.active{background:var(--primary); border-color:var(--primary); color:#fff;}

/* ---------------- Notification panel ---------------- */
.notif-item{display:flex; gap:12px; padding:14px 4px; border-bottom:1px solid var(--border-color);}
.notif-item:last-child{border-bottom:none;}
.notif-item .n-icon{width:38px; height:38px; border-radius:50%; background:var(--primary-soft); color:var(--primary); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.notif-item.unread{background:var(--primary-soft); border-radius:12px;}
.notif-item .n-title{font-weight:700; font-size:13.5px;}
.notif-item .n-msg{font-size:12.5px; color:var(--text-muted); margin-top:2px;}
.notif-item .n-time{font-size:11px; color:#bbb; margin-top:4px;}

/* ---------------- Empty state ---------------- */
.empty-state{text-align:center; padding:50px 20px; color:var(--text-muted);}
.empty-state svg{width:70px; height:70px; opacity:.35; margin-bottom:12px;}

/* ---------------- Toast ---------------- */
#toast-container{position:fixed; top:14px; left:50%; transform:translateX(-50%); z-index:200; display:flex; flex-direction:column; gap:8px; width:92%; max-width:420px;}
.toast{padding:13px 16px; border-radius:12px; font-size:13.5px; font-weight:600; box-shadow:0 8px 24px rgba(0,0,0,.14); color:#fff; animation:fadeIn .25s ease;}
.toast.success{background:var(--success);}
.toast.error{background:var(--danger);}
.toast.info{background:var(--info);}

/* ---------------- Loader ---------------- */
.spinner{width:20px; height:20px; border:3px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite;}
.spinner.dark{border:3px solid var(--primary-light); border-top-color:var(--primary);}
@keyframes spin{to{transform:rotate(360deg);}}
.page-loader{position:fixed; inset:0; background:var(--white); display:flex; align-items:center; justify-content:center; z-index:300;}

/* ---------------- Map ---------------- */
#map{width:100%; height:220px; border-radius:var(--radius); overflow:hidden;}

/* ---------------- Misc ---------------- */
.section-title{font-size:15px; font-weight:800; margin:18px 0 12px;}
.text-muted{color:var(--text-muted);}
.text-primary{color:var(--primary);}
.flex-between{display:flex; align-items:center; justify-content:space-between;}
.tag{background:var(--primary-light); color:var(--primary); padding:3px 10px; border-radius:8px; font-size:11.5px; font-weight:700;}

/* ---------------- Notification popup (live alert) ---------------- */
.notif-popup{
  position:fixed; top:-120px; left:50%; transform:translateX(-50%);
  width:92%; max-width:420px; z-index:250;
  background:var(--white); border-radius:16px; box-shadow:0 14px 40px rgba(0,0,0,.18);
  border-right:4px solid var(--primary);
  transition:top .35s cubic-bezier(.34,1.4,.64,1);
  cursor:pointer;
}
.notif-popup.show{top:14px;}
.notif-popup-inner{display:flex; gap:12px; padding:14px 16px; align-items:flex-start;}
.notif-popup-inner .n-icon{width:36px; height:36px; border-radius:50%; background:var(--primary-soft); color:var(--primary); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.notif-popup-inner .n-title{font-weight:800; font-size:13.5px;}
.notif-popup-inner .n-msg{font-size:12.5px; color:var(--text-muted); margin-top:2px;}

/* ---------------- Profile menu sheet ---------------- */
.profile-head{text-align:center; padding:6px 0 18px;}
.profile-head .avatar{width:72px; height:72px; margin:0 auto 10px;}
.profile-head .p-name{font-weight:800; font-size:16px;}
.profile-head .p-mobile{color:var(--text-muted); font-size:12.5px; margin-top:2px; direction:ltr; display:inline-block;}
.menu-item{display:flex; align-items:center; gap:12px; padding:14px 6px; border-bottom:1px solid var(--border-color); font-size:14px; font-weight:600;}
.menu-item:last-child{border-bottom:none;}
.menu-item svg{width:20px; height:20px; color:var(--primary);}
.menu-item.danger{color:var(--danger);}
.menu-item.danger svg{color:var(--danger);}

/* ---------------- Debt / settlement ---------------- */
.debt-row{display:flex; align-items:center; justify-content:space-between; background:var(--white); border-radius:var(--radius-sm); padding:12px 14px; margin-bottom:8px; box-shadow:var(--shadow);}
.debt-row .amount{font-weight:800; color:var(--danger);}

/* ---------------- Map picker ---------------- */
#map-picker-el{width:100%; height:320px; border-radius:var(--radius); overflow:hidden; background:#eee;}
.map-pick-btn{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--primary); font-weight:700; margin-top:-6px; margin-bottom:14px; background:none;}
.map-pick-btn svg{width:15px; height:15px;}
.map-confirmed{font-size:11.5px; color:var(--success); margin-top:-6px; margin-bottom:14px; display:none;}

/* ---------------- Order detail sheet ---------------- */
.detail-row{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; padding:9px 0; border-bottom:1px solid var(--border-color); font-size:13px;}
.detail-row:last-child{border-bottom:none;}
.detail-row .k{color:var(--text-muted); flex-shrink:0;}
.detail-row .v{font-weight:700; text-align:left;}
.detail-section-title{font-size:12.5px; font-weight:800; color:var(--primary); margin:16px 0 4px;}
.courier-intro-card{display:flex; align-items:center; gap:12px; background:var(--primary-soft); border-radius:var(--radius-sm); padding:12px 14px; margin-bottom:4px;}
.courier-intro-card .avatar{width:46px; height:46px;}

@media (min-width:600px){
  .stats-grid{grid-template-columns:repeat(3,1fr);}
}














/* ========== سایدبار دسکتاپ پنل مدیر ========== */



/* ========== سایدبار دسکتاپ پنل مدیر ========== */
.admin-sidebar {
  display: none;
}

@media (min-width: 992px) {

  /* مخفی کردن نوار پایین */
  .bottom-nav {
    display: none !important;
  }

  /* سایدبار ثابت سمت راست */
  .admin-sidebar {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: #ffffff;
    border-left: 1px solid #eee;
    z-index: 1000;
    box-shadow: -4px 0 24px rgba(0,0,0,0.06);
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 24px;
    font-weight: 800;
    font-size: 17px;
    color: #1a1a1a;
    border-bottom: 1px solid #f0f0f0;
  }

  .sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
  }

  .sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 12px;
    color: #555;
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .sidebar-nav a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .sidebar-nav a:hover {
    background: #f8f8f8;
    color: #E63939;
  }

  .sidebar-nav a.active {
    background: #FFF0F0;
    color: #E63939;
    font-weight: 700;
  }

  .sidebar-footer {
    padding: 16px 20px 28px;
    border-top: 1px solid #f0f0f0;
  }

  /* ========== مهم: فاصله دادن محتوا از سایدبار ========== */
  body {
    padding-right: 260px !important;
  }

  .topbar {
    right: 260px !important;
    left: 0 !important;
    width: auto !important;
  }

  .container.page,
  .container {
    margin-right: 0 !important;
    padding-right: 32px !important;
    padding-left: 32px !important;
    max-width: 100% !important;
  }
}








@media (min-width: 768px) {
  .container.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 32px 80px;
  }
  #orders-list,
  #pending-orders-list,
  #report-list,
  #customer-orders-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 18px;
  }
  .order-card {
    margin-bottom: 0 !important;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  #users-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
  }
}






