html,
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", "Noto Sans", sans-serif;
    color: #1f2933;
}

a {
    color: #0f6270;
}

a:hover {
    color: #0b4e58;
}

.auth-card {
    max-width: 700px;
    margin: 0 auto;
}

.field-group {
    margin-bottom: 1rem;
}

.field-group.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-field {
    width: 100%;
    border: 1px solid #cdd3d9;
    border-radius: 0.3rem;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
}

.validation-message {
    display: block;
    margin-top: 0.3rem;
    color: #9f1d35;
    font-size: 0.9rem;
}

.auth-link,
.auth-links {
    margin-top: 1rem;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hero-panel {
    max-width: 820px;
}

.requests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.requests-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.request-items {
    margin-top: 1rem;
}

.pagination-row {
    margin-top: 1rem;
}

.request-textarea {
    min-height: 160px;
}

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

.detail-meta {
    margin-bottom: 1rem;
}

.detail-action-note {
    margin-top: 1rem;
}

.preview-image {
    margin-top: 0.75rem;
}

@media (max-width: 760px) {
    .field-group.two-col {
        grid-template-columns: 1fr;
    }

    .requests-filter-grid,
    .tags-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════
   MainLayout — topbar, navigation, footer
   ═══════════════════════════════════════════ */

.ms-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Topbar ── */
.ms-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e6e8f4;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.ms-topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
}

.ms-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.ms-brand img {
    height: 34px;
    width: auto;
}

/* ── Desktop nav ── */
.ms-nav-desktop {
    display: flex;
    align-items: center;
    gap: 0;
}

.ms-nav-desktop a {
    color: #5d648d;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 16px 14px;
    transition: color .15s, background .15s;
    white-space: nowrap;
}

.ms-nav-desktop a:hover {
    color: #4E5BC1;
    background: #f5f6fb;
}

.ms-nav-desktop a.active {
    color: #4E5BC1;
    border-bottom: 2px solid #4E5BC1;
}

.ms-admin-link,
.ms-nav-desktop .ms-admin-link {
    color: #e07c3a !important;
    font-weight: 700 !important;
}

.ms-nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.ms-profile-link,
.ms-nav-desktop .ms-profile-link {
    display: flex !important;
    align-items: center;
    gap: 6px;
    text-transform: none !important;
}

/* ── Hamburger (mobile) ── */
.ms-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #5d648d;
    cursor: pointer;
    padding: 8px;
}

/* ── Mobile menu ── */
.ms-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 1001;
}

.ms-mobile-menu {
    position: fixed;
    top: 54px;
    right: 0;
    width: 260px;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0,0,0,.1);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    max-height: calc(100vh - 54px);
    overflow-y: auto;
}

.ms-mobile-menu a,
.ms-mobile-menua) {
    padding: 12px 20px;
    color: #2f3568;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f1f7;
    transition: background .15s;
}

.ms-mobile-menu a:hover,
.ms-mobile-menua:hover) {
    background: #f5f6fb;
}

.ms-mobile-menua.active) {
    color: #4E5BC1;
    font-weight: 700;
    background: #f0f1ff;
}

/* ── Main content ── */
.ms-main {
    flex: 1;
    margin-top: 54px;
}

/* ── Footer ── */
.ms-footer {
    background: #fafafa;
    border-top: 1px solid #ececec;
    padding: 28px 0 0;
    font-family: Inter, system-ui, sans-serif;
}

.ms-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 26px;
}

.ms-footer-col h4 {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #4e4e4e;
    text-transform: none;
}

.ms-footer-col a {
    display: block;
    color: #6666c9;
    text-decoration: none;
    line-height: 1.9;
    font-size: 0.9rem;
}

.ms-footer-col a:hover {
    text-decoration: underline;
}

.ms-footer-col p {
    color: #5b5b5b;
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0 0 4px;
}

.ms-footer-copy {
    max-width: 1180px;
    margin: 20px auto 0;
    padding: 14px 16px;
    border-top: 1px solid #e8e8e8;
    color: #888;
    font-size: 0.8rem;
    text-align: center;
}

/* ── Hero grid ── */
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 24px;
    padding: 48px 0 36px;
}

.hero-text h1 {
    font-size: clamp(2rem, 4.2vw, 3.3rem);
    line-height: 1.1;
    margin: 0 0 16px;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: #5d6497;
}

.hero-text p {
    margin: 0 0 22px;
    color: #5f6791;
    font-size: 1.15rem;
    max-width: 640px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .ms-nav-desktop {
        display: none;
    }

    .ms-hamburger {
        display: block;
    }

    .ms-footer-inner {
        grid-template-columns: 1fr;
    }

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

    .hero-visual {
        display: none;
    }
}

/* Notification badge */
.ms-notif-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #db2828;
    color: #fff;
    font-size: 0.65em;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 8px;
    text-align: center;
    padding: 0 4px;
}

.ms-bell-link {
    position: relative;
    display: inline-block;
}

.ms-bell-dropdown {
    position: absolute;
    top: 100%;
    right: -10px;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-top: 8px;
}

.ms-bell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

.ms-bell-readall {
    background: none;
    border: none;
    color: #6669d0;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}

.ms-bell-readall:hover { text-decoration: underline; }

.ms-bell-empty {
    padding: 24px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.ms-bell-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
}

.ms-bell-item:hover { background: #f8f9fa; }

.ms-bell-item.unread { background: #f0f7ff; }
.ms-bell-item.unread:hover { background: #e4effa; }

.ms-bell-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 2px;
}

.ms-bell-msg {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

.ms-bell-time {
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 3px;
}

/* Foundation CTA on request cards */
.nadace-cta {
    margin-top: 8px;
}

.nadace-cta a {
    color: #5f5fd3;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}

.nadace-cta a:hover {
    text-decoration: underline;
}

/* Donate link styling */
.ms-donate-link,
.ms-nav-desktop.ms-donate-link) {
    color: #5f5fd3 !important;
    font-weight: 700 !important;
}

/* ═══════════════════════════════════════════
   Bazar — grid, cards, gallery
   ═══════════════════════════════════════════ */

.bazar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
}

.bazar-card {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.15s;
}

.bazar-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.bazar-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bazar-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bazar-card-noimg {
    color: #bbb;
    font-size: 3rem;
}

.bazar-card-body {
    padding: 0.75rem;
}

.bazar-card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bazar-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.bazar-card-time {
    font-size: 0.8rem;
    color: #999;
}

/* Gallery on detail page */
.bazar-gallery {
    margin-bottom: 1rem;
}

.bazar-gallery-main {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bazar-gallery-main img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.bazar-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    overflow-x: auto;
}

.bazar-gallery-thumbs img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: opacity 0.15s, border-color 0.15s;
}

.bazar-gallery-thumbs img.active,
.bazar-gallery-thumbs img:hover {
    opacity: 1;
    border-color: #2185d0;
}

/* Upload preview */
.bazar-upload-preview {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.bazar-upload-thumb {
    position: relative;
    width: 80px;
    height: 80px;
}

.bazar-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.bazar-upload-thumb .button {
    position: absolute;
    top: -6px;
    right: -6px;
    padding: 2px 5px !important;
    min-width: 0 !important;
}

@media (max-width: 900px) {
    .bazar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ===== Toast notifications ===== */
.toast-stack {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    width: calc(100% - 40px);
    animation: toast-slide-in 0.3s ease;
}

.toast-stack .ui.message {
    margin: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    animation: toast-slide-in 0.3s ease;
}

.toast-stack .ui.success.message {
    background: #f0fff0;
    border-left: 4px solid #21ba45;
}

.toast-stack .ui.error.message {
    background: #fff6f6;
    border-left: 4px solid #db2828;
}

@keyframes toast-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
