/* ===== أوامر المكاتب — كارت أنضف =====
   Drop-in replacement for the "phase 2 additions" block in styles.css
   (the .office-cmd-* rules). Markup change: an avatar img before the name,
   and a status icon inside the state pill. Nothing else in the page moves. */

/* 1) الكارت نفسه: شبكة داخلية بدل تدفّق عائم */
.office-cmd-row{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid #e7e0d9;
  border-radius:16px;
  background:#fffdfb;
  box-shadow:0 1px 2px rgb(77 53 51 / .04), 0 10px 22px -18px rgb(77 53 51 / .45);
}
.office-cmd-row[data-state="active"]{border-color:#cfe3dc}
.office-cmd-row[data-state="paused"]{border-color:#ecdfc0;background:#fffcf5}
.office-cmd-row[data-state="stopped"]{border-color:#e9d8d8;background:#fdf8f8}

/* 2) صف الاسم: أفاتار + اسم + حالة */
.office-cmd-who{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:10px;
  margin:0;
}
.office-cmd-avatar{
  width:40px;
  height:40px;
  flex:none;
  display:block;
  border-radius:12px;
  background:#f6f2ef;          /* يبان كويس لو الصورة اتأخرت */
  box-shadow:0 1px 2px rgb(77 53 51 / .12);
}
.office-cmd-name{font-weight:700;font-size:1rem;line-height:1.3}
.office-cmd-row[data-state="paused"] .office-cmd-name,
.office-cmd-row[data-state="stopped"] .office-cmd-name{opacity:.75}

/* 3) بادج الحالة: أيقونة 12px + نص */
.office-cmd-state{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px 4px 9px;
  border-radius:999px;
  background:#e8f3ef;
  color:#2f7d63;
  font-size:.75rem;
  font-weight:600;
  white-space:nowrap;
}
.office-cmd-state img{width:12px;height:12px;display:block}
.office-cmd-state--paused{background:#fbf1dc;color:#8a5a00}
.office-cmd-state--stopped{background:#fbe9e9;color:#b02a2a}

/* 4) خانة الأمر + زر الإرسال في صف واحد */
.office-cmd-form{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}
.office-cmd-input{
  width:100%;
  min-height:42px;
  padding:10px 12px;
  border:1px solid #d9d1c9;
  border-radius:11px;
  background:#fbf8f4;
  color:#4d3533;
  font:inherit;
  font-size:16px;              /* 16px = الموبايل مايعملش زوم لوحده */
  transition:border-color .15s, box-shadow .15s;
}
.office-cmd-input::placeholder{color:#a89f97}
.office-cmd-input:focus{
  outline:none;
  border-color:#73a89a;
  box-shadow:0 0 0 3px rgb(115 168 154 / .18);
}
.office-cmd-row .btn.is-primary.is-compact{
  min-height:42px;
  padding:0 18px;
  border-radius:11px;
  background:#3f7d6e;
  border-color:#3f7d6e;
  white-space:nowrap;
}
.office-cmd-row .btn.is-primary.is-compact:hover{background:#356c5f;border-color:#356c5f}

/* 5) سطر الأمر الحالي: شريط خفيف بدل سطر نص */
.office-cmd-current{
  display:flex;
  align-items:center;
  gap:6px;
  margin:0;
  padding:7px 10px;
  border-radius:10px;
  background:#f2f8f5;
  color:#2f7d63;
  font-size:.85rem;
  font-weight:600;
  overflow-wrap:anywhere;
}
.office-cmd-current::before{
  content:"";
  width:6px;height:6px;border-radius:50%;
  background:currentColor;flex:none;
}
.office-cmd-current--idle{background:#f6f2ef;color:#8a8078;font-weight:400}

/* 6) عمودين على الشاشات الكبيرة (اختياري لكنه بيوفّر سكرول) */
@media (min-width:768px){
  .office-cmd-list{grid-template-columns:1fr 1fr;align-items:start}
}

/* 7) لمسة على بادجات المكاتب فوق الرسمة */
.office-plate{gap:.36em}
.office-plate-dot{box-shadow:0 0 0 2px rgb(255 255 255 / .7)}

/* 8) حاوية الشبكة + زر الإرسال + صف الإدارة */
.office-cmd-list{display:grid;gap:12px;grid-template-columns:1fr}
.btn.is-primary{background:#3f7d6e;border-color:#3f7d6e;color:#fff}
.btn.is-primary.is-compact{font-weight:700;cursor:pointer}
.office-cmd-admin{display:flex;gap:6px;flex-wrap:wrap;border-top:1px solid #efe8e2;padding-top:8px;margin-top:2px}
.office-cmd-admin button{font:inherit;font-size:.72rem;font-weight:600;color:#8a8078;background:transparent;border:1px solid #ece4dd;border-radius:8px;padding:3px 9px;cursor:pointer;line-height:1.5}
.office-cmd-admin button:hover{background:#f6f2ef;color:#4d3533}
.office-cmd-admin button:disabled{opacity:.4;cursor:not-allowed}
.office-cmd-row .rename-form{display:flex;gap:6px;width:100%;grid-column:1/-1}
.office-cmd-row .rename-form input{flex:1;min-width:0;font:inherit;font-size:15px;padding:6px 10px;border:1px solid #d9d1c9;border-radius:9px}
.office-cmd-row .rename-form .btn{font-size:.78rem;padding:0 12px;min-height:34px;border-radius:9px}

/* 9) ضبط اتجاه صف الاسم زي الموك أب: أفاتار ← اسم ← بادج، والفراغ على الشمال */
.office-cmd-who{grid-template-columns:auto auto 1fr}
@media (min-width:768px){.office-cmd-list{grid-template-columns:1fr 1fr}}

.office-cmd-state{justify-self:start}
.office-cmd-who{grid-template-columns:auto auto 1fr}

.office-cmd-done{display:block;font-size:.82em;color:#6b5a4a;margin-top:2px}
.office-cmd-admin button[data-act=done]{color:#2f7d63;border-color:rgba(47,125,99,.45)}
