* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6f8;
    color: #202124;
}

.topbar {
    height: 72px;
    background: #111827;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.topbar h1 {
    margin: 0;
    font-size: 24px;
}

.topbar span {
    font-size: 13px;
    opacity: .7;
}

.status {
    background: #1f2937;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
}

.layout {
    display: flex;
    min-height: calc(100vh - 72px);
}

.sidebar {
    width: 220px;
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 28px 16px;
}

.menu-title {
    font-size: 11px;
    font-weight: bold;
    color: #9ca3af;
    padding: 0 12px 10px;
}

.espacamento {
    margin-top: 30px;
}

.menu {
    display: block;
    padding: 12px;
    margin-bottom: 4px;
    border-radius: 7px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
}

.menu.active {
    background: #111827;
    color: white;
}

.menu.disabled {
    opacity: .45;
    cursor: default;
}

.content {
    flex: 1;
    padding: 36px;
    overflow-x: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h2 {
    margin: 0;
    font-size: 28px;
}

.page-header p {
    margin: 7px 0 0;
    color: #6b7280;
}

.contador {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
}

.card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    background: #f9fafb;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    padding: 14px 16px;
}

td {
    padding: 16px;
    border-top: 1px solid #f0f1f3;
    font-size: 14px;
}

td small {
    display: block;
    color: #9ca3af;
    margin-top: 4px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-agendado {
    background: #e0f2fe;
}

.status-confirmado {
    background: #dcfce7;
}

.status-realizada {
    background: #dcfce7;
}

.status-faltou {
    background: #fee2e2;
}

.status-cancelado {
    background: #f3f4f6;
}

.acoes {
    display: flex;
    gap: 8px;
}

.btn {
    border: 0;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.compareceu {
    background: #dcfce7;
}

.faltou {
    background: #fee2e2;
}

.ok {
    font-weight: bold;
}

.alerta {
    font-weight: bold;
}

.muted {
    color: #9ca3af;
}

.vazio {
    text-align: center;
    padding: 50px;
    color: #9ca3af;
}

@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .content {
        padding: 20px;
    }

    table {
        min-width: 850px;
    }
}
/* ===== MRCHAT LOGIN ===== */

.login-body {
    margin: 0;
    min-height: 100vh;
    background: #f5f7fa;
    font-family: Arial, Helvetica, sans-serif;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.login-brand {
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.10), transparent 35%),
        linear-gradient(145deg, #111827, #1f2937);
    color: white;
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: white;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 25px;
}

.brand-mark.small {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    margin: 0;
    font-size: 15px;
}

.login-brand h1 {
    font-size: 52px;
    margin: 0 0 20px;
    letter-spacing: -2px;
}

.brand-title {
    max-width: 580px;
    font-size: 25px;
    line-height: 1.35;
    font-weight: 600;
    margin: 0 0 20px;
}

.brand-description {
    max-width: 560px;
    font-size: 16px;
    line-height: 1.7;
    opacity: .75;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
    opacity: .9;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 410px;
}

.login-mobile-logo {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    font-size: 20px;
}

.login-card h2 {
    margin: 0;
    font-size: 32px;
    color: #111827;
}

.login-subtitle {
    color: #6b7280;
    margin: 10px 0 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 14px 15px;
    font-size: 15px;
    background: white;
    outline: none;
    transition: .2s;
}

.form-group input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17,24,39,.08);
}

.login-button {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 14px;
    background: #111827;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.login-button:hover {
    background: #263244;
    transform: translateY(-1px);
}

.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 35px;
}

@media (max-width: 800px) {

    .login-page {
        display: block;
    }

    .login-brand {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 25px;
        box-sizing: border-box;
    }

    .login-mobile-logo {
        display: flex;
    }
}
/* ===== MRCHAT APP ===== */

.app-shell {
    min-height: 100vh;
    display: flex;
    background: #f5f7fa;
    font-family: Arial, Helvetica, sans-serif;
    color: #111827;
}

.sidebar {
    width: 245px;
    min-height: 100vh;
    background: #111827;
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 25px 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    background: white;
    color: #111827;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand strong {
    font-size: 18px;
}

.sidebar-brand small {
    margin-top: 3px;
    opacity: .55;
    font-size: 11px;
}

.sidebar-nav {
    padding: 22px 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 5px;
    border-radius: 9px;
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
}

.nav-item.active {
    background: rgba(255,255,255,.10);
    color: white;
    font-weight: 600;
}

.nav-item.disabled {
    opacity: .45;
}

.nav-separator {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 18px 10px;
}

.sidebar-bottom {
    padding: 20px 22px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-bottom small,
.sidebar-bottom strong,
.sidebar-bottom span {
    display: block;
}

.sidebar-bottom small {
    opacity: .45;
    margin-bottom: 6px;
}

.sidebar-bottom strong {
    font-size: 13px;
}

.sidebar-bottom span {
    font-size: 11px;
    opacity: .55;
    margin-top: 5px;
}

.main-area {
    flex: 1;
    min-width: 0;
}

.app-header {
    height: 70px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.company-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #111827;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.logout-link {
    margin-left: 10px;
    color: #6b7280;
    text-decoration: none;
}

.logout-link:hover {
    color: #111827;
}

.dashboard-content {
    padding: 32px;
}

.dashboard-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
}

.dashboard-title h1 {
    margin: 0;
    font-size: 30px;
}

.dashboard-title p {
    margin: 7px 0 0;
    color: #6b7280;
}

.total-badge {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    color: #4b5563;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.summary-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
}

.summary-card span {
    display: block;
    color: #6b7280;
    font-size: 13px;
}

.summary-card strong {
    display: block;
    font-size: 30px;
    margin: 8px 0;
}

.summary-card small {
    color: #9ca3af;
}

.table-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.table-card-header {
    padding: 20px 22px;
    border-bottom: 1px solid #e5e7eb;
}

.table-card-header h2 {
    margin: 0;
    font-size: 17px;
}

.table-card-header p {
    margin: 5px 0 0;
    color: #9ca3af;
    font-size: 13px;
}

.table-scroll {
    overflow-x: auto;
}

.visitas-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

.visitas-table th {
    text-align: left;
    padding: 13px 18px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    background: #f9fafb;
}

.visitas-table td {
    padding: 16px 18px;
    border-top: 1px solid #f0f1f3;
    font-size: 13px;
}

.client-cell strong,
.client-cell span {
    display: block;
}

.client-cell span {
    margin-top: 4px;
    color: #9ca3af;
    font-size: 11px;
}

.status-pill {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: #f3f4f6;
}

.status-agendado {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-confirmado {
    background: #ecfdf5;
    color: #047857;
}

.status-realizada {
    background: #ecfdf5;
    color: #047857;
}

.status-faltou {
    background: #fff7ed;
    color: #c2410c;
}

.status-cancelado {
    background: #fef2f2;
    color: #b91c1c;
}

.table-actions {
    display: flex;
    gap: 7px;
}

.action-btn {
    border: 0;
    padding: 7px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.action-btn.success {
    background: #ecfdf5;
    color: #047857;
}

.action-btn.danger {
    background: #fef2f2;
    color: #b91c1c;
}

.result-success {
    color: #047857;
    font-weight: 600;
}

.result-warning {
    color: #c2410c;
}

.result-muted {
    color: #9ca3af;
}

.empty-table {
    text-align: center;
    padding: 45px !important;
    color: #9ca3af;
}

@media (max-width: 1000px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .sidebar {
        display: none;
    }

    .dashboard-content {
        padding: 20px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .app-header {
        padding: 0 20px;
    }
}

/* ===== MRCHAT CONVERSAS ===== */

.conversation-list-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.conversation-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f1f3;
    text-decoration: none;
    color: #111827;
}

.conversation-row:hover {
    background: #f9fafb;
}

.conversation-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: #111827;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.conversation-info {
    flex: 1;
}

.conversation-top,
.conversation-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.conversation-top span,
.conversation-bottom {
    color: #9ca3af;
    font-size: 12px;
}

.conversation-bottom {
    margin-top: 5px;
}

.chat-layout {
    display: flex;
    height: 100vh;
    background: #f3f4f6;
    font-family: Arial, Helvetica, sans-serif;
}

.chat-list {
    width: 330px;
    background: white;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
}

.chat-brand {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
}

.chat-brand a,
.chat-header a {
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
}

.chat-contact {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 18px;
    text-decoration: none;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
}

.chat-contact.selected {
    background: #f3f4f6;
}

.chat-contact strong,
.chat-contact span {
    display: block;
}

.chat-contact span {
    color: #9ca3af;
    font-size: 11px;
    margin-top: 4px;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    min-height: 70px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header strong,
.chat-header span {
    display: block;
}

.chat-header span {
    color: #9ca3af;
    font-size: 12px;
    margin-top: 4px;
}

.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

.message-line {
    display: flex;
    margin-bottom: 14px;
}

.message-line.incoming {
    justify-content: flex-start;
}

.message-line.outgoing {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 65%;
    padding: 11px 14px;
    border-radius: 13px;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.outgoing .message-bubble {
    background: #dcfce7;
}

.message-author {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 5px;
}

.message-text {
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.message-time {
    text-align: right;
    font-size: 10px;
    color: #9ca3af;
    margin-top: 6px;
}

@media (max-width: 800px) {
    .chat-list {
        width: 110px;
    }

    .chat-contact > div:last-child {
        display: none;
    }

    .message-bubble {
        max-width: 85%;
    }
}

