:root {
    --primary-color: #1a237e;
    --secondary-color: #ffd700;
    --background-color: #f5f7fa;
    --text-color: #333;
    --border-color: rgba(255, 255, 255, 0.2);
    --success-color: #4CAF50;
    --info-color: #2196F3;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), #303f9f);
    color: #ffffff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a237e;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-title {
    flex-grow: 1;
    text-align: center;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    margin: 0;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.nav-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.scripts-btn {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: #ffffff;
}

.scripts-btn:hover {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

.tests-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: #ffffff;
}

.tests-btn:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
}

.logout-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: #ffffff;
}

.logout-btn:hover {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
}

.cases-btn {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: #ffffff;
}

.cases-btn:hover {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
}

@media screen and (max-width: 768px) {
    .header-buttons {
        flex-direction: column;
        width: 100%;
    }

    .nav-btn {
        width: 100%;
    }
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 10px;
    width: 100%;
}

.control-group {
    flex: 1 1 calc(50% - 10px);
    min-width: 200px;
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--secondary-color);
}

select, button, input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

button {
    background: linear-gradient(45deg, var(--secondary-color), #ffa000);
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

button:hover {
    background: linear-gradient(45deg, #ffa000, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

select {
    min-width: -webkit-fill-available;
}

.result-container {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

#result {
    padding: 20px;
    min-height: 200px;
}

.generated-report {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.generated-report button {
    text-decoration: none;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.open-report-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.open-report-btn:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
}

#dynamicInputs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;

}

#dynamicInputs.hidden {
    display: none;
}

.input-wrapper {
    flex: 1 1 calc(50% - 10px);
    min-width: 100px;
    
}


#dynamicInputs input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#dynamicInputs input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.input-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--secondary-color);
}

@media (max-width: 600px) {
    .input-wrapper {
        flex: 1 1 100%;
    }
}

.highlight-error {
    border: 2px solid #e74c3c !important;
    box-shadow: 0 0 5px #e74c3c !important;
}

.cancel-btn {
    background: linear-gradient(45deg, #021c1e, #7f8c8d);
    color: #ffffff;
}

.cancel-btn:hover {
    background: linear-gradient(45deg, #455152, #14191a);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.delete-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: #ffffff;
}

.delete-btn:hover {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

@media screen and (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 10px;
    }

    .header-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .header-buttons {
        flex-direction: column;
        width: 100%;
    }

    .header-buttons button {
        width: 100%;
        margin-bottom: 5px;
    }

    .content {
        padding: 20px 10px;
    }

    .controls {
        flex-direction: column;
    }

    .control-group {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .error-table {
        font-size: 14px;
    }

    .error-table th,
    .error-table td {
        padding: 8px 5px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

@media screen and (max-width: 480px) {
    .header-title {
        font-size: 18px;
    }

    .error-table {
        font-size: 12px;
    }

    .error-table th,
    .error-table td {
        padding: 5px 3px;
    }
}

.error-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.error-card h3 {
    color: var(--secondary-color);
    margin-top: 0;
}

.error-card p {
    margin: 5px 0;
}

.full-width-btn {
    width: 100%;
    margin-top: 10px;
}

@media screen and (min-width: 769px) {
    .full-width-btn {
        width: auto;
    }
}

.error-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.error-table th, .error-table td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
}

.error-table th {
    background-color: var(--primary-color);
    color: white;
}

.error-card-container {
    display: none;
}

.error-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.error-card h3 {
    color: var(--secondary-color);
    margin-top: 0;
}

.error-card p {
    margin: 5px 0;
}

@media screen and (max-width: 768px) {
    .error-table {
        display: none;
    }
    
    .error-card-container {
        display: block;
    }
    
    /* ... (pozostałe style dla mniejszych ekranów) ... */
}

@media screen and (min-width: 769px) {
    .error-table {
        display: table;
    }
    
    .error-card-container {
        display: none;
    }
}

@media (min-width: 1200px) {
    .case-table, .error-table {
        width: 90%;
        max-width: 1400px;
        margin: 0 auto;
    }
}

@media (min-width: 1600px) {
    .case-table, .error-table {
        width: 95%;
        max-width: 1800px;
    }
}

/* Dodaj te style na końcu pliku */

.api-test-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.test-form, .test-list, .test-results {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.test-item {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.test-item h3 {
    margin-top: 0;
}

.test-actions {
    margin-top: 10px;
}

.test-actions button {
    margin-right: 10px;
}

.test-results pre {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Style dla widoku mobilnego */
@media screen and (max-width: 768px) {
    .content {
        padding: 10px;
        width: 95%;
    }

    .controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .control-group {
        margin-bottom: 15px;
    }

    .control-group label {
        font-size: 14px;
    }

    select, input {
        width: 100%;
        padding: 8px;
        font-size: 14px;
    }

    .quick-access-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .quick-access-button {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }

    .generated-report {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .generated-report button {
        width: 100%;
        margin: 5px 0;
        padding: 10px;
        font-size: 14px;
    }

    .result-container {
        margin-top: 20px;
    }

    #dynamicInputs {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #dynamicInputs input {
        width: 100%;
        padding: 8px;
        font-size: 14px;
    }

    .full-width-btn {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        margin-top: 20px;
    }
}

/* Style dla nagłówka w widoku mobilnym */
@media screen and (max-width: 768px) {
    .header {
        padding: 10px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header h1 {
        font-size: 20px;
        margin: 0;
    }

    .header-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }

    .header-buttons button {
        width: 100%;
        padding: 8px;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-buttons button i {
        margin-right: 4px;
    }

    .environment-selector {
        width: 100%;
        margin-top: 10px;
    }

    .environment-selector select {
        width: 100%;
        padding: 8px;
        font-size: 14px;
    }

    /* Dostosowanie nawigacji */
    .nav-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }

    .nav-buttons button {
        width: 100%;
        padding: 8px;
        font-size: 12px;
    }
}
