/* ============================================================
   CSS COMPLETO - SULSAFE (ATUALIZADO PARA PRODUÇÃO)
   ============================================================ */
:root {
    --p: #2E7D32;
    --p2: #43A047;
    --p3: #1B5E20;
    --gold: #C9B037;
    --bg: #f4f7f6;
    --tx: #1a1a1a;
    --tx2: #4a4a4a;
    --tx3: #888;
    --bd: #dce3e0;
    --bd2: #e8eeec;
    --ip: #f8fafa;
    --r: 12px;
    --sb: #0f1a12;
    --sb2: #1a2b1e;
    --sb-tx: #c8e0c8;
    --card-bg: #fff;
    --shadow: 0 8px 32px rgba(0,0,0,.06);
    --shadow-hover: 0 12px 48px rgba(0,0,0,.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Inter', sans-serif; 
    background: var(--bg); 
    color: var(--tx); 
    line-height: 1.5;
    transition: background .3s, color .3s;
}
input, select, textarea { font-family: inherit; outline: none; }
a { color: var(--p); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Temas */
body.t-azul { --p: #1565C0; --p2: #1E88E5; --p3: #0D47A1; --sb: #0a1628; --sb2: #142a4a; }
body.t-roxo { --p: #7B1FA2; --p2: #9C27B0; --p3: #4A148C; --sb: #1a0a2a; --sb2: #2a1a3a; }
body.t-vermelho { --p: #C62828; --p2: #E53935; --p3: #B71C1C; --sb: #2a0a0a; --sb2: #3a1a1a; }
body.t-laranja { --p: #E65100; --p2: #F57C00; --p3: #BF360C; --sb: #2a1200; --sb2: #3a1a0a; }
body.t-escuro { 
    --p: #66BB6A; --p2: #81C784; --p3: #388E3C; 
    --bg: #121212; --tx: #eee; --tx2: #bbb; --tx3: #777; 
    --bd: #333; --bd2: #2a2a2a; --ip: #1e1e1e; 
    --card-bg: #1e1e1e; --shadow: 0 8px 32px rgba(0,0,0,.3); 
    --sb: #0a0a0a; --sb2: #1a1a1a; --sb-tx: #a0c8a0; 
}

/* AUTH */
#authWrap { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    padding: 20px; 
    background: var(--bg); 
    transition: opacity .5s, transform .5s; 
}
#authWrap.off { 
    opacity: 0; 
    transform: scale(.95); 
    pointer-events: none; 
    position: fixed; 
    width: 100%; 
}
.auth-card { 
    background: var(--card-bg); 
    border-radius: 24px; 
    padding: 40px 36px; 
    max-width: 440px; 
    width: 100%; 
    box-shadow: var(--shadow); 
    position: relative; 
    animation: fv .5s ease;
}
.auth-card .t { display: none; }
.auth-card .t.on { display: block; animation: fv .3s ease; }
.back-to-site { display: inline-block; font-size: 13px; color: var(--tx3); margin-bottom: 20px; }
.back-to-site i { margin-right: 6px; }
.logo-r { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.lic { width: 48px; height: 48px; background: var(--p); color: #fff; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; }
.lt { font-size: 22px; font-weight: 800; color: var(--p); }
.sub { font-size: 14px; color: var(--tx2); margin-bottom: 24px; }
.fld { margin-bottom: 16px; }
.fld label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; color: var(--tx2); }
.fld input, .fld select, .fld textarea { 
    width: 100%; 
    padding: 12px 14px; 
    background: var(--ip); 
    border: 1px solid var(--bd); 
    border-radius: var(--r); 
    font-size: 14px; 
    color: var(--tx); 
    transition: .2s; 
}
.fld input:focus, .fld select:focus { 
    border-color: var(--p); 
    box-shadow: 0 0 0 3px rgba(46,125,50,.15); 
}
.fld .error { border-color: #D32F2F !important; }

.btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    padding: 12px 24px; 
    border: none; 
    border-radius: var(--r); 
    font-weight: 700; 
    font-size: 14px; 
    cursor: pointer; 
    transition: .2s; 
    justify-content: center; 
}
.btn-p { background: var(--p); color: #fff; }
.btn-p:hover { background: var(--p3); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-s { background: var(--bd); color: var(--tx); }
.btn-s:hover { background: var(--bd2); transform: translateY(-2px); }
.btn-d { background: #D32F2F; color: #fff; }
.btn-d:hover { background: #B71C1C; transform: translateY(-2px); }
.btn-g { background: var(--gold); color: #1a1a1a; }
.btn-g:hover { background: #b89f2a; transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.divider { text-align: center; padding: 16px 0; color: var(--tx3); font-size: 13px; }
.divider::before, .divider::after { content: ''; display: inline-block; width: 30px; height: 1px; background: var(--bd); vertical-align: middle; margin: 0 10px; }

/* DASHBOARD */
#dash { display: none; min-height: 100vh; min-height: 100dvh; }
#dash.on { display: flex; }
.sidebar { 
    width: 240px; 
    background: var(--sb); 
    color: var(--sb-tx); 
    display: flex; 
    flex-direction: column; 
    padding: 20px 0; 
    position: fixed; 
    top: 0; 
    left: 0; 
    bottom: 0; 
    overflow-y: auto; 
    z-index: 100; 
    scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }
.sb-hd { display: flex; align-items: center; gap: 12px; padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sb-hd .lic { width: 40px; height: 40px; font-size: 18px; }
.sb-hd .lt { color: #fff; font-size: 18px; }
.sb-role { 
    margin: 16px 20px; 
    padding: 8px 14px; 
    border-radius: 40px; 
    font-size: 12px; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: .5px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    background: rgba(255,255,255,.08); 
}
.sb-role.admin, .sb-role.super_admin { background: rgba(201,176,55,.25); color: #f0d050; }
.sb-role.professor { background: rgba(46,125,50,.25); color: #8bc34a; }
.sb-role.aluno { background: rgba(33,150,243,.2); color: #64b5f6; }
.sb-nav { flex: 1; padding: 12px 12px; }
.sb-lbl { 
    font-size: 10px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: rgba(255,255,255,.3); 
    padding: 16px 12px 8px; 
}
.ni { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 10px 14px; 
    border-radius: 10px; 
    cursor: pointer; 
    transition: .2s; 
    font-size: 14px; 
    color: rgba(255,255,255,.6); 
}
.ni:hover { background: rgba(255,255,255,.06); color: #fff; }
.ni.on { background: rgba(46,125,50,.25); color: #8bc34a; font-weight: 600; }
.ni i { width: 20px; text-align: center; }
.sb-ft { 
    border-top: 1px solid rgba(255,255,255,.06); 
    padding: 16px 20px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}
.sb-name { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.8); }
.sb-out { 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    background: rgba(255,255,255,.06); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    transition: .2s; 
}
.sb-out:hover { background: rgba(211,47,47,.3); color: #ef5350; }

.main { 
    flex: 1; 
    min-width: 0;
    margin-left: 240px; 
    padding: 30px 36px; 
    min-height: 100vh; 
    min-height: 100dvh;
    background: var(--bg); 
}

/* CARDS / STATS */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 20px 0 28px; }
.st { 
    background: var(--card-bg); 
    padding: 18px 20px; 
    border-radius: var(--r); 
    box-shadow: var(--shadow); 
    transition: .3s;
}
.st:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.st-v { font-size: 28px; font-weight: 800; color: var(--p); }
.st-l { font-size: 13px; color: var(--tx2); margin-top: 4px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 8px; }
.card { 
    background: var(--card-bg); 
    border-radius: var(--r); 
    padding: 24px 20px; 
    box-shadow: var(--shadow); 
    cursor: pointer; 
    transition: .25s; 
    text-align: center; 
    border: 2px solid transparent; 
}
.card:hover { 
    transform: translateY(-4px); 
    border-color: var(--p); 
    box-shadow: var(--shadow-hover); 
}
.card-ic { font-size: 32px; color: var(--p); margin-bottom: 8px; }
.card-t { font-weight: 700; font-size: 15px; }
.card-d { font-size: 12px; color: var(--tx3); margin-top: 4px; }

/* PROGRESS */
.prog-w { 
    background: var(--card-bg); 
    border-radius: var(--r); 
    padding: 18px 24px; 
    margin: 12px 0 24px; 
    box-shadow: var(--shadow); 
}
.prog-bar { height: 8px; background: var(--bd); border-radius: 40px; overflow: hidden; }
.prog-fill { 
    height: 100%; 
    background: linear-gradient(90deg, var(--p), var(--p2)); 
    border-radius: 40px; 
    transition: width .6s; 
}

/* NRs */
.nr-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.nr-c { 
    background: var(--card-bg); 
    border-radius: var(--r); 
    padding: 14px 18px; 
    display: flex; 
    align-items: center; 
    gap: 14px; 
    box-shadow: var(--shadow); 
    cursor: pointer; 
    transition: .2s; 
    border: 2px solid transparent; 
}
.nr-c:hover { border-color: var(--p); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.nr-ic { 
    width: 40px; 
    height: 40px; 
    background: rgba(46,125,50,.12); 
    border-radius: 10px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 18px; 
    color: var(--p); 
    flex-shrink: 0; 
}
.nr-num { font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: .5px; }
.nr-nm { font-size: 14px; font-weight: 600; }

.badge { 
    display: inline-block; 
    padding: 2px 12px; 
    border-radius: 40px; 
    font-size: 11px; 
    font-weight: 700; 
}
.bg-ok { background: rgba(46,125,50,.15); color: #2E7D32; }
.bg-warn { background: rgba(255,152,0,.15); color: #E65100; }
.bg-err { background: rgba(211,47,47,.15); color: #C62828; }
.bg-info { background: rgba(33,150,243,.15); color: #1565C0; }
.bg-pendente { background: rgba(255,152,0,.15); color: #E65100; }

/* TABLES */
.tw { overflow-x: auto; background: var(--card-bg); border-radius: var(--r); box-shadow: var(--shadow); }
.tw table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tw th { 
    text-align: left; 
    padding: 14px 18px; 
    background: var(--bd2); 
    font-weight: 600; 
    color: var(--tx2); 
    font-size: 12px; 
    text-transform: uppercase; 
    letter-spacing: .5px; 
}
.tw td { padding: 12px 18px; border-bottom: 1px solid var(--bd2); }
.tw tr:last-child td { border-bottom: 0; }
.tw tr:hover td { background: rgba(46,125,50,.03); }

/* CHAT */
.chat-box { background: var(--card-bg); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.chat-msgs { height: 360px; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.chat-m { max-width: 80%; padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.6; }
.chat-m.u { align-self: flex-end; background: var(--p); color: #fff; border-bottom-right-radius: 4px; }
.chat-m.b { align-self: flex-start; background: var(--bd); color: var(--tx); border-bottom-left-radius: 4px; }
.chat-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--bd); }
.chat-row input { flex: 1; padding: 10px 14px; border: 1px solid var(--bd); border-radius: var(--r); background: var(--ip); color: var(--tx); }

/* TABS */
.tabs { display: flex; gap: 4px; background: var(--bd); border-radius: var(--r); padding: 4px; margin-bottom: 20px; }
.tab-b { 
    flex: 1; 
    padding: 10px; 
    border: none; 
    background: transparent; 
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 13px; 
    cursor: pointer; 
    transition: .2s; 
    color: var(--tx2); 
}
.tab-b.on { background: var(--card-bg); box-shadow: var(--shadow); color: var(--p); }
.tab-b:hover:not(.on) { background: rgba(255,255,255,.3); }
.tab-c { display: none; animation: fv .3s ease; }
.tab-c.on { display: block; }

/* MODAL GERAL */
.mdl-bg { 
    display: none; 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,.5); 
    backdrop-filter: blur(4px);
    z-index: 999; 
    align-items: center; 
    justify-content: center; 
    padding: 20px; 
}
.mdl-bg.on { display: flex; }
.mdl { 
    background: var(--card-bg); 
    border-radius: 24px; 
    padding: 32px 28px; 
    max-width: 520px; 
    width: 100%; 
    max-height: 90vh; 
    overflow-y: auto; 
    position: relative; 
    box-shadow: 0 20px 60px rgba(0,0,0,.3); 
}
.mdl-x { 
    position: absolute; 
    top: 12px; 
    right: 16px; 
    background: var(--bd); 
    border: none; 
    border-radius: 50%; 
    width: 36px; 
    height: 36px; 
    font-size: 16px; 
    cursor: pointer; 
    color: var(--tx); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: .2s; 
}
.mdl-x:hover { background: var(--tx3); color: #fff; transform: rotate(90deg); }

/* ============================================================
   MODAL DE VÍDEO (NOVO) - Player interno com iframe
   ============================================================ */
#videoModal .mdl {
    max-width: 900px;
    padding: 0;
    background: #0a0a0a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
#videoModal .video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0,0,0,.8);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
#videoModal .video-header span {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}
#videoModal .video-header .mdl-x {
    position: static;
    background: rgba(255,255,255,.1);
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s;
}
#videoModal .video-header .mdl-x:hover {
    background: rgba(255,255,255,.2);
    transform: rotate(90deg);
}
#videoModal .video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background: #000;
}
#videoModal .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
#videoModal .video-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0,0,0,.8);
    border-top: 1px solid rgba(255,255,255,.08);
    flex-wrap: wrap;
    gap: 10px;
}
#videoModal .video-footer .progress-text {
    color: #aaa;
    font-size: 13px;
}
#videoModal .video-footer .btn-concluir {
    display: none;
    background: var(--p);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
}
#videoModal .video-footer .btn-concluir:hover {
    background: var(--p3);
    transform: scale(1.02);
}
#videoModal .video-footer .btn-concluir.show {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* RESPONSIVE - Video Modal */
@media (max-width: 768px) {
    #videoModal .mdl {
        border-radius: 12px;
        margin: 10px;
        max-width: 100%;
    }
    #videoModal .video-header span {
        font-size: 12px;
        max-width: 60%;
    }
    #videoModal .video-footer {
        flex-direction: column;
        align-items: stretch;
    }
    #videoModal .video-footer .btn-concluir {
        width: 100%;
        justify-content: center;
    }
}

/* NOTIF POPUP */
.notif-popup { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    max-width: 380px; 
    width: 100%; 
    background: var(--card-bg); 
    border-radius: 16px; 
    box-shadow: 0 12px 48px rgba(0,0,0,.15); 
    z-index: 1000; 
    transform: translateY(120px); 
    opacity: 0; 
    transition: .4s; 
    border-left: 4px solid var(--p); 
}
.notif-popup.show { transform: translateY(0); opacity: 1; }
.notif-popup-hd { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 14px 18px; 
    background: var(--p); 
    color: #fff; 
    border-radius: 16px 16px 0 0; 
}
.notif-popup-hd h4 { font-size: 14px; }
.notif-popup-bd { padding: 16px 18px; font-size: 14px; color: var(--tx); }
.notif-popup-ft { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px 18px; border-top: 1px solid var(--bd); }

/* TOAST */
#toast { 
    position: fixed; 
    bottom: 20px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 2000; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 8px; 
    pointer-events: none; 
}
.toast { 
    background: var(--tx); 
    color: #fff; 
    padding: 12px 24px; 
    border-radius: var(--r); 
    font-weight: 500; 
    font-size: 14px; 
    box-shadow: 0 8px 24px rgba(0,0,0,.2); 
    animation: toastIn .3s ease; 
    pointer-events: auto; 
    max-width: 500px;
    text-align: center;
}
.toast.err { background: #C62828; }
.toast.warn { background: #E65100; }
.toast.info { background: #1565C0; }
.toast.success { background: #2E7D32; }

/* MISC */
.empty { text-align: center; padding: 48px 20px; color: var(--tx3); }
.empty i { font-size: 48px; margin-bottom: 12px; opacity: .3; display: block; }
.empty h4 { font-size: 16px; color: var(--tx2); margin-top: 4px; }
.wc { font-size: 24px; font-weight: 800; }
.wcs { color: var(--tx2); margin-bottom: 20px; font-size: 15px; }
.btn-back { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    font-size: 13px; 
    color: var(--tx3); 
    cursor: pointer; 
    margin-bottom: 16px; 
    transition: .2s; 
}
.btn-back:hover { color: var(--p); transform: translateX(-4px); }
.search { 
    width: 100%; 
    padding: 12px 16px; 
    background: var(--ip); 
    border: 1px solid var(--bd); 
    border-radius: var(--r); 
    font-size: 14px; 
    color: var(--tx); 
    margin: 12px 0; 
    transition: .2s;
}
.search:focus { border-color: var(--p); box-shadow: 0 0 0 3px rgba(46,125,50,.1); }

/* CONFIG */
.cfg-w { display: flex; gap: 24px; background: var(--card-bg); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.cfg-sb { width: 200px; padding: 20px; border-right: 1px solid var(--bd); flex-shrink: 0; }
.cfg-tb { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 10px 14px; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: .2s; 
    font-size: 14px; 
    color: var(--tx2); 
}
.cfg-tb:hover { background: var(--bd); }
.cfg-tb.on { background: var(--p); color: #fff; }
.cfg-bd { flex: 1; padding: 24px 28px; }
.cfg-sc { display: none; }
.cfg-sc.on { display: block; animation: fv .3s ease; }
.cfg-grp { margin-bottom: 18px; }
.cfg-grp label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; color: var(--tx2); }
.cfg-grp input, .cfg-grp select { 
    width: 100%; 
    padding: 10px 14px; 
    background: var(--ip); 
    border: 1px solid var(--bd); 
    border-radius: var(--r); 
    font-size: 14px; 
    color: var(--tx); 
}
.tema-g { display: flex; flex-wrap: wrap; gap: 12px; }
.tema-o { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 8px 16px; 
    border-radius: 40px; 
    border: 2px solid var(--bd); 
    cursor: pointer; 
    transition: .2s; 
    font-size: 13px; 
}
.tema-o:hover { transform: scale(1.05); }
.tema-o.on { border-color: var(--p); background: rgba(46,125,50,.08); }
.tema-dot { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }

/* GRID CHARTS */
.ch-g { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.ch-b { background: var(--card-bg); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); }
.ch-b h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pnl { background: var(--card-bg); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0; }
.pnl-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pnl-t { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.god-hd { margin-bottom: 20px; }
.god-hd h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.god-hd p { color: var(--tx2); font-size: 14px; margin-top: 4px; }
.mt-c { 
    background: var(--card-bg); 
    border-radius: var(--r); 
    padding: 16px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: var(--shadow); 
    margin-bottom: 12px; 
    transition: .2s;
}
.mt-c:hover { transform: translateX(4px); box-shadow: var(--shadow-hover); }
.mt-topic { font-weight: 700; font-size: 16px; }
.mt-id { font-size: 12px; color: var(--tx3); }

/* LOADING */
.loading { text-align: center; padding: 40px; color: var(--tx3); }
.loading i { font-size: 32px; animation: spin 1s linear infinite; display: block; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* KEYFRAMES */
@keyframes fv { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ============================================================
   CARDS DE NR - VERSÃO COMPACTA (PADRÃO)
   ============================================================ */
.grid-nrs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding: 20px 0;
}
.card-nr {
  background: var(--card-bg);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 12px;
  transition: .2s;
}
.card-nr:hover {
  border-color: var(--p);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.card-nr-hd {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bd);
}
.nr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--p);
  color: #000;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 6px;
}
.card-nr h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
  line-height: 1.2;
}
.admin-area {
  margin: 8px 0;
}
.admin-area label {
  display: block;
  font-size: 10px;
  color: var(--tx2);
  margin-bottom: 4px;
}
.admin-area input {
  width: 100%;
  margin-bottom: 6px;
  padding: 6px 8px;
  background: var(--ip);
  border: 1px solid var(--bd);
  border-radius: 5px;
  color: var(--tx);
  font-size: 11px;
}
.admin-area .btn-sm {
  padding: 6px 10px;
  font-size: 11px;
}
.aluno-area .btn-block {
  padding: 8px;
  font-size: 12px;
}
.sem-video {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: var(--ip);
  border-radius: 6px;
  font-size: 11px;
  color: var(--tx3);
}

/* RESPONSIVE GERAL (unificado com as correções) */
@media (max-width: 768px) {
    .sidebar { width: 64px; }
    .sb-hd .lt, .sb-role span, .sb-lbl, .ni span, .sb-name { display: none; }
    .ni { justify-content: center; padding: 12px; }
    .sb-role { justify-content: center; padding: 6px; }
    .sb-ft { justify-content: center; }
    .main { margin-left: 64px; padding: 80px 16px 20px 16px; }
    .ch-g { grid-template-columns: 1fr; }
    .cfg-w { flex-direction: column; }
    .cfg-sb { width: 100%; border-right: 0; border-bottom: 1px solid var(--bd); display: flex; flex-wrap: wrap; gap: 4px; }
    .auth-card { padding: 24px 18px; }
    .notif-popup { right: 10px; left: 10px; max-width: none; bottom: 10px; }
    .mt-c { flex-direction: column; align-items: stretch; gap: 10px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .card { padding: 16px 12px; }
    .card-ic { font-size: 24px; }
    .card-t { font-size: 13px; }
    .grid-nrs { 
        grid-template-columns: 1fr; 
        gap: 10px;
        padding: 10px 0;
    }
    .card-nr .admin-area input {
        font-size: 16px; /* evita zoom no iPhone */
    }
}


/* ============================================================
   NOTIFICAÇÕES NA SIDEBAR (DROPDOWN MODERNO)
   ============================================================ */
.sb-notif-wrap { position: relative; }
.sb-notif-btn {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all .2s ease;
    font-size: 13px;
}
.sb-notif-btn:hover {
    background: rgba(46,125,50,.4);
    border-color: var(--p2);
    transform: scale(1.05);
}
.sb-notif-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: #E53935;
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
    border: 2px solid var(--sb);
    animation: notifPulse 2.5s infinite;
}
@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.sb-notif-dropdown {
    position: fixed; /* Fixa na tela, não no botão */
    top: 65px; /* Altura logo abaixo do cabeçalho do sino */
    left: 250px; /* Empurra para fora da sidebar (que tem ~240px) */
    width: 320px;
    max-width: 90vw;
    background: var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.28);
    border: 1px solid var(--bd);
    z-index: 1000;
    display: none;
    color: var(--tx);
    overflow: hidden;
    animation: fv .2s ease;
}

.sb-notif-dropdown.show { display: block; }

/* Ajuste para celular: a sidebar fica escondida, então o balão encosta na esquerda */
@media (max-width: 768px) {
    .sb-notif-dropdown {
        left: 10px;
        width: 90vw;
        top: 70px;
    }
}

.sb-notif-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--bd2);
    font-size: 13px; font-weight: 700;
    background: var(--ip);
}

.sb-notif-action {
    background: none; border: none;
    color: var(--p);
    font-size: 11px; font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.sb-notif-action:hover { text-decoration: underline; }
.sb-notif-list {
    max-height: 320px;
    overflow-y: auto;
}
.sb-notif-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--bd2);
    cursor: pointer;
    transition: background .15s;
    display: flex; gap: 10px; align-items: flex-start;
}
.sb-notif-item:last-child { border-bottom: none; }
.sb-notif-item:hover { background: rgba(46,125,50,.05); }
.sb-notif-item.unread {
    background: rgba(46,125,50,.07);
    border-left: 3px solid var(--p);
}
.sb-notif-item-ic {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: rgba(46,125,50,.12);
    color: var(--p);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}
.sb-notif-item-title { font-size: 12.5px; font-weight: 700; color: var(--tx); margin-bottom: 2px; line-height: 1.3; }
.sb-notif-item-msg { font-size: 11.5px; color: var(--tx2); line-height: 1.4; }
.sb-notif-item-time { font-size: 10px; color: var(--tx3); margin-top: 4px; }

/* ADMIN - Cards Modernos */
.st-mod {
    background: var(--card-bg);
    border-radius: var(--r);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: .3s;
    border-left: 4px solid var(--p);
}
.st-mod:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.st-mod-ic {
    width: 48px;
    height: 48px;
    background: rgba(46,125,50,0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--p);
    flex-shrink: 0;
}
.st-mod-v { font-size: 26px; font-weight: 800; color: var(--p); line-height: 1.1; }
.st-mod-l { font-size: 12px; color: var(--tx3); font-weight: 500; margin-top: 2px; }

/* CHARTS - fundo transparente */
.ch-g { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.ch-b {
    background: var(--card-bg);
    border-radius: var(--r);
    padding: 20px;
    box-shadow: var(--shadow);
}
.ch-b h3 { font-size: 14px; font-weight: 700; color: var(--tx2); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* PROFESSOR AREA */
.pnl { background: var(--card-bg); border-radius: var(--r); padding: 20px 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.pnl-h { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--bd); }
.pnl-t { font-size: 15px; font-weight: 700; color: var(--p); display: flex; align-items: center; gap: 8px; }
.god-hd { background: linear-gradient(135deg, var(--p), var(--p3)); color: #fff; border-radius: var(--r); padding: 20px 24px; margin-bottom: 24px; }
.god-hd h2 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.god-hd p { font-size: 13px; opacity: .85; }

@media (max-width: 640px) {
    .ch-g { grid-template-columns: 1fr; }
}

/* ============================================================
   CENTRAL ADMINISTRATIVA + ALMOXARIFADO
   ============================================================ */
.adm-hero, .almox-hero {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
    flex-wrap: wrap; background: linear-gradient(135deg, var(--p), var(--p3));
    color: #fff; border-radius: var(--r, 16px); padding: 24px 28px;
    margin-bottom: 22px; box-shadow: var(--shadow, 0 8px 32px rgba(0,0,0,.08));
}
.adm-hero-main, .almox-hero > div:first-child { min-width: 240px; flex: 1; }
.adm-hero h1, .almox-hero h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; line-height: 1.15; margin: 6px 0 6px; color: #fff; }
.adm-hero p, .almox-hero p { font-size: 13px; line-height: 1.55; opacity: .9; max-width: 720px; }
.adm-eyebrow {
    display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase; background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.25); padding: 5px 10px; border-radius: 999px;
}
.adm-user { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 12px; opacity: .92; }
.adm-hero-actions, .almox-toolbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-hero-actions .btn, .almox-hero .btn { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.adm-hero-actions .btn-p, .almox-hero .btn-p { background: #fff; color: var(--p3); border-color: #fff; }
.adm-hero-actions .btn:hover, .almox-hero .btn:hover { background: rgba(255,255,255,.24); }
.adm-hero-actions .btn-p:hover, .almox-hero .btn-p:hover { background: #f1f1f1; }

.adm-section-title {
    display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800;
    color: var(--tx, #1a1a1a); margin: 22px 0 12px;
}
.adm-section-title i { color: var(--p); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi {
    display: flex; align-items: flex-start; gap: 12px; background: var(--card-bg, #fff);
    border: 1px solid var(--bd); border-left: 4px solid var(--p); border-radius: 14px;
    padding: 15px 16px; box-shadow: 0 2px 10px rgba(0,0,0,.04); min-width: 0;
}
.kpi-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(46,125,50,.12); color: var(--p); font-size: 16px; }
.kpi-info { min-width: 0; }
.kpi-v { font-size: 21px; font-weight: 900; line-height: 1.1; color: var(--tx); overflow-wrap: anywhere; }
.kpi-l { font-size: 11px; font-weight: 700; color: var(--tx2); margin-top: 3px; }
.kpi-d { font-size: 10px; color: var(--tx3); margin-top: 3px; line-height: 1.35; }
.kpi-warn { border-left-color: #E65100; } .kpi-warn .kpi-ic { background: rgba(255,152,0,.14); color: #E65100; }
.kpi-ok { border-left-color: #2E7D32; }
.kpi-danger { border-left-color: #C62828; } .kpi-danger .kpi-ic { background: rgba(198,40,40,.13); color: #C62828; }
.kpi-gold { border-left-color: #C9B037; } .kpi-gold .kpi-ic { background: rgba(201,176,55,.16); color: #9a8517; }

.adm-alerts { display: grid; gap: 9px; margin: 4px 0 18px; }
.alm-alert {
    display: flex; align-items: center; gap: 12px; background: var(--card-bg, #fff);
    border: 1px solid var(--bd); border-left: 4px solid var(--p); border-radius: 12px; padding: 12px 14px;
}
.alm-alert > i { font-size: 18px; flex: 0 0 20px; text-align: center; }
.alm-alert > div { flex: 1; min-width: 0; }
.alm-alert strong { display: block; font-size: 13px; color: var(--tx); }
.alm-alert span { display: block; font-size: 11px; color: var(--tx2); margin-top: 2px; }
.alm-alert-ok { border-left-color: #2E7D32; } .alm-alert-ok > i { color: #2E7D32; }
.alm-alert-warn { border-left-color: #E65100; } .alm-alert-warn > i { color: #E65100; }
.alm-alert-danger { border-left-color: #C62828; } .alm-alert-danger > i { color: #C62828; }
.alm-alert-info { border-left-color: #1565C0; } .alm-alert-info > i { color: #1565C0; }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.chart-card { background: var(--card-bg, #fff); border: 1px solid var(--bd); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.chart-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.chart-card h3 { font-size: 13px; font-weight: 800; color: var(--tx); display: flex; align-items: center; gap: 7px; }
.chart-card h3 i { color: var(--p); }
.chart-hint { font-size: 10px; color: var(--tx3); text-align: right; }
.chart-canvas { position: relative; height: 240px; }
.chart-canvas canvas { max-height: 240px; }

.adm-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.adm-split > * { min-width: 0; }
.adm-resumo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 9px; margin-bottom: 16px; }
.adm-resumo-item { background: var(--ip, #f8fafa); border: 1px solid var(--bd2); border-radius: 10px; padding: 10px 12px; }
.adm-resumo-item span { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tx3); }
.adm-resumo-item strong { display: block; font-size: 19px; font-weight: 900; color: var(--p); line-height: 1.2; }
.adm-resumo-item small { display: block; font-size: 10px; color: var(--tx3); }
.adm-subtitle { font-size: 12px; font-weight: 800; color: var(--tx2); margin: 14px 0 8px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 9px; }
.quick-card {
    display: flex; align-items: center; gap: 9px; padding: 12px; border-radius: 11px;
    border: 1px solid var(--bd); background: var(--ip, #f8fafa); color: var(--tx);
    font: 700 12px 'Inter', sans-serif; cursor: pointer; text-align: left; transition: .2s;
}
.quick-card i { color: var(--p); font-size: 15px; }
.quick-card:hover { border-color: var(--p); background: rgba(46,125,50,.07); transform: translateY(-1px); }

/* Almoxarifado */
.almox-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--bd); margin-bottom: 18px; }
.almox-tab {
    display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border: 0;
    border-bottom: 3px solid transparent; background: transparent; color: var(--tx2);
    font: 700 12px 'Inter', sans-serif; cursor: pointer; border-radius: 8px 8px 0 0;
}
.almox-tab:hover { background: var(--ip); color: var(--p); }
.almox-tab.on { color: var(--p); border-bottom-color: var(--p); background: rgba(46,125,50,.06); }
.almox-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.almox-toolbar .adm-section-title { margin: 0 0 3px; }
.almox-muted { color: var(--tx3); font-size: 11px; }
.almox-inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--tx2); }
.almox-inline-field select, .almox-inline-field input { width: auto; min-width: 90px; padding: 7px 9px; border: 1px solid var(--bd); border-radius: 8px; background: var(--ip); color: var(--tx); font-size: 12px; }
.almox-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--card-bg); border: 1px solid var(--bd); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.almox-filters .search, .almox-filters select, .almox-filters input[type="date"] { margin: 0; min-width: 150px; padding: 9px 11px; border: 1px solid var(--bd); border-radius: 9px; background: var(--ip); color: var(--tx); font-size: 12px; }
.almox-filters .search { flex: 1 1 220px; }
.almox-lista-info { font-size: 11px; font-weight: 700; color: var(--tx3); margin-bottom: 8px; }
.almox-acoes { white-space: nowrap; }
.almox-acoes .btn { padding: 6px 8px; }
.almox-paginacao { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 4px; font-size: 11px; color: var(--tx2); }
.almox-paginacao .btn[disabled] { opacity: .45; cursor: not-allowed; }
.almox-config { text-align: center; background: var(--card-bg); border: 1px dashed var(--bd); border-radius: 16px; padding: 42px 22px; }
.almox-config > i { font-size: 42px; color: var(--p); margin-bottom: 12px; }
.almox-config h3 { font-size: 17px; font-weight: 800; color: var(--tx); margin-bottom: 6px; }
.almox-config p { font-size: 12px; color: var(--tx2); max-width: 560px; margin: 0 auto 10px; line-height: 1.6; }
.almox-config code { display: block; font-size: 11px; background: var(--ip); padding: 8px 10px; border-radius: 8px; color: var(--p3); margin: 10px auto; max-width: 560px; overflow-wrap: anywhere; }
.almox-config .btn { margin-top: 8px; }
.almox-cat-lista { border: 1px solid var(--bd); border-radius: 10px; margin-bottom: 14px; max-height: 220px; overflow: auto; }
.almox-cat-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-bottom: 1px solid var(--bd2); font-size: 12px; }
.almox-cat-item:last-child { border-bottom: 0; }
.almox-cat-item strong { color: var(--tx); }
.almox-mdl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-right: 28px; }
.almox-mdl-ic { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(46,125,50,.12); color: var(--p); font-size: 17px; }
.almox-mdl-head h2 { font-size: 17px; font-weight: 800; color: var(--tx); }
.almox-mdl-head p { font-size: 11px; color: var(--tx3); margin-top: 2px; }
.almox-form { display: grid; gap: 11px; }
.almox-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.almox-field { display: grid; gap: 5px; font-size: 11px; font-weight: 700; color: var(--tx2); }
.almox-field input, .almox-field select, .almox-field textarea {
    width: 100%; padding: 9px 11px; border: 1px solid var(--bd); border-radius: 9px;
    background: var(--ip); color: var(--tx); font: 400 13px 'Inter', sans-serif;
}
.almox-field input:focus, .almox-field select:focus, .almox-field textarea:focus { outline: 2px solid var(--p); outline-offset: 1px; }
.almox-field small { font-weight: 400; color: var(--tx3); font-size: 10px; }
.almox-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.almox-resumo-mov { background: var(--ip); border: 1px solid var(--bd2); border-radius: 10px; padding: 10px 12px; font-size: 12px; margin-bottom: 12px; }
.almox-resumo-mov p { margin: 2px 0; color: var(--tx); }
.mov-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.mov-entrada { background: rgba(46,125,50,.15); color: #2E7D32; }
.mov-saida { background: rgba(198,40,40,.13); color: #C62828; }
.mov-ajuste { background: rgba(21,101,192,.13); color: #1565C0; }
.mov-transferencia { background: rgba(123,31,162,.13); color: #7B1FA2; }
.mov-perda { background: rgba(230,81,0,.14); color: #E65100; }
.mov-estorno { background: rgba(100,100,100,.15); color: #555; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.report-card { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; background: var(--card-bg); border: 1px solid var(--bd); border-radius: 13px; padding: 14px; }
.report-ic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(46,125,50,.1); color: var(--p); }
.report-body { flex: 1; min-width: 150px; }
.report-body h3 { font-size: 12px; font-weight: 800; color: var(--tx); }
.report-body p { font-size: 10px; color: var(--tx3); line-height: 1.45; margin-top: 3px; }
.report-actions { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }

@media (max-width: 900px) {
    .adm-split, .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .adm-hero, .almox-hero { padding: 18px; }
    .almox-form-grid { grid-template-columns: 1fr; }
    .almox-filters .search, .almox-filters select, .almox-filters input[type="date"] { flex: 1 1 100%; width: 100%; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .kpi { padding: 12px; }
    .kpi-v { font-size: 18px; }
}
@media (max-width: 420px) {
    .kpi-grid { grid-template-columns: 1fr; }
}

.almox-unidades-pnl { padding: 14px 18px; margin-bottom: 18px; }
.almox-unidades { display: flex; flex-wrap: wrap; gap: 8px; }
.almox-unidade {
    display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 12px;
    border: 1px solid var(--bd); border-radius: 10px; background: var(--ip, #f8fafa);
}
.almox-unidade span { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--tx3); }
.almox-unidade strong { font-size: 15px; font-weight: 900; color: var(--p); }

/* ============================================================
   DOSSIE SISTEC
   ============================================================ */
.dossie-alerta {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255, 152, 0, .12);
    border: 1px solid rgba(255, 152, 0, .35);
    color: #8a4b00;
    border-radius: var(--r);
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 13px;
}
.dossie-alerta i { font-size: 20px; margin-top: 2px; }
.dossie-alerta strong { display: block; margin-bottom: 2px; }
.dossie-alerta p { margin: 0; line-height: 1.5; }

.dossie-resumo {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    background: var(--card-bg);
    border-radius: var(--r);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.dossie-resumo-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--tx3);
    margin-bottom: 6px;
}
.dossie-resumo-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.dossie-progresso { flex: 0 1 340px; min-width: 240px; }
.dossie-progresso-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--tx2);
}
.dossie-progresso-topo strong { color: var(--p); font-size: 18px; }
.dossie-progresso small { display: block; margin-top: 7px; color: var(--tx3); }

.dossie-cols {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 20px;
    align-items: start;
}
.dossie-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px 16px;
}
.dossie-full { grid-column: 1 / -1; }
.dossie-grid .fld { margin-bottom: 12px; }
.dossie-rodape {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--bd2);
    padding-top: 14px;
    margin-top: 4px;
}
.dossie-rodape small { color: var(--tx3); font-size: 11px; line-height: 1.4; }

.dossie-foto { text-align: center; }
.dossie-foto img {
    width: 140px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid var(--gold);
    background: var(--bd2);
    display: block;
    margin: 0 auto 12px;
}
.dossie-foto-vazia {
    width: 140px;
    height: 180px;
    border: 2px dashed var(--bd);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 12px;
    color: var(--tx3);
    font-size: 11px;
    background: var(--bd2);
}
.dossie-foto-vazia i { font-size: 42px; opacity: .5; }
.dossie-foto p { font-size: 11px; color: var(--tx3); line-height: 1.5; margin-bottom: 12px; }

.dossie-orientacoes {
    background: var(--bd2);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
}
.dossie-orientacoes h4 { font-size: 12px; margin-bottom: 8px; color: var(--p); }
.dossie-orientacoes ul { margin: 0; padding-left: 16px; }
.dossie-orientacoes li { font-size: 11px; color: var(--tx2); line-height: 1.5; margin-bottom: 4px; }

.dossie-docs { display: flex; flex-direction: column; }
.dossie-doc {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--bd2);
}
.dossie-doc:last-child { border-bottom: 0; padding-bottom: 0; }
.dossie-doc-info { min-width: 0; }
.dossie-doc-titulo {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dossie-doc-titulo i { color: var(--p); }
.dossie-doc-info p { font-size: 12px; color: var(--tx3); margin: 3px 0; }
.dossie-doc-info small { font-size: 11px; color: var(--tx2); display: block; }
.dossie-doc-acoes {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.dossie-doc-acoes .btn { padding: 6px 10px; font-size: 11px; }
.dossie-obrig, .dossie-opcional {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-radius: 20px;
    padding: 2px 8px;
}
.dossie-obrig { background: rgba(255, 152, 0, .15); color: #b45309; }
.dossie-opcional { background: var(--bd2); color: var(--tx3); }
.dossie-obs { color: #b45309 !important; font-size: 11px; }
.dossie-ok, .dossie-pendente {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
}
.dossie-ok { color: var(--p); }
.dossie-pendente { color: #b45309; }

.dossie-filtros {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}
.dossie-filtros .search { margin: 0; flex: 1; }
.dossie-filtros select {
    background: var(--ip);
    border: 1px solid var(--bd);
    border-radius: var(--r);
    padding: 11px 14px;
    color: var(--tx);
    font-size: 13px;
    min-width: 180px;
}
.dossie-aluno { display: flex; align-items: center; gap: 10px; }
.dossie-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--p);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}
.dossie-linha small { color: var(--tx3); font-size: 11px; }

.dossie-mdl-hd {
    display: flex;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid var(--bd2);
    padding-bottom: 16px;
    margin-bottom: 16px;
    padding-right: 36px;
}
.dossie-mdl-foto {
    width: 96px;
    height: 120px;
    border-radius: 12px;
    background: var(--bd2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--gold);
}
.dossie-mdl-foto img { width: 100%; height: 100%; object-fit: cover; }
.dossie-mdl-foto i { font-size: 40px; color: var(--tx3); opacity: .5; }
.dossie-mdl-hd h2 { font-size: 19px; line-height: 1.2; }
.dossie-mdl-hd p { font-size: 12px; color: var(--tx3); margin-top: 3px; }
.dossie-mdl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 18px;
    background: var(--bd2);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.dossie-mdl-grid div { min-width: 0; }
.dossie-mdl-grid span {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--tx3);
}
.dossie-mdl-grid strong { font-size: 12px; overflow-wrap: anywhere; }
.dossie-mdl-secao { font-size: 14px; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.dossie-mdl-docs { margin-bottom: 16px; }
.dossie-mdl-doc {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--bd2);
}
.dossie-mdl-doc:last-child { border-bottom: 0; }
.dossie-mdl-doc small { color: var(--tx3); font-size: 11px; }
.dossie-mdl-doc-acoes {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.dossie-mdl-doc-acoes .btn { padding: 5px 8px; font-size: 10px; }
.dossie-mdl-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.dossie-mdl-upload {
    background: var(--bd2);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.dossie-mdl-upload-hd {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
}
.dossie-mdl-upload-hd strong { font-size: 13px; }
.dossie-mdl-upload-hd small {
    font-size: 11px;
    color: var(--tx3);
    line-height: 1.5;
}
.dossie-mdl-upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
    gap: 12px;
    align-items: end;
}
.dossie-mdl-upload-form .fld { margin: 0; }
.dossie-mdl-upload-form .btn { min-height: 42px; }
.dossie-mdl-upload .dossie-mdl-aviso { margin: 10px 0 0; }
.dossie-mdl-acoes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid var(--bd2);
    padding-top: 14px;
}
.dossie-mdl-aviso {
    font-size: 11px;
    color: #b45309;
    margin-top: 10px;
    line-height: 1.5;
}

@media (max-width: 1000px) {
    .dossie-cols { grid-template-columns: 1fr; }
    .dossie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dossie-mdl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .dossie-resumo { flex-direction: column; }
    .dossie-progresso { flex: 1 1 auto; width: 100%; }
    .dossie-grid, .dossie-mdl-grid { grid-template-columns: 1fr; }
    .dossie-rodape { flex-direction: column; align-items: stretch; }
    .dossie-rodape .btn { width: 100%; }
    .dossie-doc, .dossie-mdl-doc { flex-direction: column; align-items: flex-start; }
    .dossie-doc-acoes, .dossie-mdl-doc-acoes { justify-content: flex-start; }
    .dossie-filtros { flex-direction: column; align-items: stretch; }
    .dossie-filtros select { width: 100%; }
    .dossie-mdl-upload-form { grid-template-columns: 1fr; }
    .dossie-mdl-upload-form .btn { width: 100%; }
    .dossie-mdl-acoes .btn { width: 100%; }
}
