.btn-primary {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--kurzola-btn, #0a0a0a);
    border: 1px solid var(--kurzola-btn, #0a0a0a);
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--kurzola-btn-hover, #1a1a1a);
    border-color: var(--kurzola-btn-hover, #1a1a1a);
    color: #fff;
}

.btn-primary:disabled,
.btn-primary.disabled,
.btn-primary[disabled] {
    color: #9ca3af;
    background-color: #e5e7eb;
    border-color: #e5e7eb;
    opacity: 1;
    cursor: not-allowed;
}

.error {
    color: #dc2626;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border-radius: 0.5rem;
}

/* Marketplace */
.marketplace-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.25rem 2.5rem;
}

.marketplace-page-header {
    margin-bottom: 1.5rem;
}

.marketplace-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.marketplace-lead {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 52rem;
}

.marketplace-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .marketplace-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .marketplace-page {
        padding: 0.75rem 0.65rem 2rem;
    }

    .marketplace-page-header {
        margin-bottom: 0.75rem;
    }

    .marketplace-title {
        font-size: 1.35rem;
    }

    .marketplace-lead--desktop {
        display: none;
    }

    .marketplace-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .marketplace-main {
        order: 1;
        width: 100%;
    }

    .mp-filters-backdrop {
        z-index: 2100;
    }

    .marketplace-sidebar {
        display: none;
        order: 2;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 2110;
        width: min(92vw, 320px);
        max-height: 100vh;
        overflow-y: auto;
        margin: 0;
        transform: translateX(-105%);
        transition: transform 0.28s ease;
        border-radius: 0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    }

    .marketplace-sidebar--open {
        display: block;
        transform: translateX(0);
    }

    .mp-mobile-toolbar {
        margin-bottom: 0.65rem;
    }

    .mp-sort-row {
        margin-top: 0;
    }

    .mp-sort-row {
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 0.75rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .mp-sort-row::-webkit-scrollbar {
        display: none;
    }

    .mp-sort-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .mp-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
    }

    .mp-mobile-item {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mp-mobile-item--expanded {
        display: grid;
        gap: 0;
    }

    .mp-mobile-item--expanded > .course-card--mobile,
    .mp-mobile-item--expanded > .mp-expand-panel {
        grid-area: 1 / 1;
    }

    .mp-mobile-item--expanded > .course-card--mobile {
        visibility: hidden;
        pointer-events: none;
    }

    .mp-mobile-item--expanded > .mp-expand-panel {
        z-index: 1;
        width: 100%;
        align-self: start;
        box-shadow: 0 10px 36px rgba(0, 0, 0, 0.14);
    }

    .course-card--mobile {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        min-height: 0;
    }

    .course-card--mobile .course-cover,
    .course-card--mobile .course-cover-placeholder {
        width: 108px;
        min-width: 108px;
        height: auto;
        min-height: 108px;
        flex-shrink: 0;
        border-radius: 0.65rem 0 0 0.65rem;
    }

    .course-card--mobile .course-card-body {
        flex: 1;
        min-width: 0;
        padding: 0.65rem 0.75rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .course-card--mobile .course-card-body h2 {
        font-size: 0.875rem;
        line-height: 1.3;
        margin: 0.25rem 0 0.15rem;
        -webkit-line-clamp: 3;
    }

    .course-card--mobile .course-lector {
        font-size: 0.75rem;
        display: block;
    }

    .course-card--mobile .course-meta {
        display: flex;
        gap: 0.5rem;
        font-size: 0.7rem;
        margin: 0.2rem 0;
    }

    .course-card--mobile .course-price {
        font-size: 1rem;
        margin-top: 0.15rem;
    }

    .mp-mobile-item .mp-expand-panel {
        border-radius: 0.75rem;
    }

    .mp-mobile-item .mp-expand-inner {
        grid-template-columns: 1fr;
    }

    .mp-expand-inner {
        grid-template-columns: 1fr;
    }

    .mp-expand-cover,
    .mp-expand-cover-placeholder {
        min-height: 140px;
        max-height: 160px;
    }

    .mp-expand-content {
        padding: 1rem 1rem 1.15rem;
        padding-right: 2.5rem;
    }

    .mp-expand-title {
        font-size: 1.05rem;
    }

    .mp-expand-price {
        font-size: 1.1rem;
    }

    .mp-expand-desc {
        font-size: 0.82rem;
        -webkit-line-clamp: 4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mp-expand-actions {
        flex-direction: column;
    }

    .mp-expand-actions .btn {
        width: 100%;
    }

    .course-overview-lector {
        margin-bottom: 0.5rem;
    }

    .course-overview-lector-photo,
    .course-overview-lector-initial {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }

    .course-overview-lector-name {
        font-size: 0.8rem;
    }

    .course-overview-meta {
        font-size: 0.75rem;
        margin-bottom: 0.35rem;
    }
}

.marketplace-sidebar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1rem 1.25rem;
    position: sticky;
    top: 1rem;
}

.mp-sidebar-block + .mp-sidebar-block {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f3f4f6;
}

.mp-sidebar-label,
.mp-sidebar-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--kurzola-text);
    margin: 0 0 0.65rem;
}

.mp-search-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.mp-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mp-chip {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: #374151;
    transition: border-color 0.15s, background 0.15s;
}

.mp-chip:hover,
.mp-chip.active {
    border-color: var(--kurzola-primary, #22C55E);
    background: #ecfdf5;
    color: #14532d;
}

.mp-count {
    color: #6b7280;
    font-weight: 500;
}

.mp-chip.active .mp-count {
    color: #166534;
}

.mp-category-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mp-category-tree > li + li {
    margin-top: 0.15rem;
}

.mp-cat-row {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.mp-cat-toggle {
    border: none;
    background: transparent;
    width: 1.25rem;
    padding: 0;
    font-size: 0.7rem;
    color: #6b7280;
    cursor: pointer;
    flex-shrink: 0;
}

.mp-cat-toggle-spacer {
    width: 1.25rem;
    flex-shrink: 0;
}

.mp-cat-link {
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.35rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    width: 100%;
}

.mp-cat-link:hover,
.mp-cat-link.active {
    background: #ecfdf5;
    color: #14532d;
}

.mp-category-children {
    list-style: none;
    margin: 0.15rem 0 0.35rem 1.5rem;
    padding: 0;
}

.mp-apply-btn {
    margin-top: 1.25rem;
}

.marketplace-main {
    min-width: 0;
}

.mp-sort-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.mp-sort-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.mp-sort-tab {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: #4b5563;
    padding: 0.25rem 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.mp-sort-tab:hover {
    color: var(--kurzola-text);
}

.mp-sort-tab.active {
    color: #14532d;
    font-weight: 600;
    border-bottom-color: var(--kurzola-primary, #22C55E);
}

.mp-loading,
.mp-empty {
    color: #6b7280;
    padding: 2rem 0;
}

.course-badge-free {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #dcfce7;
    color: #166534;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    margin-right: 0.35rem;
}

.course-category-tag {
    display: inline-block;
    font-size: 0.7rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    margin-left: 0.35rem;
}

.promotion-section-lead {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.55;
    margin: -0.5rem 0 1.25rem;
    max-width: 42rem;
}

.results-count {
    color: #6b7280;
    margin-bottom: 1rem;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.mp-course-rows {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mp-grid-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.mp-grid-row--expand {
    grid-template-columns: 1fr;
}

.mp-expand-panel {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: mpExpandOpen 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mp-expand-panel--from-left {
    transform-origin: left center;
}

.mp-expand-panel--from-right {
    transform-origin: right center;
}

@keyframes mpExpandOpen {
    from {
        opacity: 0;
        transform: scaleX(0.94);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

.mp-expand-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.mp-expand-close:hover {
    background: #fff;
    color: #111;
}

.mp-expand-loading {
    padding: 2.5rem 1.5rem;
    color: #6b7280;
    text-align: center;
}

.mp-expand-inner {
    display: grid;
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
    gap: 0;
}

.mp-expand-cover {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

.mp-expand-cover-placeholder {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    min-height: 220px;
}

.mp-expand-content {
    padding: 1.25rem 1.5rem 1.5rem;
    padding-right: 2.75rem;
}

.mp-expand-title {
    font-size: 1.35rem;
    line-height: 1.25;
    margin: 0 0 0.75rem;
    color: var(--kurzola-text);
}

.mp-expand-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 0.75rem;
}

.mp-expand-desc {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #4b5563;
    margin: 0 0 1rem;
}

.mp-expand-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.mp-mobile-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: stretch;
}

.mp-mobile-search {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.95rem;
}

.mp-mobile-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.mp-filters-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1040;
}

.mp-sidebar-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.course-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.course-wishlist-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    color: #dc2626;
    z-index: 2;
}

.course-wishlist-btn:hover {
    background: #fff;
}

.course-wishlist-error {
    position: absolute;
    top: 2.75rem;
    right: 0.5rem;
    z-index: 2;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    line-height: 1.2;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.course-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.course-cover {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.course-cover-placeholder {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* Course overview (marketplace detail step 1) */
.course-overview-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.course-overview-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.course-overview-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.course-overview-cover-placeholder {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.course-overview-body {
    padding: 1.5rem;
}

.course-overview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.course-overview-title {
    font-size: 1.65rem;
    line-height: 1.25;
    margin: 0 0 1rem;
    color: var(--kurzola-text);
}

.course-overview-lector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.course-overview-lector-photo,
.course-overview-lector-initial {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    background: #111;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.course-overview-lector-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.course-overview-lector-link {
    font-size: 0.8rem;
    color: #6b7280;
    text-decoration: none;
}

.course-overview-lector-link:hover {
    color: #111;
    text-decoration: underline;
}

.course-overview-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.course-overview-meta .rating {
    color: #d97706;
}

.course-overview-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 1.25rem;
}

.course-overview-desc {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
}

.course-overview-desc h2 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 0 0 0.5rem;
}

.course-overview-desc p {
    font-size: 0.925rem;
    line-height: 1.6;
    color: #374151;
    margin: 0;
    white-space: pre-wrap;
}

.course-overview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Course web (marketplace detail step 2) */
.course-web-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
}

.course-web-toolbar {
    margin-bottom: 0.75rem;
}

.course-web-frame {
    border-radius: 1rem;
}

.public-course-thumb {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card > .public-course-thumb {
    width: 100%;
    height: 100px;
    border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
}

.card-body .public-course-thumb {
    width: 56px;
    height: 56px;
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.public-course-thumb-lg {
    min-height: 140px;
    background-size: cover;
    background-position: center;
}

.course-card-body {
    padding: 1rem 1.25rem 1.25rem;
}

.course-card-body h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0.35rem 0;
}

.course-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--kurzola-primary, #22C55E);
    background: #dcfce7;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.course-lector {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0.25rem 0;
}

.course-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0.5rem 0;
}

.course-meta .rating {
    color: #d97706;
}

.course-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--kurzola-primary, #22C55E);
    margin: 0.5rem 0 0;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.course-reviews {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.review-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

/* Chat */
.message-bubble {
    max-width: 75%;
    padding: 0.65rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
}

.message-bubble.mine {
    background: var(--kurzola-primary, #22C55E);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.message-bubble.theirs {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 0.25rem;
}

.message-bubble p {
    margin: 0;
}

.message-time {
    display: block;
    font-size: 0.7rem;
    opacity: 0.75;
    margin-top: 0.25rem;
}

.admin-chat-search {
    position: relative;
    flex: 1 1 220px;
    max-width: 280px;
}

.admin-chat-search-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--kurzola-text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.admin-chat-search input {
    padding-left: 1.75rem;
}

.admin-chat-item {
    border-left: 3px solid transparent;
}

.admin-chat-item--needs-reply {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.admin-chat-item--needs-reply.active {
    background: var(--kurzola-btn);
    border-left-color: var(--kurzola-btn);
}

.admin-chat-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--kurzola-btn);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    overflow: hidden;
    flex-shrink: 0;
}

.admin-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-chat-avatar--lg {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--kurzola-primary, #22C55E);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-danger {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    background-color: #dc2626;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-danger:disabled {
    opacity: 0.6;
}

/* ── Password rules (Register / ResetPassword) ──────────────────────────── */
.pwd-rules {
    margin-top: 0.4rem;
    padding-left: 0.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pwd-rule {
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #9ca3af;
    transition: color 0.35s ease;
}

.pwd-rule::before {
    content: '✗';
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    display: inline-block;
}

.pwd-rule.ok {
    color: #16a34a;
}

.pwd-rule.ok::before {
    content: '✓';
    animation: pwd-rule-pop 0.35s ease;
}

@keyframes pwd-rule-pop {
    0% { transform: scale(0.5); }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .pwd-rule.ok::before {
        animation: none;
    }
}

/* ── App Footer ─────────────────────────────────────────────────── */
.app-footer {
    margin-top: 4rem;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0 1rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.app-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.app-footer__col {
    flex: 1 1 180px;
}

.app-footer__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.app-footer__brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--kurzola-text);
    letter-spacing: -0.01em;
}

.app-footer__address {
    font-style: normal;
    line-height: 1.7;
}

.app-footer__address a {
    color: inherit;
    text-decoration: none;
}

.app-footer__address a:hover {
    text-decoration: underline;
}

.app-footer__heading {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 0.6rem;
}

.app-footer__link {
    display: block;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 0.35rem;
    transition: color 0.15s;
}

.app-footer__link:hover {
    color: var(--kurzola-text);
}

.app-footer__payment-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 44px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.1;
    border: 1px solid #e5e7eb;
    text-align: center;
    white-space: nowrap;
}

.pay-badge--visa {
    background: #1a1f71;
    color: #fff;
    font-size: 0.75rem;
    font-style: italic;
    letter-spacing: 0.02em;
    border-color: #1a1f71;
}

.pay-badge--mc {
    background: #fff;
    gap: 0;
    position: relative;
    overflow: hidden;
    padding: 0 8px;
    min-width: 44px;
}

.pay-badge__mc-left,
.pay-badge__mc-right {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.pay-badge__mc-left {
    background: #eb001b;
    margin-right: -6px;
    position: relative;
    z-index: 1;
}

.pay-badge__mc-right {
    background: #f79e1b;
    opacity: 0.9;
}

.pay-badge--3ds {
    background: #fff;
    color: #1a1f71;
    border-color: #1a1f71;
    font-size: 0.55rem;
    line-height: 1.2;
    min-width: 38px;
}

.app-footer__bottom {
    border-top: 1px solid #f3f4f6;
    padding-top: 0.75rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ── Legal pages ────────────────────────────────────────────────── */
.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #374151;
}

.legal-page__header {
    margin-bottom: 2.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1.5rem;
}

.legal-page__back {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
}

.legal-page__back:hover {
    color: var(--kurzola-text);
}

.legal-page__header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--kurzola-text);
}

.legal-page__updated {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin: 0;
}

.legal-page__body section {
    margin-bottom: 2rem;
}

.legal-page__body h2 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--kurzola-text);
}

.legal-page__body ul {
    padding-left: 1.25rem;
}

.legal-page__body li {
    margin-bottom: 0.3rem;
}

.legal-page__body a {
    color: var(--kurzola-menu);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.legal-table th,
.legal-table td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.legal-table th {
    background: #f9fafb;
    font-weight: 600;
}

.legal-page__tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-x: auto;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.legal-page__tab {
    flex: 0 0 auto;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
    cursor: pointer;
}

.legal-page__tab:hover {
    color: var(--kurzola-text);
}

.legal-page__tab.active {
    color: var(--kurzola-menu);
    border-bottom-color: var(--kurzola-primary);
}

.legal-page__inline-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--kurzola-menu);
    text-decoration: underline;
    cursor: pointer;
}

/* Quick-link grid to the legal pages (e.g. on the lector settings page) - plain black icons in
   bordered squares, matching the app's monochrome icon convention rather than colored badges. */
.legal-links-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 1.25rem 0.75rem;
}

@media (max-width: 420px) {
    .legal-links-grid {
        grid-template-columns: repeat(2, minmax(90px, 1fr));
    }
}

.legal-links-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    text-align: center;
}

.legal-links-label {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 2.2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--kurzola-text);
}

.legal-links-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--kurzola-text);
    transition: border-color 0.15s;
}

.legal-links-item:hover .legal-links-icon {
    border-color: var(--kurzola-btn);
}

button.legal-links-item {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
}

button.legal-links-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.legal-links-item--danger .legal-links-icon {
    color: #dc2626;
    border-color: #fecaca;
}

.legal-links-item--danger:hover .legal-links-icon {
    border-color: #dc2626;
}

.settings-collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}

.settings-collapse-toggle .bi {
    color: #6b7280;
}

