* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #0b0b0b; color: #eee; font-family: Arial, Helvetica, sans-serif; min-height: 100vh; }
a { color: #6ee7e7; }

.topbar { position: fixed; top: 0; left: 0; right: 0; height: 58px; background: #f5f5f5; color: #111; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; z-index: 200; }
.topbar .logo { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.topbar .user { font-size: 13px; color: #333; }
.topbar .user a { color: #c00; text-decoration: none; font-weight: 700; }

.sidebar { position: fixed; top: 58px; left: 0; bottom: 0; width: 210px; background: #083d3d; padding: 18px 12px; z-index: 150; overflow-y: auto; transition: transform .25s; }
.menu-item { display: block; background: #b8f5f5; color: #062b2b; text-decoration: none; font-weight: 800; font-size: 13px; text-align: center; padding: 14px 8px; border-radius: 4px; margin-bottom: 14px; text-transform: uppercase; }
.menu-item:hover { background: #8eeeee; }
.menu-item.active { background: #ffee58; color: #111; }

.content { margin: 58px 0 0 210px; padding: 24px; }
#menuToggle { display: none; position: fixed; top: 10px; left: 10px; z-index: 300; background: #083d3d; color: #b8f5f5; border: 0; border-radius: 6px; font-size: 20px; padding: 6px 12px; }

h1 { font-size: 22px; margin-bottom: 18px; }
h2 { font-size: 17px; margin: 22px 0 12px; }
.card { background: #161616; border: 1px solid #262626; border-radius: 12px; padding: 18px; margin-bottom: 18px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert.ok { background: #12351f; color: #91e7ae; border: 1px solid #216c3c; }
.alert.erro { background: #3b1218; color: #ff9aa9; border: 1px solid #6b1c2a; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #262626; }
th { color: #6ee7e7; font-size: 12px; text-transform: uppercase; }
tr:hover td { background: #1c1c1c; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; }
.badge.verde { background: #12351f; color: #91e7ae; }
.badge.vermelho { background: #3b1218; color: #ff9aa9; }
.badge.amarelo { background: #3a3310; color: #ffe082; }
.badge.cinza { background: #222; color: #999; }

.btn { display: inline-block; border: 0; border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 800; cursor: pointer; text-decoration: none; color: #fff; background: #0d6e6e; }
.btn:hover { filter: brightness(1.15); }
.btn.verde { background: #15803d; }
.btn.vermelho { background: #b91c1c; }
.btn.cinza { background: #333; }
.btn.pequeno { padding: 5px 10px; font-size: 12px; }

input, select, textarea { background: #0f0f0f; border: 1px solid #333; border-radius: 8px; color: #fff; padding: 9px 12px; font-size: 14px; outline: 0; }
input:focus, select:focus, textarea:focus { border-color: #14b8a6; }
label { display: block; font-size: 12px; color: #999; margin: 10px 0 4px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 180px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #161616; border: 1px solid #262626; border-radius: 12px; padding: 18px; text-align: center; }
.stat .num { font-size: 30px; font-weight: 800; color: #6ee7e7; }
.stat .lbl { font-size: 12px; color: #999; margin-top: 4px; text-transform: uppercase; }

.layouts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.layout-mini { position: relative; aspect-ratio: 12/7; background: #b8f5f5; border-radius: 8px; overflow: hidden; cursor: pointer; border: 3px solid transparent; }
.layout-mini.sel { border-color: #ffee58; }
.layout-mini .slot { position: absolute; background: #ffee00; border: 2px solid #083d3d; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #083d3d; }
.layout-nome { text-align: center; font-size: 13px; font-weight: 700; margin-top: 6px; }

.slot-editor { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.slot-box { background: #1c1c1c; border: 1px solid #2c2c2c; border-radius: 10px; padding: 12px; }
.slot-box .tit { font-weight: 800; font-size: 13px; color: #6ee7e7; margin-bottom: 8px; }

.msg-box { background: #0d2b2b; border-left: 4px solid #14b8a6; padding: 12px 14px; border-radius: 8px; margin-bottom: 10px; font-size: 14px; }
.msg-box small { color: #7dd; display: block; margin-top: 4px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at top, #123c3c, #060606 65%); }
.login-box { width: 100%; max-width: 380px; background: #141414; border: 1px solid #2a2a2a; border-radius: 18px; padding: 34px 28px; text-align: center; }
.login-box h1 { font-size: 22px; margin-bottom: 6px; }
.login-box p { color: #888; font-size: 13px; margin-bottom: 18px; }
.login-box input { width: 100%; margin-bottom: 12px; text-align: center; }
.login-box .btn { width: 100%; padding: 12px; }

@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); width: 230px; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .content { margin-left: 0; padding: 16px; }
    #menuToggle { display: block; }
    .topbar { padding-left: 60px; }
    table { font-size: 12px; }
    th, td { padding: 7px 5px; }
}
