﻿.form-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    max-width: 720px;
}

.container {
    margin-left: 1.2rem;
}

.form-row {
    margin-bottom: .75rem;
    display: grid;
    gap: .35rem;
    max-width: 520px;
}

.form-actions {
    margin-top: .75rem;
    display: flex;
    gap: .5rem;
}

.form-row > label {
    font-size: .92rem;
    color: #334155;
    font-weight: 600;
}

.ro,
.form-row input,
.form-row select {
    padding: .45rem .65rem;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
    background: #fff;
}

.ro {
    background: #f8fafc;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.inline {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem .75rem;
}

.fieldset-ro {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: .75rem;
    background: #f8fafc;
}

.select-przylacze {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.przylacze-select {
    width: 100%;
    max-width: 520px;
    min-width: 320px;
    padding: .5rem .9rem;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'><path d='M6 8l4 4 4-4' stroke='%2362748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 16px 16px;
    padding-right: 2.2rem;
}

    .przylacze-select:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59,130,246,.15);
    }

    .przylacze-select:disabled {
        color: #64748b;
        background: #f1f5f9;
        cursor: not-allowed;
        border-color: #e5e9f0;
    }

    .przylacze-select option {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

.validation-message {
    color: #dc2626;
    font-size: .88rem;
}

input.invalid, select.invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220,38,38,.12) !important;
}

.msg {
    margin: .5rem 0 0;
}

    .msg.error {
        color: #b91c1c;
    }

    .msg.warn {
        color: #b45309;
    }

    .msg.ok {
        color: #16a34a;
    }

.spinner,
.spinner-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(59,130,246,.25);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

.spinner-inline {
    margin-left: .5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    .przylacze-select {
        min-width: 0;
        max-width: 100%;
    }

    .form-card {
        max-width: 100%;
    }
}

.przylacze-details .form-row + .form-row {
    margin-top: .4rem;
}


.btn-secondary {
    background: #e5e7eb;
    color: #111827;
    border: 1px solid #d1d5db;
}

    .btn-secondary[disabled] {
        opacity: .6;
        cursor: default;
    }

.zg-container {
    padding: 1rem 2rem 2rem 0rem;
}

.zg-form {
    max-width: 1100px;
    width: 100%;
    margin: 0;
}

    .zg-fieldset .form-row + .form-row {
        margin-top: .4rem;
    }

.zg-section {
    margin-top: 1.25rem;
    padding-top: .5rem;
    border-top: 1px solid #e5e7eb;
}

    .zg-section:first-of-type {
        margin-top: .75rem;
        border-top: none;
        padding-top: 0;
    }

.zg-section-title {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.zg-header-row {
    align-items: center;
    gap: .5rem;
}

.zg-fieldset {
    margin-top: .5rem;
}

.zg-przylacze-row label {
    min-width: 120px;
}

.zg-inline-small {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.textarea-uwagi {
    width: 100%;
    height: 5rem;
    min-height: 5rem;
    max-height: 5rem;
    padding: .35rem .5rem;
    box-sizing: border-box;
    resize:none;
}

.przylacze-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .6rem;
    gap: .75rem;
}

.przylacze-hint {
    margin-right: 4.5rem;
    font-size: .8rem;
    color: #6b7280;
}

.btn-sm {
    padding: .2rem .7rem;
    font-size: .85rem;
}

.radio-chip {
    margin-right: .6rem;
}

button[disabled],
.btn[disabled],
.btn-primary[disabled],
.btn-secondary[disabled] {
    cursor: not-allowed;
    opacity: .6;
}
