@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
    --accent: #e3ff53;
    --dark: #2d2d2d;
    --light: #ffffff;
    --muted: #f5f5f5;
    --border: #dddddd;
    --success: #4caf50;
    --error: #f44336;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--accent);
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: #ffffff;
    color: var(--dark);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: var(--accent);
    color: var(--dark);
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    height: 48px;
    width: auto;
    display: block;
}

.brand-logo-home {
    height: 350px;
    width: auto;
    display: inline-flex;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 700;
    font-size: 18px;
}

.brand-subtitle {
    display: block;
    font-size: 12px;
    opacity: 0.8;
}

.top-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.menu-group {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.menu-parent {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 12px;
    font-size: 0.9em;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.menu-parent::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s ease;
}

/* Opcjonalnie: obrót przy otwartym menu */
.menu-parent.active::after,
.menu-parent:hover::after {
    transform: rotate(180deg);
}


.menu-group.active .menu-parent {
    background: #000000;
    color: var(--light);
}

.menu-children {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    padding: 8px;
    display: none;
    z-index: 50;
}


/* .menu-group:hover .menu-children,
.menu-group:focus-within .menu-children {
    display: block;
} */

@media (min-width: 769px) {
    .menu-group:hover .menu-children,
    .menu-group:focus-within .menu-children {
        display: block;
    }
}

.menu-child {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 14px;
}

.menu-child:hover,
.menu-child.active {
    background: var(--muted);
}

.top-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
}

.top-link.active {
    background: #000000;
    color: var(--light);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.edition-switcher__select {
    appearance: none;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.08);
    color: var(--dark);
    padding: 8px 34px 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    line-height: 1.1;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.edition-switcher__select:hover {
    background: rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.35);
}

.edition-switcher__select:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
}

.edition-switcher {
    position: relative;
}

.edition-switcher::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 0;
    height: 0;
    margin-top: -2px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    pointer-events: none;
}

@media (max-width: 768px) {
    .top-menu {
        width: 100%;
    }

    .menu-group,
    .top-link {
        width: 100%;
    }

    .menu-parent {
        width: 100%;
        justify-content: space-between;
    }

    .menu-children {
        position: static;
        min-width: 0;
        box-shadow: none;
        border: 1px solid var(--border);
        margin-top: 8px;
    }

    .menu-children {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: transparent;
        padding: 0;
    }

    .menu-group {
        display: block;
    }

    .menu-children {
        width: 100%;
        border: 0;
    }

    .menu-child {
        width: 100%;
        color: var(--dark);
        text-decoration: none;
        font-weight: 600;
        padding: 6px 12px;
        border-radius: 999px;
        background: rgba(0, 0, 0, 0.08);
        border: none;
        transition: background-color 0.15s ease; /* smooth transition */
    }

    .menu-child:hover {
        background: rgba(0, 0, 0, 0.15); /* tylko kolor, bez zmiany paddingu */
    }

    .menu-child.active {
        background: #000000;
        color: var(--light);
    }
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px;
}

.main-full {
    max-width: none;
    margin: 0;
    padding: 0;
}

.card {
    background: var(--light);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px var(--shadow);
    margin: 28px 0;
}

.card:hover,
.hero-card:hover,
.download-card:hover,
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.card,
.hero-card,
.download-card,
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.edition-copy-options {
    display: grid;
    gap: 10px;
}

.edition-copy-option {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafafa;
}

.edition-copy-option__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    flex-wrap: wrap;
}

.edition-copy-option__description {
    font-size: 13px;
    color: #555555;
}

.edition-copy-option__info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #1f2937;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.preview-number {
    text-align: center;
    font-weight: 700;
    margin-top: 8px;
    margin-bottom: 12px;
}

.char-counter {
    margin-top: 6px;
    font-size: 12px;
    color: #666666;
}

.char-counter span {
    font-weight: 600;
}

.preview-title-center {
    text-align: center;
    margin: 10px 0 20px;
}

h2.preview-title-center {
    font-size: 22px;
    font-weight: 800;
    margin: 12px 0 18px;
}

.preview-grid {
    display: grid;
    gap: 16px;
}

.preview-two-col {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.preview-members {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.preview-swot {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 16px;
}

.preview-card,
.preview-box {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 10px;
    word-wrap: break-word;
}

.preview-box .grid-2 > div {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
}

.preview-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-card h4 {
    margin-top: 0;
    margin-bottom: 8px;
}

.preview-member-name {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 6px;
}

.preview-item {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.preview-item span {
    font-weight: 600;
}

.preview-body {
    white-space: pre-wrap;
}

.preview-table thead th {
    background: #f0f0f0;
}

.preview-swot-table td {
    vertical-align: top;
}

.preview-swot-cell {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
}

.preview-swot-table {
    border-collapse: separate;
    border-spacing: 12px;
}

@media (max-width: 768px) {
    .preview-swot-table {
        border-spacing: 0;
    }

    .preview-swot-table,
    .preview-swot-table tbody,
    .preview-swot-table tr,
    .preview-swot-table td {
        display: block;
        width: 100%;
    }

    .preview-swot-table tbody tr {
        margin-bottom: 12px;
    }

    .preview-swot-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .preview-swot-table td {
        margin-bottom: 12px;
    }

    .preview-swot-table td:last-child {
        margin-bottom: 0;
    }
}

.form-intro .intro-header {
    display: block;
    align-items: center;
}

.form-intro .subheader {
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(227, 255, 83, 0.35);
    color: var(--dark);
    font-weight: 700;
    font-size: 12px;
}

.subheader {
    margin: 4px 0 0;
    color: #666;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
}

.intro-category {
    margin-top: 16px;
    padding: 16px 20px;
    background: var(--muted);
    border-radius: 12px;
}

.progress-wrap {
    margin-top: 20px;
}

.kicker {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.progress {
    background: #e9e9e9;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.progress__bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.2s ease;
}

.jury-progress {
    height: 24px;
    border-radius: 999px;
    background: #fef3c7;
    border: 1px solid #facc15;
    margin-top: 8px;
}

.jury-progress .progress__bar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e3ff53 0%, #d4f442 100%);
}

.progress__bar-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    padding: 0 8px;
}

.jury-dashboard-actions {
    margin-top: 18px;
}

.helper {
    margin-top: 20px;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--muted);
}

.helper summary {
    cursor: pointer;
}

.helper-body {
    margin-top: 12px;
}

.readonly-field {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--muted);
    font-weight: 600;
}

.hero-card {
    background: var(--light);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 5px 20px var(--shadow);
}

.home-hero {
    background: var(--accent);
}

.hero-logo img {
    max-width: 240px;
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 16px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
	white-space: nowrap;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    border: 1px solid transparent;
    text-decoration: none;
	font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #000000;
    color: var(--light);
    border-color: #000000;
	padding: 0.3rem 1rem;
    height: 3em;
    margin-top: 1em;
}

.btn-draw {
    margin: 2em 0;
}

.btn-primary:hover {
    background: #000000;
    border-color: #000000;
}

.btn-send {
    background: #e3ff53;
    color: #111111;
    border-color: #c7e63f;
    padding: 0.3rem 1rem;
    height: 3em;
}

.btn-send:hover {
    background: #d4ef45;
    border-color: #b9d43a;
    color: #111111;
}

.btn-outline {
    background: #000000;
    border-color: #000000;
    color: var(--light);
	padding: 0.3rem 1rem;
    height: 3em;
    /*margin-top: 1em;*/
}

.btn-outline:hover {
    background: #000000;
    border-color: #000000;
    color: var(--light);
}

.faq-item .btn-outline {
    margin-top: 0;
    height: auto;
    padding: 0.35rem 1rem;
}

.btn-ghost {
    background: #000000;
    color: var(--light);
    border-color: #000000;
}

.btn-ghost:hover {
    background: #000000;
    border-color: #000000;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tabs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tab-btn {
    border: 2px solid #000000;
    background: transparent;
    color: #000000;
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
}

.tab-btn[aria-selected="true"] {
    background: #000000;
    color: var(--light);
}

.form-label {
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 6px;
	margin-top: 40px;
}

.form-input {
    border-radius: 8px;
    border: 2px solid var(--border);
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
    display: block;
    background: #fff;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(227, 255, 83, 0.2);
}

.form-textarea {
    border-radius: 8px;
    border: 2px solid var(--border);
    padding: 12px 16px;
    font-size: 14px;
    min-height: 120px;
    width: 100%;
    display: block;
    background: #fff;
    resize: vertical;
}

.feedback-editor-form textarea[data-autogrow="1"] {
    resize: none;
    overflow: hidden;
}

.criteria-editor {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.criteria-editor .form {
    gap: 16px;
}

.criteria-editor .form-label {
    margin-top: 0;
}

.criteria-editor-summary__header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.criteria-editor-summary__intro {
    margin: 8px 0 0;
    color: #64748b;
}

.criteria-editor-summary__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.criteria-editor-summary__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
}

.criteria-editor-status {
    margin-bottom: 14px;
}

.criteria-editor-tabs__nav {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    padding-bottom: 4px;
}

.criteria-editor-tab-btn {
    padding: 12px 18px;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.criteria-editor-tab-btn:hover {
    color: #111827;
    background: #f8fafc;
}

.criteria-editor-tab-btn.active {
    color: #111827;
    border-bottom-color: #e3ff53;
}

.criteria-editor-tab-btn__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #312e81;
    font-size: 12px;
    font-weight: 700;
}

.criteria-editor-tab-btn.active .criteria-editor-tab-btn__count {
    background: #111827;
    color: #ffffff;
}

.criteria-school-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.criteria-school-panel__intro {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.criteria-school-panel__title {
    margin: 0 0 6px;
}

.criteria-school-panel__desc {
    margin: 0;
    color: #64748b;
}

.criteria-school-panel__count {
    white-space: nowrap;
    border-radius: 999px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-size: 13px;
    font-weight: 700;
}

.criteria-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.criteria-editor-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
}

.criteria-editor-card--full {
    grid-column: 1 / -1;
}

.criteria-editor-card__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.criteria-editor-card__header h4 {
    margin: 0;
}

.criteria-editor-card__badge,
.criteria-editor-card__state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    background: #eef2ff;
    color: #312e81;
}

.criteria-editor-card__state {
    background: #f3f4f6;
    color: #374151;
}

.criteria-editor-card__subtle {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 13px;
}

.criteria-empty-state {
    padding: 18px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px dashed var(--border);
    color: #64748b;
}

.criteria-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.criteria-item {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    background: #ffffff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.criteria-item.is-open {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.criteria-item.is-dragging {
    opacity: 0.6;
}

.criteria-item.drag-over {
    border-color: #a3e635;
    box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.18);
}

.criteria-item__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.criteria-item__title-wrap {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.criteria-item__title {
    margin: 0 0 6px;
    font-size: 18px;
}

.criteria-item__meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #6b7280;
}

.criteria-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.criteria-item__desc {
    margin-top: 12px;
    color: #4b5563;
}

.criteria-drag-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: #6b7280;
    font-size: 18px;
    flex: 0 0 auto;
}

.criteria-drag-handle:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.criteria-inline-editor {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}

.criteria-inline-editor__actions {
    margin-top: 8px;
}

.criteria-form-error {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    margin-bottom: 10px;
}

.criteria-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.criteria-badge {
    background: #e3ff53;
    color: #1f2937;
    border-radius: 12px;
    font-weight: 700;
    padding: 2px 10px;
}

@media (max-width: 960px) {
    .criteria-editor-summary__header,
    .criteria-school-panel__intro,
    .criteria-item__header {
        flex-direction: column;
    }

    .criteria-editor-summary__meta,
    .criteria-item__actions {
        justify-content: flex-start;
    }

    .criteria-editor-grid {
        grid-template-columns: 1fr;
    }
}

.text-grid-textarea {
    min-height: 84px;
    resize: vertical;
    overflow-y: hidden;
}

.form-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--light);
}

.form-header-row {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.form-header-main,
.form-header-actions {
    width: min(100%, 90%);
}

.form-header-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-header-main h2 {
    margin: 0;
}

.form-header-meta {
    margin: 0;
    font-size: 15px;
    color: #4d4d4d;
    font-weight: 600;
}

.form-header .progress-header {
    width: 100%;
    max-width: none;
}

.form-header-collapsed-name {
    display: none;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    color: #294f7a;
}

.form-header-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-feedback-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-header-toggle {
    margin-right: auto;
    background: #123b69;
    color: #d9ecff;
    border: 1px solid #123b69;
    font-weight: 700;
}

.form-header-toggle:hover {
    background: #0f3157;
    color: #eaf4ff;
    border-color: #0f3157;
}

.form-header-notices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-header-extended-notices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-header.is-collapsed .form-header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 48px;
}

.form-header.is-collapsed .form-header-main {
    width: 100%;
    min-width: 0;
    gap: 0;
}

.form-header.is-collapsed .form-header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 4px;
    width: auto;
    min-width: 0;
    gap: 0;
}

.form-header.is-collapsed {
    padding: 10px 16px;
    max-height: 80px;
    overflow: hidden;
}

.form-header.is-collapsed .form-header-main h2,
.form-header.is-collapsed .form-header-meta {
    display: none;
}

.form-header.is-collapsed .form-header-collapsed-name {
    display: block;
    margin: 0 0 2px;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-header.is-collapsed .progress-header {
    margin-top: 0;
}

.form-header.is-collapsed .progress-wrap {
    min-width: 0;
}

.form-header.is-collapsed .kicker {
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.1;
}

.form-header.is-collapsed .progress {
    height: 7px;
}

.form-header.is-collapsed .actions-row .btn {
    padding: 7px 12px;
    font-size: 12px;
    line-height: 1.2;
}

.form-header.is-collapsed .form-feedback-stack {
    grid-column: 1;
    grid-row: 1;
    gap: 4px;
    min-width: 0;
}

.form-header.is-collapsed .actions-row {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
}

.form-header.is-collapsed .form-header-notices {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.form-header.is-collapsed .form-header-notices .badge,
.form-header.is-collapsed .form-header-notices .alert,
.form-header.is-collapsed .form-feedback {
    margin: 0;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.15;
    box-shadow: none;
    max-width: 100%;
}

.form-header.is-collapsed .form-header-notices .alert,
.form-header.is-collapsed .form-feedback {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-header.is-collapsed .form-feedback__content {
    gap: 0;
    min-width: 0;
}

.form-header.is-collapsed .form-feedback__title,
.form-header.is-collapsed .form-feedback__close,
.form-header.is-collapsed .form-notice-full {
    display: none;
}

.form-notice-collapsed {
    display: none;
}

.form-header.is-collapsed .form-notice-collapsed {
    display: inline;
}

.form-header.is-collapsed + .form-header-extended-notices,
.form-header-extended-notices.is-hidden {
    display: none;
}

@media (max-width: 768px) {
    .form-header.is-collapsed {
        padding: 8px 12px;
    }

    .form-header.is-collapsed .form-header-actions {
        column-gap: 6px;
    }

    .form-header.is-collapsed .actions-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        justify-content: flex-end;
    }

    .form-header.is-collapsed .actions-row .btn:not(.form-header-toggle),
    .form-header.is-collapsed .actions-row a.btn:not(.form-header-toggle) {
        display: none;
    }

    .form-header.is-collapsed .form-header-toggle {
        margin-right: 0;
        min-height: 36px;
        padding: 6px 12px;
    }
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 50px;
    background: rgba(227, 255, 83, 0.35);
    color: var(--dark);
    font-weight: 700;
}

.badge-warn {
    background: rgba(227, 255, 83, 1);
    color: var(--dark);
}

.badge-dirty {
    background: #ffe1b3;
    color: #7a3e00;
    border: 1px solid #f3b35c;
}

.badge-ready {
    background: #e7f1ff;
    color: #0f4f8a;
    border: 1px solid #9bc3eb;
}

.badge-saved {
    background: #dff6e4;
    color: #155b2a;
    border: 1px solid #7fc28f;
}

.inner-card {
    margin-top: 20px;
    border: 1px solid var(--border);
    box-shadow: none;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    width: 100%;
    margin: 20px 0 0;
}

.stat-card {
    background: var(--muted);
    padding: 16px 20px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.stat-card__value {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.1;
    color: #111827;
    word-break: break-word;
}

.stat-card__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mentor-dashboard .quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0 28px;
}

.mentor-dashboard .stat-card {
    padding: 20px;
    border-radius: 14px;
    color: #0f172a;
    background: linear-gradient(135deg, #e3ff53 0%, #ffffff 100%);
    border: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.mentor-dashboard .stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mentor-dashboard .stat-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
}

.mentor-dashboard .stat-subtitle {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.7);
    font-weight: 600;
}

@media (max-width: 768px) {
    .mentor-dashboard .quick-stats {
        grid-template-columns: 1fr;
    }

    .mentor-dashboard .stat-value {
        font-size: 26px;
    }
}

.jury-group-header {
    display: grid;
    gap: 12px;
    align-items: center;
    text-align: center;
    margin-bottom: 16px;
}

.jury-group-score {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.jury-group-score strong {
    font-size: 28px;
}

.jury-group-name {
    font-weight: 700;
}

@media (min-width: 768px) {
    .jury-group-header {
        grid-template-columns: 1fr 1fr 1fr;
        text-align: left;
    }

    .jury-group-score {
        text-align: center;
    }

    .jury-group-name {
        text-align: right;
    }
}

.inline-form {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-right: 6px;
}

.timer-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    background: var(--dark);
    color: var(--accent);
    padding: 12px 20px;
    font-weight: 700;
}

#deadline-timer {
    display: inline-block;
    min-width: 16ch;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.scroll-box {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    --collapsed-height: 180px;
    max-height: var(--collapsed-height);
    overflow-y: auto;
    background: var(--muted);
    font-size: 14px;
}

.scroll-box.is-expanded {
    max-height: calc(var(--collapsed-height) * 2);
}

.legal-text-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.legal-text-toggle {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--dark);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    margin-top: 20px;
}

.legal-text-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.consent-list {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.consent-item {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
	margin: 0 10px;
}

.consent-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-weight: 700;
}

.consent-date {
    font-size: 12px;
    font-weight: 600;
    color: #555555;
}

.muted { color: #6b7280; font-size: 12px; }

.consent-help { margin: 8px 0 12px; }
.consent-help > summary { list-style: none; cursor: pointer; display: inline-block; }
.consent-help > summary::-webkit-details-marker { display: none; }
.consent-help__content { margin-top: 8px; background: #f8fafc; border: 1px solid #e5e7eb; padding: 12px; border-radius: 8px; font-size: 14px; line-height: 1.5; }

.info-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
}

.info-trigger {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--dark);
    background: var(--accent);
    color: var(--dark);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.info-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.info-box {
    position: absolute;
    top: 28px;
    left: -8px;
    width: min(420px, 85vw);
    background: var(--accent);
    color: var(--dark);
    border: 2px solid var(--border);
    padding: 12px 14px;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow);
    z-index: 2000;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.info-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-note {
    background: var(--muted);
    border-left: 6px solid var(--accent);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin: 6px 0 10px;
}

.profile-intro {
    margin: 10px 0 18px;
}

.profile-actions {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 18px;
}

.profile-actions--bottom {
    margin: 20px 0 0;
}

.profile-password-panel {
    margin-top: 22px;
}

.profile-password-panel > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--muted);
    font-weight: 700;
    color: var(--dark);
}

.profile-password-panel > summary::-webkit-details-marker {
    display: none;
}

.profile-password-panel > summary::after {
    content: 'Rozwiń';
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.profile-password-panel[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.profile-password-panel[open] > summary::after {
    content: 'Zwiń';
}

.profile-password-panel__body {
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 14px 14px;
    background: #ffffff;
    padding: 16px;
}

.profile-password-panel__body .password-rules {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .profile-actions {
        display: block;
    }

    .profile-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.field-missing {
    border-color: var(--error);
    background: rgba(196, 61, 61, 0.08);
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}


.form-section-body.grid-2 .form-field[data-full-width="1"] {
    grid-column: 1 / -1;
}

.grid-2 > div,
.grid-3 > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
}

.alert-title {
    font-weight: 700;
    margin-bottom: 4px;
	font-size: 1em;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d9edf7;
    color: #245269;
    border: 1px solid #bcdff1;
}

.system-message {
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.system-message__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.system-message__title {
    margin: 0;
}

.system-message__title-toggle {
    flex: 1 1 auto;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.system-message__toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.35);
    color: inherit;
    cursor: pointer;
}

.system-message__toggle-icon {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.system-message__body {
    margin-top: 10px;
}

.system-message.is-collapsed .system-message__body {
    display: none;
}

.system-message.is-collapsed .system-message__toggle-icon {
    transform: rotate(-180deg);
}

.form-session-state {
    margin: 0 0 16px;
}

.form-session-modal {
    width: min(520px, 94vw);
}

.global-session-state {
    margin: 0 0 16px;
}

.global-session-modal {
    width: min(520px, 94vw);
}

.form-feedback-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-feedback {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.form-feedback__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-feedback__title {
    font-weight: 800;
}

.form-feedback__message {
    font-weight: 500;
}

.form-feedback__close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.maintenance-banner {
    background: #c0392b;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 15px auto;
    font-weight: 700;
    width: 90%;
    text-align: center;
}

.note {
    background: rgba(227, 255, 83, 0.4);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin: 10px 0;
}

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

.jury-preview-navigation {
    justify-content: center;
    margin-top: 16px;
}

.jury-preview-jump {
    position: sticky;
    top: 14px;
    z-index: 20;
    display: flex;
    justify-content: center;
    margin: 0 0 16px;
    padding: 8px 0;
}

.jury-preview-jump .btn {
    background: #123b69;
    color: #d9ecff;
    border: 1px solid #123b69;
}

.jury-preview-evaluation-anchor {
    scroll-margin-top: 148px;
}

.jury-deadline-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 16px auto 20px;
    padding: 16px 20px;
    border-radius: 14px;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    text-align: center;
}

.jury-deadline-banner--muted {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.jury-deadline-banner__label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1d4ed8;
}

.jury-deadline-banner--muted .jury-deadline-banner__label {
    color: #475569;
}

.jury-deadline-banner__value {
    font-size: 1.15rem;
    color: #0f172a;
}

@media (max-width: 768px) {
    .form-header-main,
    .form-header-actions {
        width: 100%;
    }

    .actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .actions-row .btn,
    .actions-row a.btn {
        width: 100%;
        justify-content: center;
    }

    .jury-preview-navigation {
        align-items: stretch;
    }

    .jury-preview-jump {
        top: 72px;
        padding: 6px 0;
    }

    .jury-preview-jump .btn {
        width: 100%;
        max-width: 360px;
        justify-content: center;
    }

    .jury-preview-evaluation-anchor {
        scroll-margin-top: 132px;
    }

    .jury-deadline-banner {
        margin: 14px 0 18px;
        padding: 14px 16px;
    }

    .jury-deadline-banner__value {
        font-size: 1.02rem;
    }
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--light);
    border-radius: 15px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.table th {
    /*background: var(--muted);*/
    font-weight: 700;
}

.table tr.structured-section td {
    background: var(--muted);
    font-weight: 700;
    border-top: 2px solid var(--border);
}

.table tr.structured-sum td {
    background: #f6f6f6;
    font-weight: 700;
}

.mentor-users .table-wrap,
.mentor-teams .table-wrap {
    border-radius: 12px;
    border: 1px solid var(--border);
}

.mentor-users .table thead,
.mentor-teams .table thead {
    background: var(--dark);
    color: var(--light);
}

.mentor-users .table th,
.mentor-teams .table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.mentor-users .table td,
.mentor-teams .table td {
    padding: 14px 16px;
    vertical-align: middle;
}

.mentor-users .user-actions,
.mentor-teams .user-actions {
    display: table-cell;
    flex-wrap: nowrap;
}

.mentor-teams .user-actions .btn,
.mentor-teams .user-actions form {
    width: 100%;
    margin-top: 5px;
}

.mentor-teams .user-actions form {
    display: flex;
}

.mentor-teams .user-actions form .btn {
    width: 100%;
    justify-content: center;
}

.mentor-users .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.mentor-users .status-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mentor-users .status-active {
    background: rgba(76, 175, 80, 0.15);
    color: #1b5e20;
}

.mentor-users .status-active::before {
    background: #4caf50;
}

.mentor-users .status-pending {
    background: rgba(255, 152, 0, 0.15);
    color: #e65100;
}

.mentor-users .status-pending::before {
    background: #ff9800;
}

.mentor-users .status-pending-email {
    background: rgba(255, 152, 0, 0.15);
    color: #e65100;
}

.mentor-users .status-pending-email::before {
    background: #ff9800;
}

.mentor-users .status-pending-consent {
    background: rgba(33, 150, 243, 0.15);
    color: #0d47a1;
}

.mentor-users .status-pending-consent::before {
    background: #2196f3;
}

.mentor-users .status-blocked {
    background: rgba(244, 67, 54, 0.15);
    color: #b71c1c;
}

.mentor-users .status-blocked::before {
    background: #f44336;
}

.mentor-teams .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.mentor-teams .status-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mentor-teams .status-active {
    background: rgba(255, 152, 0, 0.15);
    color: #e65100;
}

.mentor-teams .status-active::before {
    background: #ff9800;
}

.mentor-teams .status-submitted {
    background: rgba(76, 175, 80, 0.15);
    color: #1b5e20;
}

.mentor-teams .status-submitted::before {
    background: #4caf50;
}

.mentor-teams .status-blocked {
    background: rgba(244, 67, 54, 0.15);
    color: #b71c1c;
}

.mentor-teams .status-blocked::before {
    background: #f44336;
}

.mentor-teams .participants-cell {
    font-size: 13px;
    line-height: 1.5;
}

.mentor-teams .participants-cell .mentor-name {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.mentor-teams .participants-cell .mentor-school {
    font-size: 12px;
    color: #888;
    display: block;
}

.mentor-teams .participants-cell .participant-item {
    margin-bottom: 8px;
}

.mentor-teams .participants-cell .participant-item:last-child {
    margin-bottom: 0;
}

@media (max-width: 1130px) {
    .mentor-users .table-wrap,
    .mentor-teams .table-wrap {
        border: none;
        border-radius: 0;
        overflow: visible;
    }

    .mentor-users .table,
    .mentor-teams .table {
        display: block;
    }

    .mentor-users .table thead,
    .mentor-teams .table thead {
        display: none;
    }

    .mentor-users .table tbody,
    .mentor-teams .table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .mentor-users .table tbody tr,
    .mentor-teams .table tbody tr {
        display: block;
        background: var(--light);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    .mentor-users .table td,
    .mentor-teams .table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 8px 0;
        border-bottom: 1px solid var(--muted);
        gap: 12px;
    }

    .mentor-users .table td:last-child,
    .mentor-teams .table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .mentor-users .table td::before,
    .mentor-teams .table td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #888;
        flex-shrink: 0;
        min-width: 70px;
    }

    .mentor-users .user-actions,
    .mentor-teams .user-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mentor-users .user-actions,
    .mentor-teams .user-actions {
        grid-template-columns: 1fr;
    }
}

.draw-results-table .draw-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.draw-results-table .draw-result-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

.draw-results-table .draw-result-title {
    display: inline-block;
    font-weight: 700;
    text-decoration: none;
    color: var(--dark);
}

.draw-results-table .draw-result-title:hover {
    text-decoration: underline;
}

.jury-work-link {
    display: inline-block;
    font-weight: 700;
    text-decoration: none;
    color: #000;
}

.jury-work-link:hover,
.jury-work-link:focus {
    text-decoration: none;
    color: #000;
}

.draw-results-table .draw-result-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}



.table .form-input,
.table .form-textarea {
    width: 100%;
    min-width: 120px;
    background: #ffffff;
}

.table .form-textarea {
    min-height: 80px;
}

.criteria-table td {
    vertical-align: top;
}

.criteria-table {
    table-layout: fixed;
}

.criteria-table thead th {
    background: #e3ff53;
    color: #000000;
}

.criteria-table th:first-child,
.criteria-table td:first-child,
.criteria-table th:last-child,
.criteria-table td:last-child {
    width: 100%;
}

.criteria-title {
    font-weight: 700;
    font-size: 15px;
}

.criteria-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
    color: #000000;
}

.criteria-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e3ff53;
    font-weight: 600;
    color: #000000;
}

.criteria-desc {
    margin-top: 8px;
    color: var(--text);
    line-height: 1.5;
    word-break: break-word;
}

.criteria-actions .criteria-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.criteria-actions .action-row {
    display: block;
}

.criteria-actions .criteria-delete {
    margin-top: 8px;
}

@media (max-width: 768px) {
    .criteria-table tbody td {
        display: block;
        text-align: left;
    }

    .criteria-table tbody td::before {
        display: block;
        margin-bottom: 6px;
        text-align: left;
    }

    .criteria-actions {
        margin-top: 12px;
    }

    .criteria-actions .action-row {
        display: block;
    }
}

@media (max-width: 768px) {
    .criteria-table.responsive-table tbody td {
        display: block;
        text-align: left;
    }

    .criteria-table.responsive-table tbody td::before {
        display: block;
        margin-bottom: 6px;
        text-align: left;
    }

    .criteria-table .criteria-actions {
        margin-top: 12px;
    }

    .criteria-table .criteria-actions .actions-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.08);
}

.status-pill--ok {
    background: rgba(76, 175, 80, 0.2);
    color: #1b5e20;
}

.status-pill--warn {
    background: rgba(244, 67, 54, 0.2);
    color: #b71c1c;
}

.status-pill--partial {
    background: rgba(251, 191, 36, 0.2);
    color: #92400e;
}

.status-pill--info {
    background: rgba(59, 130, 246, 0.16);
    color: #1d4ed8;
}

.criteria-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.criteria-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.criteria-item:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.criteria-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.criteria-header strong {
    display: block;
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 8px;
}

.criteria-item .subheader {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    text-align: left;
}

.criteria-score {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.criteria-header .form-input {
    width: 100%;
    max-width: 200px;
    padding: 10px 12px;
    font-size: 1rem;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.criteria-header .form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.criteria-header .form-input:hover {
    border-color: #94a3b8;
}

@media (min-width: 768px) {
    .criteria-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 32px;
    }

    .criteria-content {
        flex: 1;
        min-width: 0;
    }

    .criteria-score {
        flex-shrink: 0;
        width: 180px;
        align-self: flex-start;
        position: sticky;
        top: 20px;
    }
}

@media (min-width: 1024px) {
    .criteria-item {
        padding: 24px;
    }

    .criteria-score {
        width: 200px;
    }
}

.criteria-form textarea.form-textarea {
    margin-top: 24px;
    min-height: 120px;
    line-height: 1.6;
}

.criteria-form button[type="submit"] {
    margin-top: 24px;
    width: 100%;
}

@media (min-width: 640px) {
    .criteria-form button[type="submit"] {
        width: auto;
        min-width: 200px;
    }
}

.criteria-summary {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 2px solid #e0e0e0;
    padding: 16px 20px;
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    gap: 12px;
}

.criteria-summary-total {
    font-size: 1.25rem;
    color: #2563eb;
}

.criteria-item:has(select:invalid) {
    border-color: #fbbf24;
    background: #fffbeb;
}

/* ========================================
   RESPONSYWNOŚĆ DLA MOBILE (max-width: 768px)
   ======================================== */

@media (max-width: 1130px) {

    /* Ukryj nagłówki tabeli */
    .users-table thead,
    .responsive-table thead {
        display: none;
    }

    /* Wiersze jako karty */
    .users-table tbody tr,
    .responsive-table tbody tr {
        display: block;
        padding: 16px;
        margin-bottom: 16px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    /* Komórki jako flex containers */
    .users-table tbody td,
    .responsive-table tbody td {
        display: block;
        padding: 12px 0;
        border: none;
        text-align: left;
    }

    /* Etykiety (data-label) jako nagłówki */
    .users-table tbody td::before,
    .responsive-table tbody td::before {
        content: attr(data-label);
        display: block;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: #666666;
        margin-bottom: 6px;
    }

    /* Separator między komórkami */
    .responsive-table tbody td:not(:last-child) {
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 12px;
        margin-bottom: 12px;
    }

    /* Tfoot */
    .responsive-table tfoot {
        display: block;
    }

    .responsive-table tfoot tr {
        display: block;
        padding: 16px;
        margin-bottom: 16px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--muted);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .responsive-table tfoot th,
    .responsive-table tfoot td {
        display: flex;
        gap: 12px;
        padding: 8px 0;
        border: none;
        align-items: flex-start;
        justify-content: space-between;
        text-align: right;
        font-weight: 700;
    }

    .responsive-table tfoot th::before,
    .responsive-table tfoot td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        color: #666666;
        text-align: left;
    }

    /* ========================================
       SPECJALNE STYLE DLA FORMULARZA KONFIGURACJI
       ======================================== */

    /* Input fields - pełna szerokość */
    .responsive-table .form-input,
    .responsive-table .point-input {
        width: 100% !important;
        max-width: 100%;
        font-size: 14px;
        padding: 10px;
    }

    /* Textarea - pełna szerokość i auto-height */
    .responsive-table .form-textarea {
        width: 100% !important;
        max-width: 100%;
        min-height: 80px;
        font-size: 14px;
        padding: 10px;
        line-height: 1.5;
    }

    /* Config note - lepsze formatowanie na mobile */
    .config-forms .config-note {
        font-size: 13px;
        line-height: 1.5;
        padding: 10px;
        background: #f9f9f9;
        border-radius: 8px;
        margin-top: 8px;
        white-space: normal;
        word-wrap: break-word;
    }

    /* Config note empty */
    .config-forms .config-note-empty {
        font-size: 12px;
        padding: 8px;
        background: transparent;
    }

    /* Badge na mobile - lepsze pozycjonowanie */
    .config-forms .badge {
        display: inline-flex;
        margin-top: 8px;
        font-size: 11px;
        padding: 4px 8px;
    }

    /* Points table - specjalne traktowanie */
    .config-forms .points-table tbody td {
        padding: 10px 0;
    }

    /* Kolumna z numerem - wyróżnienie */
    .config-forms .points-table .col-number::before {
        color: var(--accent);
        background: var(--dark);
        padding: 2px 6px;
        border-radius: 4px;
        display: inline-block;
        margin-bottom: 6px;
    }

    /* Section title na mobile */
    .config-forms .section-title {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }

    /* Subsection na mobile */
    .config-forms .subsection {
        margin-top: 20px;
    }

    /* Card w config-grid */
    .config-forms .config-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .config-forms .card {
        padding: 16px;
    }

    /* Lepsza widoczność pól formularza */
    .responsive-table input[type="text"],
    .responsive-table textarea {
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #ffffff;
    }

    .responsive-table input[type="text"]:focus,
    .responsive-table textarea:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(227, 255, 83, 0.1);
    }

    /* Zwiększ rozmiar czcionki dla lepszej czytelności */
    .responsive-table {
        font-size: 14px;
    }

    /* Numeracja wierszy - lepsze wyróżnienie */
    .responsive-table tbody td[data-label="Lp."] {
        font-weight: 700;
        color: var(--dark);
        background: var(--accent);
        display: inline-block;
        padding: 4px 10px;
        border-radius: 4px;
        margin-bottom: 8px;
    }

    .responsive-table tbody td[data-label="Lp."]::before {
        display: none;
    }

    /* Form actions - stack na mobile */
    .form-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    .form-actions .btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
}

/* ========================================
   TABLET (max-width: 1024px)
   ======================================== */

@media (max-width: 1024px) and (min-width: 769px) {

    /* Na tabletach - zmniejsz marginesy */
    .config-forms .config-grid {
        gap: 16px;
    }

    /* Textarea - dopasuj szerokość */
    .responsive-table .form-textarea {
        width: 100%;
    }

    /* Config note - nieco mniejszy font */
    .config-forms .config-note {
        font-size: 12px;
    }
}

/* ========================================
   BARDZO MAŁE EKRANY (max-width: 480px)
   ======================================== */

@media (max-width: 480px) {

    /* Jeszcze większe paddingi dla lepszej czytelności */
    .responsive-table tbody tr {
        padding: 12px;
    }

    /* Mniejsze fonty */
    .responsive-table tbody td::before {
        font-size: 10px;
    }

    .config-forms .config-note {
        font-size: 12px;
        padding: 8px;
    }

    /* Zmniejsz rozmiar inputów dla bardzo małych ekranów */
    .responsive-table .form-input,
    .responsive-table .form-textarea {
        font-size: 13px;
        padding: 8px;
    }

    /* Section title - mniejszy font */
    .config-forms .section-title {
        font-size: 1.1rem;
    }
}

[data-school-type="SZ"] .sp-only {
    display: none;
}

[data-school-type="SP"] .sz-only {
    display: none;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {

    /* Przywróć normalny widok tabeli do druku */
    .responsive-table thead {
        display: table-header-group !important;
    }

    .responsive-table tbody tr {
        display: table-row !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .responsive-table tbody td {
        display: table-cell !important;
        border: 1px solid #ddd !important;
    }

    .responsive-table tbody td::before {
        display: none !important;
    }

    @page {
        size: A4;
        margin: 12mm;
    }

    body.pdf-content {
        background: #fff !important;
        color: #000 !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    .pdf-content .card {
        box-shadow: none !important;
        border: 1px solid #c9c9c9 !important;
        background: #fff !important;
        padding: 14px 16px !important;
        margin: 0 0 12px !important;
    }

    .pdf-content .form-label,
    .pdf-content label.form-label {
        font-weight: 600 !important;
        color: #111 !important;
    }

    .pdf-content .form-input,
    .pdf-content .form-textarea,
    .pdf-content select.form-input,
    .pdf-content select.form-select {
        border: 1px solid #9c9c9c !important;
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
    }

    .pdf-content .table,
    .pdf-content .table th,
    .pdf-content .table td {
        border: 1px solid #9c9c9c !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .pdf-content .table {
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: fixed !important;
    }

    .pdf-content .table th,
    .pdf-content .table td {
        padding: 6px 8px !important;
        vertical-align: top !important;
        font-size: 11.5px !important;
        line-height: 1.3 !important;
    }

    .pdf-content .table thead th {
        font-weight: 700 !important;
        background: #fff !important;
    }

    .pdf-content .table tfoot td {
        font-weight: 700 !important;
        background: #fff !important;
    }

    .pdf-content .table .structured-section td {
        font-weight: 700 !important;
        background: #fff !important;
        border-top: 2px solid #8a8a8a !important;
    }

    .pdf-content .table-wrap {
        overflow: visible !important;
    }

    .pdf-content .preview-box {
        border: 1px solid #c9c9c9 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .pdf-content .info-wrap .info-trigger {
        display: none !important;
    }

    .pdf-content .info-box-print {
        display: block !important;
        font-size: 11px !important;
        color: #111 !important;
        background: #f3f3f3 !important;
        border: 1px solid #c9c9c9 !important;
        padding: 6px 8px !important;
        margin-top: 6px !important;
    }

    .pdf-content .btn,
    .pdf-content .topbar,
    .pdf-content .timer-bar,
    .pdf-content .site-footer,
    .pdf-content .organizers-section {
        display: none !important;
    }
}

/* ========================================
   CRITERIA TABLE - MOBILE OPTIMIZATION
   Target: /admin/criteria
   ======================================== */

@media (max-width: 768px) {
    .criteria-table .grid-3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .criteria-table .action-row {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }

    .criteria-table .form-textarea {
        min-height: 100px;
        resize: vertical;
        padding: 12px;
        line-height: 1.5;
    }

    .criteria-desc {
        max-height: 120px;
        overflow-y: auto;
        padding-right: 8px;
        line-height: 1.5;
        font-size: 0.9rem;
        margin-top: 8px;
    }

    .criteria-desc::-webkit-scrollbar {
        width: 6px;
    }

    .criteria-desc::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .criteria-desc::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 3px;
    }

    .criteria-desc::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

    .criteria-meta {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
        margin-top: 8px;
        margin-bottom: 8px;
    }

    .criteria-badge {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 4px;
        background-color: #e3ff53;
        color: #000;
        font-weight: 600;
        font-size: 0.85rem;
    }

    .criteria-title {
        border-bottom: 2px solid #e3ff53;
        padding-bottom: 8px;
        margin-bottom: 12px;
        font-weight: 600;
        font-size: 1.1rem;
        color: #333;
    }

    .criteria-table .btn {
        width: 100%;
        min-height: 44px;
        padding: 12px 16px;
        font-size: 0.95rem;
        margin-bottom: 8px;
        display: block;
        text-align: center;
    }

    .criteria-table .form-input,
    .criteria-table .form-textarea {
        width: 100%;
        font-size: 1rem;
        box-sizing: border-box;
    }

    .criteria-table .form-input {
        min-height: 44px;
        padding: 10px 12px;
    }

    .criteria-delete {
        margin-bottom: 12px;
    }

    .criteria-table tbody tr {
        margin-bottom: 24px;
        display: block;
    }

    .criteria-table tbody tr td {
        display: block;
        width: 100%;
        margin-bottom: 16px;
    }

    .criteria-table,
    .criteria-table thead,
    .criteria-table tbody,
    .criteria-table tr,
    .criteria-table td {
        border: none;
    }
}

/* ========================================
   VERY SMALL PHONES (<=480px)
   ======================================== */

@media (max-width: 480px) {
    .criteria-desc {
        max-height: 80px;
        font-size: 0.85rem;
    }

    .criteria-meta {
        gap: 4px;
        font-size: 0.85rem;
    }

    .criteria-title {
        font-size: 1rem;
        padding-bottom: 6px;
        margin-bottom: 10px;
    }

    .criteria-table .action-row {
        gap: 10px;
        margin-bottom: 10px;
    }

    .criteria-table .btn {
        padding: 10px 14px;
        font-size: 0.9rem;
        min-height: 42px;
    }

    .criteria-table .form-input {
        padding: 8px 10px;
        font-size: 0.95rem;
    }

    .criteria-table .form-textarea {
        min-height: 80px;
        font-size: 0.9rem;
    }
}

.checkbox-list {
    display: grid;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    padding: 10px 0;
}

.checkbox-item input {
    width: 20px;
    height: 20px;
}

.feedback-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.feedback-editor-panel,
.feedback-jury-block,
.feedback-editor-criterion {
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.feedback-editor-panel h3,
.feedback-jury-block h3,
.feedback-editor-criterion h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.feedback-editor-form-card {
    scroll-margin-top: 120px;
}

.feedback-work-preview {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fafafa;
    overflow: hidden;
}

.feedback-work-preview summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 700;
}

.feedback-work-preview summary small {
    color: #64748b;
    font-weight: 500;
    text-align: right;
}

.feedback-work-preview__sections {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0 20px 20px;
}

.feedback-work-preview__embedded {
    padding: 0 20px 20px;
}

.feedback-work-preview__embedded .card {
    margin: 16px 0 0;
    border-radius: 12px;
}

.feedback-work-preview__embedded .feedback-work-preview__embedded-card {
    margin-top: 0;
}

.feedback-work-preview__embedded .actions-row,
.feedback-work-preview__embedded .jury-preview-jump {
    display: none;
}

.feedback-work-preview__section {
    border-top: 1px solid #e5e7eb;
    padding-top: 18px;
}

.feedback-work-preview__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.feedback-work-preview__section:first-child {
    border-top: none;
    padding-top: 0;
}

.feedback-work-preview__items {
    display: grid;
    gap: 12px;
}

.feedback-work-preview__item,
.feedback-work-preview__table {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.feedback-work-preview__item-label {
    font-weight: 700;
    margin-bottom: 6px;
}

.feedback-work-preview__item-meta {
    font-weight: 600;
    color: #1f2937;
}

.feedback-work-preview__item-value {
    white-space: pre-wrap;
    line-height: 1.65;
    color: #334155;
}

.feedback-work-preview__list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.feedback-work-preview__group {
    display: grid;
    gap: 10px;
}

.feedback-work-preview__group-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.feedback-work-preview__group-label {
    font-weight: 700;
    margin-bottom: 4px;
    color: #0f172a;
}

.feedback-work-preview__group-value {
    white-space: pre-wrap;
    line-height: 1.55;
    color: #334155;
}

.feedback-work-preview__badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
    border: 1px solid #fcd34d;
}

.feedback-work-preview__table-wrap {
    margin-top: 10px;
}

.feedback-work-preview__data-table {
    table-layout: fixed;
}

.feedback-work-preview__data-table th,
.feedback-work-preview__data-table td {
    vertical-align: top;
}

.feedback-work-preview__data-table td {
    white-space: pre-wrap;
    line-height: 1.55;
}

.feedback-editor-panel .responsive-table tbody td,
.feedback-jury-block .responsive-table tbody td {
    vertical-align: top;
}

.feedback-criteria-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.feedback-criteria-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fafafa;
    font-size: 13px;
    font-weight: 600;
}

.feedback-criteria-legend__number,
.feedback-editor-criterion__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #000000;
    color: #ffffff;
    font-weight: 800;
    flex-shrink: 0;
}

.feedback-jury-blocks {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.feedback-jury-block__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.feedback-jury-block__mode {
    text-align: left;
}

.feedback-jury-block .jury-admin-table thead th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    border-bottom: 1px solid #dbe3ec;
}

.feedback-jury-table__score-col {
    text-align: center;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.feedback-jury-table__total-col {
    font-weight: 700;
}

.feedback-jury-comment {
    display: inline-flex;
    align-items: center;
}

.feedback-jury-comment__toggle {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid #bfd4e6;
    border-radius: 999px;
    background: #eef6fb;
    color: #0b5a88;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.feedback-jury-comment__toggle::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transform-origin: center;
    transition: transform 0.15s ease;
    flex: 0 0 auto;
}

.feedback-jury-comment__toggle:hover {
    background: #e2f0fa;
    border-color: #9cc3dd;
}

.feedback-jury-comment__toggle[aria-expanded="true"] {
    background: #d9ebf8;
    border-color: #84b1d3;
}

.feedback-jury-comment__toggle[aria-expanded="true"]::after {
    transform: rotate(-135deg) translateY(-1px);
}

.feedback-jury-comment__body {
    margin-top: 0;
    padding: 10px 12px;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: #f8fafc;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.feedback-jury-comment-row td {
    background: #fbfdff;
    border-top: 0;
    padding-top: 0;
}

.feedback-editor-form-card {
    position: relative;
}

.feedback-editor-save-bar {
    position: sticky;
    top: 16px;
    z-index: 15;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.feedback-editor-save-bar__status {
    font-weight: 700;
    color: #334155;
}

.feedback-editor-save-bar__status.is-dirty {
    color: #b45309;
}

.feedback-editor-save-bar__status.is-saving {
    color: #1d4ed8;
}

.feedback-editor-save-bar__status.is-success {
    color: #166534;
}

.feedback-editor-save-bar__status.is-error {
    color: #b91c1c;
}

.feedback-editor-save-bar__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.feedback-editor-criteria {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0 20px 20px;
}

.feedback-editor-criterion {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
}

.feedback-editor-criterion__meta {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.feedback-editor-criterion__meta p {
    margin: 8px 0 0;
    color: #475569;
    white-space: pre-wrap;
}

.feedback-editor-criterion__input .form-label,
.feedback-editor-overall .form-label {
    margin-top: 0;
}

.feedback-editor-overall {
    margin-top: 8px;
}

.feedback-editor-overall__title {
    margin: 0 0 12px;
    font-size: 1.17em;
    line-height: 1.3;
    color: #0f172a;
}

.feedback-editor-overall > .form-label {
    display: none;
}

.feedback-editor-overall__help {
    margin-top: 8px;
}

.feedback-mail-preview__list {
    display: grid;
    gap: 14px;
}

.feedback-mail-preview__recipient {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.feedback-mail-preview__recipient summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    background: #f8fafc;
}

.feedback-mail-preview__recipient summary::-webkit-details-marker {
    display: none;
}

.feedback-mail-preview__recipient-meta {
    display: grid;
    gap: 4px;
}

.feedback-mail-preview__recipient-meta span {
    color: #64748b;
    font-size: 13px;
}

.feedback-mail-preview__recipient-role {
    white-space: nowrap;
    font-weight: 700;
    color: #0f172a;
}

.feedback-mail-preview__content {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.feedback-mail-preview__field {
    display: grid;
    gap: 8px;
}

.feedback-mail-preview__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #475569;
}

.feedback-mail-preview__subject {
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-weight: 600;
}

.feedback-mail-preview__frame {
    width: 100%;
    min-height: 420px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.feedback-mail-preview__raw {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
}

.feedback-mail-preview__raw summary {
    cursor: pointer;
    font-weight: 600;
    color: #1d4ed8;
}

.feedback-mail-preview__raw pre {
    margin: 12px 0 0;
    padding: 14px;
    white-space: pre-wrap;
    word-break: break-word;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
}

.team-feedback-sent-content,
.team-feedback-inline__content {
    line-height: 1.7;
}

.team-feedback-sent-content__text,
.team-feedback-inline__text {
    margin: 0;
    padding: 14px 16px;
    white-space: pre-wrap;
    word-break: break-word;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    color: #0f172a;
}

.team-name-cell {
    display: grid;
    gap: 8px;
}

.team-result-status {
    display: grid;
    gap: 6px;
}

.team-result-status__badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.team-result-status__badge--finalist {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.18);
    color: #1d4ed8;
}

.team-result-status__badge--winner {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.2);
    color: #166534;
}

.team-result-status__detail {
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.team-name-cell__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.team-feedback-inline-row > td {
    background: #fbfdff;
    padding-top: 0;
}

.team-feedback-inline {
    padding: 14px 0 4px;
}

.team-feedback-inline__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.team-feedback-inline__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
}

.jury-members-save-bar {
    position: sticky;
    top: 16px;
    z-index: 12;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #dbe3ec;
    border-radius: 16px;
    background: #f8fafc;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.jury-members-save-bar__meta {
    display: grid;
    gap: 4px;
}

.jury-members-save-bar__meta strong {
    color: #0f172a;
}

.jury-members-save-bar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

@media (max-width: 1024px) {
    .feedback-editor-grid,
    .feedback-editor-criterion {
        grid-template-columns: 1fr;
    }

    .feedback-editor-save-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .feedback-editor-save-bar__actions {
        width: 100%;
    }

    .feedback-work-preview summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .feedback-work-preview summary small {
        text-align: left;
    }

    .feedback-mail-preview__recipient summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .feedback-mail-preview__recipient-role {
        white-space: normal;
    }

    .feedback-mail-preview__frame {
        min-height: 320px;
    }

    .jury-members-save-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .jury-members-save-bar__actions {
        width: 100%;
    }
}

.download-card {
    padding: 20px;
    border-radius: 18px;
    border: 2px solid var(--border);
    background: var(--muted);
    box-shadow: 0 5px 20px var(--shadow);
}

.organizers-section {
    background: var(--light);
    padding: 60px 0;
}

.organizers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    align-items: center;
    justify-items: center;
    margin-top: 32px;
}

.organizer-box {
    text-align: center;
    padding: 20px;
    background: var(--light);
    border-radius: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    width: 100%;
    max-width: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--muted);
}

.organizer-box:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.organizer-name img {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.site-footer {
    background: var(--accent);
    color: var(--dark);
    padding: 48px 0;
    text-align: center;
    margin-top: 40px;
}

.site-footer .footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.site-footer .footer-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: var(--dark);
}

.site-footer .footer-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 500;
}

.site-footer .footer-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.site-footer .footer-link {
    background: #000000;
    color: var(--light);
    padding: 0.8rem 2rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.site-footer .footer-link:hover {
    background: var(--light);
    color: var(--dark);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.site-footer .footer-bottom {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 500;
}

.site-footer .footer-system-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.6);
    color: var(--dark);
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 16px;
}

.site-footer .footer-system-link__icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
}

.site-footer .footer-bottom a {
    color: inherit;
    text-decoration: underline;
}

.link {
    display: inline-block;
    margin-top: 8px;
    color: var(--dark);
}

.text-block,
.card p {
    word-break: break-word;
    overflow-wrap: anywhere;
}

h1,
h2 {
    font-weight: 800;
}

.card h2,
.section-title {
    position: relative;
    padding-bottom: 12px;
	text-align: center;
}

.card h2::after,
.section-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .card {
        padding: 24px;
        border-radius: 16px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }


    .grid-3 {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .brand-logo {
        height: 40px;
    }

    .organizers-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        padding: 36px 0;
    }

    .site-footer .footer-title {
        font-size: 1.5rem;
    }

    .site-footer .footer-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .topbar {
        padding: 14px 18px;
    }

    .brand-title {
        font-size: 16px;
    }

    .btn {
        width: 90%;
        justify-content: center;
    }

    .form-label {
        font-size: 13px;
    }

    .form-input,
    .form-textarea {
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 10px 12px;
    }

    .brand-logo {
        height: 36px;
    }
}

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

.bold-sum-row {
	font-weight: 800;
	font-size: 1em;
}

.form-input[readonly],
.form-textarea[readonly] {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5f5;
}

.perf-stats {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 12px;
    padding: 8px 12px;
    border-top: 1px solid #1e293b;
    z-index: 999;
}

.perf-stats__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 4px;
}

.perf-stats__row:last-child {
    margin-bottom: 0;
}

.perf-stats__label {
    color: #94a3b8;
    font-weight: 600;
}

.perf-stats__value {
    color: #e2e8f0;
    max-width: 100%;
    word-break: break-word;
}

.perf-stats__chip {
    background: #1e293b;
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 700;
}

.perf-stats__sql {
    font-family: "Courier New", monospace;
    font-size: 11px;
}

body.has-perf-stats {
    /*padding-bottom: 110px;*/
}

/* Form Builder - Modern UI */
.form-builder-app {
    --fb-accent: #e3ff53;
    --fb-accent-hover: #d4f029;
    --fb-accent-dark: #2d2d2d;
    --fb-bg-primary: #f8f9fa;
    --fb-bg-secondary: #ffffff;
    --fb-bg-tertiary: #f5f5f5;
    --fb-bg-hover: #eeeeee;
	--fb-border: #cccccc;
    --fb-text-primary: #2d2d2d;
    --fb-text-secondary: #666666;
    --fb-text-muted: #999999;
    --fb-border: #cccccc;
    --fb-border-hover: #cccccc;
    --fb-success: #4caf50;
    --fb-warning: #ff9800;
    --fb-error: #f44336;
    --fb-radius-sm: 6px;
    --fb-radius-md: 10px;
    --fb-radius-lg: 14px;
    --fb-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --fb-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --fb-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --fb-transition: 150ms ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: auto;
    background: var(--fb-bg-primary);
    color: var(--fb-text-primary);
    font-family: "DM Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.has-rule-conflict .form-input,
.has-rule-conflict .form-textarea,
.has-rule-conflict select.form-input {
    border-color: #b00020;
    box-shadow: 0 0 0 2px rgba(176, 0, 32, 0.15);
}

.form-rule-conflict {
    margin-top: 6px;
    font-size: 12px;
    color: #b00020;
}

/* Layout improvements */
.form-builder-app-wrapper {
    max-width: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.container .form-builder-app-wrapper {
    max-width: none;
    padding: 0;
}

.form-builder-app {
    width: 100%;
    margin: 0;
}

.fb-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fb-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fb-icon--sm {
    width: 14px;
    height: 14px;
}

.fb-icon--lg {
    width: 22px;
    height: 22px;
}

.fb-icon--xl {
    width: 28px;
    height: 28px;
}

.form-builder-app .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--fb-radius-md);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--fb-transition);
}

.form-builder-app .btn-ghost {
    background: transparent;
    color: var(--fb-text-secondary);
}

.form-builder-app .btn-ghost:hover {
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-primary);
}

.form-builder-app .btn-outline {
    background: transparent;
    color: var(--fb-text-primary);
    border: 1px solid var(--fb-border);
}

.form-builder-app .btn-outline:hover {
    border-color: var(--fb-border-hover);
    background: var(--fb-bg-tertiary);
}

.form-builder-app .btn-primary {
    background: var(--fb-accent);
    color: var(--fb-accent-dark);
    border: none;
}

.form-builder-app .btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.form-builder-app .btn-send {
    background: #e3ff53;
    color: #0f172a;
    border: none;
}

.form-builder-app .btn-send:hover {
    background: #d4ef45;
    color: #0f172a;
    transform: translateY(-1px);
}

.fb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--fb-accent);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--fb-accent-dark);
    min-height: 60px;
    gap: 12px;
    flex-wrap: wrap;
}

.fb-edit-policy-banner {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 24px;
    border-bottom: 1px solid var(--fb-border);
    background: #e6f6ea;
    color: #1b5e20;
}

.fb-edit-policy-banner.is-full {
    background: #e6f6ea;
    color: #1b5e20;
}

.fb-edit-policy-banner.is-safe {
    background: #fff6e0;
    color: #7a4b00;
}

.fb-edit-policy-banner.is-frozen {
    background: #fdecea;
    color: #8a1f11;
}

.fb-edit-policy-banner__status {
    font-weight: 700;
    letter-spacing: 0.4px;
}

.fb-edit-policy-banner__text {
    flex: 1;
    font-size: 13px;
}

.is-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.fb-locked-label {
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: var(--fb-radius-sm);
    background: var(--fb-bg-tertiary);
    border: 1px solid var(--fb-border);
    font-size: 11px;
}

.fb-policy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.fb-policy-overlay[hidden] {
    display: none;
}

.fb-policy-panel {
    width: min(720px, 92vw);
    max-height: 80vh;
    overflow: auto;
    background: var(--fb-bg-secondary);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-lg);
    box-shadow: var(--fb-shadow-lg);
}

.fb-policy-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
}

.fb-policy-panel__title {
    margin: 0;
    font-size: 16px;
}

.fb-policy-panel__close {
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-sm);
    background: var(--fb-bg-secondary);
    padding: 2px 8px;
    cursor: pointer;
}

.fb-policy-panel__body {
    padding: 16px;
}

.fb-policy-panel__section + .fb-policy-panel__section {
    margin-top: 14px;
}

.fb-policy-panel__subtitle {
    font-weight: 600;
    color: var(--fb-text-secondary);
    margin-bottom: 6px;
}

.fb-policy-panel__section ul {
    margin: 6px 0 0 18px;
}

.fb-policy-toast {
    position: fixed;
    right: 20px;
    top: 84px;
    z-index: 70;
    background: var(--fb-accent-dark);
    color: var(--fb-bg-secondary);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-md);
    padding: 10px 14px;
    box-shadow: var(--fb-shadow-md);
    opacity: 0;
    transform: translateY(-6px);
    transition: var(--fb-transition);
}

.fb-policy-toast[hidden] {
    display: none;
}

.fb-policy-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fb-policy-toast__title {
    font-weight: 700;
    margin-bottom: 2px;
}

.fb-header__left,
.fb-header__center,
.fb-header__right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.fb-header__right {
    justify-content: flex-end;
}

.fb-header .btn-ghost {
    color: var(--fb-accent-dark);
    opacity: 0.7;
}

.fb-header .btn-ghost:hover {
    background: rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.fb-header .btn-primary {
    background: var(--fb-accent-dark);
    color: var(--fb-accent);
}

.fb-header .btn-primary:hover {
    background: #1a1a1a;
}

.fb-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
}

.fb-logo__icon {
    width: 32px;
    height: 32px;
    background: var(--fb-accent-dark);
    border-radius: var(--fb-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--fb-accent);
}

.fb-logo__text {
    color: var(--fb-accent-dark);
}

.fb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--fb-accent-dark);
    opacity: 0.7;
}

.fb-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.fb-breadcrumb__separator {
    color: var(--fb-text-muted);
}

.fb-breadcrumb__current {
    font-weight: 600;
    opacity: 1;
}

.fb-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(76, 175, 80, 0.15);
    color: var(--fb-success);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.fb-status-badge.is-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--fb-warning);
}

.fb-status-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
}





.fb-main {
    display: grid;
    grid-template-columns: 280px 1fr 420px;
    flex: 1;
    overflow: visible;
    min-height: 0;
}

@media (max-width: 1400px) {
    .fb-main {
        grid-template-columns: 260px 1fr 380px;
    }
}

@media (max-width: 1200px) {
    .fb-main {
        grid-template-columns: 240px 1fr 340px;
    }
}

.fb-sidebar {
    background: var(--fb-bg-secondary);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fb-sidebar--left {
    border-right: 1px solid var(--fb-border);
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    align-self: start;
}

.fb-sidebar--right {
    border-left: 1px solid var(--fb-border);
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    align-self: start;
}

.fb-sidebar__header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--fb-border);
    position: sticky;
    top: 0;
    background: var(--fb-bg-secondary);
    z-index: 10;
}

.fb-sidebar__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fb-text-muted);
}

.fb-sidebar__subtitle {
    font-size: 12px;
    color: var(--fb-text-secondary);
    margin: 16px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fb-search {
    position: relative;
}

.fb-search__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fb-text-muted);
    font-size: 12px;
}

.fb-search__input {
    width: 100%;
    padding: 10px 12px 10px 30px;
    border-radius: var(--fb-radius-md);
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-primary);
    font-size: 14px;
    transition: var(--fb-transition);
}

.fb-search__input:focus {
    outline: none;
    border-color: var(--fb-accent);
    box-shadow: 0 0 0 3px rgba(227, 255, 83, 0.3);
}

.fb-property-input:focus,
.fb-form-title-input:focus {
    outline: none;
    border-color: var(--fb-accent);
    box-shadow: 0 0 0 3px rgba(227, 255, 83, 0.3);
}

.fb-component-groups {
    padding: 16px 20px;
}

.fb-presets-list {
    padding: 0 20px 20px;
}

.fb-presets-toolbar {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.fb-presets-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fb-presets-container {
    display: grid;
    gap: 10px;
}

.fb-preset-item {
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    border-radius: var(--fb-radius-md);
    padding: 12px;
}

.fb-preset-item__header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.fb-preset-item__name {
    font-weight: 700;
    font-size: 13px;
    color: var(--fb-text-primary);
}

.fb-preset-item__desc {
    font-size: 12px;
    color: var(--fb-text-secondary);
    margin-bottom: 8px;
}

.fb-preset-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fb-preset-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: var(--fb-radius-sm);
    background: var(--fb-bg-hover);
    color: var(--fb-text-secondary);
    border: 1px solid var(--fb-border);
}

.fb-preset-item__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.fb-preset-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 6px;
    border-radius: var(--fb-radius-sm);
    background: var(--fb-bg-secondary);
    color: var(--fb-text-secondary);
    border: 1px dashed var(--fb-border);
}

.fb-component-group {
    border-bottom: 1px solid var(--fb-border);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.fb-component-group__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fb-text-secondary);
    cursor: pointer;
}

.fb-component-group__toggle {
    color: var(--fb-text-muted);
}

.fb-component-group.is-collapsed .fb-component-grid {
    display: none;
}

.fb-component-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.fb-component-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 12px;
    background: var(--fb-bg-tertiary);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-md);
    cursor: grab;
    transition: var(--fb-transition);
}

.fb-component-item:hover {
    border-color: var(--fb-accent-dark);
    background: var(--fb-bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--fb-shadow-sm);
}

.fb-component-item__icon {
    width: 36px;
    height: 36px;
    background: var(--fb-bg-secondary);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--fb-accent-dark);
    font-weight: 700;
}

.fb-component-item__label {
    font-size: 12px;
    color: var(--fb-text-secondary);
    text-align: center;
}

.fb-sections-list {
    padding: 0 20px 20px;
}

.fb-sections-container {
    display: grid;
    gap: 8px;
}

.fb-section-link {
    padding: 8px 10px;
    border-radius: var(--fb-radius-sm);
    background: var(--fb-bg-tertiary);
    border: 1px solid var(--fb-border);
    color: var(--fb-text-secondary);
    cursor: pointer;
    transition: var(--fb-transition);
    font-size: 12px;
}

.fb-section-link:hover {
    border-color: var(--fb-accent);
    color: var(--fb-text-primary);
}

.fb-add-section-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--fb-radius-md);
    border: 1px dashed var(--fb-border);
    background: transparent;
    color: var(--fb-text-secondary);
    cursor: pointer;
}

.fb-add-section-btn:hover {
    border-color: var(--fb-accent-dark);
    color: var(--fb-text-primary);
    background: var(--fb-bg-tertiary);
}

.fb-add-rule-btn:hover {
    border-color: var(--fb-accent-dark);
    color: var(--fb-text-primary);
    background: var(--fb-bg-tertiary);
}

.fb-canvas-area {
    background: var(--fb-bg-primary);
    padding: 32px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
}

.fb-actions-menu {
    position: relative;
}

.fb-actions-menu__summary {
    list-style: none;
}

.fb-actions-menu__summary::-webkit-details-marker {
    display: none;
}

.fb-actions-menu[open] .fb-actions-menu__summary {
    background: var(--fb-bg-tertiary);
}

.fb-actions-menu__content {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: var(--fb-bg-secondary);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-md);
    box-shadow: var(--fb-shadow-md);
    padding: 8px;
    display: grid;
    gap: 6px;
    z-index: 50;
}

.fb-actions-menu__content .btn {
    width: 100%;
    justify-content: flex-start;
}

.fb-canvas-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    margin-bottom: 20px;
    position: sticky;
    top: 12px;
    z-index: 20;
    background: var(--fb-bg-primary);
    padding: 12px 0;
}

.fb-canvas-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fb-canvas-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.fb-preview-sticky-btn {
    box-shadow: var(--fb-shadow-sm);
}

.fb-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--fb-bg-secondary);
    padding: 6px;
    border-radius: var(--fb-radius-md);
}

.fb-zoom-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--fb-text-secondary);
    cursor: pointer;
    border-radius: var(--fb-radius-sm);
    transition: var(--fb-transition);
}

.fb-zoom-btn:hover {
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-primary);
}

.fb-zoom-level {
    min-width: 48px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--fb-text-secondary);
}

.fb-canvas {
    width: 100%;
    max-width: 900px;
    background: var(--fb-bg-secondary);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-lg);
    padding: 32px;
    box-shadow: var(--fb-shadow-lg);
    min-height: 600px;
    height: auto;
    align-self: center;
}

.fb-form-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fb-canvas[data-mode="list"] .fb-form-editor {
    display: none !important;
}

.fb-canvas[data-mode="edit"] .fb-form-selector {
    display: none !important;
}

.fb-sections-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fb-form-selector h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.fb-form-list {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.fb-form-option {
    width: 100%;
    text-align: left;
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    padding: 14px;
    border-radius: var(--fb-radius-md);
    color: inherit;
    cursor: pointer;
    transition: var(--fb-transition);
}

.fb-form-option:hover {
    border-color: var(--fb-accent);
    background: var(--fb-bg-hover);
}

.fb-form-option__name {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.fb-form-option__meta {
    font-size: 12px;
    color: var(--fb-text-secondary);
}

.fb-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.fb-form-title-input {
    flex: 1;
    padding: 10px 12px;
    border-radius: var(--fb-radius-md);
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-primary);
}

.fb-form-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fb-select,
.fb-input {
    padding: 8px 10px;
    border-radius: var(--fb-radius-sm);
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-primary);
}

.fb-input--small {
    width: 80px;
}

.fb-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.fb-section {
    margin-bottom: 24px;
    border: 2px dashed transparent;
    border-radius: var(--fb-radius-md);
    transition: var(--fb-transition);
}

.fb-section:hover {
    border-color: var(--fb-border-hover);
}

.fb-section--selected {
    border-color: var(--fb-accent);
    background: rgba(227, 255, 83, 0.05);
}

.fb-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--fb-bg-tertiary);
    border-radius: var(--fb-radius-md) var(--fb-radius-md) 0 0;
}

.fb-section__icon {
    width: 32px;
    height: 32px;
    background: var(--fb-accent);
    border-radius: var(--fb-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fb-accent-dark);
    font-size: 12px;
    font-weight: 700;
}

.fb-section__info {
    flex: 1;
}

.fb-section__title {
    font-weight: 600;
    margin-bottom: 2px;
}

.fb-section__desc {
    font-size: 12px;
    color: var(--fb-text-secondary);
}

.fb-section__actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: var(--fb-transition);
}

.fb-section:hover .fb-section__actions {
    opacity: 1;
}

.fb-section__content {
    padding: 20px;
    background: var(--fb-bg-secondary);
    border-radius: 0 0 var(--fb-radius-md) var(--fb-radius-md);
}

.fb-field {
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-md);
    background: var(--fb-bg-primary);
    transition: var(--fb-transition);
}

.fb-field:hover {
    border-color: var(--fb-accent-dark);
    box-shadow: 0 0 0 2px rgba(45, 45, 45, 0.08);
}

.fb-field--selected {
    border-color: var(--fb-accent);
    box-shadow: 0 0 0 3px rgba(227, 255, 83, 0.4);
}

.fb-field__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.fb-field__label {
    font-weight: 600;
    flex: 1;
}

.fb-field__type-badge {
    font-size: 11px;
    padding: 4px 8px;
    background: var(--fb-bg-tertiary);
    border-radius: 100px;
    color: var(--fb-text-muted);
    font-family: "JetBrains Mono", "Courier New", monospace;
}

.fb-field__actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--fb-transition);
}

.fb-action-btn--up .fb-icon {
    transform: rotate(180deg);
}

.fb-field:hover .fb-field__actions {
    opacity: 1;
}

.fb-field__preview {
    margin-top: 12px;
}

.fb-drag-handle {
    color: var(--fb-text-muted);
    cursor: grab;
}

.fb-required {
    color: var(--fb-error);
    margin-left: 4px;
}

.fb-preview-input,
.fb-preview-textarea,
.fb-preview-select,
.fb-table-input {
    width: 100%;
    padding: 8px;
    border-radius: var(--fb-radius-sm);
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-secondary);
}

.fb-preview-textarea {
    min-height: 80px;
}

.fb-preview-heading {
    font-size: 18px;
    font-weight: 700;
    padding: 6px 0;
}

.fb-preview-heading.preview-title-center {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    padding: 8px 0;
}

.fb-preview-swot {
    border: 1px dashed var(--fb-border);
    border-radius: var(--fb-radius-md);
    padding: 10px;
}

.fb-preview-swot__title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--fb-text-secondary);
}

.fb-preview-swot__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.fb-preview-swot__item {
    padding: 8px;
    border-radius: var(--fb-radius-sm);
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    font-size: 12px;
    color: var(--fb-text-secondary);
}

.fb-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.fb-preview-grid__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--fb-text-secondary);
}

.fb-preview-grid__label {
    font-weight: 600;
    color: var(--fb-text-secondary);
}

.fb-preview-divider {
    height: 1px;
    background: var(--fb-border);
    margin: 8px 0;
}

.fb-preview-checkbox,
.fb-preview-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fb-text-secondary);
}

.fb-preview-table {
    width: 100%;
    border-collapse: collapse;
}

.fb-preview-table th,
.fb-preview-table td {
    border: 1px solid var(--fb-border);
    padding: 6px;
    font-size: 12px;
}

.fb-drop-zone {
    border: 2px dashed var(--fb-border);
    border-radius: var(--fb-radius-md);
    padding: 18px;
    text-align: center;
    color: var(--fb-text-muted);
    margin-top: 12px;
    transition: var(--fb-transition);
}

.fb-drop-zone--between {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 12px;
}

.fb-drop-zone--between span {
    display: block;
    opacity: 0.7;
}

.fb-drop-zone--end {
    margin-top: 14px;
}

.fb-drop-zone:hover,
.fb-drop-zone--active {
    border-color: var(--fb-accent);
    background: rgba(227, 255, 83, 0.08);
    color: var(--fb-accent-dark);
}

.fb-properties-tabs {
    display: flex;
    gap: 6px;
    padding: 16px 20px 0;
}

.fb-tab {
    position: relative;
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-secondary);
    padding: 6px 10px;
    border-radius: var(--fb-radius-sm);
    cursor: pointer;
}

.fb-tab.active {
    border-color: var(--fb-accent);
    color: var(--fb-text-primary);
}

.fb-tab.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -6px;
    height: 2px;
    background: var(--fb-accent);
}

.fb-properties-content {
    padding: 16px 20px 24px;
}

.fb-empty-state {
    text-align: center;
    color: var(--fb-text-muted);
    padding: 40px 16px;
}

.fb-property-group {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fb-border);
}

.fb-property-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fb-property-group__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fb-text-muted);
    margin-bottom: 12px;
    font-weight: 700;
}

.fb-property-row {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.fb-structured-row__note {
    font-size: 11px;
    color: var(--fb-text-muted);
    margin-top: 4px;
}

.fb-structured-row {
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-sm);
    padding: 10px;
    margin: 10px 0;
    background: var(--fb-bg);
}

.fb-structured-sum {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--fb-radius-sm);
    border: 1px dashed var(--fb-border);
    background: var(--fb-bg-secondary);
}

.fb-structured-sum__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fb-property-label {
    font-size: 1em;
	font-we: 500;
    color: var(--fb-text-secondary);
}

.fb-property-input,
.fb-property-select,
.fb-json-preview {
    width: 100%;
    padding: 8px;
    border-radius: var(--fb-radius-sm);
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-primary);
}

.fb-property-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.fb-property-section {
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}

.fb-property-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--fb-bg-tertiary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.fb-property-section__header:hover {
    background: var(--fb-bg-hover);
}

.fb-property-section__body {
    padding: 12px;
}

.fb-property-section.is-collapsed .fb-property-section__body {
    display: none;
}

.fb-inline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
}

.fb-option-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    background: var(--fb-bg-tertiary);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-sm);
    margin-bottom: 6px;
}

.fb-option-row__inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.fb-option-row__inputs input {
    padding: 6px 8px;
    font-size: 12px;
}

.fb-column-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--fb-bg-tertiary);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-md);
    margin-bottom: 10px;
}

.fb-column-row__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--fb-border);
}

.fb-column-row__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fb-column-row__actions {
    display: flex;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--fb-border);
    flex-wrap: wrap;
}

.fb-column-row__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fb-column-row__field label {
    font-size: 11px;
    color: var(--fb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fb-column-handle {
    cursor: grab;
    color: var(--fb-text-muted);
    font-size: 12px;
}

.fb-option-row .fb-action-btn,
.fb-column-row .fb-action-btn {
    padding: 6px 10px;
    border-radius: var(--fb-radius-sm);
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-secondary);
    cursor: pointer;
}

.fb-option-row .fb-action-btn:hover,
.fb-column-row .fb-action-btn:hover {
    border-color: var(--fb-accent);
    color: var(--fb-text-primary);
}

.fb-json-preview {
    min-height: 140px;
    font-family: "JetBrains Mono", "Courier New", monospace;
    font-size: 11px;
}

.fb-action-btn {
    padding: 6px 10px;
    border-radius: var(--fb-radius-sm);
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-secondary);
    cursor: pointer;
    transition: var(--fb-transition);
}

.fb-action-btn:hover {
    border-color: var(--fb-accent);
    color: var(--fb-text-primary);
}

.fb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 45, 45, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.fb-modal-overlay[hidden] {
    display: none !important;
}

.fb-modal {
    width: min(600px, 94vw);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--light);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-lg);
    box-shadow: var(--fb-shadow-lg);
    animation: fb-modal-appear 0.2s ease-out;
    transform-origin: center;
    display: flex;
    flex-direction: column;
}

.fb-modal__header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--fb-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--accent);
}

.fb-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--fb-text-primary);
    margin: 0;
}

.fb-modal__subtitle {
    font-size: 13px;
    color: var(--fb-text-muted);
    margin-top: 4px;
}

.fb-modal__close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--fb-text-muted);
    cursor: pointer;
    border-radius: var(--fb-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-modal__close:hover {
    background: var(--fb-bg-hover);
    color: var(--fb-text-primary);
}

.fb-modal__body {
    padding: 24px;
    display: grid;
    gap: 16px;
    overflow-y: auto;
}

.fb-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--fb-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--fb-bg-tertiary);
    position: sticky;
    bottom: 0;
}

.fb-modal__body .fb-property-row {
    margin-bottom: 0;
}

.fb-modal__body .fb-property-input,
.fb-modal__body .fb-property-select,
.fb-modal__body .fb-json-preview {
    background: var(--fb-bg-tertiary);
    border-color: var(--fb-border);
}

.fb-modal__footer .btn {
    min-height: 38px;
}

@keyframes fb-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fb-modal__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--fb-text-secondary);
    margin-bottom: 6px;
}

.fb-modal__input,
.fb-modal__select,
.fb-modal__textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--fb-radius-md);
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--fb-transition);
}

.fb-modal__input:focus,
.fb-modal__select:focus,
.fb-modal__textarea:focus {
    outline: none;
    border-color: var(--fb-accent);
    box-shadow: 0 0 0 3px rgba(227, 255, 83, 0.25);
}

.fb-modal__textarea {
    min-height: 100px;
    resize: vertical;
}

.fb-modal__row {
    display: grid;
    gap: 12px;
}

.fb-modal__row--2col {
    grid-template-columns: 1fr 1fr;
}

.fb-modal__group {
    margin-bottom: 16px;
}

.fb-modal__hint {
    font-size: 11px;
    color: var(--fb-text-muted);
    margin-top: 4px;
}

.fb-modal__divider {
    height: 1px;
    background: var(--fb-border);
    margin: 16px 0;
}

    margin-top: 24px;
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-lg);
    background: var(--fb-bg-secondary);
    color: var(--fb-text-primary);
    overflow: hidden;
}

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--fb-bg-tertiary);
    border-bottom: 1px solid var(--fb-border);
}

    font-size: 14px;
    font-weight: 700;
    color: var(--fb-text-primary);
}

    padding: 16px;
    display: grid;
    gap: 16px;
}

    border: 1px solid var(--fb-border);
    border-radius: 12px;
    padding: 14px;
    background: var(--fb-bg-secondary);
}

    margin: 0 0 6px;
    font-size: 15px;
}

    display: grid;
    gap: 6px;
    margin-top: 10px;
}

    font-size: 12px;
    font-weight: 600;
    color: var(--fb-text-secondary);
}

    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--fb-border);
    background: var(--fb-bg-tertiary);
    color: var(--fb-text-primary);
    font-size: 13px;
}

    color: #b91c1c;
}

.fb-preview-invalid {
    border-color: #ef4444 !important;
    background: #fff1f2 !important;
}

    display: grid;
    gap: 6px;
    font-size: 12px;
}

.fb-rules-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fb-rule-item {
    background: var(--fb-bg-tertiary);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-md);
    overflow: hidden;
}

.fb-rule-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--fb-bg-hover);
    cursor: pointer;
    gap: 8px;
}

.fb-rule-item__header:hover {
    background: var(--fb-border);
}

.fb-rule-item__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.fb-rule-item__body {
    padding: 12px;
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--fb-border);
}

.fb-rule-item__row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px;
    align-items: start;
    font-size: 12px;
}

.fb-rule-item__label {
    color: var(--fb-text-muted);
    font-weight: 500;
}

.fb-rule-item__value {
    color: var(--fb-text-primary);
}

.fb-rule-item__actions {
    display: flex;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--fb-border);
}

.fb-rule__type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--fb-accent);
    color: var(--fb-accent-dark);
    padding: 3px 8px;
    border-radius: var(--fb-radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fb-add-rule-btn {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: var(--fb-radius-md);
    border: 1px dashed var(--fb-border);
    background: transparent;
    color: var(--fb-text-secondary);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.fb-rule-warnings {
    background: #fff7ed;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: #92400e;
}

.fb-rule-warning + .fb-rule-warning {
    margin-top: 4px;
}

.fb-rule-deps {
    background: #f1f5f9;
    border: 1px solid #cbd5f5;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: #334155;
}

    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

    border: 1px solid #e2e8f0;
    padding: 6px;
    font-size: 12px;
}

.fb-snackbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--fb-accent-dark);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-md);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--fb-bg-secondary);
    z-index: 1300;
    transition: var(--fb-transition);
}

.fb-snackbar--visible {
    transform: translateX(-50%) translateY(0);
}

.fb-snackbar--success .fb-snackbar__icon {
    color: var(--fb-accent);
}

.fb-snackbar--error .fb-snackbar__icon {
    color: var(--fb-error);
}

/* Builder content helpers */
.form-heading {
    font-size: 18px;
    font-weight: 700;
    margin: 8px 0;
}

.form-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 16px 0;
}

.preview-heading {
    font-size: 16px;
    font-weight: 700;
    margin: 10px 0;
}

.preview-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 10px 0;
}

@media (max-width: 1200px) {
    .fb-main {
        grid-template-columns: 240px 1fr 280px;
    }
}

@media (max-width: 980px) {
    .fb-main {
        grid-template-columns: 1fr;
    }

    .fb-sidebar--left,
    .fb-sidebar--right {
        display: none;
        position: static;
        height: auto;
    }
}

.password-rules {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid #f1c0c0;
    background: #fff6f6;
    display: none;
}

.password-rules.is-active {
    display: block;
}

.password-rules__status {
    font-size: 13px;
    font-weight: 700;
    color: #b71c1c;
    margin-bottom: 8px;
}

.password-rules__status.is-ok {
    color: #1b5e20;
}

.password-rules__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.password-rules__list li {
    font-size: 12px;
    color: #b71c1c;
    font-weight: 600;
}

.password-rules__list li.is-ok {
    color: #1b5e20;
}
.container:has(.form-builder-app) {
    max-width: none;
    padding: 0;
}
.fb-infobox-item {
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-md);
    background: var(--fb-bg-tertiary);
    padding: 12px 14px;
    margin-bottom: 12px;
}

.fb-infobox-item__header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.fb-infobox-item__title {
    font-weight: 600;
    font-size: 14px;
    color: var(--fb-text-primary);
}

.fb-infobox-item__meta {
    font-size: 12px;
    color: var(--fb-text-muted);
    white-space: nowrap;
}

.fb-infobox-item__body {
    font-size: 13px;
    color: var(--fb-text-secondary);
    white-space: pre-wrap;
}

.info-box-print {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #444444;
}

.form-instruction {
    margin-bottom: 16px;
}

/* PDF print-friendly layout */
.pdf-content {
    background: #ffffff;
    color: #111111;
    font-size: 12px;
}

.pdf-content .container {
    max-width: 100%;
    padding: 0;
}

.pdf-content .card,
.pdf-content .inner-card {
    box-shadow: none;
    border: 1px solid #cccccc;
    background: #ffffff;
}

.pdf-content .form-header {
    position: static;
    top: auto;
}

.pdf-content .badge,
.pdf-content .intro-category,
.pdf-content .helper {
    background: #f2f2f2;
    border-color: #cccccc;
    color: #111111;
}

.pdf-content .progress {
    background: #e0e0e0;
}

.pdf-content .progress__bar {
    background: #b5b5b5;
}

.pdf-content .form-input,
.pdf-content .form-textarea,
.pdf-content .readonly-field {
    background: #f2f2f2;
    border-color: #cccccc;
    box-shadow: none;
}

.pdf-content .table {
    box-shadow: none;
}

.pdf-content .table th,
.pdf-content .table td {
    border-color: #cccccc;
}

.pdf-content .info-box {
    box-shadow: none;
    border: 1px solid #cccccc;
    background: #f7f7f7;
}

@page {
    size: A4;
    margin: 12mm;
}


.floating-actions {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 5000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bug-report-trigger,
.scroll-top-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    border: none;
    background: #000000;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.bug-report-trigger__icon,
.scroll-top-trigger__icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.scroll-top-trigger {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-top-trigger.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.bug-report-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6000;
    padding: 20px;
}

.bug-report-overlay[hidden] {
    display: none !important;
}

.bug-report-modal {
    width: min(720px, 94vw);
    max-height: 90vh;
    overflow: hidden;
    background: var(--light);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.confirm-modal {
    max-width: 560px;
}

.confirm-modal__subtitle {
    margin-top: 4px;
    
    font-size: 0.95rem;
}

.confirm-modal__message {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
}

.confirm-modal .bug-report-actions {
    justify-content: flex-end;
    gap: 12px;
}

.confirm-modal .bug-report-actions .btn {
    min-width: 150px;
}

@media (max-width: 768px) {
    .confirm-modal {
        width: min(100%, 100vw - 16px);
    }

    .confirm-modal .bug-report-actions {
        flex-direction: column-reverse;
    }

    .confirm-modal .bug-report-actions .btn {
        width: 100%;
    }
}

.system-description-modal {
    width: min(860px, 94vw);
}

.bug-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    background: var(--accent);
}

.bug-report-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.bug-report-close {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.bug-report-body {
    padding: 22px;
    display: grid;
    gap: 16px;
    overflow-y: auto;
}

.system-description-body {
    max-width: 820px;
    margin: 0 auto;
    line-height: 1.7;
}

.system-description-body h2 {
    margin: 16px 0 8px;
    font-size: 18px;
    font-weight: 800;
}

.system-description-body ul {
    padding-left: 18px;
    margin: 0 0 12px;
}

.bug-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.bug-report-mentor {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: var(--muted);
}

.bug-report-mentor__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #555555;
}

.bug-report-counter {
    text-align: right;
    font-size: 12px;
    color: #666666;
}

.bug-report-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #856404;
}

.bug-report-actions {
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--muted);
}

body.bug-report-open {
    overflow: hidden;
}

.bug-report-toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 6500;
    background: #000000;
    color: #ffffff;
}

.bug-report-toast.is-ok {
    background: #1b5e20;
}

.bug-report-toast.is-error {
    background: #b71c1c;
}

.bug-report-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
    .bug-report-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .bug-report-modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 100dvh;
        height: auto;
        min-height: min(100dvh, 100vh);
        border-radius: 18px 18px 0 0;
        box-sizing: border-box;
    }

    .bug-report-header {
        padding: 14px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px));
        align-items: flex-start;
    }

    .bug-report-header h3 {
        font-size: 14px;
        line-height: 1.35;
        padding-top: 4px;
        min-width: 0;
    }

    .bug-report-body {
        padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
        gap: 14px;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bug-report-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .bug-report-mentor {
        padding: 10px;
    }

    .bug-report-disclaimer {
        font-size: 12px;
        line-height: 1.45;
    }

    .floating-actions {
        right: 16px;
        bottom: 16px;
        gap: 10px;
    }

    .bug-report-trigger,
    .scroll-top-trigger {
        padding: 10px 14px;
    }

    .bug-report-trigger__label,
    .scroll-top-trigger__label {
        display: none;
    }

    .bug-report-actions {
        padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
        flex-direction: column;
        align-items: stretch;
        position: sticky;
        bottom: 0;
    }

    .bug-report-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .bug-report-body .form-textarea {
        min-height: 140px;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .form-input,
    .form-textarea,
    select.form-input,
    select.form-select,
    .responsive-table .form-input,
    .responsive-table .form-textarea,
    .responsive-table .point-input,
    .bug-report-body .form-textarea {
        font-size: 16px !important;
    }

    .bug-report-grid > div,
    .bug-report-mentor,
    .bug-report-body .readonly-field,
    .bug-report-body .form-textarea {
        min-width: 0;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.jury-groups-header {
    display: grid;
    gap: 16px;
}

.jury-groups-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.jury-groups-section-header--table {
    justify-content: center;
}

.jury-groups-section-header--table > div {
    width: 100%;
}

.jury-groups-section-header--table h2,
.jury-groups-section-header--table .jury-groups-subheader {
    text-align: center;
}

.jury-groups-section-header--centered {
    justify-content: center;
    text-align: center;
}

.jury-groups-section-header--centered > div {
    max-width: 920px;
}

.jury-groups-section-header--centered .jury-groups-subheader {
    text-align: center;
}

.jury-groups-subheader {
    margin: 6px 0 0;
    text-align: left;
    font-size: 15px;
}

.jury-admin-table thead th,
.jury-groups-config-table thead th,
.jury-members-table thead th {
    text-align: center;
    vertical-align: middle;
}

.jury-groups-stats {
    margin-left: 0;
}

.jury-groups-config-actions {
    justify-content: center;
}

.jury-reports-actions {
    justify-content: center;
}

.jury-report-toggle {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #111827;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.jury-report-toggle:hover,
.jury-report-toggle[aria-expanded="true"] {
    color: #1d4ed8;
}

.jury-report-detail-row > td {
    background: #f8fafc;
    padding: 0;
}

.jury-report-detail-card {
    padding: 16px;
}

.jury-report-detail-table {
    margin: 0;
}

.jury-report-master-table td strong,
.jury-report-detail-table td strong {
    font-weight: 700;
}

.jury-report-print-card {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.jury-report-print-wrap {
    margin: 0;
}

.jury-reports-jump {
    position: sticky;
    top: 14px;
    z-index: 24;
    margin: 0 0 18px;
    padding: 8px 0;
}

.jury-reports-jump__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 28px rgba(15, 49, 87, 0.10);
    backdrop-filter: blur(8px);
}

.jury-reports-jump__link {
    background: #123b69;
    color: #d9ecff;
    border: 1px solid #123b69;
    font-weight: 700;
    white-space: nowrap;
}

.jury-reports-jump__link:hover {
    background: #0f3157;
    color: #eff6ff;
    border-color: #0f3157;
}

.jury-reports-anchor {
    scroll-margin-top: 124px;
}

.jury-report-print-header,
.jury-report-print-detail,
.jury-report-summary-table {
    margin: 0;
}

.jury-report-print-header {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.jury-report-print-header tbody tr:first-child td {
    background: #eef4ff;
    border-color: #d6e4ff;
}

.jury-report-print-header tbody tr:first-child td[data-label="Lp."],
.jury-report-print-header tbody tr:first-child td[data-label="Numer"],
.jury-report-print-header tbody tr:first-child td[data-label="Praca"] {
    color: #163b68;
    font-weight: 800;
    white-space: nowrap;
}

.jury-report-print-header tbody tr:first-child td[data-label="Wartość"] {
    font-weight: 700;
}

.jury-report-print-header tbody tr + tr td {
    background: #f8fafc;
}

.jury-report-print-header tbody td:first-child,
.jury-report-print-detail tbody td:first-child,
.jury-report-summary-table tbody td:first-child {
    font-weight: 700;
}

.jury-report-group-header {
    margin-top: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #eef4ff;
}

.jury-report-group-header.jury-groups-section-header--table h3 {
    margin: 0;
    text-align: left;
    font-size: 16px;
    color: #163b68;
}

.jury-report-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.jury-report-score-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.jury-report-score-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.jury-report-score-card__header h4 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
}

.jury-report-score-card__header .subheader {
    margin-top: 4px;
}

.jury-report-score-card__total {
    display: grid;
    gap: 4px;
    min-width: 104px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    text-align: right;
}

.jury-report-score-card__total span {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.jury-report-score-card__total strong {
    font-size: 18px;
    line-height: 1;
    white-space: nowrap;
}

.jury-report-score-list {
    display: grid;
    gap: 8px;
}

.jury-report-score-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.jury-report-score-row__label {
    font-size: 14px;
    line-height: 1.45;
    color: #0f172a;
}

.jury-report-score-row__value {
    min-width: 28px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-align: right;
    color: #163b68;
}

.jury-report-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.jury-report-list li {
    margin: 0;
    line-height: 1.45;
}

.jury-report-group-title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #45658d;
}

.jury-report-summary-wrap .jury-report-group-title + .jury-report-list {
    margin-top: -2px;
}

.jury-report-summary-table td[data-label="Wynik końcowy"] strong,
.jury-report-print-header td[data-label="Wynik końcowy"],
.jury-report-print-detail td[data-label="Suma punktów"] strong {
    white-space: nowrap;
}

.jury-report-summary-table td[data-label="Uczestnicy"],
.jury-report-summary-table td[data-label="Grupa Jury"],
.jury-report-summary-table td[data-label="Członkowie Jury"] {
    min-width: 190px;
    vertical-align: top;
}

.jury-report-print-detail thead th,
.jury-report-summary-table thead th {
    white-space: nowrap;
}

.jury-report-print-detail tbody td,
.jury-report-summary-table tbody td {
    vertical-align: top;
}

@media (max-width: 900px) {
    .jury-reports-jump {
        top: 10px;
        margin-bottom: 14px;
    }

    .jury-reports-jump__inner {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .jury-reports-anchor {
        scroll-margin-top: 142px;
    }

    .jury-report-print-card {
        padding: 14px;
        border-radius: 14px;
    }

    .jury-report-score-grid {
        grid-template-columns: 1fr;
    }

    .jury-report-score-card__header {
        grid-template-columns: 1fr;
        display: grid;
    }

    .jury-report-score-card__total {
        min-width: 0;
        text-align: left;
    }

    .jury-report-summary-table td[data-label="Uczestnicy"],
    .jury-report-summary-table td[data-label="Grupa Jury"],
    .jury-report-summary-table td[data-label="Członkowie Jury"] {
        min-width: 0;
    }
}

.jury-groups-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    padding: 16px;
    background: var(--muted);
    border-radius: 12px;
    margin-bottom: 16px;
}

.jury-groups-filters .filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.jury-groups-filters .filter-input {
    border-radius: 8px;
    border: 2px solid var(--border);
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    width: 100%;
}

.jury-groups-filters .filter-input:focus {
    outline: none;
    border-color: #e3ff53;
    box-shadow: 0 0 0 3px rgba(227, 255, 83, 0.2);
}

.jury-groups-filters .btn-filter-clear {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: transparent;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.jury-groups-filters .btn-filter-clear:hover {
    background: #fff;
    border-color: #999;
}

.jury-feedback-filters {
    align-items: end;
}

.jury-feedback-filters__search {
    grid-column: span 2;
}

.jury-feedback-filters__actions .inline-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.jury-feedback-filters__actions .btn {
    min-width: 120px;
}

@media (max-width: 900px) {
    .jury-feedback-filters__search {
        grid-column: span 1;
    }

    .jury-feedback-filters__actions .inline-form {
        display: grid;
        grid-template-columns: 1fr;
    }
}

.jury-members-table-wrap {
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
}

.jury-members-table {
    margin: 0;
}

.jury-members-table thead {
    background: #0f172a;
    color: #f8fafc;
}

.jury-members-table th {
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.jury-members-table td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid #e5e7eb;
}

.jury-members-table__config-col {
    width: 6%;
    white-space: normal;
}

.jury-members-table tbody tr:last-child td {
    border-bottom: none;
}

.jury-members-table tbody tr:hover {
    background: #f8fafc;
}

.jury-member-name,
.jury-member-group,
.jury-member-progress-value,
.jury-member-workload {
    font-weight: 700;
    color: #0f172a;
}

.jury-member-contact {
    color: #0f172a;
    word-break: break-word;
}

.jury-member-contact-meta,
.jury-member-workload-meta,
.jury-member-progress-meta {
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}

.jury-member-permissions {
    display: grid;
    gap: 6px;
    align-content: start;
}

.jury-member-config {
    display: grid;
    gap: 10px;
    min-width: 180px;
}

.jury-members-save-status {
    margin-top: 16px;
}

form[data-jury-groups-form="members"] > .table-wrap ~ .jury-members-save-status,
form[data-jury-groups-form="members"] > .table-wrap ~ .actions-row {
    display: none;
}

@media (min-width: 769px) {
    .jury-members-table__config-col {
        width: 276px;
        max-width: 276px;
    }

    .jury-member-config {
        min-width: 0;
        max-width: 276px;
        gap: 8px;
    }

    .jury-member-config .form-input {
        min-width: 0;
    }

    .jury-member-config .btn {
        width: fit-content;
        max-width: 100%;
    }

    .jury-member-config .checkbox-item {
        line-height: 1.3;
    }
}

.jury-group-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.jury-group-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    
}

.jury-group-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.jury-group-card__header h3 {
    margin: 0;
}

.jury-group-card__capacity {
    font-size: 13px;
}

.jury-group-card__meta {
    margin: 4px 0 0;
    color: #666666;
    font-size: 13px;
}

.jury-group-card__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.jury-group-card__stat {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (max-width: 768px) {
    .jury-groups-filters {
        grid-template-columns: 1fr;
    }

    .jury-members-table-wrap {
        border: none;
        border-radius: 0;
        overflow: visible;
        background: transparent;
    }

    .jury-members-table {
        display: block;
    }

    .jury-members-table thead {
        display: none;
    }

    .jury-members-table tbody {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .jury-members-table tbody tr {
        display: block;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    }

    .jury-members-table tbody tr:hover {
        background: #ffffff;
    }

    .jury-members-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 16px;
        padding: 12px 16px;
        border-bottom: 1px solid #eef2f7;
    }

    .jury-members-table td:last-child {
        border-bottom: none;
    }

    .jury-members-table td::before {
        content: attr(data-label);
        min-width: 104px;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #64748b;
        flex-shrink: 0;
    }

    .jury-member-config {
        width: 100%;
        min-width: 0;
    }
}

.jury-group-card__stat span {
    font-size: 12px;
    color: #666666;
    font-weight: 700;
    text-transform: uppercase;
}

.jury-group-card__stat strong {
    font-size: 18px;
}

.jury-group-card__members {
    display: grid;
    gap: 10px;
}

.jury-group-card__member {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
}

.jury-group-card__member span {
    color: #666666;
    font-size: 13px;
}

.jury-group-card__member--empty {
    color: #666666;
    font-style: italic;
}

.jury-group-config-form {
    display: grid;
    gap: 18px;
}

.jury-group-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.jury-group-config-item {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--muted);
}

.jury-jurors-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin: 18px 0 24px;
}

.jury-jurors-filter {
    display: grid;
    gap: 8px;
}

.jury-jurors-toolbar__summary {
    font-size: 14px;
    color: #555555;
    font-weight: 600;
}

.jury-jurors-table td {
    vertical-align: middle;
}

.jury-juror-main,
.jury-juror-contact,
.jury-juror-group,
.jury-juror-load {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jury-juror-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jury-badge-muted {
    background: rgba(0, 0, 0, 0.08);
}

.jury-juror-contact span,
.jury-juror-group span,
.jury-juror-load span {
    color: #666666;
    font-size: 13px;
}

.jury-juror-progress {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 8px;
}

.jury-juror-progress-bar {
    min-width: 120px;
}

.jury-group-select {
    min-width: 180px;
}

.jury-inline-note {
    margin: 0;
}

@media (max-width: 768px) {
    .jury-group-card__stats {
        grid-template-columns: 1fr;
    }

    .jury-jurors-toolbar {
        grid-template-columns: 1fr;
    }

    .jury-jurors-toolbar__summary {
        width: 100%;
    }

    .jury-group-select {
        min-width: 0;
        width: 100%;
    }
}
.mass-messages-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.mass-messages-header--compact {
    gap: 14px;
}

.mass-messages-header > div:first-child {
    max-width: 900px;
}

.mass-messages-actions-center {
    justify-content: center;
}

.mass-campaign-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.mass-messages-tabs {
    margin: 18px 0 0;
}

.btn.btn-outline.active {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

.mass-message-filters {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.mass-message-top-grid,
.mass-message-filter-grid,
.mailing-ajax-filters__grid {
    display: grid;
    gap: 16px;
}

.mass-message-top-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.mass-message-top-grid--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mass-message-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plain-link {
    color: inherit;
    text-decoration: none;
}

.plain-link:hover,
.plain-link:focus {
    text-decoration: underline;
}

.strong-link {
    font-weight: 700;
}

.muted {
    color: #64748b;
}

.mass-message-agent {
    max-width: 360px;
    word-break: break-word;
}

.stat-card--with-help {
    position: relative;
}

.stat-card__topline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
}

.mailing-info-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
}

.mailing-info-trigger:hover .mailing-tooltip,
.mailing-info-trigger:focus .mailing-tooltip,
.mailing-info-trigger:focus-visible .mailing-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.mailing-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 8px);
    width: 240px;
    max-width: min(240px, 80vw);
    padding: 10px 12px;
    border-radius: 10px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 30;
}

.mailing-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0f172a;
}

.mailing-ajax-panel.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.mailing-ajax-filters {
    margin-bottom: 16px;
}

.mailing-ajax-filters--boxed {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f8fafc;
}

.mailing-open-summary {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.mailing-open-latest {
    margin-bottom: 8px;
    line-height: 1.5;
}

.mailing-open-toggle {
    margin-top: 4px;
}

.mailing-open-history {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.mailing-open-history__item + .mailing-open-history__item {
    margin-top: 8px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination-info {
    color: #666;
    font-size: 13px;
}

.pagination-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-links .btn.btn-outline.active {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

@media (max-width: 768px) {
    .mass-messages-header,
    .mass-campaign-detail-header {
        flex-direction: column;
    }

    .mailing-tooltip {
        left: auto;
        right: 0;
        transform: translate(0, 8px);
        max-width: min(240px, 88vw);
    }

    .mailing-info-trigger:hover .mailing-tooltip,
    .mailing-info-trigger:focus .mailing-tooltip,
    .mailing-info-trigger:focus-visible .mailing-tooltip {
        transform: translate(0, 0);
    }

    .mailing-tooltip::after {
        left: auto;
        right: 8px;
        transform: none;
    }

    .pagination {
        align-items: stretch;
    }
}

@media (max-width: 1180px) {
    .mass-message-top-grid,
    .mass-message-filter-grid,
    .mailing-ajax-filters__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .mass-message-top-grid,
    .mass-message-top-grid--secondary,
    .mass-message-filter-grid,
    .mailing-ajax-filters__grid {
        grid-template-columns: 1fr;
    }
}
