.jp-container {
    max-width: 1180px;
    margin: 20px auto;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
}

.jp-header {
    background: #0f172a;
    color: #fff;
    padding: 20px 24px;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.jp-badge {
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.jp-brand h2 {
    margin: 6px 0 0;
    font-size: 20px;
    color: #fff;
}

.jp-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.jp-week-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1e293b;
    padding: 6px 10px;
    border-radius: 6px;
}

.jp-week-label {
    font-size: 13px;
    font-weight: 600;
    min-width: 150px;
    text-align: center;
}

.jp-btn {
    border: none;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
}

.jp-btn-outline {
    background: #fff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

.jp-btn-outline:hover { background: #f1f5f9; }
.jp-btn-primary { background: #1d4ed8; color: #fff; }
.jp-btn-primary:hover { background: #1e40af; }
.jp-btn-red { background: #dc2626; color: #fff; }
.jp-btn-red:hover { background: #b91c1c; }
.jp-btn-ai { background: #0f766e; color: #fff; width: 100%; }
.jp-btn-ai:hover { background: #115e59; }
.jp-btn-danger { background: #fee2e2; color: #b91c1c; }

/* Abas dos dias */
.jp-day-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.jp-day-tab {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
}

.jp-day-tab.active {
    background: #eff6ff;
    border-color: #1d4ed8;
}

.jp-day-tab strong { display: block; font-size: 14px; }
.jp-day-tab span { font-size: 12px; color: #64748b; }

/* Cards de Horários */
.jp-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.jp-slot-card {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.jp-slot-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.jp-time-badge {
    font-size: 18px;
    font-weight: 800;
    color: #1d4ed8;
}

.jp-slot-empty {
    text-align: center;
    padding: 35px 10px;
    color: #64748b;
}

.jp-slot-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #0f172a;
}

.jp-slot-meta {
    font-size: 13px;
    color: #334155;
    margin-bottom: 6px;
}

.jp-whats-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #15803d;
    font-weight: 600;
    text-decoration: none;
}

.jp-slot-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

/* Modal */
.jp-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}

.jp-modal.hidden, .hidden { display: none !important; }

.jp-modal-content {
    background: #fff;
    width: 100%;
    max-width: 780px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 10px;
    padding: 24px;
}

.jp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.jp-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
}

.jp-form-row { margin-bottom: 14px; }
.jp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.jp-grid-3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.jp-align-end { display: flex; align-items: flex-end; }

.jp-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #334155;
}

.jp-form-group input,
.jp-form-group select,
.jp-form-group textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.jp-modal-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.jp-footer-right { display: flex; gap: 10px; margin-left: auto; }

/* Modo Estúdio / Impressão */
.jp-studio {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 24px;
    margin-top: 16px;
}

.jp-studio-toolbar {
    display: flex;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 2px solid #0f172a;
    margin-bottom: 20px;
}

.jp-studio-sheet { font-size: 16px; line-height: 1.6; }
.jp-studio-block {
    border-bottom: 2px dashed #94a3b8;
    padding-bottom: 22px;
    margin-bottom: 24px;
}

.jp-studio-abertura {
    background: #f1f5f9;
    border-left: 4px solid #1d4ed8;
    padding: 12px 16px;
    margin: 12px 0;
    font-weight: 500;
}

@media (max-width: 850px) {
    .jp-slots-grid, .jp-day-tabs, .jp-grid-2, .jp-grid-3 { grid-template-columns: 1fr; }
}

@media print {
    body * { visibility: hidden; }
    #jp-studio-view, #jp-studio-view * { visibility: visible; }
    #jp-studio-view { position: absolute; left: 0; top: 0; width: 100%; border: none; padding: 0; }
    .no-print { display: none !important; }
}
