:root{--green:#22c55e;--blue:#0ea5e9;--yellow:#facc15;--dark:#07111d;--gray:#f3f6fa;--text:#0f172a}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--gray);color:var(--text)}a{text-decoration:none}.splash{min-height:100vh;background:#07111d url('../img/abertura_gmb.png') center/cover no-repeat;position:relative}.splash-actions{position:absolute;right:40px;bottom:36px}.enter-btn{display:inline-flex;gap:10px;align-items:center;padding:16px 28px;border-radius:999px;background:rgba(34,197,94,.14);border:1px solid rgba(34,197,94,.75);color:white;font-weight:900;box-shadow:0 0 35px rgba(34,197,94,.45)}.topbar{background:#07111d;color:white;border-bottom:1px solid rgba(255,255,255,.08);position:sticky;top:0;z-index:50}.topbar-inner{max-width:1280px;margin:auto;padding:16px 22px;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{display:flex;align-items:center;gap:14px}.brand img{height:52px;max-width:170px;object-fit:contain}.brand h1{margin:0;font-size:22px}.brand p{margin:2px 0 0;color:#94a3b8;font-size:13px}.top-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.search{height:46px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.08);color:white;padding:0 18px;min-width:300px;outline:none}.google-bar{display:flex;align-items:center;gap:8px;background:#3f454c;border-radius:999px;padding:0 10px 0 18px;height:46px}.google-bar input{background:transparent;border:0;outline:none;color:white;width:260px}.google-bar button{background:transparent;border:0;color:white;font-size:18px;cursor:pointer}.content{max-width:1280px;margin:auto;padding:26px 22px}.hero{border-radius:30px;background:linear-gradient(135deg,#0f172a,#07111d);color:white;padding:34px;box-shadow:0 20px 50px rgba(0,0,0,.18);position:relative;overflow:hidden}.hero:after{content:'';position:absolute;right:-100px;top:-100px;width:300px;height:300px;background:rgba(14,165,233,.18);border-radius:50%;filter:blur(35px)}.hero h2{font-size:42px;margin:12px 0 10px;max-width:820px}.hero p{color:#cbd5e1;line-height:1.7;max-width:850px}.badge{display:inline-flex;padding:8px 13px;border-radius:999px;font-size:12px;font-weight:900;text-transform:uppercase}.badge-cyan,.badge-blue{background:#e0f2fe;color:#0369a1}.badge-red{background:#fee2e2;color:#b91c1c}.badge-yellow{background:#fef3c7;color:#92400e}.grid{display:grid;gap:18px}.grid-3{grid-template-columns:repeat(3,1fr)}.card{background:white;border:1px solid #e5e7eb;border-radius:24px;padding:22px;box-shadow:0 12px 30px rgba(15,23,42,.06)}.notice-card{border-top:4px solid var(--yellow)}.system-card{transition:.22s}.system-card:hover{transform:translateY(-4px);box-shadow:0 22px 44px rgba(15,23,42,.12)}.system-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.system-ico{width:60px;height:60px;border-radius:18px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;font-size:32px}.pill{font-size:12px;font-weight:900;color:#15803d;background:#dcfce7;border-radius:999px;padding:7px 10px}.muted{color:#64748b}.btn{display:inline-flex;align-items:center;justify-content:center;border-radius:14px;padding:12px 16px;font-weight:900;border:0}.btn-primary{background:linear-gradient(135deg,var(--green),var(--blue));color:white}.btn-dark{background:#0f172a;color:white}.btn-light{background:white;color:#0f172a;border:1px solid #e5e7eb}.btn-green{background:#22c55e;color:#052e16}.footer{text-align:center;color:#64748b;padding:30px}.ouvidoria-box{background:linear-gradient(135deg,#fff7ed,#fff);border-color:#fed7aa}.admin-shell{display:flex;min-height:100vh}.admin-sidebar{width:260px;background:#07111d;color:white;padding:22px;display:flex;flex-direction:column;gap:8px}.admin-sidebar a{color:#cbd5e1;padding:13px;border-radius:14px}.admin-sidebar a:hover{background:rgba(255,255,255,.08);color:white}.admin-logo{max-width:170px;margin:0 0 20px}.admin-main{flex:1;padding:28px;background:#f3f6fa}.form-card{max-width:900px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-group{margin-bottom:14px}.form-group label{display:block;font-weight:800;margin-bottom:6px}.input,textarea,select{width:100%;padding:13px 14px;border-radius:14px;border:1px solid #dbe3ef;background:white}textarea{min-height:120px}.table{width:100%;border-collapse:collapse;background:white;border-radius:18px;overflow:hidden}.table th,.table td{padding:13px;border-bottom:1px solid #edf2f7;text-align:left}.table th{background:#0f172a;color:white}.alert{padding:14px;border-radius:14px;margin-bottom:16px}.alert-ok{background:#dcfce7;color:#166534}.alert-err{background:#fee2e2;color:#991b1b}@media(max-width:900px){.topbar-inner{align-items:flex-start;flex-direction:column}.top-actions,.google-bar,.google-bar input,.search{width:100%}.grid-3{grid-template-columns:1fr}.hero h2{font-size:30px}.admin-shell{display:block}.admin-sidebar{width:100%}.form-row{grid-template-columns:1fr}}

/* ===== Portal com menu lateral, departamentos e avisos laterais ===== */
.portal-shell{max-width:1480px;margin:auto;display:grid;grid-template-columns:240px 1fr 340px;gap:22px;padding:22px}.portal-sidebar{position:sticky;top:86px;align-self:start;background:#fff;border:1px solid #e5e7eb;border-radius:24px;padding:16px;box-shadow:0 12px 30px rgba(15,23,42,.06)}.side-title{font-size:11px;font-weight:950;text-transform:uppercase;letter-spacing:.12em;color:#64748b;margin:18px 10px 8px}.side-link{display:flex;align-items:center;gap:10px;color:#0f172a;padding:12px 13px;border-radius:15px;font-weight:850;margin-bottom:4px}.side-link:hover,.side-link.active{background:#ecfdf5;color:#166534}.side-ouvidoria{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.portal-main{min-width:0}.compact-hero{padding:28px}.compact-hero h2{font-size:34px}.dept-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:20px 0}.dept-chip{display:flex;flex-direction:column;gap:4px;background:white;border:1px solid #e5e7eb;border-radius:20px;padding:16px;color:#0f172a;box-shadow:0 10px 25px rgba(15,23,42,.05)}.dept-chip span{font-size:28px}.dept-chip strong{font-size:16px}.dept-chip small{color:#64748b;font-weight:750}.departments-list{display:flex;flex-direction:column;gap:28px}.department-block{scroll-margin-top:110px}.department-head{display:flex;align-items:center;gap:16px;border-radius:24px;padding:18px;margin-bottom:16px;background:#0f172a;color:white;box-shadow:0 16px 34px rgba(15,23,42,.12)}.department-icon{width:58px;height:58px;border-radius:18px;background:rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center;font-size:31px}.department-head h2{margin:0;font-size:26px}.department-head p{margin:4px 0 0;color:rgba(255,255,255,.72)}.department-count{margin-left:auto;background:rgba(255,255,255,.12);padding:9px 12px;border-radius:999px;font-size:12px;font-weight:950}.dept-green{border-color:rgba(34,197,94,.25)!important;background:linear-gradient(135deg,rgba(34,197,94,.16),#fff)}.department-head.dept-green{background:linear-gradient(135deg,#064e3b,#0f172a)}.dept-blue{border-color:rgba(14,165,233,.25)!important;background:linear-gradient(135deg,rgba(14,165,233,.14),#fff)}.department-head.dept-blue{background:linear-gradient(135deg,#075985,#0f172a)}.dept-cyan{border-color:rgba(6,182,212,.25)!important;background:linear-gradient(135deg,rgba(6,182,212,.14),#fff)}.department-head.dept-cyan{background:linear-gradient(135deg,#155e75,#0f172a)}.dept-yellow{border-color:rgba(250,204,21,.35)!important;background:linear-gradient(135deg,rgba(250,204,21,.16),#fff)}.department-head.dept-yellow{background:linear-gradient(135deg,#854d0e,#0f172a)}.dept-purple{border-color:rgba(168,85,247,.28)!important;background:linear-gradient(135deg,rgba(168,85,247,.14),#fff)}.department-head.dept-purple{background:linear-gradient(135deg,#581c87,#0f172a)}.dept-red{border-color:rgba(239,68,68,.28)!important;background:linear-gradient(135deg,rgba(239,68,68,.12),#fff)}.department-head.dept-red{background:linear-gradient(135deg,#7f1d1d,#0f172a)}.dept-gray{border-color:#e5e7eb!important;background:#fff}.department-head.dept-gray{background:linear-gradient(135deg,#334155,#0f172a)}.empty-dept{color:#64748b}.notices-sidebar{min-width:0}.notices-sticky{position:sticky;top:86px;background:#fff;border:1px solid #e5e7eb;border-radius:24px;padding:16px;box-shadow:0 12px 30px rgba(15,23,42,.06)}.notices-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.notices-title strong{display:block;font-size:19px}.notices-title span{font-size:12px;color:#64748b}.notices-scroll{max-height:calc(100vh - 170px);overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding-right:4px;scroll-snap-type:y mandatory}.notices-scroll::-webkit-scrollbar{width:7px}.notices-scroll::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:99px}.notice-mini{scroll-snap-align:start;background:#f8fafc;border:1px solid #e5e7eb;border-radius:18px;overflow:hidden}.notice-mini img{width:100%;height:100%;object-fit:cover;display:block}.notice-mini-body{padding:14px}.notice-mini-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.notice-mini h3{margin:0 0 8px;font-size:17px}.notice-mini p{margin:0;color:#64748b;line-height:1.55;font-size:13px}.notice-actions{display:flex;gap:8px;margin-top:12px}.notice-actions a{background:#0f172a;color:white;border-radius:12px;padding:9px 10px;font-size:12px;font-weight:900}.aviso-cover{width:100%;max-height:360px;object-fit:cover;border-radius:22px;margin-bottom:18px}.aviso-detalhe{max-width:900px;margin:auto}.upload-preview{margin-top:10px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}.upload-preview img,.thumb-admin{width:86px;height:58px;object-fit:cover;border-radius:10px;border:1px solid #e5e7eb}.thumb-admin{width:70px;height:46px}.systems-grid .system-card{min-height:260px}
@media(max-width:1180px){.portal-shell{grid-template-columns:220px 1fr}.notices-sidebar{grid-column:1/-1}.notices-sticky{position:relative;top:auto}.notices-scroll{max-height:420px;display:grid;grid-template-columns:repeat(2,1fr);overflow-y:auto}.dept-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.portal-shell{display:block;padding:16px}.portal-sidebar{position:relative;top:auto;margin-bottom:18px}.notices-scroll{display:flex;max-height:420px}.dept-summary{grid-template-columns:1fr}.department-head{align-items:flex-start;flex-wrap:wrap}.department-count{margin-left:0}.topbar-layout{align-items:flex-start}.portal-main{margin-bottom:18px}}
.notice-image{
    margin-bottom:12px;
}

.notice-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:14px;
    border:1px solid #e5e7eb;
}
.mobile-menu-toggle {
    display: none;
    position: fixed;
    left: 14px;
    top: 14px;
    z-index: 100000;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #16a34a);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(0,0,0,.32);
    cursor: pointer;
}

.mobile-backdrop {
    display: none;
}

html, body {
    max-width: 100%;
}

img, video, canvas {
    max-width: 100%;
}

@media(max-width: 900px) {
    body {
        overflow-x: hidden;
    }

    .mobile-menu-toggle {
        display: grid;
        place-items: center;
    }

    .mobile-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 99990;
        background: rgba(2, 6, 23, .72);
        backdrop-filter: blur(4px);
    }

    body.mobile-menu-open .mobile-backdrop {
        display: block;
    }

    .app-shell {
        display: block !important;
        min-height: 100vh;
        width: 100%;
    }

    .sidebar,
    aside.sidebar,
    .app-sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 99999;
        width: 286px !important;
        max-width: 86vw;
        transform: translateX(-105%);
        transition: transform .24s ease;
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow: 18px 0 40px rgba(0,0,0,.38);
    }

    body.mobile-menu-open .sidebar,
    body.mobile-menu-open aside.sidebar,
    body.mobile-menu-open .app-sidebar {
        transform: translateX(0);
    }

    .content-area,
    .main-content,
    main.content-area,
    main.main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 76px 14px 18px !important;
        min-height: 100vh;
    }

    .topbar {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: start;
        margin-bottom: 14px;
    }

    .topbar h1 {
        font-size: 24px !important;
        line-height: 1.15;
    }

    .topbar p {
        font-size: 13px !important;
    }

    .top-actions,
    .conversation-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .new-card,
    .btn-primary,
    .btn-ghost,
    .btn-push-enable {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .metrics-row,
    .online-summary,
    .dashboard-grid,
    .cards-grid,
    .projects-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table th,
    .admin-table td,
    .admin-table tr {
        display: block;
        width: 100%;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tr {
        background: rgba(15, 27, 45, .92);
        border: 1px solid rgba(148, 163, 184, .14);
        border-radius: 16px;
        margin-bottom: 12px;
        padding: 12px;
    }

    .admin-table td {
        border: 0 !important;
        padding: 7px 0 !important;
        display: flex;
        justify-content: space-between;
        gap: 12px;
        color: #cbd5e1;
    }

    .admin-table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: #94a3b8;
        min-width: 110px;
    }

    .table-actions {
        justify-content: flex-start !important;
        flex-wrap: wrap;
    }

    .admin-form input,
    .admin-form select,
    .admin-form textarea,
    .form-panel input,
    .form-panel select,
    .form-panel textarea {
        width: 100% !important;
        font-size: 16px !important;
    }

    .participants-checklist,
    .canal-admin-list {
        max-height: 56vh;
    }

    .canal-user-row {
        grid-template-columns: 1fr !important;
    }

    .chat-page-premium {
        height: auto !important;
        overflow: visible !important;
    }

    .chat-premium-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        height: auto !important;
        overflow: visible !important;
        gap: 12px;
    }

    .chat-channels-panel {
        height: auto !important;
        max-height: 260px;
        overflow-y: auto !important;
    }

    .chat-conversation-panel {
        height: auto !important;
        min-height: 70vh;
    }

    .conversation-header {
        position: sticky;
        top: 0;
        z-index: 5;
        background: rgba(15, 27, 45, .98);
        border-radius: 16px;
    }

    .chat-messages-premium {
        height: 55vh !important;
        min-height: 55vh !important;
        overflow-y: auto !important;
        padding-right: 4px;
    }

    .chat-details-panel {
        display: none !important;
    }

    .chat-composer-premium {
        position: sticky;
        bottom: 0;
        z-index: 10;
        background: rgba(15, 27, 45, .98);
        border-radius: 16px;
        padding: 10px;
    }

    .board,
    .kanban-board,
    .project-kanban {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px;
        overflow: visible !important;
    }

    .kanban-column {
        min-width: 0 !important;
        width: 100% !important;
        max-height: none !important;
    }

    .gmb-chat-toast-container {
        left: 12px !important;
        right: 12px !important;
        bottom: 14px !important;
        width: auto !important;
    }
}

@media(min-width: 901px) and (max-width: 1200px) {
    .chat-premium-layout {
        grid-template-columns: 250px minmax(0, 1fr) !important;
    }

    .chat-details-panel {
        display: none !important;
    }

    .metrics-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
