/* المجتمع بثيم الموقع: كريمي، أخضر داكن، برتقالي (توكنات :root من Base.css). */
.hub{--cta:#b8501c;--cta-hover:#a24515;--line:#0f3d3e1a;--soft:#0f3d3e0d;--warn-bg:#f3e2a9;--warn:#7a4a12;--err:#b4553a;--shadow:0 0 0 1px #0f3d3e0f,0 18px 44px -28px #0f3d3e59}
.hub .i,.hub-modal .i{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.hub .minw{min-width:0}
.hub :focus-visible,.hub-modal :focus-visible{outline:3px solid var(--teal);outline-offset:2px;border-radius:10px}
.hub [hidden],.hub-modal[hidden]{display:none!important}
.hub h1{margin:0}
.hub .lead{color:var(--fg-2);margin:6px 0 0}

/* الرأس والتبويبات */
.hub-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:22px}
.hub-me{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--green);background:#fff;border-radius:999px;padding:6px 6px 6px 16px;box-shadow:var(--shadow);max-width:100%}
.hub-me b{display:block;font-size:14px}.hub-me small{display:block;font-size:12px;color:var(--fg-2)}
.hub-av{width:40px;height:40px;border-radius:50%;background:linear-gradient(140deg,var(--orange),#c45a22);color:#fff;display:grid;place-items:center;font-weight:700;flex:none}
.hub-tabs{display:flex;gap:6px;background:#fff;border-radius:999px;padding:6px;box-shadow:var(--shadow);margin-bottom:22px;overflow-x:auto;scrollbar-width:none}
.hub-tabs::-webkit-scrollbar{display:none}
.hub-tabs a{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:999px;color:var(--fg-2);text-decoration:none;font-size:15px;white-space:nowrap;transition:background .2s,color .2s}
.hub-tabs a:hover{background:var(--soft);color:var(--green)}
.hub-tabs a[aria-current="page"]{background:var(--green);color:#fff;font-weight:700}
.hub .count{display:inline-block;min-width:22px;line-height:22px;padding:0 7px;border-radius:99px;background:var(--orange);color:#fff;font-size:12px;font-weight:700;text-align:center;margin-inline-start:6px}

.hub-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start}
.hub-main{min-width:0;outline:none}
.hub-aside{display:flex;flex-direction:column;gap:16px;position:sticky;top:100px}
.hub-aside h2{font-size:16px;margin:0 0 6px}
.hub-aside .tip h3{font-size:16px;margin:12px 0 4px}.hub-aside .tip p{font-size:14px;color:var(--fg-2);margin:0 0 14px}
.hub .screen{display:none}.hub .screen.show{display:block}
.hub .hub-intro{margin:0 0 12px}

/* بطاقات وعناصر عامة */
.hub .card,.hub .panel{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow)}
.hub .panel{padding:22px}.hub .panel+.panel{margin-top:14px}
.hub .panel h2{font-size:18px;margin:0 0 4px}
.hub .sub{color:var(--fg-2);font-size:14px}
.hub .row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.hub .spacer{margin-inline-start:auto}
.hub .softbtn,.hub .solidbtn,.hub .dangerbtn,.hub .ghostbtn,.hub-modal .softbtn,.hub-modal .solidbtn,.hub-modal .dangerbtn,.hub-modal .ghostbtn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:0 18px;border-radius:999px;font:500 14px var(--font);cursor:pointer;text-decoration:none;border:0;touch-action:manipulation;transition:background .2s,box-shadow .2s,color .2s}
.hub .solidbtn,.hub-modal .solidbtn{background:var(--cta);color:#fff}
.hub .solidbtn:hover,.hub-modal .solidbtn:hover{background:var(--cta-hover);box-shadow:0 0 20px #e8743b66}
.hub .softbtn,.hub-modal .softbtn{background:transparent;color:var(--green);box-shadow:inset 0 0 0 1px #0f3d3e40}
.hub .softbtn:hover,.hub-modal .softbtn:hover{background:var(--soft)}
.hub .softbtn[aria-pressed="true"],.hub-modal .softbtn[aria-pressed="true"]{background:var(--green);color:#fff;box-shadow:none}
.hub .dangerbtn,.hub-modal .dangerbtn{background:#fbe9e2;color:var(--err)}
.hub .ghostbtn,.hub-modal .ghostbtn{background:transparent;color:var(--fg-2);padding:0 12px}
.hub .ghostbtn:hover,.hub-modal .ghostbtn:hover{color:var(--green);background:var(--soft)}
.hub button:disabled,.hub-modal button:disabled{opacity:.5;cursor:default;pointer-events:none}
.hub .chip,.hub-modal .chip{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;line-height:1.6;padding:3px 11px;border-radius:99px;background:var(--mint);color:var(--green);text-decoration:none}
.hub .chip .i{width:14px;height:14px}
.hub .chip.muted{background:var(--cream-2);color:var(--fg-2)}
.hub .chip.warn{background:var(--warn-bg);color:var(--warn)}
.hub a.chip:hover{text-decoration:underline}
.hub .chips{display:flex;flex-wrap:wrap;gap:6px}
.hub .note{display:flex;gap:10px;align-items:flex-start;padding:12px 16px;border-radius:18px;background:#fff4ec;border:1px dashed var(--orange);font-size:14px;margin-bottom:14px}
.hub .note a{color:var(--cta);font-weight:700}

/* المنشورات */
.hub .composer{padding:18px;margin-bottom:6px}
.hub .compose-head{display:flex;align-items:center;gap:12px}
.hub .inputfake{flex:1;min-height:48px;text-align:start;background:var(--cream);border:1px solid #0f3d3e2e;border-radius:14px;padding:0 14px;color:var(--fg-2);font:400 15px var(--font);cursor:text}
.hub .compose-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.hub .filters{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.hub .filter{min-height:40px;padding:0 15px;border-radius:99px;border:0;background:#fff;color:var(--fg-2);font:500 14px var(--font);cursor:pointer;box-shadow:inset 0 0 0 1px var(--line)}
.hub .filter[aria-pressed="true"]{background:var(--green);color:#fff;box-shadow:none}
.hub .post{padding:20px 22px;margin-bottom:14px}
.hub .person{display:flex;align-items:center;gap:10px}
.hub .postavatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(140deg,var(--sage),var(--green));display:grid;place-items:center;color:#fff;font-weight:700;flex:none}
.hub .postname{font-weight:700;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.hub .postmeta{font-size:13px;color:var(--fg-2)}
.hub .post h3{font-size:18px;margin:14px 0 6px;overflow-wrap:anywhere}
.hub .post p{margin:0;color:var(--fg-2);line-height:1.85;white-space:pre-line;overflow-wrap:anywhere}
.hub .postfoot{border-top:1px solid var(--line);margin-top:14px;padding-top:8px;display:flex;gap:8px;flex-wrap:wrap}
.hub .comments{border-top:1px solid var(--line);margin-top:10px;padding-top:12px}
.hub .comment{display:flex;gap:9px;margin-bottom:10px}
.hub .miniava{width:34px;height:34px;border-radius:50%;background:var(--sage);display:grid;place-items:center;font-size:13px;font-weight:700;color:#fff;flex:none}
.hub .cbody{background:var(--cream);border-radius:14px;padding:8px 12px;font-size:14px;flex:1;overflow-wrap:anywhere}
.hub .cform{display:flex;gap:8px;margin-top:8px}

/* حقول */
.hub input[type=text],.hub input[type=search],.hub textarea,.hub select,.hub-modal input[type=text],.hub-modal input[type=search],.hub-modal textarea,.hub-modal select{width:100%;min-height:46px;font:400 16px var(--font);background:var(--cream);color:var(--green);border:1px solid #0f3d3e2e;border-radius:14px;padding:10px 14px;outline:none}
.hub textarea,.hub-modal textarea{min-height:110px;resize:vertical}
.hub input:focus,.hub textarea:focus,.hub select:focus,.hub-modal input:focus,.hub-modal textarea:focus,.hub-modal select:focus{border-color:var(--orange);box-shadow:0 0 0 3px #e8743b33}
.hub .field,.hub-modal .field{display:block;margin-top:14px}
.hub .field>span,.hub-modal .field>span{display:block;font-size:14px;font-weight:500;margin-bottom:6px}
.hub .field small,.hub-modal .field small{display:block;color:var(--fg-2);font-size:13px;margin-top:4px}
.hub .err,.hub-modal .err{color:var(--err);font-size:14px;margin:8px 0 0;min-height:1em}
.hub .check{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer}
.hub .check input{width:20px;height:20px;accent-color:var(--green)}
.hub .switch{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-radius:18px;background:var(--cream);cursor:pointer}
.hub .switch input{appearance:none;width:52px;height:30px;border-radius:30px;background:#0f3d3e33;position:relative;flex:none;cursor:pointer;transition:background .2s}
.hub .switch input::after{content:'';position:absolute;top:3px;inset-inline-start:3px;width:24px;height:24px;border-radius:50%;background:#fff;transition:inset-inline-start .2s}
.hub .switch input:checked{background:var(--green)}
.hub .switch input:checked::after{inset-inline-start:25px}

/* تبويبات فرعية */
.hub .tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:0 0 16px;overflow-x:auto}
.hub .tab{display:inline-flex;align-items:center;min-height:46px;padding:0 14px;color:var(--fg-2);text-decoration:none;font:500 15px var(--font);border:0;border-bottom:3px solid transparent;background:none;white-space:nowrap;cursor:pointer}
.hub .tab[aria-selected="true"]{color:var(--green);border-bottom-color:var(--orange);font-weight:700}

/* الاكتشاف */
.hub .discfilters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:8px;margin-bottom:14px}
.hub .grid2{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.hub .student{padding:20px;display:flex;flex-direction:column;gap:10px}
.hub .studenthead{display:flex;gap:12px;align-items:center}
.hub .bigavatar{width:54px;height:54px;border-radius:50%;background:linear-gradient(140deg,var(--orange),#c45a22);color:#fff;display:grid;place-items:center;font-weight:700;font-size:18px;flex:none}
.hub .student h3{margin:0;font-size:17px;overflow-wrap:anywhere}
.hub .student p{margin:0;color:var(--fg-2);font-size:14px;line-height:1.8;overflow-wrap:anywhere}
.hub .studentfoot{display:flex;justify-content:flex-end;gap:8px;margin-top:auto}
.hub .introbox{background:var(--cream);border-radius:14px;padding:10px 12px;font-size:14px;overflow-wrap:anywhere}

/* اللافتات (الدوائر والفريق) */
.hub .banner{padding:26px;background:var(--green);color:#fff;margin-bottom:16px}
.hub .banner h1{font-size:26px;color:#fff;margin:0}
.hub .banner p{color:#ffffffc2;margin:6px 0 0}
.hub .banner .softbtn{color:#fff;box-shadow:inset 0 0 0 1px #ffffff55}
.hub .banner .softbtn:hover{background:#ffffff14}
.hub .banner .softbtn[aria-pressed="true"]{background:#ffffff26}
.hub .banner .solidbtn{margin-top:14px}
.hub .banner .row .solidbtn{margin-top:0}

/* الدوائر */
.hub .circle{padding:20px;display:flex;flex-direction:column;gap:8px}
.hub .circleicon{width:48px;height:48px;border-radius:16px;background:var(--mint);color:var(--green);display:grid;place-items:center}
.hub .circleicon .i{width:24px;height:24px}
.hub .circle h3{font-size:17px;margin:4px 0 0}
.hub .circle .meta{font-size:13.5px;color:var(--fg-2)}

/* الفريق */
.hub .teampick{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.hub .panel+.teampick,.hub .panel+.banner{margin-top:14px}
.hub .teamhead{padding:20px 22px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.hub .teamhead h1{font-size:22px}
.hub .teamhead .sub a{color:var(--cta)}
.hub .teambody{padding:0 22px 22px}
.hub .member{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.hub .member:last-child{border-bottom:0}
.hub .task{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--line)}
.hub .task .txt{flex:1;min-width:0;overflow-wrap:anywhere}
.hub .task.done .txt{text-decoration:line-through;color:var(--fg-2)}
.hub .task small{display:block;color:var(--fg-2);font-size:13px}
.hub .tick{width:44px;height:44px;border:0;background:none;display:grid;place-items:center;cursor:pointer;flex:none}
.hub .tick span{width:24px;height:24px;border:2px solid #0f3d3e66;border-radius:8px;display:grid;place-items:center;color:#fff}
.hub .tick[aria-checked="true"] span{background:var(--green);border-color:var(--green)}
.hub .tick .i{width:16px;height:16px}
.hub .progress{height:10px;border-radius:99px;background:var(--cream-2);overflow:hidden;margin:6px 0 12px}
.hub .progress i{display:block;height:100%;background:linear-gradient(90deg,var(--orange),#f5a26b);border-radius:99px}
.hub .update{padding:12px 0;border-bottom:1px solid var(--line)}
.hub .update p{margin:4px 0 0;white-space:pre-line;overflow-wrap:anywhere}
.hub .chat{display:flex;flex-direction:column;gap:8px;max-height:min(60dvh,520px);overflow-y:auto;padding:4px 2px 8px}
.hub .msg{max-width:78%;padding:9px 13px;border-radius:18px;background:var(--cream);overflow-wrap:anywhere;align-self:flex-start}
.hub .msg.mine{background:var(--mint);align-self:flex-end}
.hub .msg b{display:block;font-size:12px;color:var(--fg-2);font-weight:500}
.hub .msg time{display:block;font-size:11px;color:var(--fg-2);margin-top:2px}
.hub .composebar{display:flex;gap:8px;margin-top:8px}
.hub .composebar input{flex:1}

/* الجنب */
.hub .rowlink{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 8px;border-radius:14px;text-decoration:none;color:var(--fg-2)}
.hub .rowlink:hover{background:var(--soft);color:var(--green)}
.hub .rowlink b{margin-inline-start:auto;color:var(--green)}

/* حالات */
.hub .state{padding:40px 20px;text-align:center;color:var(--fg-2)}
.hub .state .big{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 12px;border-radius:50%;background:var(--cream);color:var(--orange)}
.hub .state .big .i{width:28px;height:28px}
.hub .state .solidbtn,.hub .state .softbtn{margin-top:14px}
.hub .skeleton{height:120px;border-radius:var(--radius);background:linear-gradient(90deg,#efe6d6,#f7efe3,#efe6d6);background-size:200% 100%;animation:hubshimmer 1.2s linear infinite;margin-bottom:14px}
@keyframes hubshimmer{to{background-position:-200% 0}}

/* نافذة + تنبيه */
.hub-modal{position:fixed;inset:0;background:#0a2e3066;display:grid;place-items:center;z-index:120;padding:16px;font-family:var(--font);color:var(--green)}
.hub-modal .sheet{background:#fff;border-radius:var(--radius);width:min(540px,100%);max-height:90dvh;overflow:auto;padding:24px;box-shadow:0 30px 80px #0a2e3040}
.hub-modal h2{font-size:20px;margin:0 0 4px;padding-inline-end:52px}
.hub-modal .close{float:left;border:0;background:var(--cream);color:var(--green);width:44px;height:44px;border-radius:50%;display:grid;place-items:center;cursor:pointer}
.hub-modal .sub{color:var(--fg-2);font-size:14px}
.hub-modal .row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:14px}
.hub-modal fieldset{border:0;padding:0;margin:14px 0 0}
.hub-modal legend{font-size:14px;font-weight:500;margin-bottom:6px}
.hub-modal .picklist{display:flex;flex-direction:column;gap:6px;margin-top:12px;max-height:46dvh;overflow:auto}
.hub-modal .pick{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:14px;box-shadow:inset 0 0 0 1px var(--line,#0f3d3e1a)}
.hub-modal .pick .txt{flex:1;min-width:0}
.hub-modal .miniava{width:34px;height:34px;border-radius:50%;background:#7fa07a;display:grid;place-items:center;font-size:13px;font-weight:700;color:#fff;flex:none}
.hub-modal .circleicon{width:40px;height:40px;border-radius:14px;background:var(--mint);display:grid;place-items:center}
.hub-modal .skeleton{height:60px;border-radius:14px;background:var(--cream-2)}
.hub-modal .chip.muted{background:var(--cream-2)}
.hub-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--green);color:#fff;padding:12px 20px;border-radius:999px;font:500 14px var(--font);z-index:130;opacity:0;pointer-events:none;transition:opacity .2s;max-width:min(92vw,520px);text-align:center}
.hub-toast.on{opacity:1}

@media (width<=1000px){.hub-grid{grid-template-columns:1fr}.hub-aside{position:static;display:grid;grid-template-columns:1fr 1fr}.hub .discfilters{grid-template-columns:1fr 1fr}}
@media (width<=640px){
  .hub-aside{grid-template-columns:1fr}
  .hub .discfilters{grid-template-columns:1fr}
  .hub .post{padding:16px}.hub .teamhead{padding:16px}.hub .teambody{padding:0 16px 16px}.hub .panel{padding:18px}
  .hub .msg{max-width:88%}
  .hub-me{display:none}
  .hub .tabs .tab{padding:0 10px;font-size:14px}
  .hub .tabs .tab .i{display:none}
  .hub-head{margin-bottom:16px}
  .hub-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;border-radius:22px;padding:5px}
  .hub-tabs a{flex-direction:column;justify-content:center;gap:2px;min-height:58px;padding:4px 2px;border-radius:18px;font-size:12px;white-space:normal;text-align:center;line-height:1.3;position:relative}
  .hub-tabs .count{position:absolute;top:4px;inset-inline-end:6px;margin:0;min-width:18px;line-height:18px;padding:0 5px;font-size:11px}
  .hub-toast{bottom:90px}
}
@media (prefers-reduced-motion:reduce){.hub *,.hub-modal *{animation:none!important;transition:none!important}}
