/* =========================================================
   E3R's GESTÃO CLOUD — AGENDA DE SERVIÇOS
   ========================================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --sidebar: #0b1220;
    --background: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --green: #16a34a;
    --orange: #ea580c;
    --red: #dc2626;
}

body { min-height: 100vh; font-family: Arial, Helvetica, sans-serif; background: var(--background); color: var(--text); }
.app { display: flex; min-height: 100vh; }

.sidebar { width: 260px; background: var(--sidebar); color: white; display: flex; flex-direction: column; padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 20px; }
.brand-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: bold; }
.brand-name strong { display: block; font-size: 16px; }
.brand-name span { font-size: 10px; letter-spacing: 1.5px; color: #94a3b8; }
.company-mini { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.06); border-radius: 10px; padding: 10px 12px; margin-bottom: 18px; }
.company-avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; }
.company-mini strong { display: block; font-size: 13px; }
.company-mini span { font-size: 11px; color: #94a3b8; }
.menu { flex: 1; overflow-y: auto; }
.menu-title { font-size: 10px; letter-spacing: 1.5px; color: #64748b; padding: 14px 12px 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #cbd5e1; text-decoration: none; font-size: 13px; border: 0; background: transparent; width: 100%; text-align: left; cursor: pointer; }
.menu-item:hover { background: rgba(255,255,255,.06); }
.menu-item.active { background: var(--primary); color: white; }
.menu-item.coming-soon { opacity: .55; }
.menu-icon { width: 18px; text-align: center; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.system-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #86efac; padding: 0 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.logout { border: 0; background: rgba(255,255,255,.06); color: white; padding: 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.sidebar-overlay { display: none; }

.main { flex: 1; min-width: 0; }
.header { height: 70px; background: white; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: sticky; top: 0; z-index: 10; }
.header-left { display: flex; align-items: center; gap: 14px; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.header h1 { font-size: 18px; }
.header-left p { font-size: 12px; color: var(--muted); }
.header-right { display: flex; align-items: center; gap: 16px; }
.user { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 34px; height: 34px; border-radius: 8px; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 13px; }
.user strong { display: block; font-size: 13px; }
.user span { font-size: 11px; color: var(--muted); }

.content { max-width: 1400px; margin: 0 auto; padding: 28px 30px 60px; }

.agenda-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.agenda-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.agenda-nav button {
    border: 0;
    background: var(--background);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.agenda-nav button:hover { background: #e2e8f0; }

#todayButton {
    width: auto !important;
    padding: 0 14px;
    font-size: 12px;
    font-weight: bold;
}

.agenda-date {
    text-align: center;
    position: relative;
    min-width: 160px;
}

.agenda-date strong {
    display: block;
    font-size: 14px;
}

.agenda-date input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.agenda-toolbar select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    background: white;
}

.new-button {
    margin-left: auto;
    border: 0;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
}

.new-button:hover { background: var(--primary-dark); }

.agenda-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.agenda-column {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    overflow: hidden;
}

.agenda-column-header {
    background: var(--background);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.agenda-column-header strong {
    font-size: 13px;
}

.agenda-count {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 20px;
    padding: 2px 8px;
}

.agenda-items {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
}

.agenda-card {
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.agenda-card:hover { background: var(--background); }

.agenda-card.status-em_execucao { border-left-color: var(--orange); }
.agenda-card.status-concluida,
.agenda-card.status-faturada { border-left-color: var(--green); }
.agenda-card.status-cancelada { border-left-color: var(--red); opacity: .6; }

.agenda-card-time {
    font-size: 11px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 4px;
}

.agenda-card-title {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 2px;
}

.agenda-card-client {
    font-size: 11px;
    color: var(--muted);
}

.agenda-empty-column {
    text-align: center;
    padding: 20px;
    color: #cbd5e1;
    font-size: 12px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    background: white;
    border-radius: 12px;
}

.empty-state div { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }

@media (max-width: 720px) {
    .sidebar { position: fixed; left: -280px; z-index: 100; transition: left .2s; }
    .sidebar.open { left: 0; }
    .sidebar-overlay.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; }
    .mobile-menu { display: block; }
    .content { padding: 20px 16px 50px; }
    .new-button { margin-left: 0; width: 100%; text-align: center; }
}

/* Barra de rolagem do menu lateral (padrão consistente com o Dashboard) */
.menu {
    scrollbar-color: rgba(148, 163, 184, .28) transparent;
    scrollbar-width: thin;
}

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

.menu::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(148, 163, 184, .28);
}

