* {
    font-family: 'Inter', sans-serif;
}

.hidden {
    display: none !important;
}

/* Animacje */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradients - dostosowane do kolorystyki Dzień Dobry Podatki */
.gradient-bg {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%); /* żółty */
}

.gradient-primary {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); /* pomarańczowy akcent */
}

.gradient-accent {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); /* bursztynowy */
}

.gradient-purple {
    background: linear-gradient(135deg, #fde047 0%, #facc15 100%); /* jaśniejszy żółty */
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* === PRINT-ONLY: drukuj wyłącznie #print-output === */
/* Ekran: chowamy kontener pod wydruk */
@media screen {
    #print-output {
        display: none;
    }
}

@media print {
    body * {
        visibility: hidden !important;
    }

    #print-output, #print-output * {
        visibility: visible !important;
    }

    #print-output {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        padding: 0;
        display: block !important; /* <— DODAJ TO */
    }
}

/* === Modal edycji PDF === */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    display: none;
    z-index: 50;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 51;
    align-items: center;
    justify-content: center;
}

.modal.open, .modal-backdrop.open {
    display: flex;
}

.modal-card {
    width: min(1000px, 95vw);
    max-height: 90vh;
    overflow: auto;
}

.modal textarea {
    width: 100%;
    min-height: 360px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 14px;
    line-height: 1.4;
}

/* === WYSIWYG === */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .5rem 0 1rem;
}
#progress-bar-fill {
    background: linear-gradient(to right, #facc15, #eab308);
}

.toolbar button {
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    padding: .4rem .6rem;
    background: #f8fafc;
    font-size: 14px;
}

.toolbar button:hover {
    background: #eef2ff;
}

#wysiwyg-editor {
    width: 100%;
    min-height: 360px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem;
    outline: none;
    overflow: auto;
}

#wysiwyg-editor:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, .1);
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    box-shadow: 0 4px 15px 0 rgba(234, 179, 8, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(202, 138, 4, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px 0 rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(16, 185, 129, 0.4);
}

/* Card styles */
.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Input styles */
.input-field {
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.input-field:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    transform: translateY(-1px);
}

/* Price level cards */
.price-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.price-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.price-card.selected {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Validation styles */
.input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .card {
        box-shadow: none !important;
    }
}

@media (max-width: 768px) {
    .price-card:hover {
        transform: none;
    }
}
/* === Układ edytora PDF: 2 kolumny i równe okienka === */
.editor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start; /* wyrównanie do góry */
}
@media (min-width: 768px) {
    .editor-grid { grid-template-columns: 1fr 1fr; }
}

/* Podgląd wizualny – wygląd jak edytor i ta sama wysokość */
.editor-preview {
    min-height: 360px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem;
    overflow: auto;
}
#pdf-preview {
    min-height: 360px;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
}
/* === WYSIWYG: zawsze edytowalne i z kursorem tekstu === */
#wysiwyg-editor {
    cursor: text;
    user-select: text !important;
    -webkit-user-select: text !important;
    pointer-events: auto !important;
}
#wysiwyg-editor * {
    user-select: text !important;
    -webkit-user-select: text !important;
    pointer-events: auto !important;
}
/* W środku edytora wyłącz akcje klikalnych elementów (żeby nie kradły fokusu) */
#wysiwyg-editor a,
#wysiwyg-editor button,
#wysiwyg-editor [role="button"],
#wysiwyg-editor input,
#wysiwyg-editor select,
#wysiwyg-editor textarea,
#wysiwyg-editor label {
    pointer-events: none !important;
}