@font-face{font-family:Plex;src:url('/static/assets/regular.ttf')}@font-face{font-family:Plex;src:url('/static/assets/bold.ttf');font-weight:700}
:root{font-family:Plex,Arial,sans-serif;color:#25243a;background:#f6f6fa;--purple:#39328b;--purple-dark:#292365;--teal:#009e94;--line:#e6e5ef;--muted:#6e7180;--soft:#f7f6fd}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:var(--purple)}img{max-width:100%}.hidden{display:none!important}
.login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(320px,1fr) minmax(360px,480px);background:#fff}.brand-side{background:radial-gradient(circle at 20% 20%,#5045b5 0,transparent 35%),linear-gradient(140deg,#2a246c,#4335a8);color:white;padding:clamp(30px,5vw,90px);display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}.brand-side:after{content:"";position:absolute;width:600px;height:600px;border:70px solid #ffffff0c;border-radius:50%;bottom:-300px;left:-180px}.brand-side h1{font-size:clamp(2.2rem,4vw,4.4rem);line-height:1.3;max-width:800px;margin:32px 0 12px}.brand-side p{font-size:1.15rem;color:#dedbff;max-width:600px}.brand-mark{display:inline-flex;gap:10px;align-items:center;color:#fff;font-weight:700;letter-spacing:.03em}.brand-mark:before{content:"";width:16px;height:16px;border-radius:50%;background:#00b5a6;box-shadow:25px 0 #00b5a6,12px 20px #00b5a6;margin-left:24px}.brand-foot{font-size:.9rem;color:#c9c6ef}.login-panel{display:flex;align-items:center;justify-content:center;padding:35px}.login-card{width:100%;max-width:390px}.identity{width:310px;max-height:95px;object-fit:contain;object-position:right center;margin-bottom:26px}.login-card h2{font-size:1.8rem;margin:0 0 5px}.subtle{color:var(--muted);font-size:.93rem}.login-card .subtle{margin:0 0 30px}.field{display:flex;flex-direction:column;gap:7px;margin:14px 0}.field label{font-weight:700;font-size:.91rem}.input,select,textarea{width:100%;border:1px solid #d8d9e5;border-radius:12px;background:#fff;padding:11px 13px;color:#25243a;outline:none;transition:.15s}.input:focus,select:focus,textarea:focus{border-color:var(--purple);box-shadow:0 0 0 3px #39328b20}textarea{min-height:95px;resize:vertical}.btn{border:0;border-radius:12px;background:var(--purple);color:white;padding:10px 17px;min-height:43px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px}.btn:hover{background:var(--purple-dark)}.btn.secondary{background:#f1f0fa;color:var(--purple)}.btn.secondary:hover{background:#e9e7f8}.btn.teal{background:var(--teal)}.btn.ghost{background:transparent;color:var(--purple);border:1px solid var(--line)}.btn.danger{background:#b93d58}.btn.block{width:100%}.btn.small{font-size:.85rem;min-height:34px;padding:6px 12px}.login-note{margin-top:24px;border-top:1px solid var(--line);padding-top:17px;color:var(--muted);font-size:.82rem}
.shell{display:grid;grid-template-columns:252px 1fr;min-height:100vh}.sidebar{background:#fff;border-left:1px solid var(--line);padding:24px 17px;display:flex;flex-direction:column;gap:26px;position:sticky;top:0;height:100vh}.side-logo{width:200px;max-height:73px;object-fit:contain;object-position:right}.side-name{font-size:.84rem;color:var(--muted);margin:0 8px}.nav{display:flex;flex-direction:column;gap:7px}.nav button{border:0;background:transparent;text-align:right;color:#57566a;padding:12px 15px;border-radius:12px;font-weight:700;display:flex;gap:11px;align-items:center}.nav button:hover{background:var(--soft)}.nav button.active{background:#efedfb;color:var(--purple)}.nav .icon{font-size:1.17rem;width:22px;text-align:center}.sidebar-bottom{margin-top:auto}.content{min-width:0}.topbar{height:80px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,54px)}.topbar strong{font-size:1.14rem}.topbar .user{display:flex;gap:12px;align-items:center;color:var(--muted);font-size:.88rem}.avatar{width:37px;height:37px;border-radius:12px;background:#e9e6fb;color:var(--purple);display:grid;place-items:center;font-weight:700}.main{padding:30px clamp(18px,4vw,54px) 60px;max-width:1550px;margin:auto}.page-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:22px}.page-head h1{font-size:1.75rem;margin:0 0 4px}.page-head p{color:var(--muted);margin:0}.grid{display:grid;gap:16px}.stats{grid-template-columns:repeat(4,minmax(0,1fr));margin:20px 0 26px}.card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:0 3px 14px #2e285006}.stat .label{color:var(--muted);font-size:.86rem}.stat .number{font-size:2rem;font-weight:700;color:var(--purple);margin:5px 0}.hero{background:linear-gradient(100deg,#382e93,#5550b7);color:#fff;border-radius:20px;padding:30px;position:relative;overflow:hidden}.hero:after{content:"";position:absolute;left:-70px;top:-70px;width:260px;height:260px;border:50px solid #ffffff10;border-radius:50%}.hero h2{font-size:1.5rem;margin:0 0 5px}.hero p{color:#e9e7ff;max-width:670px}.hero .btn{background:#fff;color:var(--purple);position:relative;z-index:1}.section-title{font-size:1.22rem;margin:28px 0 14px}.feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.comp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.comp-card{display:flex;flex-direction:column;gap:11px}.comp-card h3{font-size:1.1rem;margin:0;line-height:1.5}.comp-card p{margin:0;color:var(--muted);font-size:.9rem;line-height:1.7}.comp-card .bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:auto;padding-top:6px}.tag{display:inline-flex;border-radius:999px;padding:5px 10px;background:#f1effb;color:var(--purple);font-size:.77rem;font-weight:700;white-space:nowrap}.tag.green{background:#e5f7f1;color:#087a59}.tag.orange{background:#fff3df;color:#a26000}.tag.red{background:#fce8ea;color:#ae3c4a}.tags{display:flex;gap:6px;flex-wrap:wrap}.filters{display:grid;grid-template-columns:minmax(190px,2fr) repeat(3,minmax(130px,1fr));gap:10px;margin:18px 0}.empty{background:#fff;border:1px dashed #d7d4ea;border-radius:16px;padding:45px;text-align:center;color:var(--muted)}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.panel-header h2{margin:0;font-size:1.15rem}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px;background:#fff}table{width:100%;border-collapse:collapse;min-width:700px;font-size:.87rem}th,td{padding:12px 13px;text-align:right;border-bottom:1px solid var(--line);vertical-align:top}th{background:#f6f5fb;color:#575470;font-weight:700;white-space:nowrap}tbody tr:hover{background:#faf9ff}tbody tr:last-child td{border-bottom:0}.actions{display:flex;gap:7px;flex-wrap:wrap}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}.form-grid .wide{grid-column:1/-1}.level-row{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.level-row button{border:1px solid var(--line);background:#fff;color:var(--muted);border-radius:12px;min-height:65px;font-size:.78rem;padding:5px}.level-row button.selected{background:var(--purple);color:white;border-color:var(--purple)}.notice{background:#f0faf8;border-right:4px solid var(--teal);padding:15px;border-radius:9px;line-height:1.8;color:#23655e}.drawer-backdrop{position:fixed;inset:0;background:#15132e77;z-index:20;display:flex;justify-content:flex-start}.drawer{width:min(650px,100%);height:100%;background:#fff;overflow:auto;padding:28px;box-shadow:-15px 0 40px #17133c22}.drawer-head{display:flex;justify-content:space-between;align-items:start;gap:14px;border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:18px}.drawer-head h2{margin:0;font-size:1.4rem}.drawer-section{border-bottom:1px solid var(--line);padding:15px 0}.drawer-section:last-child{border:0}.drawer-section h3{margin:0 0 10px;font-size:1rem}.drawer-section p{line-height:1.8;margin:7px 0}.detail-pair{display:grid;grid-template-columns:130px 1fr;gap:10px;margin:7px 0;font-size:.9rem}.detail-pair b{color:#686577}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:18px}.toolbar .input{max-width:320px}.count-line{color:var(--muted);font-size:.87rem;margin:12px 0}.mini-counts{display:flex;gap:6px;flex-wrap:wrap}.mini-counts .tag{font-size:.69rem}.danger-text{color:#a83954}.inline-help{font-size:.78rem;color:var(--muted)}#toast{position:fixed;bottom:22px;left:22px;z-index:50;min-width:180px;max-width:420px;border-radius:12px;background:#242146;color:#fff;padding:12px 17px;box-shadow:0 12px 35px #0003;display:none}#toast.show{display:block}#toast.error{background:#a63950}.loading{display:grid;place-items:center;min-height:100vh;color:var(--purple)}
@media(max-width:980px){.stats{grid-template-columns:repeat(2,1fr)}.filters{grid-template-columns:repeat(2,1fr)}.comp-grid,.feature-grid{grid-template-columns:1fr}.shell{grid-template-columns:210px 1fr}.sidebar{padding:18px 10px}}
@media(max-width:700px){.login-shell{grid-template-columns:1fr}.brand-side{min-height:210px;padding:25px}.brand-side h1{font-size:1.7rem;margin:15px 0 4px}.brand-side p,.brand-foot{display:none}.login-panel{padding:28px 20px}.identity{width:250px}.shell{display:block;padding-bottom:70px}.sidebar{height:auto;position:fixed;bottom:0;top:auto;left:0;right:0;z-index:12;padding:5px 4px;background:#fff;border:0;border-top:1px solid var(--line);display:block}.side-logo,.side-name,.sidebar-bottom{display:none}.nav{flex-direction:row;justify-content:space-around;gap:2px;overflow:auto}.nav button{flex-direction:column;gap:1px;align-items:center;justify-content:center;min-width:65px;padding:5px 6px;font-size:.66rem;text-align:center;white-space:nowrap}.nav .icon{font-size:1.3rem}.topbar{height:65px;padding:0 18px}.topbar .user>span:not(.avatar){display:none}.main{padding:22px 16px 32px}.page-head h1{font-size:1.4rem}.stats{gap:9px}.card{padding:16px}.stat .number{font-size:1.55rem}.filters{grid-template-columns:1fr 1fr}.filters .search{grid-column:1/-1}.hero{padding:22px}.form-grid{grid-template-columns:1fr}.level-row{gap:3px}.level-row button{font-size:.65rem;min-height:65px}.detail-pair{grid-template-columns:110px 1fr}.drawer{padding:18px}.toolbar .input{max-width:none}}

/* Keep the student competition actions close to the top on small screens. */
.comp-search{margin:16px 0 10px}
.quick-filters{display:flex;gap:8px;overflow-x:auto;padding:0 0 6px;scrollbar-width:thin}
.filter-chip{flex:none;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--purple);padding:8px 14px;font-weight:700;white-space:nowrap}
.filter-chip.selected{background:var(--purple);border-color:var(--purple);color:#fff}
.advanced-filters{margin:8px 0 16px}
.advanced-filters summary,.more-details summary{cursor:pointer;color:var(--purple);font-weight:700;padding:8px 0}
.advanced-filters .filters{grid-template-columns:repeat(2,minmax(0,1fr));margin:8px 0 0}
.comp-card p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.status-section{background:var(--soft);border:1px solid var(--line);border-radius:14px;padding:16px;margin:12px 0}
.more-details>div{padding-top:8px}
@media(max-width:700px){.advanced-filters .filters{grid-template-columns:1fr}.comp-card .bottom{align-items:flex-start}.comp-card .actions{width:100%}.comp-card .actions .btn{flex:1}}
.participation-form{margin-top:16px;padding:13px;background:var(--soft);border:1px solid var(--line);border-radius:12px}
.participation-form>label{display:block;font-weight:700;font-size:.9rem;margin-bottom:8px}
.participation-controls{display:flex;gap:8px;align-items:center}
.participation-controls select{min-width:0;flex:1}
.participation-controls .btn{flex:none}
.participation-form .support-field{margin-bottom:0}
@media(max-width:700px){.participation-controls{align-items:stretch}.participation-controls .btn{min-width:70px}}
.registration-card{max-width:540px;padding:20px 0}
.registration-card .identity{margin-bottom:12px}
.registration-card .field{margin:9px 0}
.step-note{display:inline-block;background:#efedfb;color:var(--purple);border-radius:999px;padding:6px 12px;font-size:.85rem;font-weight:700;margin-bottom:16px}

/* الوصولية: تركيز مرئي، حركة مخففة، وأهداف لمس مريحة */
:focus{outline:none}
:focus-visible{outline:3px solid #009e94;outline-offset:2px;border-radius:6px}
.btn:focus-visible,.nav button:focus-visible,.filter-chip:focus-visible,.level-row button:focus-visible{outline:3px solid #009e94;outline-offset:2px}
.input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #009e94;outline-offset:1px}
#view:focus,.drawer:focus{outline:none}
.inline-help{color:var(--muted);font-size:.85rem;margin:2px 0 8px}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:700px){
.btn.small,.topbar .btn{min-height:44px;min-width:44px}
.login-shell{grid-template-rows:auto 1fr}
.brand-side{min-height:0;padding:16px 20px;justify-content:flex-start}
.brand-side:after{display:none}
.brand-side h1{margin:10px 0 0;font-size:1.5rem}
.login-panel{align-items:flex-start;padding:22px 20px 32px}
.login-card h2{font-size:1.5rem}
}
.topbar .user .btn{font-size:1.3rem;line-height:1;padding:0;display:inline-grid;place-items:center}
