

        html, body, button, input, select, textarea, label, p, span, div, a, small, strong, h1, h2, h3, h4, h5, h6, li, td, th {
            font-family: Arial, Helvetica, sans-serif !important;
        }
        .logo-title, .logo-subtitle {
            font-family: 'Montserrat', Arial, Helvetica, sans-serif !important;
        }
        .senha-wrap { position: relative; }
        .senha-wrap input { padding-right: 46px; }
        .btn-toggle-senha {
            position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
            width: 32px; height: 32px; margin: 0; padding: 0; border: none;
            background: transparent; color: #666; cursor: pointer; display: flex;
            align-items: center; justify-content: center; border-radius: 50%;
        }
        .btn-toggle-senha:hover { background: rgba(0,0,0,0.05); }
        body.dark-mode .btn-toggle-senha { color: #ddd; }
        body.dark-mode .btn-toggle-senha:hover { background: rgba(255,255,255,0.08); }
        .auth-link-row { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-top:12px; font-size:14px; }
        .auth-link-row .link-acao { font-size:14px; }
        .texto-recuperacao-email { font-size:14px; color:#555; margin:0 0 14px 0; }
        body.dark-mode .texto-recuperacao-email { color:#cbd5e1; }

        .btn-sistema-custom { background:#495057 !important; }
        .btn-sistema-custom:hover { background:#343a40 !important; }

        .agenda-identidade-box {
            display:none;
            justify-content:center;
            align-items:center;
            width:100%;
            margin: 0 auto 16px auto;
            padding: 10px;
            border-radius: 16px;
            border: 1px solid #dbe3ef;
            background: #ffffff;
            overflow: hidden;
        }
        .agenda-identidade-box[data-shape="round"] {
            width: 138px;
            height: 138px;
            border-radius: 999px;
            padding: 0;
        }
        .agenda-identidade-box[data-shape="landscape"] {
            width: min(100%, 200px);
            height: 112px;
            padding: 8px;
        }
        .agenda-identidade-box[data-shape="square"] {
            width: min(100%, 152px);
            height: 152px;
            padding: 8px;
        }
        .agenda-identidade-box img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: contain;
            object-position: 50% 50%;
            background: #fff;
            transform-origin: center center;
            transform: translate(0%, 0%) scale(1);
        }
        .agenda-identidade-box[data-shape="square"] img { aspect-ratio: 1 / 1; }
        .agenda-identidade-box[data-shape="landscape"] img { aspect-ratio: 16 / 9; }
        .agenda-identidade-box[data-shape="round"] img { aspect-ratio: 1 / 1; border-radius: 999px; }

        .sistema-preview-shell {
            width: min(100%, 360px);
            margin: 0 auto 14px auto;
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
            border: 1px solid #dbe3ef;
            border-radius: 24px;
            padding: 14px;
            box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 12px 28px rgba(15,23,42,.08);
        }
        .sistema-preview-shell[data-shape="landscape"] { width: min(100%, 420px); }
        .sistema-preview-shell[data-shape="round"] { width: min(100%, 300px); }
        .sistema-preview-frame {
            position: relative;
            width: 100%;
            margin: 0 auto;
            overflow: hidden;
            background: radial-gradient(circle at center, #ffffff 0%, #f8fafc 100%) !important;
            border: 1px solid #d8e1ef;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: grab;
            touch-action: none;
            user-select: none;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
        }
        .sistema-preview-frame.dragging { cursor: grabbing; }
        .sistema-preview-frame.zooming { cursor: zoom-in; }
        .sistema-preview-frame[data-shape="square"] { aspect-ratio: 1 / 1; border-radius: 18px; }
        .sistema-preview-frame[data-shape="landscape"] { aspect-ratio: 16 / 9; border-radius: 18px; }
        .sistema-preview-frame[data-shape="round"] { aspect-ratio: 1 / 1; border-radius: 999px; }
        .sistema-preview-frame img {
            width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%;
            display: none; background:#fff; transform-origin:center center; transform: translate(0%, 0%) scale(1); transition: transform .08s ease;
        }
        .sistema-preview-frame.dragging img,
        .sistema-preview-frame.zooming img {
            transition: none !important;
        }
        .sistema-preview-placeholder {
            font-size: 13px; color: #666; text-align: center; padding: 24px 12px;
        }
        .sistema-preview-hint {
            position: absolute;
            left: 10px;
            right: 10px;
            bottom: 10px;
            padding: 8px 10px;
            border-radius: 999px;
            background: rgba(17,24,39,.72);
            color: #f8fafc;
            font-size: 12px;
            font-weight: 700;
            text-align: center;
            pointer-events: none;
            opacity: 0;
            transition: opacity .18s ease;
        }
        .sistema-preview-frame.tem-imagem .sistema-preview-hint { opacity: 1; }
        .sistema-zoom-controls {
            display:flex; align-items:center; justify-content:center; gap:10px; margin-top:10px; flex-wrap:wrap;
            padding: 10px; border-radius: 18px; border:1px solid #d6def0; background:#eef2ff;
        }
        .sistema-zoom-btn { width:auto; min-width:44px; padding:10px 14px; margin:0; border:none; border-radius:12px; background:#111827; color:#fff; font-weight:700; cursor:pointer; }
        .sistema-zoom-btn:hover { filter:brightness(1.08); }
        .sistema-zoom-badge { min-width:74px; text-align:center; padding:9px 12px; border-radius:999px; border:1px solid #d6def0; background:#f8fafc; color:#111827; font-weight:700; }
        body.dark-mode #modal-sistema .sistema-zoom-btn { background:#1f2937; color:#f8fafc; }
        body.dark-mode #modal-sistema .sistema-zoom-badge { background:#0f172a; border-color:#334155; color:#f8fafc; }
        body.dark-mode #modal-sistema .sistema-zoom-controls { background:#0f172a; border-color:#334155; }
        body.dark-mode .sistema-preview-shell,
        body.dark-mode .sistema-preview-frame {
            background: #fff !important;
        }
        #modal-sistema .box-cupom {
            background: #f8f9fa;
            color: #1f2937;
        }
        #modal-sistema .box-cupom h4,
        #modal-sistema .campo-label,
        #modal-sistema .sistema-ajuda-texto {
            color: #374151;
        }
        body.dark-mode #modal-sistema .modal-content {
            background: #1f2937;
            color: #f8fafc;
        }
        body.dark-mode #modal-sistema .box-cupom {
            background: #111827 !important;
            border-color: #334155 !important;
            color: #f8fafc !important;
        }
        body.dark-mode #modal-sistema h3,
        body.dark-mode #modal-sistema h4,
        body.dark-mode #modal-sistema .campo-label,
        body.dark-mode #modal-sistema .sistema-ajuda-texto,
        body.dark-mode #modal-sistema .sistema-preview-placeholder {
            color: #f8fafc !important;
        }
        body.dark-mode #modal-sistema input,
        body.dark-mode #modal-sistema select,
        body.dark-mode #modal-sistema textarea {
            background: #0f172a !important;
            border-color: #334155 !important;
            color: #f8fafc !important;
        }
        body.dark-mode #modal-sistema input::placeholder,
        body.dark-mode #modal-sistema textarea::placeholder {
            color: #94a3b8 !important;
        }


        html, body, button, input, select, textarea, label, p, span, div, a, small, strong, h1, h2, h3, h4, h5, h6, li, td, th {
            font-family: Arial, Helvetica, sans-serif !important;
        }
        .logo-title, .logo-subtitle {
            font-family: 'Montserrat', Arial, Helvetica, sans-serif !important;
        }

        .campo-label { display:block; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #374151; }
        .campo-obrigatorio { color: #dc2626; margin-left: 3px; }
        .telefone-bloco { display: flex; flex-direction: column; gap: 10px; }
        .bloco-telefone-cliente { margin-bottom: 16px; }
        .bloco-telefone-cliente .checkbox-label-bloco { min-height: 52px; display:flex; align-items:center; justify-content:center; margin-top: 34px; }
        .bloco-telefone-cliente .campo-label-fantasma { opacity:.01; user-select:none; display:block; margin-bottom:6px; }
        .bloco-telefone-cliente > div:last-child { align-self: stretch; }
        .telefone-pais-select,
        .telefone-ddi,
        .telefone-numero,
        .telefone-grid select,
        .telefone-grid input { margin: 0; }
        .telefone-pais-select { width: 100%; }
        .telefone-grid { display:grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; }
        .telefone-ddi {
            min-height: 48px; display: flex; align-items: center; justify-content: center;
            border: 1px solid #ccd7e4; border-radius: 12px; background: #f8fafc;
            font-weight: 700; color: #111827; padding: 0 12px;
        }
        .telefone-numero { width: 100%; }
        .checkbox-label-bloco { display:flex; align-items:center; justify-content:center; gap:8px; min-height: 48px; }
        .termo-destaque-cliente { font-size: 12.5px; color: #4b5563; line-height: 1.5; }
        body.dark-mode .dia-card.hoje-destaque { border: 2px solid #ff4d4f !important; box-shadow: 0 0 0 2px rgba(255,77,79,.28) !important; }
        body.dark-mode .dia-card.hoje-destaque .dia-header { color: #ffd4d5 !important; }
        body.dark-mode #bloco-solicitar-cadastro-cliente { background: linear-gradient(135deg, #1b2431 0%, #121926 100%) !important; border-color: #334155 !important; }
        body.dark-mode #bloco-solicitar-cadastro-cliente .texto-solicitacao-titulo { color: #cfe1ff !important; }
        body.dark-mode #bloco-solicitar-cadastro-cliente .texto-solicitacao-descricao { color: #cbd5e1 !important; }
        body.dark-mode #modal-cliente .campo-label,
        body.dark-mode #modal-cliente .secao-titulo,
        body.dark-mode #modal-cliente .checkbox-label,
        body.dark-mode #modal-cliente .checkbox-label-bloco,
        body.dark-mode #modal-cliente #titulo-form-cliente,
        body.dark-mode #modal-cliente #nome,
        body.dark-mode #modal-cliente #telefone,
        body.dark-mode #modal-cliente #cpf,
        body.dark-mode #modal-cliente #telefonePais,
        body.dark-mode #modal-cliente #telefoneDdi,
        body.dark-mode #modal-cliente #emailCliente { color: #f8fafc !important; }
        body.dark-mode #modal-cliente input,
        body.dark-mode #modal-cliente select,
        body.dark-mode #modal-cliente textarea { background: #0f172a !important; border-color: #334155 !important; color: #f8fafc !important; }
        body.dark-mode #modal-cliente input::placeholder,
        body.dark-mode #modal-cliente textarea::placeholder { color: #94a3b8 !important; }
        body.dark-mode #modal-cliente .checkbox-label,
        body.dark-mode #modal-cliente .checkbox-label-bloco { background: #111827 !important; border-color: #334155 !important; }
        body.dark-mode #modal-cliente .telefone-ddi { background: #0f172a !important; border-color: #334155 !important; color: #f8fafc !important; }

        .senha-wrap { position: relative; }
        .senha-wrap input { padding-right: 46px; }
        .btn-toggle-senha {
            position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
            width: 32px; height: 32px; margin: 0; padding: 0; border: none;
            background: transparent; color: #666; cursor: pointer; display: flex;
            align-items: center; justify-content: center; border-radius: 50%;
        }
        .btn-toggle-senha:hover { background: rgba(0,0,0,0.05); }
        .auth-link-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; flex-wrap: wrap; }
        .auth-link-row .link-acao { font-size: 14px; }
        .texto-recuperacao-email { font-size: 14px; color: #555; margin: 0 0 14px 0; }
        body.dark-mode .btn-toggle-senha { color: #ccc; }
        body.dark-mode .btn-toggle-senha:hover { background: rgba(255,255,255,0.08); }
        body.dark-mode .texto-recuperacao-email { color: #ccc; }

        @media (max-width: 640px) {
            .telefone-grid { grid-template-columns: 96px 1fr; }
        }


        .modal-form-label {
            display:block;
            margin: 0 0 6px;
            font-size:13px;
            font-weight:700;
            color:#374151;
        }
        .modal-form-grid-2 {
            display:grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap:10px;
            align-items:start;
        }
        .modal-link-secondary {
            display:inline-flex;
            align-items:center;
            gap:6px;
            margin: 6px 0 14px;
            color:#6f42c1;
            font-size:13px;
            font-weight:700;
            cursor:pointer;
        }
        .modal-link-secondary:hover { text-decoration:underline; }
        #modal-agendamento .modal-content,
        #modal-servico .modal-content {
            width:min(100%, 640px);
        }
        #modal-agendamento input,
        #modal-agendamento textarea,
        #modal-servico input,
        #modal-servico textarea,
        #modal-agendamento select,
        #modal-servico select {
            width:100%;
            max-width:100%;
            min-width:0;
            box-sizing:border-box;
        }
        #modal-agendamento input[type="datetime-local"] {
            appearance:none;
            -webkit-appearance:none;
            min-height: 52px;
            line-height: 1.25;
            padding: 12px 14px;
        }
        #modal-agendamento input[type="datetime-local"]::-webkit-date-and-time-value {
            min-height: 1.4em;
            text-align: left;
        }
        #modal-agendamento input[type="datetime-local"]::-webkit-calendar-picker-indicator {
            opacity: .95;
            cursor: pointer;
        }
        body.dark-mode #modal-agendamento .modal-form-label,
        body.dark-mode #modal-servico .modal-form-label,
        body.dark-mode #modal-agendamento h3,
        body.dark-mode #modal-servico h3,
        body.dark-mode #modal-whatsapp h3,
        body.dark-mode #modal-whatsapp #wa-cliente-nome {
            color: #f8fafc !important;
        }
        body.dark-mode #modal-agendamento input,
        body.dark-mode #modal-agendamento textarea,
        body.dark-mode #modal-agendamento select,
        body.dark-mode #modal-servico input,
        body.dark-mode #modal-servico textarea,
        body.dark-mode #modal-servico select {
            background: #0f172a !important;
            border-color: #334155 !important;
            color: #f8fafc !important;
        }
        body.dark-mode #modal-agendamento input::placeholder,
        body.dark-mode #modal-agendamento textarea::placeholder,
        body.dark-mode #modal-servico input::placeholder,
        body.dark-mode #modal-servico textarea::placeholder {
            color: #94a3b8 !important;
        }
        body.dark-mode #modal-agendamento input[type="datetime-local"]::-webkit-calendar-picker-indicator {
            filter: invert(1);
        }
        body.dark-mode #modal-agendamento input[type="datetime-local"]::-webkit-date-and-time-value,
        body.dark-mode #modal-agendamento input[type="datetime-local"]::-webkit-datetime-edit,
        body.dark-mode #modal-agendamento input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
        body.dark-mode #modal-agendamento input[type="datetime-local"]::-webkit-datetime-edit-text,
        body.dark-mode #modal-agendamento input[type="datetime-local"]::-webkit-datetime-edit-month-field,
        body.dark-mode #modal-agendamento input[type="datetime-local"]::-webkit-datetime-edit-day-field,
        body.dark-mode #modal-agendamento input[type="datetime-local"]::-webkit-datetime-edit-year-field,
        body.dark-mode #modal-agendamento input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
        body.dark-mode #modal-agendamento input[type="datetime-local"]::-webkit-datetime-edit-minute-field {
            color: #f8fafc !important;
        }
        @media (max-width: 640px) {
            .modal-form-grid-2 {
                grid-template-columns:1fr;
                gap:0;
            }
            #modal-agendamento .modal-content,
            #modal-servico .modal-content {
                width:calc(100vw - 20px);
                max-width:calc(100vw - 20px);
                padding:18px 14px;
            }
            .modal-form-label,
            .modal-link-secondary {
                font-size:12px;
            }
            #modal-agendamento input,
            #modal-agendamento textarea,
            #modal-servico input,
            #modal-servico textarea,
            #modal-agendamento select,
            #modal-servico select {
                font-size:15px;
            }
            #modal-agendamento input[type="datetime-local"] {
                min-height: 50px;
                font-size: 16px;
            }
        }

        #overlay-login {
            display: flex;
            align-items: center;
            justify-content: center;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 18px;
            box-sizing: border-box;
            background:
                radial-gradient(circle at top left, rgba(111,66,193,.12) 0%, rgba(111,66,193,0) 24%),
                radial-gradient(circle at bottom right, rgba(34,197,94,.10) 0%, rgba(34,197,94,0) 22%),
                #0b0b0f;
        }
        .auth-shell {
            width: 100%;
            max-width: 560px;
            min-height: calc(100vh - 36px);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto;
        }
        .auth-stage-simple {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
        }
        .login-box,
        .login-destaque-card,
        .login-info-card {
            width: 100%;
            max-width: 460px;
            box-sizing: border-box;
        }
        .login-box {
            margin: 0 auto;
            position: relative;
            z-index: 2;
        }
        .login-destaque-card {
            background:
                radial-gradient(circle at top left, rgba(111,66,193,.22) 0%, rgba(111,66,193,0) 30%),
                linear-gradient(180deg, rgba(15,23,42,.98) 0%, rgba(11,18,32,.98) 100%);
            border: 1px solid rgba(111, 66, 193, 0.22);
            border-radius: 22px;
            padding: 18px 18px 16px;
            box-shadow: 0 20px 40px rgba(0,0,0,.28);
            color: #fff;
        }
        .login-destaque-head {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            color: #c4b5fd;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .05em;
        }
        .login-destaque-title {
            font-size: 28px;
            font-weight: 800;
            line-height: 1.08;
            margin: 0 0 8px 0;
            color: #fff;
        }
        .login-destaque-text {
            font-size: 15px;
            line-height: 1.55;
            color: #d4def0;
            margin: 0;
        }
        .login-destaque-dots {
            display: flex;
            gap: 8px;
            margin-top: 14px;
        }
        .login-destaque-dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: rgba(255,255,255,.22);
            transition: all .25s ease;
        }
        .login-destaque-dot.active {
            width: 26px;
            background: #8b5cf6;
        }
        .login-info-card {
            display: flex;
            align-items: center;
            gap: 14px;
            background: linear-gradient(180deg, rgba(15,23,42,.96) 0%, rgba(11,18,32,.96) 100%);
            border: 1px solid rgba(148, 163, 184, 0.14);
            border-radius: 20px;
            padding: 18px;
            box-shadow: 0 16px 34px rgba(0,0,0,.24);
            color: #fff;
        }
        .login-info-icon {
            width: 46px;
            height: 46px;
            min-width: 46px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 14px;
            background: rgba(37, 99, 235, .18);
            color: #93c5fd;
            font-size: 20px;
        }
        .login-info-content strong {
            display: block;
            color: #fff;
            font-size: 18px;
            margin-bottom: 6px;
        }
        .login-info-content span {
            display: block;
            color: #cbd5e1;
            font-size: 14px;
            line-height: 1.5;
        }
        @media (max-width: 640px) {
            #overlay-login {
                padding: 12px;
            }
            .auth-shell {
                min-height: auto;
            }
            .login-destaque-card,
            .login-box,
            .login-info-card {
                max-width: 100%;
            }
            .login-destaque-card,
            .login-info-card {
                border-radius: 18px;
                padding: 16px;
            }
            .login-destaque-title {
                font-size: 23px;
            }
            .login-destaque-text,
            .login-info-content span {
                font-size: 14px;
            }
            .login-info-content strong {
                font-size: 17px;
            }
        }

            .auth-shell {
                min-height: auto;
            }
            .dynamic-hero h1 {
                font-size: 30px;
            }
            .dynamic-rotator-title {
                font-size: 22px;
            }
            .dynamic-hero, .dynamic-feature, .dynamic-rotator, .dynamic-stats {
                padding: 16px;
            }
        }

    
        .agenda-legenda-status {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 12px;
            margin: 0 0 14px 0;
        }
        .agenda-legenda-card {
            padding: 12px 14px;
            border-radius: 16px;
            background: rgba(255,255,255,0.92);
            border: 1px solid #dbe3ef;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .agenda-legenda-card-topo {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .agenda-legenda-card-topo-inline {
            gap: 7px;
            flex-wrap: wrap;
        }
        .agenda-legenda-card-titulo {
            font-size: 13px;
            font-weight: 700;
            color: #475569;
        }
        .agenda-legenda-card-quantidade-inline {
            font-size: 20px;
            font-weight: 800;
            color: #0f172a;
            line-height: 1;
        }
        .agenda-legenda-card-valor {
            font-size: 14px;
            font-weight: 700;
            color: #334155;
        }
        .agenda-legenda-cor {
            width: 12px;
            height: 12px;
            border-radius: 999px;
            display: inline-block;
            flex: 0 0 12px;
        }
        .agenda-legenda-cor.concluido { background: #198754; }
        .agenda-legenda-cor.pendente { background: #f1c40f; }
        .agenda-legenda-cor.cancelado { background: #dc3545; }
        .agenda-legenda-card.status-concluido .agenda-legenda-card-quantidade-inline,
        .agenda-legenda-card.status-concluido .agenda-legenda-card-valor { color: #198754; }
        .agenda-legenda-card.status-pendente .agenda-legenda-card-quantidade-inline,
        .agenda-legenda-card.status-pendente .agenda-legenda-card-valor { color: #b88700; }
        .agenda-legenda-card.status-cancelado .agenda-legenda-card-quantidade-inline,
        .agenda-legenda-card.status-cancelado .agenda-legenda-card-valor { color: #dc3545; }
        .agenda-mes-wrapper {
            width: 100%;
        }
        .agenda-mes-grid {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 0;
            border: 1px solid #dbe3ef;
            border-radius: 18px;
            overflow: hidden;
            background: #f8fafc;
        }
        .agenda-mes-weekday {
            min-height: 42px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 8px;
            background: #eef3fb;
            border-right: 1px solid #dbe3ef;
            border-bottom: 1px solid #dbe3ef;
            font-size: 13px;
            font-weight: 700;
            color: #475569;
            box-sizing: border-box;
        }
        .agenda-mes-weekday:nth-child(7n) { border-right: none; }
        .agenda-mes-weekday.domingo { color: #dc3545; }
        .agenda-mes-weekday.sabado { color: #2563eb; }
        .agenda-mes-cell {
            min-height: 120px;
            padding: 8px;
            background: #fff;
            border-right: 1px solid #dbe3ef;
            border-bottom: 1px solid #dbe3ef;
            display: flex;
            flex-direction: column;
            gap: 8px;
            overflow: hidden;
            position: relative;
            text-align: left;
            cursor: pointer;
            appearance: none;
            width: 100%;
            font: inherit;
            box-sizing: border-box;
            transition: background .18s ease, box-shadow .18s ease;
        }
        .agenda-mes-cell:nth-child(7n) { border-right: none; }
        .agenda-mes-cell-vazio {
            background: #f8fafc;
        }
        .agenda-mes-cell.domingo { background: linear-gradient(180deg, rgba(220,53,69,.06) 0%, #ffffff 32%); }
        .agenda-mes-cell.sabado { background: linear-gradient(180deg, rgba(37,99,235,.06) 0%, #ffffff 32%); }
        .agenda-mes-cell.domingo .agenda-mes-dia-numero { color: #dc3545; }
        .agenda-mes-cell.sabado .agenda-mes-dia-numero { color: #2563eb; }
        .agenda-mes-dia-topo {
            display: flex;
            align-items: center;
            justify-content: flex-start;
        }
        .agenda-mes-dia-numero {
            font-size: 16px;
            font-weight: 700;
            color: #111827;
        }
        .agenda-mes-hoje {
            box-shadow: inset 0 0 0 2px #ff4d4f, inset 0 0 0 3px rgba(255,77,79,.16);
        }
        .agenda-mes-hoje .agenda-mes-dia-numero {
            color: #b91c1c !important;
        }
        .agenda-mes-contadores {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 6px;
            margin-top: 2px;
        }
        .agenda-mes-contador {
            min-width: 22px;
            height: 22px;
            padding: 0 8px;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 800;
            line-height: 1;
            color: #fff;
        }
        .agenda-mes-contador.status-concluido { background: #198754; }
        .agenda-mes-contador.status-pendente { background: #f1c40f; color: #222; }
        .agenda-mes-contador.status-cancelado { background: #dc3545; }
        .badge-qtd-status {
            font-size: 11px !important;
            line-height: 1.25 !important;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
            padding: 4px 9px !important;
            max-width: 280px;
            background: linear-gradient(180deg, rgba(40, 52, 72, 0.95) 0%, rgba(25, 35, 51, 0.95) 100%) !important;
            border: 1px solid rgba(99, 118, 146, 0.7) !important;
            color: #e5edf7 !important;
        }
        .agenda-resumo-tipo-item {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
        }
        .agenda-resumo-tipo-label {
            font-size: 11px;
            font-weight: 700;
            color: #f8fafc;
        }
        .agenda-resumo-status-bolha {
            min-width: 16px;
            height: 16px;
            padding: 0 4px;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            font-weight: 800;
            line-height: 1;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
        }
        .agenda-resumo-status-bolha.status-concluido { background: #198754; color: #fff; }
        .agenda-resumo-status-bolha.status-pendente { background: #f1c40f; color: #1f2937; }
        .agenda-resumo-status-bolha.status-cancelado { background: #dc3545; color: #fff; }
        .agenda-resumo-separador {
            color: #94a3b8;
            margin: 0 2px;
            font-weight: 700;
        }
        .agenda-popup-dia-wrapper {
            width: 100%;
        }
        .agenda-legenda-status-popup {
            margin-bottom: 14px;
        }
        .agenda-dia-popup-card {
            margin-bottom: 0;
        }
        .agenda-popup-dia-acoes {
            padding-top: 14px;
            text-align: center;
        }
        .agenda-lista-wrapper {
            margin-bottom: 12px;
        }
        .agenda-legenda-status-lista {
            margin-bottom: 18px;
        }
        .agenda-legenda-status-mes {
            margin-bottom: 18px;
        }
        .agenda-btn-agendar-novo {
            background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%) !important;
            color: #6d28d9 !important;
            border: 1px solid rgba(109, 40, 217, 0.18) !important;
            box-shadow: 0 8px 18px rgba(109, 40, 217, 0.12);
            font-weight: 800;
            opacity: 1 !important;
        }
        .agenda-btn-agendar-novo:hover {
            filter: brightness(0.98);
            transform: translateY(-1px);
        }
        .agendamento-item.agendamento-pendente {
            border: 1px solid rgba(241, 196, 15, 0.72) !important;
            box-shadow: inset 0 0 0 1px rgba(241, 196, 15, 0.12);
        }
        .agendamento-item.agendamento-cancelado {
            border: 1px solid rgba(220, 53, 69, 0.72) !important;
            box-shadow: inset 0 0 0 1px rgba(220, 53, 69, 0.12);
        }
        body.dark-mode .agenda-btn-agendar-novo {
            background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%) !important;
            color: #6b21a8 !important;
            border-color: rgba(216, 180, 254, 0.34) !important;
            box-shadow: 0 10px 22px rgba(168, 85, 247, 0.18);
        }
        body.dark-mode .agendamento-item.agendamento-pendente {
            border: 1px solid rgba(241, 196, 15, 0.92) !important;
            box-shadow: inset 0 0 0 1px rgba(241, 196, 15, 0.18);
        }
        body.dark-mode .agendamento-item.agendamento-cancelado {
            border: 1px solid rgba(220, 53, 69, 0.92) !important;
            box-shadow: inset 0 0 0 1px rgba(220, 53, 69, 0.18);
        }
        body.dark-mode .agenda-popup-dia-acoes .btn-soft {
            color: #e9d5ff;
        }
        .badge-status-agendamento {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 8px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 800;
            vertical-align: middle;
        }
        .badge-status-agendamento.status-concluido {
            background: rgba(25, 135, 84, 0.12);
            color: #198754;
        }
        .badge-status-agendamento.status-pendente {
            background: rgba(241, 196, 15, 0.18);
            color: #9a6700;
        }
        .badge-status-agendamento.status-cancelado {
            background: rgba(220, 53, 69, 0.12);
            color: #dc3545;
        }
        body.dark-mode .agenda-legenda-card {
            background: #111827;
            border-color: #334155;
        }
        body.dark-mode .agenda-legenda-card-titulo { color: #cbd5e1; }
        body.dark-mode .agenda-legenda-card-quantidade-inline { color: #f8fafc; }
        body.dark-mode .agenda-mes-grid {
            background: #0f172a;
            border-color: #334155;
        }
        body.dark-mode .agenda-mes-weekday {
            background: #111827;
            color: #cbd5e1;
            border-right-color: #334155;
            border-bottom-color: #334155;
        }
        body.dark-mode .agenda-mes-weekday.domingo { color: #ff7b7b; }
        body.dark-mode .agenda-mes-weekday.sabado { color: #7db2ff; }
        body.dark-mode .agenda-mes-cell {
            background: #0f172a;
            border-right-color: #334155;
            border-bottom-color: #334155;
        }
        body.dark-mode .agenda-mes-cell-vazio {
            background: #0b1220;
        }
        body.dark-mode .agenda-mes-dia-numero {
            color: #f8fafc;
        }
        body.dark-mode .agenda-mes-cell.domingo { background: linear-gradient(180deg, rgba(220,53,69,.10) 0%, #0f172a 34%); }
        body.dark-mode .agenda-mes-cell.sabado { background: linear-gradient(180deg, rgba(37,99,235,.12) 0%, #0f172a 34%); }
        body.dark-mode .agenda-mes-cell.domingo .agenda-mes-dia-numero { color: #ff7b7b; }
        body.dark-mode .agenda-mes-cell.sabado .agenda-mes-dia-numero { color: #7db2ff; }
        body.dark-mode .agenda-mes-hoje {
            box-shadow: inset 0 0 0 2px #ff4d4f, inset 0 0 0 3px rgba(255,77,79,.28);
        }
        body.dark-mode .agenda-mes-hoje .agenda-mes-dia-numero {
            color: #ffd4d5 !important;
        }
        body.dark-mode .agenda-resumo-separador { color: #64748b; }
        body.dark-mode .badge-qtd-status { background: linear-gradient(180deg, rgba(24, 36, 56, 0.96) 0%, rgba(13, 20, 33, 0.96) 100%) !important; border-color: rgba(91, 115, 146, 0.7) !important; }
        body.dark-mode .agenda-resumo-tipo-label { color: #e2e8f0; }
        body.dark-mode .badge-status-agendamento.status-pendente { color: #ffd85f; }
        @media (max-width: 640px) {
            .agenda-legenda-status {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            .agenda-legenda-card {
                padding: 10px 12px;
            }
            .agenda-legenda-card-titulo {
                font-size: 12px;
            }
            .agenda-legenda-card-quantidade-inline {
                font-size: 18px;
            }
            .agenda-legenda-card-valor {
                font-size: 13px;
            }
            .agenda-mes-weekday {
                min-height: 36px;
                font-size: 12px;
                padding: 6px 4px;
            }
            .agenda-mes-cell {
                min-height: 88px;
                padding: 6px;
                gap: 6px;
            }
            .agenda-mes-dia-numero {
                font-size: 14px;
            }
            .agenda-mes-contadores {
                gap: 4px;
            }
            .agenda-mes-contador {
                min-width: 18px;
                height: 18px;
                padding: 0 6px;
                font-size: 10px;
            }
            .badge-qtd-status {
                font-size: 10px !important;
                max-width: 180px;
            }
            .agenda-resumo-status-bolha {
                min-width: 14px;
                height: 14px;
                font-size: 9px;
            }
            .agenda-resumo-tipo-label {
                font-size: 10px;
            }
        }


    
        .fin-modal-lancamento-content { width: min(620px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: 92vh; overflow-y: auto; overflow-x: hidden; box-sizing: border-box; }
        .fin-modal-lancamento-content, .fin-modal-lancamento-content * { box-sizing: border-box; }
        .fin-modal-lancamento-content > * { min-width: 0; }
        .fin-modal-lancamento-content input, .fin-modal-lancamento-content select, .fin-modal-lancamento-content textarea,
        .fin-filtro-grid input, .fin-filtro-grid select {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }
        .fin-modal-lancamento-content input[type="date"], .fin-filtro-grid input[type="date"] {
            appearance: none;
            -webkit-appearance: none;
            width: 100%;
            max-width: 100%;
            min-width: 0;
        }
        .fin-modal-lancamento-content.fin-modal-saida { border-top: 4px solid #ff5f5f !important; }
        .fin-modal-lancamento-content.fin-modal-entrada { border-top: 4px solid #20c997 !important; }
        .fin-lancamento-grid-top { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; align-items:end; width:100%; }
        .fin-lancamento-grid-top > div, .fin-lancamento-grid-mid > div, .fin-lancamento-grid-rec > div, .fin-filtro-grid > div { min-width: 0; }
        .fin-lancamento-grid-mid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; margin-top:10px; }
        .fin-lancamento-grid-rec { margin-top:10px; display:grid; grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr); gap:10px; align-items:end; }
        .fin-lancamento-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
        .fin-lancamento-actions .btn-verde, .fin-lancamento-actions .btn-roxo, .fin-lancamento-actions .btn-vermelho { width:auto; margin:0; }
        .fin-resumo-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; margin-bottom:16px; width:100%; box-sizing:border-box; }
        .fin-resumo-head-acoes { display:flex; gap:10px; flex-wrap:wrap; width:100%; max-width:440px; }
        .fin-resumo-head-acoes .btn-verde, .fin-resumo-head-acoes .btn-vermelho { flex:1 1 190px; width:auto; margin:0; }
        .fin-filtro-grid { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
        .fin-filtro-grid > div { flex:1; min-width:130px; }
        @media (max-width: 560px) {
            .fin-modal-lancamento-content { width: calc(100vw - 24px); max-width: calc(100vw - 24px); padding: 12px; }
            .fin-modal-lancamento-content h3 { font-size: 17px; line-height: 1.2; margin-right: 26px; }
            .fin-lancamento-grid-top, .fin-lancamento-grid-mid, .fin-lancamento-grid-rec { grid-template-columns: 1fr !important; }
            .fin-lancamento-actions .btn-verde, .fin-lancamento-actions .btn-roxo, .fin-lancamento-actions .btn-vermelho { flex:1 1 100%; }
            .fin-modal-lancamento-content label { font-size: 11px !important; }
            .fin-modal-lancamento-content input, .fin-modal-lancamento-content select, .fin-modal-lancamento-content textarea { font-size: 14px; }
            .fin-modal-lancamento-content input[type="date"], .fin-filtro-grid input[type="date"] { font-size: 13px !important; padding-left: 10px; padding-right: 32px; }
            .fin-resumo-head-acoes { max-width: 100%; }
            .fin-resumo-head-acoes .btn-verde, .fin-resumo-head-acoes .btn-vermelho { flex:1 1 100%; }
            .fin-filtro-grid { display:grid; grid-template-columns: 1fr; }
            .fin-filtro-grid > div { min-width: 0; }
            .fin-filtro-grid .btn-roxo, .fin-filtro-grid .btn-vermelho { width:100% !important; }
        }


        @media (max-width: 760px) {
            #conteudo-aba-config div[style*="grid-template-columns: minmax(190px"] {
                grid-template-columns: 1fr !important;
            }
            #conteudo-aba-config div[style*="grid-template-columns: repeat(2"] {
                grid-template-columns: 1fr !important;
            }
        }

    