:root{
    --bg:whitesmoke;
    --sidebar:#111827;
    --card:#1e293b;
    --border:#273449;
    --primary:#f97316;
    --primary-hover:#fb923c;
    --text:black;
    --muted:#94a3b8;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    background:var(--bg);
    color:var(--text);
    font-family:'Segoe UI',sans-serif;
}

/* Layout */

.layout{
    min-height:100vh;
}

/* Sidebar */

.sidebar{
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    width:260px;
    background:var(--sidebar);
    border-right:1px solid var(--border);
    overflow-y:auto;
}

.logo{
    height:50px;
    display:flex;
    align-items:center;
    padding:0 24px;
    font-size:22px;
    font-weight:700;
    color:white;
    border-bottom:1px solid var(--border);
}

.sidebar nav{
    padding:15px 0;
}

.sidebar a{
    display:flex;
    align-items:center;
    height:48px;
    padding:0 24px;
    color:var(--muted);
    text-decoration:none;
    transition:.2s;
}

.sidebar a:hover{
    background:#1e293b;
    color:white;
}

.sidebar a.active{
    background:rgba(249,115,22,.15);
    color:var(--primary);
    border-right:3px solid var(--primary);
}

/* Conteúdo */

.main{
    margin-left:260px;
    min-height:100vh;
}

/* Topo */

.navbar{
    height:50px;
    background-color:#fff !important;
    border-bottom:1px solid #dee2e6;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 30px;
    position:sticky;
    top:0;
    z-index:999;
}

.navbar h2{
    font-size:20px;
    font-weight:600;
    font-family: arial;
}

.user-box{
    display:flex;
    align-items:center;
    gap:12px;
}

/* Conteúdo */

.content{
    padding:30px;
}

/* Cards */

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:20px;
}

.card{
    background: white;
    border:0px solid var(--border);
    border-radius:16px;
    padding:21px;
    transition:.2s;
}

.card:hover{
    transform:translateY(-2px);
    border-color:var(--primary);
    box-shadow:0 10px 30px rgba(0,0,0,.25);
}

.card h3{
    color:var(--muted);
    font-size:14px;
    margin-bottom:15px;
}

.card span{
    font-size:36px;
    font-weight:700;
}

/* Botões */

.btn,
button[type="submit"]{
    border:none;
    border-radius:10px;
    padding:10px 18px;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    transition:.2s ease;
    display:inline-flex;
    align-items:center;
    gap:8px;
}

.btn-primary{
    background:var(--primary);
    color:white;
}

.btn-primary:hover{
    background:var(--primary-hover);
}

.btn-sm{
    padding:.25rem .5rem;
    font-size:.875rem;
    line-height:1.5;
    border-radius:.25rem;
}

/* Tabelas */

.table-container{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:16px;
    overflow:hidden;
}

table{
    width:100%;
    border-collapse:collapse;
}

thead{
    background:#111827!important;
}

thead th{
    padding:14px;
    text-align:left;
    color:gray;
    font-size:12px;
    text-transform:uppercase;
}

tbody td{
    padding:14px;
}

tbody tr{
    border-top:1px solid var(--border);
}

tbody tr:hover{
    background:white;
}
.menu-group{
    border-bottom:1px solid #1e293b;
}

.menu-header{
    width:100%;

    height:48px;

    padding:0 20px;

    background:none;

    border:none;

    color:#94a3b8;

    cursor:pointer;

    display:flex;

    justify-content:space-between;

    align-items:center;

    font-size:13px;

    font-weight:600;
}

.menu-header:hover{
    background:#1e293b;
}

.arrow{
    transition:.2s;
}

.menu-group.open .arrow{
    transform:rotate(180deg);
}

.submenu{
    max-height:0;

    overflow:hidden;

    transition:max-height .3s ease;
}

.menu-group.open .submenu{
    max-height:300px;
}

.submenu a{
    display:flex;

    align-items:center;

    height:42px;

    padding-left:40px;

    color:#cbd5e1;

    text-decoration:none;
}

.submenu a:hover{
    background:#243247;
}

.tabela-wrapper {
    max-height: 500px; /* ajuste conforme necessário */
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    position: sticky;
    top: 0;
    background-color: #fff; /* importante: sem fundo, o conteúdo das linhas aparece por trás ao rolar */
    z-index: 1;
}
/* ==========================
   MENU USUÁRIO
========================== */

.user-menu{
    position:relative;
    display:inline-block;
}

.user-button{
    display:flex;
    align-items:center;
    gap:12px;
    border:none;
    background:none;
    cursor:pointer;
    padding:6px 12px;
    border-radius:10px;
    transition:.2s;
    font-family:'Segoe UI',sans-serif;
}

.user-button:hover{
    background:#f3f4f6;
}

.avatar{
    width:38px;
    height:38px;
    border-radius:50%;
    background:var(--primary);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:16px;
    text-transform:uppercase;
    flex-shrink:0;
}

.user-info{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    line-height:1.2;
}

.user-name{
    font-size:14px;
    font-weight:600;
    color:#111827;
}

.user-info small{
    color:#6b7280;
    font-size:11px;
}

.user-button .fa-chevron-down{
    color:#6b7280;
    font-size:12px;
}

.dropdown-menu{
    position:absolute;
    top:52px;
    right:0;
    width:220px;
    background:white;
    border-radius:12px;
    box-shadow:0 10px 30px rgba(0,0,0,.15);
    overflow:hidden;
    display:none;
    z-index:9999;
    border:1px solid #e5e7eb;
}

.dropdown-menu a{
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px 16px;
    color:#374151;
    text-decoration:none;
    font-size:14px;
    transition:.2s;
}

.dropdown-menu a:hover{
    background:#f8fafc;
}

.dropdown-menu hr{
    border:none;
    border-top:1px solid #e5e7eb;
}

.dropdown-menu .logout{
    color:#dc2626;
}

.user-menu:hover .dropdown-menu{
    display:block;
}
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea{
    width:100%;
    height:42px;
    padding:0 14px;
    border:1px solid #d1d5db;
    border-radius:10px;
    background:#fff;
    color:#111827;
    font-size:14px;
    transition:all .2s ease;
    outline:none;
}

textarea{
    min-height:120px;
    padding:12px 14px;
    resize:vertical;
}
.form-inline{
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:20px;
}

.form-inline .form-control{
    width:250px;
}