*{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,sans-serif;background:#f5f7fa;color:#333;line-height:1.6}.login-container{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#667eea,#764ba2)}.login-box{background:#fff;padding:2.5rem;border-radius:12px;box-shadow:0 10px 40px #0003;width:100%;max-width:400px}.login-box h1{text-align:center;color:#667eea;margin-bottom:.5rem}.login-box h2{text-align:center;font-weight:400;color:#666;margin-bottom:1.5rem;font-size:1.2rem}.login-box form{display:flex;flex-direction:column;gap:1rem}.login-box input{padding:.875rem 1rem;border:1px solid #ddd;border-radius:8px;font-size:1rem;transition:border-color .2s}.login-box input:focus{outline:none;border-color:#667eea}.login-box button{padding:.875rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:8px;font-size:1rem;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s}.login-box button:hover{transform:translateY(-1px);box-shadow:0 4px 12px #667eea66}.toggle-auth{text-align:center;margin-top:1.5rem;color:#666}.toggle-auth a{color:#667eea;text-decoration:none;font-weight:500}.error{background:#fee;color:#c00;padding:.75rem 1rem;border-radius:8px;font-size:.9rem}.navbar{background:#fff;padding:0 2rem;height:60px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 2px 10px #0000001a;position:sticky;top:0;z-index:100}.nav-brand{font-size:1.25rem;font-weight:700;color:#667eea}.nav-user{display:flex;align-items:center;gap:1rem}.nav-user span{color:#666;font-size:.9rem}.logout-btn{padding:.5rem 1rem;background:#f5f5f5;border:none;border-radius:6px;color:#666;cursor:pointer;font-size:.9rem;transition:all .2s}.logout-btn:hover{background:#e0e0e0}.main-content{max-width:1400px;margin:0 auto;padding:2rem;width:95%}.teacher-container{background:#fff;border-radius:12px;box-shadow:0 2px 20px #00000014;overflow:hidden}.teacher-header{padding:1.5rem;border-bottom:1px solid #eee}.teacher-header h2{color:#333;margin-bottom:.25rem}.teacher-header p{color:#666;font-size:.9rem}.tabs{display:flex;border-bottom:1px solid #eee}.tabs button{flex:1;padding:1rem;border:none;background:transparent;font-size:1rem;font-weight:500;color:#666;cursor:pointer;transition:all .2s;position:relative}.tabs button:hover{background:#f8f9fa}.tabs button.active{color:#667eea}.tabs button.active:after{content:"";position:absolute;bottom:0;left:0;right:0;height:3px;background:linear-gradient(135deg,#667eea,#764ba2)}.teacher-form{padding:1.5rem;display:flex;flex-direction:column;gap:1.25rem}.teacher-form label{display:flex;flex-direction:column;gap:.5rem;font-weight:500;color:#444;font-size:.95rem}.form-row{display:flex;gap:1rem}.form-row label{flex:1}.teacher-form input,.teacher-form select,.teacher-form textarea{padding:.75rem 1rem;border:1px solid #ddd;border-radius:8px;font-size:1rem;font-family:inherit;transition:border-color .2s}.teacher-form input:focus,.teacher-form select:focus,.teacher-form textarea:focus{outline:none;border-color:#667eea}.teacher-form textarea{resize:vertical;min-height:100px}.teacher-form button{padding:1rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:8px;font-size:1rem;font-weight:600;cursor:pointer;transition:all .2s;margin-top:.5rem}.teacher-form button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px #667eea66}.teacher-form button:disabled{opacity:.6;cursor:not-allowed}.result{margin:1.5rem;padding:1rem;background:#f8f9fa;border-radius:8px;border:1px solid #eee}.result.error{background:#fee;border-color:#fcc}.result h3{margin-bottom:.75rem;color:#333;font-size:1rem}.result pre{background:#2d3748;color:#e2e8f0;padding:1rem;border-radius:6px;overflow-x:auto;font-size:.85rem;line-height:1.5;max-height:400px;overflow-y:auto}.result.error pre{background:#c00;color:#fff}.teacher-layout{display:flex;min-height:calc(100vh - 140px);gap:0;position:relative}.session-sidebar{width:260px;background:#1a1a2e;color:#fff;display:flex;flex-direction:column;flex-shrink:0;border-radius:12px 0 0 12px;overflow:hidden}.session-sidebar .sidebar-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.25rem;border-bottom:1px solid rgba(255,255,255,.1)}.session-sidebar .sidebar-header h3{font-size:1rem;font-weight:600;margin:0;color:#a78bfa}.session-sidebar .sidebar-close{display:none;background:none;border:none;color:#fff;font-size:1.5rem;cursor:pointer;padding:0;line-height:1;opacity:.7}.session-sidebar .sidebar-close:hover{opacity:1}.new-session-btn{margin:1rem;padding:.75rem 1rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:8px;font-size:.9rem;font-weight:500;cursor:pointer;transition:all .2s}.new-session-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px #667eea66}.sessions-list{flex:1;overflow-y:auto;padding:.5rem}.sessions-loading,.sessions-empty{padding:2rem 1rem;text-align:center;color:#ffffff80;font-size:.9rem}.session-item{padding:.875rem 1rem;margin-bottom:.5rem;border-radius:8px;cursor:pointer;transition:all .2s;background:#ffffff0d}.session-item:hover{background:#ffffff1a}.session-item.active{background:#667eea4d;border:1px solid rgba(102,126,234,.5)}.session-item.ended{opacity:.6}.session-topic{font-weight:600;font-size:.9rem;margin-bottom:.25rem;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.session-student{font-size:.8rem;color:#ffffffb3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:.5rem}.session-meta{display:flex;gap:.75rem;font-size:.75rem;color:#ffffff80}.sidebar-overlay{display:none}.teacher-content .header-row{display:flex;align-items:flex-start}.teacher-content .header-text{flex:1}.sidebar-toggle{display:none;background:none;border:none;font-size:1.5rem;cursor:pointer;padding:.5rem;margin-right:.75rem;color:#333;border-radius:6px}.sidebar-toggle:hover{background:#f0f2f5}.teacher-sidebar{width:280px;background:#1a1a2e;color:#fff;border-radius:0 12px 12px 0;box-shadow:0 2px 20px #0003;padding:.75rem 1rem;flex-shrink:0;overflow-y:auto;max-height:calc(100vh - 140px)}.sidebar-section{margin-bottom:.75rem;padding-bottom:.75rem;border-bottom:1px solid rgba(255,255,255,.1)}.sidebar-section:last-of-type{border-bottom:none;margin-bottom:.5rem}.sidebar-section h3{font-size:.7rem;font-weight:600;color:#a78bfa;text-transform:uppercase;letter-spacing:.5px;margin-bottom:.5rem}.teacher-sidebar label{display:flex;flex-direction:column;gap:.25rem;font-weight:500;color:#ffffffe6;font-size:.75rem;margin-bottom:.5rem}.teacher-sidebar label:last-child{margin-bottom:0}.teacher-sidebar input,.teacher-sidebar select,.teacher-sidebar textarea{padding:.4rem .6rem;border:1px solid rgba(255,255,255,.2);border-radius:6px;font-size:.8rem;font-family:inherit;background:#ffffff1a;color:#fff;transition:border-color .2s,box-shadow .2s}.teacher-sidebar input::placeholder,.teacher-sidebar textarea::placeholder{color:#ffffff80}.teacher-sidebar input:focus,.teacher-sidebar select:focus,.teacher-sidebar textarea:focus{outline:none;border-color:#a78bfa;box-shadow:0 0 0 3px #a78bfa33;background:#ffffff26}.teacher-sidebar select option{background:#1a1a2e;color:#fff}.teacher-sidebar textarea{resize:vertical;min-height:50px}.generate-btn{width:100%;padding:.6rem .75rem;margin-bottom:.75rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:6px;font-size:.85rem;font-weight:600;cursor:pointer;transition:all .2s}.generate-btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px #667eea66}.generate-btn:disabled{opacity:.6;cursor:not-allowed}.teacher-content{flex:1;background:#fff;border-radius:0;box-shadow:0 2px 20px #00000014;overflow-y:auto;max-height:calc(100vh - 140px)}.teacher-content .teacher-header{padding:1.5rem 2rem;border-bottom:1px solid #eee;background:#fafbfc}.teacher-welcome{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;text-align:center;color:#666}.welcome-icon{font-size:4rem;margin-bottom:1.5rem}.teacher-welcome h3{font-size:1.5rem;color:#333;margin-bottom:1rem}.teacher-welcome p{margin-bottom:1rem;max-width:500px}.teacher-welcome ul{text-align:left;list-style:none;padding:0;margin:0}.teacher-welcome li{padding:.5rem 0 .5rem 1.5rem;position:relative}.teacher-welcome li:before{content:"✓";position:absolute;left:0;color:#667eea;font-weight:700}.teacher-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;text-align:center}.loading-spinner{width:50px;height:50px;border:4px solid #f3f3f3;border-top:4px solid #667eea;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:1.5rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.teacher-loading p{font-size:1.1rem;color:#333;margin-bottom:.5rem}.loading-hint{font-size:.9rem;color:#888}.teacher-results{padding:2rem}.results-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1.5rem;padding-bottom:1rem;border-bottom:1px solid #eee}.results-header h3{font-size:1.25rem;color:#333;margin-bottom:.25rem}.results-header p{color:#666;font-size:.9rem}.new-package-btn{padding:.5rem 1rem;background:#f5f5f5;border:1px solid #ddd;border-radius:6px;color:#666;font-size:.9rem;cursor:pointer;transition:all .2s}.new-package-btn:hover{background:#e8e8e8}.results-grid{display:grid;gap:1.5rem;margin-bottom:2rem}.result-card{background:#fafbfc;border:1px solid #eee;border-radius:12px;overflow:hidden}.card-header{display:flex;align-items:center;gap:.75rem;padding:1rem 1.25rem;background:#fff;border-bottom:1px solid #eee}.card-icon{font-size:1.25rem}.card-header h4{font-size:1rem;color:#333;margin:0}.card-content{padding:1.25rem;max-height:400px;overflow-y:auto}.content-preview{font-size:.95rem;line-height:1.6;color:#333}.content-preview p{margin-bottom:.75rem}.content-preview ul,.content-preview ol{margin-bottom:.75rem;padding-left:1.5rem}.content-preview li{margin-bottom:.25rem}.email-section{background:#f8f9fa;border-radius:12px;padding:1.5rem;border:1px solid #eee}.email-section h4{font-size:1.1rem;color:#333;margin-bottom:1.25rem}.email-form{display:flex;flex-direction:column;gap:1rem}.email-form label{display:flex;flex-direction:column;gap:.5rem;font-weight:500;color:#444;font-size:.9rem}.email-form input,.email-form textarea{padding:.75rem 1rem;border:1px solid #ddd;border-radius:8px;font-size:.95rem;font-family:inherit;background:#fff;transition:border-color .2s}.email-form input:focus,.email-form textarea:focus{outline:none;border-color:#667eea}.email-form textarea{resize:vertical;min-height:150px}.email-btn{padding:.875rem 1.5rem;background:#ff4b4b;color:#fff;border:none;border-radius:8px;font-size:1rem;font-weight:600;cursor:pointer;transition:all .2s;align-self:flex-start}.email-btn:hover{background:#e63939;transform:translateY(-1px)}.email-hint{font-size:.85rem;color:#888;margin-top:.5rem}.doc-tabs{display:flex;border-bottom:2px solid #eee;margin-bottom:0;background:#fafbfc;border-radius:8px 8px 0 0;overflow:hidden}.doc-tabs button{flex:1;padding:1rem;border:none;background:transparent;font-size:.9rem;font-weight:500;color:#666;cursor:pointer;transition:all .2s;position:relative}.doc-tabs button:hover{background:#f0f2ff;color:#667eea}.doc-tabs button.active{color:#667eea;background:#fff}.doc-tabs button.active:after{content:"";position:absolute;bottom:0;left:0;right:0;height:3px;background:linear-gradient(135deg,#667eea,#764ba2)}.doc-viewer{background:#fff;border:1px solid #eee;border-top:none;border-radius:0 0 8px 8px;min-height:400px}.doc-actions{padding:1rem 1.5rem;background:#f8f9fa;border-bottom:1px solid #eee;display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}.download-btn{padding:.75rem 1.25rem;background:linear-gradient(135deg,#28a745,#20c997);color:#fff;border:none;border-radius:8px;font-size:.95rem;font-weight:500;cursor:pointer;transition:all .2s}.download-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px #28a74566}.edit-btn{padding:.75rem 1.25rem;background:#f0f2f5;color:#333;border:1px solid #ddd;border-radius:8px;font-size:.95rem;font-weight:500;cursor:pointer;transition:all .2s;margin-left:.5rem}.edit-btn:hover{background:#e8e8e8}.version-badge{padding:.25rem .75rem;background:#e8f4ff;color:#06c;border-radius:12px;font-size:.85rem;font-weight:500;margin-left:.75rem}.edit-panel{padding:1rem 1.5rem;background:#f8f9fa;border-bottom:1px solid #eee}.edit-panel label{display:flex;flex-direction:column;gap:.5rem;font-weight:500;color:#444;font-size:.9rem}.edit-panel textarea{padding:.75rem 1rem;border:1px solid #ddd;border-radius:8px;font-size:.95rem;font-family:inherit;resize:vertical;min-height:80px;transition:border-color .2s}.edit-panel textarea:focus{outline:none;border-color:#667eea}.apply-edit-btn{margin-top:.75rem;padding:.75rem 1.25rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:8px;font-size:.95rem;font-weight:500;cursor:pointer;transition:all .2s}.apply-edit-btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px #667eea66}.apply-edit-btn:disabled{opacity:.6;cursor:not-allowed}.document-content{padding:1.5rem;max-height:500px;overflow-y:auto}.document-content h3{font-size:1.25rem;color:#333;margin-bottom:.5rem}.doc-meta{color:#666;font-size:.9rem;margin-bottom:1rem}.doc-section{margin-bottom:1.5rem;padding-bottom:1rem;border-bottom:1px solid #f0f0f0}.doc-section:last-child{border-bottom:none}.doc-section h4{font-size:1rem;color:#667eea;margin-bottom:.75rem}.doc-section ul{margin:0;padding-left:1.5rem}.doc-section li{margin-bottom:.5rem;color:#444}.doc-section p{color:#444;line-height:1.6}.lesson-step{background:#f8f9fa;padding:1rem;border-radius:8px;margin-bottom:.75rem}.lesson-step strong{color:#333;display:block;margin-bottom:.5rem}.lesson-step p{margin:.25rem 0;font-size:.95rem}.parent-summary{background:#e8f4ff;padding:1rem;border-radius:8px;border-left:4px solid #667eea;font-style:italic}.questions-list{margin-top:1rem}.question-item{padding:1rem;background:#f8f9fa;border-radius:8px;margin-bottom:1rem}.question-text{font-size:1rem;color:#333;margin-bottom:.75rem}.question-text .points{font-weight:400;color:#888;font-size:.85rem;margin-left:.5rem}.options{margin-left:1rem}.option{padding:.5rem .75rem;margin-bottom:.25rem;border-radius:4px;font-size:.95rem;color:#444}.option.correct{background:#d4edda;color:#155724;font-weight:500}.explanation{margin-top:.75rem;padding:.75rem;background:#fff3cd;border-radius:4px;font-size:.9rem;color:#856404}@media(max-width:1100px){.session-sidebar{position:fixed;left:0;top:60px;height:calc(100vh - 60px);z-index:100;transform:translate(-100%);transition:transform .3s ease;border-radius:0}.session-sidebar.open{transform:translate(0)}.session-sidebar .sidebar-close,.sidebar-toggle{display:block}.sidebar-overlay{display:block;position:fixed;inset:60px 0 0;background:#00000080;z-index:99}.teacher-sidebar{border-radius:0 12px 12px 0}.teacher-content{border-radius:0}}@media(max-width:768px){.navbar{padding:0 1rem}.nav-brand{font-size:1rem}.nav-user span{display:none}.main-content{padding:1rem}.form-row,.teacher-layout{flex-direction:column}.teacher-sidebar{width:100%;border-radius:0 0 12px 12px;max-height:none;order:2}.teacher-content{border-radius:0;max-height:none;order:1}.teacher-welcome{padding:2rem 1.5rem}.welcome-icon{font-size:3rem}.teacher-results{padding:1rem}.results-header{flex-direction:column;gap:1rem}.email-section{padding:1rem}.doc-actions{flex-wrap:wrap}.edit-btn,.version-badge{margin-left:0;margin-top:.5rem}}
