/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #333;
}

/* LAYOUT */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #dcdcdc;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* TOPO SIDEBAR */
.sidebar-top {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-bottom: 1px solid #ececec;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    overflow: hidden;
}

.sidebar-logo img {
    max-height: 34px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.sidebar-toggle {
    border: none;
    background: none;
    font-size: 22px;
    color: #666;
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;
}

/* MENU */
.sidebar-section {
    padding: 16px 0 0;
}

.sidebar-title {
    font-size: 12px;
    color: #20b15a;
    font-weight: 700;
    padding: 0 16px;
    margin-bottom: 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #2f2f2f;
    border-left: 3px solid transparent;
    font-size: 15px;
    text-decoration: none;
    background: transparent;
    width: 100%;
    border: none;
    text-align: left;
    cursor: pointer;
}

.sidebar-link.active {
    border-left-color: #22c55e;
    color: #111;
}

.sidebar-link:hover {
    background: #f7f7f7;
}

/* FOOTER SIDEBAR (SAIR) */
.sidebar-footer {
    padding: 12px 0;
    border-top: 1px solid #ececec;
}

.sidebar-logout-btn {
    border-left: 3px solid transparent;
}

/* HEADER */
.header {
    height: 60px;
    background: #22c55e;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-size: 14px;
}

/* CONTEÚDO */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* COLUNA DE TICKETS */
.ticket-panel {
    width: 340px;
    min-width: 340px;
    border-right: 1px solid #ddd;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* HEADER DO PAINEL */
.ticket-panel-header {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* TABS */
.ticket-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.ticket-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    font-size: 13px;
}

.ticket-tab.active {
    border-bottom: 2px solid #22c55e;
    color: #22c55e;
}

/* LISTA */
.ticket-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* CARD */
.ticket-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 4px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-card.selected {
    border-left-color: #22c55e;
}

.ticket-info {
    display: flex;
    flex-direction: column;
}

.ticket-info strong {
    font-size: 14px;
}

.ticket-info p {
    font-size: 12px;
    color: #666;
}

/* BOTÕES TICKET */
.ticket-actions {
    display: flex;
    gap: 6px;
}

.ticket-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btn-accept {
    background: #22c55e;
    color: #fff;
}

.btn-close {
    background: #ef4444;
    color: #fff;
}

/* AREA CHAT */
.chat-area {
    flex: 1;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* INPUT CHAT */
.chat-input {
    border-top: 1px solid #ddd;
    padding: 10px;
    background: #fff;
}

/* BOTÕES CONEXÃO */
.connection-item-actions {
    display: flex;
    gap: 8px;
}

.conn-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.default-btn {
    background: #fef3c7;
    color: #b45309;
}

.disconnect-btn {
    background: #fee2e2;
    color: #b91c1c;
}

.delete-btn {
    background: #ef4444;
    color: #fff;
}

/* RESPONSIVO */
@media (max-width: 900px) {
    .sidebar {
        width: 70px;
    }

    .sidebar-link span:last-child {
        display: none;
    }

    .ticket-panel {
        width: 100%;
    }
}