* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --cor-primaria: #e0427e;
    --cor-hover: #c73570;
    --cor-clara: #fde4f0;
    --cor-fundo: #fdf6f9;
    --cor-borda: #f0d6e4;
}

a {
    text-decoration: none;
    color: inherit;
}

body {
    display: flex;
    background: var(--cor-fundo);
}


/* ═══════════════════════════════
   SIDEBAR
═══════════════════════════════ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 220px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid var(--cor-borda);
    display: flex;
    flex-direction: column;
    padding: 24px 0 20px;
    overflow-y: auto;
    z-index: 999;
}

.sidebar h2 {
    padding: 0 20px 20px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 1px solid var(--cor-borda);
    margin-bottom: 12px;
}

.sidebar ul {
    list-style: none;
    flex: 1;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    font-size: 13.5px;
    color: #888;
    transition: 0.15s;
    border-right: 3px solid transparent;
}

.sidebar ul li a:hover {
    color: #333;
    background: #fafafa;
}

.sidebar ul li a.active {
    color: var(--cor-primaria);
    background: #fdf0f5;
    border-right: 3px solid var(--cor-primaria);
    font-weight: 600;
}

.sidebar-bottom {
    padding: 16px 20px 0;
    border-top: 1px solid var(--cor-borda);
    margin-top: auto;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--cor-clara);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--cor-primaria);
    flex-shrink: 0;
}

.user-nome {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.user-plano {
    font-size: 11px;
    color: #aaa;
}


/* ═══════════════════════════════
   MAIN
═══════════════════════════════ */
.main {
    flex: 1;
    padding: 24px;
    margin-left: 220px;
}

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

.header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.titulo {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}


/* ═══════════════════════════════
   BOTÃO
═══════════════════════════════ */
.btn {
    background: var(--cor-primaria);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn:hover {
    background: var(--cor-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(224, 66, 126, 0.3);
}


/* ═══════════════════════════════
   CARDS
═══════════════════════════════ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.card {
    background: white;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid var(--cor-borda);
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 66, 126, 0.08);
}

.card h3 {
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
    margin-bottom: 6px;
}

.card p {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}


/* ═══════════════════════════════
   TABELA
═══════════════════════════════ */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--cor-borda);
}

th {
    background: var(--cor-fundo);
    padding: 13px 16px;
    font-weight: 600;
    font-size: 12px;
    color: #c076a0;
    text-align: left;
}

td {
    padding: 13px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid #faf0f5;
    color: #444;
}

tr {
    transition: 0.15s;
}

tbody tr:hover {
    background: #fff8fb;
}


/* ═══════════════════════════════
   STATUS
═══════════════════════════════ */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-block;
}

.pendente {
    background: #fff3cd;
    color: #856404;
}

.finalizado {
    background: #d4edda;
    color: #155724;
}

.cancelado {
    background: #ffe5e5;
    color: #c0392b;
}

.confirmado {
    background: #e3f2fd;
    color: #0d47a1;
}


/* ═══════════════════════════════
   BOTÕES DE AÇÃO
═══════════════════════════════ */
.acoes {
    display: flex;
    gap: 6px;
}

.btn-acao {
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 13px;
}

.btn-acao.editar {
    background: #fdf0f5;
    color: #e0427e;
}

.btn-acao.editar:hover {
    background: var(--cor-clara);
    transform: translateY(-1px);
}

.btn-acao.excluir {
    background: #ffe5e5;
    color: #c0392b;
}

.btn-acao.excluir:hover {
    background: #ffb3b3;
}

.btn-acao.whatsapp {
    background: #e9fbf0;
    color: #25d366;
}

.btn-acao.whatsapp:hover {
    background: #25d366;
    color: white;
    transform: translateY(-1px);
}

.btn-acao i {
    pointer-events: none;
}


/* ═══════════════════════════════
   FLOATING BUTTON
═══════════════════════════════ */
.floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--cor-primaria);
    color: white;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(224, 66, 126, 0.4);
    transition: 0.2s;
}

.floating:hover {
    background: var(--cor-hover);
    transform: scale(1.05);
}


/* ═══════════════════════════════
   DRAWER
═══════════════════════════════ */
.drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 420px;
    height: 100%;
    background: #ffffff;
    padding: 28px;
    transition: 0.35s ease;
    z-index: 9999;
    overflow-y: auto;
    border-left: 1px solid var(--cor-borda);
    box-shadow: -8px 0 30px rgba(224, 66, 126, 0.08);
}

.drawer.ativo {
    right: 0;
}

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

.drawer-header h5 {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
}

.fechar {
    cursor: pointer;
    font-size: 20px;
    color: #999;
    background: #f5f5f5;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.2s;
}

.fechar:hover {
    background: var(--cor-clara);
    color: var(--cor-primaria);
}

.drawer::-webkit-scrollbar {
    width: 5px;
}

.drawer::-webkit-scrollbar-thumb {
    background: #f0d0e0;
    border-radius: 10px;
}

.drawer label {
    font-size: 12px;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.drawer input,
.drawer select,
.drawer textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 14px;
    outline: none;
    font-size: 13.5px;
    transition: 0.2s;
    background: #fafafa;
}

.drawer input:focus,
.drawer select:focus,
.drawer textarea:focus {
    border-color: var(--cor-primaria);
    background: white;
    box-shadow: 0 0 0 3px rgba(224, 66, 126, 0.08);
}

.drawer button[type="submit"] {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: var(--cor-primaria);
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.drawer button[type="submit"]:hover {
    background: var(--cor-hover);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(224, 66, 126, 0.3);
}

.mb-3 {
    margin-bottom: 4px;
}

@media (max-width: 991.98px) {
    .drawer { width: 100%; }
}


/* ═══════════════════════════════
   BUSCA
═══════════════════════════════ */
.busca-box {
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--cor-borda);
    border-radius: 12px;
    padding: 4px;
    max-width: 400px;
    transition: 0.2s;
}

.input-group:focus-within {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(224, 66, 126, 0.08);
}

.input-group i {
    color: #ccc;
    margin: 0 10px;
    font-size: 14px;
}

.input-group input {
    border: none;
    outline: none;
    flex: 1;
    padding: 9px;
    font-size: 13.5px;
    background: transparent;
}

.input-group button {
    border: none;
    background: var(--cor-primaria);
    color: white;
    padding: 8px 14px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: 0.2s;
}

.input-group button:hover {
    background: var(--cor-hover);
}


/* ═══════════════════════════════
   AGENDA / CALENDÁRIO
═══════════════════════════════ */
.calendar {
    width: 100%;
    height: 100%;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--cor-borda);
    margin-top: 20px;
}

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

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 10px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day {
    background: #fafafa;
    border: 1px solid #f0e8ed;
    border-radius: 10px;
    padding: 8px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: 0.15s;
}

.day:hover {
    background: #fff5f9;
    border-color: var(--cor-borda);
}

.date {
    font-size: 11px;
    color: #bbb;
}

.event {
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 6px;
    color: white;
}

.event.pendente {
    background: #fbbf24;
    color: #333;
}

.event.finalizado {
    background: #22c55e;
}

.nav-btn {
    background: #fff;
    border: 1px solid #eee;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #777;
    transition: 0.2s;
}

.nav-btn:hover {
    background: var(--cor-primaria);
    color: white;
    border-color: var(--cor-primaria);
    transform: translateY(-1px);
}


/* ═══════════════════════════════
   FINANCEIRO
═══════════════════════════════ */
.kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.kpi {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid var(--cor-borda);
}

.kpi span {
    font-size: 12px;
    color: #aaa;
    display: block;
    margin-bottom: 6px;
}

.kpi h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.kpi.destaque {
    background: var(--cor-primaria);
    border-color: var(--cor-primaria);
    color: white;
}

.kpi.destaque span,
.kpi.destaque h2 {
    color: white;
}

.grid-financeiro {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    margin-top: 20px;
}

.pagamento {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tabela table {
    width: 100%;
    margin-top: 10px;
}

.tabela th {
    text-align: left;
    color: #bbb;
    font-size: 12px;
}

.tabela td {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}


/* ═══════════════════════════════
   FLASH MESSAGES
═══════════════════════════════ */
.flash-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.flash {
    min-width: 280px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(25, 25, 25, 0.92);
    color: #fff;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    font-size: 13.5px;
    font-weight: 500;
    animation: dropDown 0.35s ease;
    position: relative;
    overflow: hidden;
}

.flash span { flex: 1; }

.flash button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 7px;
    width: 26px;
    height: 26px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.flash button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.flash::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    animation: progressBar 4s linear forwards;
}

.flash.success::before { background: #00e676; }
.flash.sucess::before  { background: #00e676; }
.flash.error::before   { background: #ff5252; }
.flash.warning::before { background: #ffd600; }
.flash.info::before    { background: #e0427e; }

@keyframes progressBar {
    from { width: 100%; }
    to   { width: 0%; }
}

@keyframes dropDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}