/* ---------- ESTILO BASE ---------- */
body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    padding: 40px;
}

.container {
    max-width: 1200px;
    margin: auto;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 10px #0002;
}

/* ---------- HEADER ---------- */
.header {
    max-width: 1200px;
    margin: 0 auto 30px auto;
    background: #007bff;
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 8px #0002;
    text-align: center;
}

/* ---------- FORMS, INPUT E BOTÕES ---------- */
label {
    font-weight: bold;
    margin-top: 15px;
    display: block;
}

input, select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: white;
    font-size: 15px;
    transition: 0.25s ease;
}

input:focus, select:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px #007bff55;
    outline: none;
}

/* Select com seta personalizada */
select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

select option {
    padding: 8px;
}

select:hover {
    border-color: #007bff;
}

/* ---------- BOTÕES ---------- */
.btn {
    margin-top: 20px;
    padding: 12px;
    width: 100%;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    display: block;
}

.btn:hover {
    opacity: 0.9;
}

.btn.danger {
    background: #d9534f;
}

/* ---------- MENSAGENS ---------- */
.success {
    background: #d4ffd4;
    padding: 10px;
    margin-top: 15px;
    color: green;
    border-radius: 6px;
    display: block;
}

.error {
    background: #ffd4d4;
    padding: 10px;
    margin-top: 15px;
    color: darkred;
    border-radius: 6px;
    display: block;
}

.error-msg {
    font-size: 12px;
    color: red;
    display: none;
    margin-top: 2px;
}

/* ---------- LOGIN FORM CENTRALIZADO ---------- */
.login-form {
    max-width: 400px;
    margin: 0 auto;
}

/* ---------- SIDE MENU FIXO + GRID ---------- */
.layout-side-menu {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* Menu lateral fixo */
.side-menu {
    width: 200px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #fafafa;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 6px #0001;
    height: fit-content;
}

/* Conteúdo principal */
.main-content {
    flex: 1;
    display: flex;
    gap: 20px;
}

/* Bloco Accounts */
.content-block.accounts-block {
    flex: 1;
    background: #fafafa;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    max-height: 600px;
    overflow-y: auto;
}

/* Bloco Chars */
.content-block.chars-block {
    flex: 1.5;
    background: #fafafa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    max-height: 600px;
    overflow-y: auto;
}

/* ---------- TABELA ---------- */
.account-table {
    width: 100%;
    border-collapse: collapse;
}

.account-table th,
.account-table td {
    padding: 10px;
    text-align: left;
}

.account-table thead {
    background: #007bff;
    color: white;
}

.account-table tr:nth-child(even) {
    background: #f1f1f1;
}

/* ---------- LOADING ---------- */
.loading {
    display: none;
    text-align: center;
    margin-top: 10px;
}

.spinner {
    width: 25px;
    height: 25px;
    border: 4px solid #ccc;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- RESPONSIVIDADE ---------- */
@media(max-width: 1100px){
    .main-content {
        flex-direction: column;
    }
    .layout-side-menu {
        flex-direction: column;
    }
    .side-menu {
        width: 100%;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        top: 0;
    }
}

@media(max-width: 850px){
    .container {
        padding: 15px;
    }
}

/* Linha verde clara para chars online */
tr.online {
    background-color: #d4ffd4;
}

/* Pequeno círculo verde indicando online */
.online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #28a745; /* verde */
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
}


