﻿.panel {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

    .panel > div {
        border: 1px solid #ccc;
        padding: 20px;
        min-height: 100px;
        background: #f9f9f9;
    }

.zprava {
    color: #cb3d3d;
}

/* Tablet a monitor (šířka nad 768px) */
@media (max-width: 768px) {
    .panel {
        /* Monitor: 2 sloupce vedle sebe */
        grid-template-columns: 1fr;
    }
}

/* Layout */
.af-meta {
    margin: 10px 0 14px;
    max-width: 1200px
}

.af-updated {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.af-label {
    opacity: .65;
    font-size: 12px;
}

.af-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Badge */
.af-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.af-badge--dirty {
    border-color: #f3d08a;
    background: #fff7e6;
}

.af-badge--ok {
    border-color: #b7e2c0;
    background: #effaf2;
}

/* Actions (sticky top inside form) */
.af-actions {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    margin: 10px 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
}

.af-spacer {
    flex: 1;
}

/* Buttons */
.af-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    text-decoration: none;
    color: #111827;
    cursor: pointer;
    transition: transform .05s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
    user-select: none;
}

    .af-btn:active {
        transform: translateY(1px);
    }

    .af-btn:disabled {
        opacity: .45;
        cursor: not-allowed;
        transform: none;
    }

.af-btn--primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

    .af-btn--primary:hover {
        background: #1d4ed8;
    }

.af-btn--ghost:hover {
    background: #f3f4f6;
}

.af-btn--danger {
    border-color: #ef4444;
    color: #ef4444;
    background: #fff;
}

    .af-btn--danger:hover {
        background: #fff1f2;
    }

/* Field wrappers */
.af-field {
    display: block;
    margin: 10px 0;
}

.af-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    opacity: .75;
}

/* Inputs */
.af-input, .af-textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    outline: none;
    transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.af-textarea {
    min-height: 86px;
    resize: vertical;
}

    .af-input:focus, .af-textarea:focus {
        border-color: #b7e2c0;
        box-shadow: 0 0 0 4px rgba(59,130,246,.15);
    }

/* Changed / invalid highlighting */
.af-modified {
    border-color: #f59e0b !important;
    background: #fffbeb;
    outline: none;
}

.af-modified {
    animation: afPulse .7s ease-out;
}

@keyframes afPulse {
    0% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-1px);
    }

    100% {
        transform: translateY(0);
    }
}

.af-invalid {
    border-color: #ef4444 !important;
    background: #fff1f2;
}

/* Fieldsets */
.af-set {
    margin: 2px 0;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

    .af-set > legend {
        padding: 0 8px;
        font-size: 12px;
        opacity: .7;
    }
