:root{
  --primary:#173b7a;
  --primary-strong:#0f2d61;
  --secondary:#155d7a;
  --accent:#2fb8df;
  --gold:#d9a928;
  --ink:#101828;
  --muted:#667085;
  --bg:#f3f6fa;
  --card:#ffffff;
  --line:#d9e2ec;
  --line-soft:#edf1f5;
  --shadow:0 18px 45px rgba(16,24,40,.08);
  --font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;overflow-x:hidden}
body{margin:0;font-family:var(--font);background:var(--bg);color:var(--ink);font-size:15px;line-height:1.5;overflow-x:hidden}
body.sidebar-open{overflow-x:hidden;overflow-y:auto;touch-action:auto}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
button,input,textarea,select{font:inherit}
.muted{color:var(--muted);font-weight:650}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  border:1px solid transparent;
  border-radius:8px;
  padding:.78rem 1rem;
  min-height:42px;
  font-weight:850;
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.btn:hover{transform:translateY(-1px);box-shadow:0 10px 26px rgba(16,24,40,.12)}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-strong)}
.btn-gold{background:var(--gold);color:#172036}
.btn-ghost{background:#eef6fb;color:var(--primary);border-color:#d7e8f0}
.full{width:100%}

.aula-login-body{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px;
  background:
    linear-gradient(135deg,rgba(7,17,38,.96),rgba(23,59,122,.86)),
    url("../assets/hero-pattern.svg") center/cover;
}
.login-card{
  width:min(1060px,100%);
  display:grid;
  grid-template-columns:.95fr 1.05fr;
  border:1px solid rgba(255,255,255,.22);
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 35px 95px rgba(0,0,0,.28);
  background:rgba(255,255,255,.12);
  backdrop-filter:blur(18px);
}
.login-info{padding:38px;color:#fff;display:flex;flex-direction:column;justify-content:space-between;gap:34px}
.login-info img{width:184px;background:#fff;border-radius:8px;padding:8px}
.login-kicker{display:inline-flex;margin-top:28px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.1);border-radius:999px;padding:.45rem .75rem;font-size:.78rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.login-info h1{font-size:clamp(2.2rem,5vw,4.2rem);line-height:.96;margin:16px 0;letter-spacing:0}
.login-info p{color:#d7e8f0;font-size:1.06rem;max-width:520px}
.login-benefits{display:grid;gap:12px}
.login-benefit{display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.14);border-radius:8px;padding:13px 14px}
.login-benefit span{width:34px;height:34px;border-radius:8px;background:var(--gold);color:#172036;display:grid;place-items:center;font-weight:900}
.login-benefit b{font-weight:850}
.login-form-wrap{background:#fff;padding:38px;display:flex;flex-direction:column;justify-content:center;gap:16px}
.login-form-head h2{margin:0;font-size:2rem;letter-spacing:0}
.login-form-head p{margin:0}
.login-form-head span{display:block;margin-top:8px;color:var(--muted);font-weight:650}
.field{display:grid;gap:8px;margin:14px 0}
.field label{font-weight:850;color:#223047}
.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:8px;padding:13px 14px;background:#fff;outline:none;color:var(--ink)}
.field textarea{min-height:118px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{border-color:rgba(21,93,122,.55);box-shadow:0 0 0 4px rgba(47,184,223,.12)}

.aula-shell{display:block;min-height:100vh}
.aula-sidebar{
  position:fixed;
  top:0;
  left:0;
  height:100vh;
  max-height:100vh;
  width:286px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  scrollbar-color:rgba(47,184,223,.36) transparent;
  padding:20px;
  background:#071126;
  color:#d9e7ef;
  display:flex;
  flex-direction:column;
  gap:22px;
  border-right:1px solid rgba(255,255,255,.08);
  z-index:1000;
}
.aula-sidebar::-webkit-scrollbar{width:6px}
.aula-sidebar::-webkit-scrollbar-thumb{background:rgba(21,93,122,.45);border-radius:999px}
.aula-sidebar::-webkit-scrollbar-track{background:transparent}
.aula-logo{width:178px;background:#fff;border-radius:8px;padding:8px}
.aula-user{display:flex;gap:12px;align-items:center;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:8px;padding:12px;min-width:0}
.aula-user small{display:block;color:#b8cbd8;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.avatar{width:44px;height:44px;border-radius:8px;background:linear-gradient(135deg,var(--accent),var(--gold));display:grid;place-items:center;font-weight:900;color:#102033;flex:0 0 auto}
.aula-nav{display:grid;gap:7px;min-height:0;overflow-x:hidden}
.aula-nav a,.aula-nav button{border:1px solid transparent;text-align:left;background:transparent;color:#d9e7ef;border-radius:8px;padding:11px 12px;font-weight:800;cursor:pointer;display:flex;align-items:center;gap:10px;min-width:0}
.aula-icon-svg{width:22px;height:22px;flex:0 0 22px;display:grid;place-items:center;color:#8ee6ff}
.aula-icon-svg svg{width:20px;height:20px;display:block;fill:currentColor}
.aula-nav-label{min-width:0;overflow-wrap:anywhere}
.aula-nav a:hover,.aula-nav a.active,.aula-nav button:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.12);color:#fff}
.aula-nav a.active .aula-icon-svg,.aula-nav a:hover .aula-icon-svg,.aula-nav button:hover .aula-icon-svg{color:var(--gold)}
.aula-main{padding:28px;min-width:0;min-height:100vh;margin-left:286px;width:calc(100% - 286px);overflow-x:hidden}
.aula-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:22px;
  padding:26px;
  border:1px solid var(--line);
  border-radius:10px;
  background:linear-gradient(135deg,#fff,#f8fbff);
  box-shadow:var(--shadow);
}
.aula-hero h1{margin:2px 0 8px;font-size:clamp(2rem,4vw,3rem);letter-spacing:0;line-height:1.05}
.aula-hero span{display:block;color:var(--muted);font-weight:650;max-width:720px}
.grid{display:grid;gap:16px}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.card{background:#fff;border:1px solid var(--line);border-radius:8px;padding:20px;box-shadow:var(--shadow)}
.stat{position:relative;overflow:hidden}
.stat:before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--primary),var(--accent),var(--gold))}
.stat strong{font-size:2.05rem;color:var(--primary);display:block;line-height:1}
.stat span{display:block;margin-top:8px;color:var(--muted);font-weight:850}
.aula-tabs{
  display:flex;
  gap:10px;
  margin:22px 0 4px;
  padding:10px;
  border:1px solid rgba(21,93,122,.12);
  border-radius:22px;
  background:rgba(255,255,255,.88);
  box-shadow:0 18px 45px rgba(15,37,64,.08);
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
}
.aula-tabs::-webkit-scrollbar{display:none}
.aula-tab{
  flex:0 0 auto;
  border:0;
  border-radius:16px;
  padding:12px 18px;
  min-height:44px;
  background:#eef7fc;
  color:#0b2b4a;
  cursor:pointer;
  font-weight:900;
  scroll-snap-align:start;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease,color .18s ease;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.aula-tab:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,37,64,.1)}
.aula-tab.active{
  color:#fff;
  background:linear-gradient(135deg,#0b4d78,#159ed0);
  box-shadow:0 12px 28px rgba(21,93,122,.25);
}
.aula-tab .aula-icon-svg{color:currentColor;width:19px;height:19px;flex-basis:19px}
.aula-tab .aula-icon-svg svg{width:18px;height:18px}
.aula-tab-panel{display:none;animation:fadeUp .25s ease}
.aula-tab-panel.active{display:block}
@keyframes fadeUp{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}
.aula-section-block{margin-top:28px}
.section-title{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:14px}
.section-title h2{margin:0;font-size:1.45rem}
.section-title .muted{margin:0}
.course-card{display:grid;grid-template-columns:190px 1fr;gap:18px;align-items:stretch}
.course-cover{min-height:150px;border-radius:8px;background:linear-gradient(135deg,var(--primary),var(--secondary),var(--accent));overflow:hidden;position:relative}
.course-cover:after{content:"TAIRA";position:absolute;left:16px;bottom:10px;color:rgba(255,255,255,.18);font-weight:900;font-size:2.2rem}
.course-cover img{width:100%;height:100%;object-fit:cover;position:relative;z-index:1}
.course-body{display:flex;flex-direction:column;gap:10px}
.course-body h3{margin:0;font-size:1.28rem;line-height:1.2}
.course-meta{display:flex;gap:8px;flex-wrap:wrap}
.progress{height:10px;background:#e9eef5;border-radius:999px;overflow:hidden}
.progress span{height:100%;display:block;background:linear-gradient(90deg,var(--secondary),var(--accent));border-radius:999px}
.progress-row{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-weight:800}
.pill{display:inline-flex;align-items:center;border-radius:999px;padding:.38rem .62rem;background:#eef6fb;color:var(--secondary);font-weight:850;font-size:.76rem}
.module{border:1px solid var(--line);border-radius:8px;background:#fff;overflow:hidden;box-shadow:var(--shadow)}
.module + .module{margin-top:14px}
.module-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;padding:18px 20px;background:#f8fafc;border-bottom:1px solid var(--line-soft)}
.module-head h3{margin:0;font-size:1.1rem}
.lesson{display:flex;justify-content:space-between;gap:1rem;align-items:center;border-top:1px solid var(--line-soft);padding:14px 20px}
.lesson:first-of-type{border-top:none}
.lesson-info{display:flex;gap:12px;align-items:center;min-width:0}
.lesson-type{width:40px;height:40px;border-radius:8px;background:#eef6fb;display:grid;place-items:center;font-weight:900;color:var(--secondary);flex:0 0 auto}
.lesson.done .lesson-type{background:#e7f7ee;color:#15803d}
.lesson h4{margin:0;font-size:1rem}
.lesson .muted{font-size:.9rem}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.empty{padding:30px;text-align:center;border:1px dashed rgba(21,93,122,.28);border-radius:8px;background:#fbfdff;color:var(--muted);font-weight:750}
.empty-action{display:grid;justify-items:center;gap:10px}
.empty-action b{color:#102033}
.empty-action span{display:block;max-width:560px}
.aula-card-list{display:grid;gap:14px}
.aula-mini-card{
  display:grid;
  grid-template-columns:1fr auto;
  gap:16px;
  align-items:center;
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  padding:18px;
  box-shadow:var(--shadow);
}
.aula-mini-card h3{margin:0;color:#102033}
.aula-mini-card p{margin:8px 0;color:#344258;font-weight:650}
.mini-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.notification-card{border-left:4px solid var(--accent)}
.activity-card{border-left:4px solid var(--gold)}
.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.profile-card,.support-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:20px;
  box-shadow:var(--shadow);
}
.profile-card h3,.support-card h3{margin:0 0 10px;color:#102033}
.profile-list{display:grid;gap:10px}
.profile-row{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:11px 0;
  border-bottom:1px dashed rgba(16,24,40,.12);
}
.profile-row:last-child{border-bottom:0}
.profile-row span{color:var(--muted);font-weight:800}
.profile-row b{text-align:right;word-break:break-word;color:#102033}
.support-card.featured{
  color:#fff;
  background:linear-gradient(135deg,#071126,#173b7a 58%,#155d7a);
  border-color:rgba(255,255,255,.14);
}
.support-card.featured h3,.support-card.featured .muted{color:#fff}
.support-card.featured .muted{opacity:.86}
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:#101828;color:#fff;border-radius:8px;padding:13px 16px;box-shadow:0 18px 50px rgba(0,0,0,.22);z-index:100;display:none}
.toast.show{display:block}
.mobile-bar{display:none;align-items:center;justify-content:space-between;gap:1rem;background:#fff;border-bottom:1px solid var(--line);padding:10px 16px;position:sticky;top:0;z-index:20}
.hamb{border:1px solid var(--line);background:#eef6fb;width:44px;height:44px;border-radius:10px;color:var(--primary);font-size:1.25rem;box-shadow:0 10px 24px rgba(23,59,122,.12)}
.mobile-overlay{
  position:fixed;
  inset:0;
  background:rgba(7,17,38,.5);
  backdrop-filter:blur(4px);
  z-index:29;
  opacity:0;
  pointer-events:none;
  transition:opacity .22s ease;
}
.mobile-overlay.show{opacity:1;pointer-events:auto}

@media(max-width:980px){
  .login-card{grid-template-columns:1fr}
  .aula-shell{display:block}
  .aula-sidebar{
    position:fixed!important;
    inset:0 auto 0 0;
    width:92px;
    height:100dvh;
    max-height:100dvh;
    z-index:1000;
    transform:none!important;
    transition:none;
    padding:12px 8px;
    gap:12px;
  }
  .aula-sidebar.show{transform:none!important}
  .aula-logo{width:64px;margin:0 auto;padding:5px}
  .aula-user{display:grid;justify-items:center;text-align:center;gap:7px;padding:9px 5px}
  .avatar{width:34px;height:34px;border-radius:8px}
  .aula-user b{font-size:.72rem;line-height:1.1;overflow-wrap:anywhere}
  .aula-user small{display:none}
  .aula-nav{gap:5px}
  .aula-nav a,.aula-nav button{
    padding:9px 5px;
    font-size:.68rem;
    line-height:1.14;
    text-align:center;
    word-break:break-word;
    overflow-wrap:anywhere;
    flex-direction:column;
    justify-content:center;
    gap:5px;
  }
  .aula-icon-svg{width:22px;height:22px;flex:0 0 auto}
  .aula-icon-svg svg{width:20px;height:20px}
  .mobile-bar{display:none!important}
  .hamb,.mobile-overlay{display:none!important}
  .aula-main{margin-left:92px;width:calc(100% - 92px);padding:20px;min-width:0}
  .grid-3,.grid-2{grid-template-columns:1fr}
  .profile-grid{grid-template-columns:1fr}
  .course-card{grid-template-columns:1fr}
  .course-cover{min-height:190px}
  .aula-hero{align-items:flex-start;flex-direction:column}
}
@media(min-width:981px){
  .mobile-overlay{display:none!important}
  body.sidebar-open{overflow-x:hidden;overflow-y:auto;touch-action:auto}
}
@media(max-width:620px){
  .aula-login-body{padding:14px}
  .login-info,.login-form-wrap{padding:24px}
  .lesson,.module-head{align-items:flex-start;flex-direction:column}
  .lesson .actions,.lesson .btn{width:100%}
  .aula-mini-card{grid-template-columns:1fr;align-items:start}
  .mini-card-head{display:grid}
  .aula-mini-card .actions,.aula-mini-card .btn{width:100%}
  .course-cover{min-height:150px}
  .aula-main{margin-left:92px;width:calc(100% - 92px);padding:16px}
}

.mobile-bottom-nav{display:none}
.mobile-more-sheet{display:none}
body.sheet-open{overflow:hidden}

@media(max-width:768px){
  html,body{max-width:100%;overflow-x:hidden}
  *{box-sizing:border-box}
  .aula-sidebar{display:none!important}
  .aula-shell{display:block}
  .aula-main{
    margin-left:0!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0;
    padding:16px!important;
    padding-bottom:118px!important;
    overflow-x:hidden;
  }
  .mobile-bar,.hamb,.mobile-overlay{display:none!important}
  .aula-hero{border-radius:18px;padding:18px;gap:12px}
  .aula-hero h1{font-size:clamp(24px,8vw,34px);line-height:1.05}
  .section-title{display:block}
  .section-title h2{font-size:clamp(20px,6vw,28px)}
  .aula-tabs{
    position:sticky;
    top:0;
    z-index:50;
    margin:16px -2px 6px;
    border-radius:20px;
    padding:8px;
  }
  .aula-tab{padding:11px 14px;font-size:12px;border-radius:14px}
  .grid-3,.grid-2{grid-template-columns:1fr}
  .profile-grid{grid-template-columns:1fr}
  .profile-row{display:grid;gap:3px}
  .profile-row b{text-align:left}
  .card,.aula-mini-card,.module,.course-card,.profile-card,.support-card,.data-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden;
    border-radius:22px;
  }
  .card,.aula-mini-card,.profile-card,.support-card{padding:16px}
  .card *,.aula-mini-card *,.course-card *,.profile-card *,.support-card *{min-width:0}
  .aula-mini-card h3,.course-card h3,.profile-card h3,.support-card h3{
    font-size:20px;
    line-height:1.15;
    overflow-wrap:anywhere;
  }
  .aula-mini-card p,.course-card p,.profile-card p,.support-card p,.muted,b{
    overflow-wrap:anywhere;
    word-break:break-word;
  }
  .course-card{grid-template-columns:1fr;gap:14px}
  .course-cover{min-height:170px;border-radius:18px}
  .course-cover img{width:100%;height:100%;object-fit:cover;border-radius:18px}
  .lesson,.module-head{align-items:flex-start;flex-direction:column}
  .actions,.action-buttons,.card-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    width:100%;
  }
  .lesson .actions,.lesson .btn,.aula-mini-card .actions,.aula-mini-card .btn,.action-buttons button,.card-actions button,.action-buttons a,.card-actions a{
    width:100%;
    min-height:46px;
    justify-content:center;
  }
  .empty{padding:24px 16px;border-radius:18px;text-align:center}

  .mobile-bottom-nav{
    position:fixed;
    left:10px;
    right:10px;
    bottom:10px;
    max-width:calc(100vw - 20px);
    z-index:2000;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:6px;
    padding:10px;
    padding-bottom:calc(10px + env(safe-area-inset-bottom));
    border:1px solid rgba(255,255,255,.12);
    border-radius:22px;
    background:rgba(5,20,45,.96);
    box-shadow:0 18px 45px rgba(0,0,0,.28);
    backdrop-filter:blur(16px);
  }
  .mobile-bottom-nav a,
  .mobile-bottom-nav button{
    min-height:54px;
    border:0;
    border-radius:16px;
    background:transparent;
    color:#dceeff;
    font-size:10px;
    font-weight:900;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    text-decoration:none;
    cursor:pointer;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button.active{
    background:linear-gradient(135deg,#e7f7ff,#bfeaff);
    color:#063455;
  }
  .mobile-bottom-nav .nav-icon{font-size:18px;line-height:1}

  .mobile-more-sheet{
    position:fixed;
    inset:0;
    z-index:2500;
    display:none;
    background:rgba(0,0,0,.45);
  }
  .mobile-more-sheet.show{
    display:flex;
    align-items:flex-end;
  }
  .mobile-more-panel{
    width:100%;
    max-height:75vh;
    overflow-y:auto;
    background:#fff;
    border-radius:26px 26px 0 0;
    padding:22px;
    padding-bottom:calc(22px + env(safe-area-inset-bottom));
    box-shadow:0 -18px 45px rgba(0,0,0,.22);
  }
  .mobile-more-panel h3{margin:0 0 16px;color:#08233f}
  .mobile-more-panel a,
  .mobile-more-panel button:not(.sheet-close){
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    padding:14px 16px;
    border-radius:16px;
    border:0;
    background:#f4f8fc;
    color:#08233f;
    font-weight:850;
    text-decoration:none;
    margin-bottom:10px;
    cursor:pointer;
  }
  .sheet-icon{width:24px;text-align:center}
  .sheet-close{
    width:42px;
    height:42px;
    border-radius:999px;
    border:0;
    float:right;
    background:#eef6fb;
    color:#08233f;
    font-size:1.35rem;
    cursor:pointer;
  }
}
