151 lines
13 KiB
CSS
151 lines
13 KiB
CSS
*{margin:0;padding:0;box-sizing:border-box}
|
|
:root{--bg:#f5f5f5;--card:#fff;--border:#e5e5e5;--accent:#2563eb;--text:#171717;--muted:#737373;--radius:12px;--sidebar:240px}
|
|
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--text);min-height:100dvh}
|
|
|
|
.layout{display:flex;min-height:100dvh}
|
|
.sidebar{width:var(--sidebar);background:var(--card);border-right:1px solid var(--border);padding:24px 0;position:fixed;top:0;left:0;height:100dvh;display:flex;flex-direction:column}
|
|
.sidebar .logo{font-size:1.1rem;font-weight:700;padding:0 20px 20px;border-bottom:1px solid var(--border)}
|
|
.sidebar nav{flex:1;padding:12px 0}
|
|
.sidebar nav a{display:flex;align-items:center;gap:10px;padding:10px 20px;color:var(--muted);text-decoration:none;font-size:.9rem;transition:all .15s;border-left:3px solid transparent}
|
|
.sidebar nav a:hover{color:var(--text);background:var(--bg)}
|
|
.sidebar nav a.active{color:var(--accent);background:rgba(37,99,235,.06);border-left-color:var(--accent);font-weight:500}
|
|
.sidebar .bottom{padding:12px 20px;border-top:1px solid var(--border)}
|
|
.sidebar .bottom a{display:block;color:var(--muted);text-decoration:none;font-size:.8rem;padding:6px 0}
|
|
.sidebar .bottom a:hover{color:var(--text)}
|
|
.sidebar .bottom .logout{color:#ef4444;cursor:pointer;margin-top:4px}
|
|
|
|
.main{flex:1;margin-left:var(--sidebar);padding:32px}
|
|
.main h2{font-size:1.3rem;font-weight:600;margin-bottom:20px}
|
|
|
|
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:32px}
|
|
.stat{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:20px}
|
|
.stat .num{font-size:2rem;font-weight:700;color:var(--accent)}
|
|
.stat .label{color:var(--muted);font-size:.8rem;margin-top:4px}
|
|
|
|
.filters{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap;align-items:flex-end}
|
|
.filters select,.filters input[type=date]{background:var(--card);border:1px solid var(--border);color:var(--text);border-radius:8px;padding:8px 12px;font-size:.85rem}
|
|
.filters label{font-size:.8rem;color:var(--muted);display:block;margin-bottom:4px}
|
|
.search-input{background:var(--card);border:1px solid var(--border);color:var(--text);border-radius:8px;padding:8px 12px;font-size:.85rem;outline:none}
|
|
.search-input:focus{border-color:var(--accent)}
|
|
#studentFilter,#linkStudent{background:var(--card);border:1px solid var(--border);color:var(--text);border-radius:8px;padding:8px 12px;font-size:.85rem;outline:none;width:100%;max-width:220px}
|
|
#studentFilter:focus,#linkStudent:focus{border-color:var(--accent)}
|
|
|
|
.pager{display:flex;gap:6px;align-items:center;justify-content:center;margin-top:20px;flex-wrap:wrap}
|
|
.pager button{background:var(--card);border:1px solid var(--border);color:var(--text);border-radius:8px;padding:6px 12px;font-size:.85rem;cursor:pointer}
|
|
.pager button:hover{border-color:var(--accent)}
|
|
.pager button.active{background:var(--accent);color:#fff;border-color:var(--accent)}
|
|
.pager button:disabled{opacity:.4;cursor:not-allowed}
|
|
.pager .info{color:var(--muted);font-size:.8rem}
|
|
|
|
.grid{display:flex;flex-direction:column;gap:12px}
|
|
.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:16px;display:flex;gap:16px;align-items:flex-start}
|
|
.card img{width:80px;height:80px;border-radius:8px;object-fit:cover;flex-shrink:0;cursor:pointer}
|
|
.card .info{flex:1;min-width:0}
|
|
.card .name{font-weight:600;font-size:.95rem}
|
|
.card .group{color:var(--accent);font-size:.8rem;margin-top:2px}
|
|
.card .desc{color:var(--muted);font-size:.85rem;margin-top:8px;line-height:1.4;white-space:pre-wrap}
|
|
.card .time{color:var(--muted);font-size:.75rem;margin-top:8px}
|
|
.card .del{background:none;border:none;color:var(--muted);cursor:pointer;font-size:1.1rem;padding:4px;flex-shrink:0}
|
|
.card .del:hover{color:#ef4444}
|
|
.card .edit{background:none;border:none;color:var(--muted);cursor:pointer;font-size:1.05rem;padding:4px;flex-shrink:0}
|
|
.card .edit:hover{color:var(--accent)}
|
|
.empty{text-align:center;color:var(--muted);padding:48px 0}
|
|
|
|
.view-toggle{display:inline-flex;border:1px solid var(--border);border-radius:8px;overflow:hidden}
|
|
.view-toggle button{background:var(--card);border:none;color:var(--muted);padding:9px 14px;font-size:.85rem;font-weight:600;cursor:pointer}
|
|
.view-toggle button:hover{color:var(--text)}
|
|
.view-toggle button.active{background:var(--accent);color:#fff}
|
|
.journal-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
|
|
.journal-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column}
|
|
.journal-card img{width:100%;aspect-ratio:4/3;object-fit:cover;cursor:pointer;display:block;flex-shrink:0}
|
|
.journal-card .no-photo{aspect-ratio:4/3;background:var(--bg);display:flex;align-items:center;justify-content:center;flex-shrink:0}
|
|
.journal-card .no-photo svg{width:64%;height:64%;color:#c7cbd0}
|
|
.journal-card .no-photo svg *{fill:currentColor}
|
|
.journal-card .body{padding:12px 14px;display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
|
|
.journal-card .name{font-weight:600;font-size:.95rem}
|
|
.journal-card .group{color:var(--accent);font-size:.8rem}
|
|
.journal-card .desc{color:var(--muted);font-size:.85rem;line-height:1.4;white-space:pre-wrap;flex:1}
|
|
.journal-card .foot{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 14px;border-top:1px solid var(--border);color:var(--muted);font-size:.75rem}
|
|
.journal-card .foot .edit,.journal-card .foot .del{background:none;border:none;color:var(--muted);cursor:pointer;font-size:1rem;padding:4px}
|
|
.journal-card .foot .edit:hover{color:var(--accent)}
|
|
.journal-card .foot .del:hover{color:#ef4444}
|
|
@media(max-width:1200px){.journal-cards{grid-template-columns:repeat(3,1fr)}}
|
|
@media(max-width:900px){.journal-cards{grid-template-columns:repeat(2,1fr)}}
|
|
@media(max-width:640px){.journal-cards{grid-template-columns:1fr}}
|
|
|
|
.add-row{display:flex;gap:8px;margin-bottom:24px}
|
|
.add-row input{flex:1;background:var(--card);border:1px solid var(--border);color:var(--text);border-radius:var(--radius);padding:12px 16px;font-size:.95rem;outline:none}
|
|
.add-row input:focus{border-color:var(--accent)}
|
|
.add-row button{background:var(--accent);color:#fff;border:none;border-radius:var(--radius);padding:12px 20px;font-weight:600;cursor:pointer}
|
|
.add-row .btn-ghost{background:var(--card);border:1px solid var(--border);color:var(--accent)}
|
|
.add-row .btn-ghost:hover{border-color:var(--accent)}
|
|
.btn-link{background:var(--bg);border:1px solid var(--border);color:var(--accent);border-radius:8px;padding:8px 14px;font-size:.85rem;font-weight:600;cursor:pointer;transition:opacity .15s}
|
|
.btn-link:hover{border-color:var(--accent);opacity:.85}
|
|
.list{display:flex;flex-direction:column;gap:8px}
|
|
.item{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;display:flex;justify-content:space-between;align-items:center;gap:8px}
|
|
.item .name{font-weight:500}
|
|
.item .del{background:none;border:none;color:var(--muted);cursor:pointer;font-size:1.2rem;padding:4px}
|
|
.item .del:hover{color:#ef4444}
|
|
.item .name-input{background:var(--bg);border:1px solid var(--border);color:var(--text);border-radius:6px;padding:4px 8px;font-size:.95rem;font-weight:500;outline:none;width:100%;max-width:300px}
|
|
.item .name-input:focus{border-color:var(--accent)}
|
|
.item .group-select{background:var(--bg);border:1px solid var(--border);color:var(--text);border-radius:6px;padding:4px 8px;font-size:.8rem;outline:none;max-width:200px}
|
|
.item .group-select:focus{border-color:var(--accent)}
|
|
.attach-list{max-height:280px;overflow-y:auto;display:flex;flex-direction:column;gap:4px;border:1px solid var(--border);border-radius:8px;padding:8px}
|
|
.attach-list label{display:flex;gap:8px;align-items:center;font-size:.85rem;color:var(--text);margin:0;cursor:pointer}
|
|
.attach-list .cur{color:var(--muted);font-size:.75rem;margin-left:auto}
|
|
.student-actions{display:flex;gap:6px;align-items:center;flex-shrink:0}
|
|
.student-actions button{border-radius:8px;padding:8px 14px;font-size:.8rem;font-weight:600;cursor:pointer;border:none;transition:opacity .15s}
|
|
.student-actions button:hover{opacity:.85}
|
|
.student-actions .btn-save{background:var(--accent);color:#fff}
|
|
.student-actions .btn-link{background:var(--bg);border:1px solid var(--border);color:var(--accent)}
|
|
.student-actions .btn-link:hover{border-color:var(--accent)}
|
|
.student-actions .btn-del{background:none;color:var(--muted);font-size:1.2rem;padding:4px 8px}
|
|
.student-actions .btn-del:hover{color:#ef4444;opacity:1}
|
|
|
|
.group-schedule{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:8px}
|
|
.group-schedule select,.group-schedule input[type=time]{background:var(--bg);border:1px solid var(--border);color:var(--text);border-radius:6px;padding:4px 8px;font-size:.8rem}
|
|
.group-schedule label{font-size:.75rem;color:var(--muted)}
|
|
.group-schedule .sched-status{font-size:.75rem;color:var(--muted)}
|
|
.group-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
|
|
.group-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:16px;display:flex;flex-direction:column;gap:12px}
|
|
.group-card .group-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
|
|
.group-card .name-input{background:var(--bg);border:1px solid var(--border);color:var(--text);border-radius:8px;padding:8px 10px;font-size:.95rem;font-weight:600;outline:none;width:100%}
|
|
.group-card .name-input:focus{border-color:var(--accent)}
|
|
.group-card .del{background:none;border:none;color:var(--muted);cursor:pointer;font-size:1.2rem;padding:4px;flex-shrink:0}
|
|
.group-card .del:hover{color:#ef4444}
|
|
.group-card .group-schedule{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;align-items:start}
|
|
.group-card .group-schedule label{font-size:.75rem;color:var(--muted);display:block;margin-bottom:4px}
|
|
.group-card .group-schedule select,.group-card .group-schedule input[type=time]{width:100%;background:var(--bg);border:1px solid var(--border);color:var(--text);border-radius:6px;padding:6px 8px;font-size:.8rem}
|
|
.group-card .group-foot{display:flex;justify-content:space-between;align-items:center;gap:8px}
|
|
.group-card .save-sched{background:var(--accent);color:#fff;border:none;border-radius:8px;padding:8px 14px;font-size:.85rem;font-weight:600;cursor:pointer}
|
|
.group-card .save-sched:hover{opacity:.85}
|
|
.group-card .btn-link{background:var(--bg);border:1px solid var(--border);color:var(--accent);border-radius:8px;padding:8px 14px;font-size:.85rem;font-weight:600;cursor:pointer}
|
|
.group-card .btn-link:hover{border-color:var(--accent)}
|
|
.settings-card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:24px;max-width:640px}
|
|
.settings-row{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
|
|
.settings-row label{font-weight:600;display:block;margin-bottom:4px}
|
|
.settings-row .hint{font-size:.8rem;color:var(--muted);max-width:420px;margin:0}
|
|
.settings-card .btn-link{background:var(--accent);color:#fff;border:none;padding:10px 20px;font-size:.9rem}
|
|
.settings-card .btn-link:hover{opacity:.85;border-color:transparent}
|
|
.group-card .sched-status{font-size:.8rem;color:var(--muted)}
|
|
@media(max-width:1024px){.group-grid{grid-template-columns:repeat(2,1fr)}}
|
|
@media(max-width:640px){.group-grid{grid-template-columns:1fr}}
|
|
|
|
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:100;display:none;align-items:center;justify-content:center}
|
|
.modal-overlay.open{display:flex}
|
|
.modal-overlay img{max-width:90%;max-height:90dvh;border-radius:var(--radius)}
|
|
.edit-modal{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:24px;max-width:420px;width:90%;display:flex;flex-direction:column;gap:16px}
|
|
.edit-modal h3{font-size:1.1rem;font-weight:600}
|
|
.edit-modal label{font-size:.8rem;color:var(--muted);margin-bottom:4px}
|
|
.edit-modal input,.edit-modal select,.edit-modal textarea{background:var(--bg);border:1px solid var(--border);color:var(--text);border-radius:8px;padding:10px 12px;font-size:.9rem;outline:none;font-family:inherit}
|
|
.edit-modal input:focus,.edit-modal select:focus,.edit-modal textarea:focus{border-color:var(--accent)}
|
|
.edit-modal textarea{min-height:100px;resize:vertical}
|
|
.edit-modal .actions{display:flex;gap:8px}
|
|
.edit-modal .actions button{flex:1;padding:12px;border:none;border-radius:8px;font-size:.9rem;font-weight:600;cursor:pointer}
|
|
.edit-modal .save{background:var(--accent);color:#fff}
|
|
.edit-modal .cancel{background:var(--border);color:var(--text)}
|
|
.edit-modal .cancel-btn{display:flex;flex:1;align-items:center;justify-content:center;padding:12px;border-radius:8px;font-size:.9rem;font-weight:600;cursor:pointer;text-decoration:none;background:var(--border);color:var(--text);transition:opacity .15s}
|
|
.edit-modal .cancel-btn:hover{opacity:.85}
|
|
.edit-modal .actions button:hover{opacity:.85}
|
|
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#16a34a;color:#fff;padding:12px 24px;border-radius:var(--radius);font-size:.9rem;opacity:0;transition:opacity .3s;pointer-events:none;z-index:200}
|
|
.toast.show{opacity:1} |