/* ==========================================================
   nachole.com – stilar för Köp & sälj, Nyheter, Admin och konton
   Bygger på variablerna i styles.css
   ========================================================== */

.btn-sm { padding: 6px 14px; font-size: .9rem; }
.btn-danger { background: #fff; color: #b91c1c; border-color: #fca5a5; }
.btn-danger:hover { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #e07f0a; border-color: #e07f0a; color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.pt-block { width: 100%; }

/* ---------- Rullgardinsmeny i navigeringen (Tjänster) ---------- */
.nav-dd { position: relative; }
.nav-dd-btn {
    display: flex; align-items: center; gap: 6px; padding: 8px 16px; border: 0; background: none;
    font: inherit; font-weight: 500; color: var(--text-dark); border-radius: var(--radius-sm); cursor: pointer;
}
.nav-caret { font-size: .85em; transition: transform .2s; }
.nav-dd-btn:hover, .nav-dd.open > .nav-dd-btn,
.nav-dd:has(a.active) > .nav-dd-btn { background: var(--primary-light); color: var(--primary); }
.nav-dd.open .nav-caret { transform: rotate(180deg); }
.nav ul.nav-dd-menu {
    display: none; flex-direction: column; gap: 2px; position: absolute; top: calc(100% + 6px); left: 0;
    min-width: 200px; padding: 6px; background: var(--bg-white); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); border: 1px solid var(--border); z-index: 1100; list-style: none;
}
.nav-dd.open > ul.nav-dd-menu { display: flex; }
.nav-dd-menu a { white-space: nowrap; }
@media (hover: hover) and (min-width: 769px) {
    .nav-dd:hover > ul.nav-dd-menu { display: flex; }
    /* osynlig brygga så att menyn inte stängs när musen går ner till den */
    .nav-dd:hover::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
}
@media (max-width: 768px) {
    .nav-dd-btn { width: 100%; justify-content: space-between; padding: 12px 20px; }
    .nav ul.nav-dd-menu {
        position: static; box-shadow: none; border: 0; border-left: 2px solid var(--primary-light);
        border-radius: 0; margin: 2px 0 4px 20px; padding: 0 0 0 6px; min-width: 0;
    }
}

/* ---------- Sidlayout ---------- */
.page-main { padding: 104px 0 60px; min-height: 70vh; }
@media (max-width: 768px) { .page-main { padding-top: 96px; } }

.pt-page-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.pt-page-head h1 { font-size: 2rem; color: var(--text-dark); line-height: 1.2; }
.pt-page-head p { color: var(--text-muted); }
.pt-muted { color: var(--text-muted); }
.pt-hint { color: var(--text-muted); font-size: .88rem; margin: -6px 0 10px; }
.pt-hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.pt-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pt-back { display: inline-block; margin-bottom: 16px; font-weight: 500; }

.pt-card {
    background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    border: 1px solid var(--border); padding: 24px;
}
.pt-empty {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
    background: var(--bg-white); border-radius: var(--radius); border: 1px dashed var(--border);
}
.pt-empty .pt-empty-icon { font-size: 3rem; display: block; margin-bottom: 8px; }
.pt-loading { text-align: center; padding: 40px; color: var(--text-muted); }

/* ---------- Badges ---------- */
.pt-badge {
    display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .8rem; font-weight: 600;
    background: var(--primary-light); color: var(--primary-dark); white-space: nowrap;
}
.pt-st-pending { background: #fef3c7; color: #92400e; }
.pt-st-approved { background: #dcfce7; color: #166534; }
.pt-st-rejected { background: #fee2e2; color: #991b1b; }
.pt-st-sold { background: #e5e7eb; color: #374151; }
.pt-st-draft { background: #f1f5f9; color: #475569; }
.pt-reason { background: #fef2f2; color: #991b1b; border-radius: var(--radius-sm); padding: 8px 12px; font-size: .9rem; margin-top: 8px; }
.pt-notice { background: var(--accent-light); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; }

/* ---------- Formulär ---------- */
.pt-form .form-group input[type=checkbox], .pt-form .form-group input[type=radio] { width: auto; }
.pt-check { display: flex; align-items: center; gap: 8px; margin: 8px 0 16px; cursor: pointer; }
.pt-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.pt-radio-row { display: flex; gap: 12px; flex-wrap: wrap; }
.pt-radio-row label {
    display: flex; align-items: center; gap: 6px; border: 2px solid var(--border); border-radius: var(--radius-sm);
    padding: 8px 16px; cursor: pointer; font-weight: 500;
}
.pt-radio-row input { accent-color: var(--primary); }
.pt-radio-row label:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.pt-form-error { background: #fef2f2; color: #991b1b; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; }
.pt-modal-title { color: var(--primary); margin-bottom: 4px; }
.pt-switch { text-align: center; margin-top: 14px; font-size: .95rem; }
.pt-counter { float: right; font-weight: 400; color: var(--text-muted); font-size: .85rem; }

/* Bilduppladdning */
.pt-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 10px; }
.pt-img-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-light); border: 1px solid var(--border); }
.pt-img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-img-item button {
    position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0;
    background: rgba(0,0,0,.65); color: #fff; font-size: 1rem; cursor: pointer; line-height: 1;
}
.pt-img-add {
    aspect-ratio: 1; border: 2px dashed var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: var(--text-muted); cursor: pointer; font-size: .85rem; text-align: center; padding: 6px;
}
.pt-img-add:hover { border-color: var(--primary); color: var(--primary); }
.pt-img-add span { font-size: 1.8rem; line-height: 1; }

/* ---------- Användarmeny i headern ---------- */
.user-pill {
    display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--text-dark);
    padding: 6px 12px 6px 8px; border-radius: 20px; cursor: pointer; font-family: inherit; font-size: .9rem; font-weight: 500;
    transition: background .15s;
}
.user-pill:hover, .user-pill:focus-visible { background: var(--primary-light); outline: none; }
.pill-avatar { position: relative; }
.pt-dot {
    position: absolute; top: -6px; right: -8px; background: var(--accent); color: #fff; border-radius: 10px;
    font-size: .65rem; padding: 0 5px; line-height: 16px; font-weight: 700;
}
.pt-user-menu {
    position: absolute; right: 0; top: calc(100% + 8px); background: var(--bg-white); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); border: 1px solid var(--border); min-width: 220px; padding: 6px; display: none; z-index: 1100;
}
.pt-user-menu.open { display: block; }
.pt-user-menu a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-dark); }
.pt-user-menu a:hover { background: var(--primary-light); color: var(--primary-dark); }
.pt-menu-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.pt-menu-head strong { display: block; }
.pt-menu-head span { font-size: .8rem; color: var(--text-muted); }
.pt-count { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; font-size: .75rem; font-weight: 700; }

/* ---------- Filter och kategorier ---------- */
.pt-filters {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; gap: 10px; align-items: end;
    background: var(--bg-white); padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 16px;
}
.pt-filters .form-group { margin: 0; }
.pt-filters label { font-size: .82rem; color: var(--text-muted); margin-bottom: 4px; }
.pt-filters input, .pt-filters select { padding: 9px 12px !important; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pt-chips-sub { margin-top: -8px; padding: 10px 12px; background: var(--primary-light); border-radius: var(--radius); gap: 6px; }
.pt-chips-sub .pt-chip { font-size: .85rem; padding: 5px 12px; }
.pt-chip {
    flex: 0 0 auto; border: 1px solid var(--border); background: var(--bg-white); border-radius: 20px; padding: 6px 14px;
    cursor: pointer; font-family: inherit; font-size: .92rem; color: var(--text-dark); transition: var(--transition);
}
.pt-chip:hover { border-color: var(--primary); }
.pt-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pt-result-info { color: var(--text-muted); margin-bottom: 12px; font-size: .95rem; }

/* ---------- Annonskort ---------- */
.pt-ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.pt-ad-card {
    background: var(--bg-white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
    color: var(--text-dark); transition: var(--transition); display: flex; flex-direction: column;
}
.pt-ad-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); color: var(--text-dark); }
.pt-ad-thumb {
    aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    display: flex; align-items: center; justify-content: center; font-size: 3rem; overflow: hidden;
}
.pt-ad-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pt-ad-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pt-ad-price { font-size: 1.15rem; font-weight: 700; color: var(--primary-dark); }
.pt-ad-title { font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-ad-meta { font-size: .82rem; color: var(--text-muted); margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; gap: 8px; }

/* Annonssida */
.pt-ad-detail {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px 24px; align-items: start;
    grid-template-areas: "gal side" "desc side"; grid-template-rows: auto 1fr;
}
.pt-ad-gal { grid-area: gal; }
.pt-ad-desc { grid-area: desc; }
.pt-ad-detail .pt-side { grid-area: side; }
.pt-gallery-main {
    aspect-ratio: 4 / 3; background: var(--bg-light); border-radius: var(--radius); overflow: hidden;
    display: flex; align-items: center; justify-content: center; font-size: 5rem; border: 1px solid var(--border);
}
.pt-gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pt-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pt-gallery-thumbs button { flex: 0 0 72px; height: 72px; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; padding: 0; cursor: pointer; background: none; }
.pt-gallery-thumbs button.active { border-color: var(--primary); }
.pt-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pt-ad-info h1 { font-size: 1.6rem; line-height: 1.3; margin: 6px 0 4px; }
.pt-ad-info .pt-ad-price { font-size: 1.8rem; }
.pt-specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0; font-size: .95rem; }
.pt-specs dt { color: var(--text-muted); }
.pt-desc { white-space: normal; line-height: 1.8; }
.pt-desc p { margin-bottom: 10px; }
.pt-seller { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pt-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: var(--primary-light); color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex: 0 0 44px;
}
.pt-contact textarea { min-height: 90px; }
.pt-side { display: flex; flex-direction: column; gap: 16px; }

/* Mina annonser / listrader */
.pt-rows { display: flex; flex-direction: column; gap: 12px; }
.pt-row {
    display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center;
    background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px;
}
.pt-row-img { width: 96px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-light); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.pt-row-img img { width: 100%; height: 100%; object-fit: cover; }
.pt-row h3 { font-size: 1.05rem; margin-bottom: 2px; }
.pt-row > .pt-actions { justify-content: flex-end; }

/* ---------- Meddelanden ---------- */
.pt-inbox { display: grid; grid-template-columns: 320px 1fr; gap: 0; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-height: 520px; }
.pt-threads { border-right: 1px solid var(--border); overflow-y: auto; max-height: 640px; }
.pt-thread-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-dark); align-items: center; }
.pt-thread-item:hover, .pt-thread-item.active { background: var(--primary-light); color: var(--text-dark); }
.pt-thread-item img, .pt-thread-item .pt-ti-ph { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-light); flex: 0 0 48px; display: flex; align-items: center; justify-content: center; }
.pt-ti-text { flex: 1; min-width: 0; }
.pt-ti-text strong, .pt-ti-text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-ti-text span { font-size: .85rem; color: var(--text-muted); }
.pt-ti-text strong.unread::after { content: ' ●'; color: var(--accent); }
.pt-chat { display: flex; flex-direction: column; min-height: 520px; max-height: 640px; }
.pt-chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pt-chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-light); }
.pt-msg { max-width: 75%; padding: 8px 12px; border-radius: 14px; background: var(--bg-white); border: 1px solid var(--border); align-self: flex-start; word-wrap: break-word; }
.pt-msg.mine { align-self: flex-end; background: var(--primary); color: #fff; border-color: var(--primary); }
.pt-msg time { display: block; font-size: .72rem; opacity: .7; margin-top: 2px; }
.pt-chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.pt-chat-form textarea { flex: 1; resize: none; height: 46px; padding: 10px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 1rem; }
.pt-chat-form textarea:focus { outline: none; border-color: var(--primary); }
.pt-chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-muted); padding: 30px; text-align: center; }

/* ---------- Nyheter ---------- */
.pt-tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.pt-tab {
    border: 0; background: none; padding: 10px 16px; font-family: inherit; font-size: 1rem; cursor: pointer; color: var(--text-muted);
    border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; font-weight: 500;
}
.pt-tab:hover { color: var(--primary); }
.pt-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.pt-tab .pt-count { margin-left: 4px; }
.pt-news-featured {
    display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; background: var(--bg-white); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border); margin-bottom: 24px; color: var(--text-dark);
}
.pt-news-featured:hover { box-shadow: var(--shadow-lg); color: var(--text-dark); }
.pt-news-featured .pt-nf-img { min-height: 280px; background: linear-gradient(135deg, var(--primary-light), var(--accent-light)) center / cover; display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.pt-news-featured .pt-nf-text { padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.pt-news-featured h2 { font-size: 1.7rem; line-height: 1.3; }
.pt-news-link { color: inherit; display: block; }
.pt-news-link:hover { color: inherit; }
.pt-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.pt-news-grid .news-card { background: var(--bg-white); border: 1px solid var(--border); }
.pt-news-grid .news-image { background-size: cover; background-position: center; }
.pt-article { max-width: 780px; margin: 0 auto; }
.pt-article h1 { font-size: 2.1rem; line-height: 1.3; margin: 10px 0; }
.pt-article-meta { color: var(--text-muted); font-size: .95rem; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.pt-article-img { width: 100%; border-radius: var(--radius); margin-bottom: 20px; max-height: 480px; object-fit: cover; }
.pt-article-summary { font-size: 1.15rem; font-weight: 500; margin-bottom: 18px; color: #334155; }
.pt-article-body p { margin-bottom: 16px; font-size: 1.08rem; line-height: 1.9; }
.pt-editor textarea[name=body] { min-height: 340px; line-height: 1.8; }

/* ---------- Admin ---------- */
.pt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.pt-stat { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.pt-stat b { display: block; font-size: 1.8rem; color: var(--primary-dark); line-height: 1.2; }
.pt-stat span { color: var(--text-muted); font-size: .9rem; }
.pt-stat.warn b { color: var(--accent); }
.pt-review { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.pt-review-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pt-review h3 { font-size: 1.15rem; }
.pt-review-imgs { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0; }
.pt-review-imgs a { flex: 0 0 120px; height: 90px; border-radius: var(--radius-sm); overflow: hidden; }
.pt-review-imgs img { width: 100%; height: 100%; object-fit: cover; }
.pt-review-body { background: var(--bg-light); border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0; max-height: 260px; overflow-y: auto; }
.pt-review-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.pt-review-foot input { flex: 1; min-width: 200px; padding: 9px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem; }
.pt-small { font-size: .88rem; color: var(--text-muted); }
.pt-table-wrap { overflow-x: auto; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); }
.pt-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.pt-table th, .pt-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.pt-table th { background: var(--bg-light); font-weight: 600; white-space: nowrap; }
.pt-table select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; }
.pt-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pt-toolbar input, .pt-toolbar select { padding: 9px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem; }
.pt-toolbar input { flex: 1; min-width: 200px; }

/* ---------- Sidnumrering ---------- */
.pt-pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 28px; color: var(--text-muted); }

/* ---------- Undersidor: sidfoten hamnar alltid längst ner ---------- */
body.pt-page { display: flex; flex-direction: column; min-height: 100vh; }
body.pt-page > .page-main { flex: 1 0 auto; width: 100%; }
body.pt-page > .footer { flex-shrink: 0; }

/* ---------- Mobil ---------- */
@media (max-width: 992px) {
    .pt-filters { grid-template-columns: 1fr 1fr 1fr; }
    .pt-filters .pt-f-q { grid-column: 1 / -1; }
    .pt-ad-detail { grid-template-columns: 1fr; grid-template-areas: "gal" "side" "desc"; grid-template-rows: auto; }
    .pt-news-featured { grid-template-columns: 1fr; }
    .pt-news-featured .pt-nf-img { min-height: 200px; }
}
@media (max-width: 768px) {
    .pt-page-head h1 { font-size: 1.6rem; }
    .pt-filters { grid-template-columns: 1fr 1fr; }
    .pt-inbox { grid-template-columns: 1fr; }
    .pt-inbox.has-thread .pt-threads { display: none; }
    .pt-inbox:not(.has-thread) .pt-chat { display: none; }
    .pt-threads { border-right: 0; max-height: none; }
    .pt-row { grid-template-columns: 72px 1fr; }
    .pt-row-img { width: 72px; height: 56px; }
    .pt-row > .pt-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .pt-article h1 { font-size: 1.6rem; }
    .pt-ad-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pt-ad-body { padding: 8px 10px 10px; }
    .pt-ad-price { font-size: 1rem; }
    .modal-body { padding: 28px 20px; }
    .header-auth { margin-left: auto; }
}
@media (max-width: 380px) {
    .pt-ad-grid { grid-template-columns: 1fr; }
}

/* ---------- Konton: robotskydd, e-post, profilbild ---------- */
/* Fält som bara robotar ser och fyller i */
.pt-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.pt-captcha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-captcha img { border-radius: var(--radius-sm); border: 1px solid var(--border); background: #f0f9ff; width: 180px; height: 60px; }
.pt-captcha-new {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-white);
    font-size: 1.2rem; cursor: pointer; color: var(--primary);
}
.pt-captcha-new:hover { background: var(--primary-light); }
.pt-captcha input { width: 90px !important; font-size: 1.2rem; text-align: center; }
.pt-check span { line-height: 1.4; }
.pt-check { align-items: flex-start; }
.pt-check input { flex-shrink: 0; margin-top: 2px; }

.pt-notice { background: #ecfdf5; color: #065f46; padding: 14px 16px; border-radius: var(--radius-sm); margin: 10px 0; line-height: 1.5; }
.pt-mail-done { text-align: center; }
.pt-mail-done p { margin: 10px 0; line-height: 1.6; }
.pt-mail-done .btn { margin-top: 10px; }
.pt-mail-icon { font-size: 3.2rem; line-height: 1; margin-bottom: 8px; }

/* Profilbild i passformat 35 x 45 */
.pt-avatar-edit { display: flex; gap: 18px; align-items: center; margin: 18px 0 4px; }
.pt-passport {
    width: 105px; height: 135px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--primary-light);
    display: flex; align-items: center; justify-content: center; font-size: 3rem; border: 1px solid var(--border);
}
.pt-passport img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-avatar-edit label.btn { cursor: pointer; }

.pt-crop {
    position: relative; width: 245px; height: 315px; margin: 0 auto 14px; overflow: hidden; border-radius: 8px;
    background: #111; cursor: grab; touch-action: none; user-select: none;
}
.pt-crop:active { cursor: grabbing; }
.pt-crop > img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; pointer-events: none; }
/* Hjälplinje: oval där ansiktet ska vara */
.pt-crop-guide {
    position: absolute; left: 22%; right: 22%; top: 12%; height: 58%; border: 2px dashed rgba(255,255,255,.75);
    border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0,0,0,.08);
}
.pt-crop-zoom { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 18px; font-weight: 500; }
.pt-crop-zoom input { width: 180px; accent-color: var(--primary); }

.pt-pill-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: center 25%; display: block; }
.pt-avatar-img { object-fit: cover; object-position: center 25%; padding: 0; }
.pt-chat-who { display: flex; align-items: center; gap: 10px; }
.pt-avatar-sm { width: 38px; height: 38px; flex: 0 0 38px; font-size: 1rem; }

/* ---------- Villkorssidan ---------- */
html[lang="en"] [data-lang-block="bn"], html:not([lang="en"]) [data-lang-block="en"] { display: none; }
.pt-policy-wrap { max-width: 860px; }
.pt-policy { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 40px; line-height: 1.75; }
.pt-policy-head h1 { font-size: 1.9rem; line-height: 1.25; margin-bottom: 4px; color: var(--text-dark); }
.pt-policy-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.pt-policy-toc a { background: var(--primary-light); color: var(--primary-dark); padding: 6px 14px; border-radius: 20px; font-weight: 500; font-size: .92rem; }
.pt-policy-toc a:hover { background: var(--primary); color: #fff; }
.pt-policy-lead { font-size: 1.05rem; margin: 22px 0 8px; padding: 16px 18px; background: #f8fafc; border-left: 4px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.pt-policy section { padding-top: 18px; scroll-margin-top: 96px; }
.pt-policy h2 { font-size: 1.4rem; color: var(--primary-dark); margin: 26px 0 6px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.pt-policy h3 { font-size: 1.08rem; margin: 20px 0 6px; color: var(--text-dark); }
.pt-policy ul { padding-left: 22px; margin: 6px 0; }
.pt-policy li { margin: 4px 0; }
.pt-policy p { margin: 6px 0; }
.pt-policy-cols { columns: 2; column-gap: 32px; }
.pt-policy-cols li { break-inside: avoid; }
@media (max-width: 768px) {
    .pt-policy { padding: 22px 18px; }
    .pt-policy-head h1 { font-size: 1.5rem; }
    .pt-policy-cols { columns: 1; }
}

/* ---------- Fordon ---------- */
.pt-vehicle { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 16px 4px; margin-bottom: 16px; }
.pt-vehicle [hidden] { display: none !important; }
.pt-brta { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.pt-brta-yes { background: #dcfce7; color: #166534; }
.pt-brta-no { background: #fef3c7; color: #92400e; }
.pt-ad-brta { margin: 4px 0 2px; }
.pt-ad-brta .pt-brta { font-size: .74rem; padding: 2px 8px; }

/* ---------- Evenemang på startsidan ---------- */
.ev-add-wrap { margin-top: 14px; }
.ev-empty { padding: 28px 20px; text-align: center; color: var(--text-muted); background: var(--bg-light); border-radius: var(--radius); }
.events .event-card { cursor: pointer; }
.events .event-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.event-info { min-width: 0; }
.event-info h4 { overflow-wrap: anywhere; }
.calendar-day.past { color: var(--text-muted); }
.calendar-day.has-event { font-weight: 600; }
.calendar-day.today.has-event::after { background: #fff; }
.ev-detail-date { color: var(--primary-dark); font-weight: 600; margin-bottom: 6px; }
.ev-detail-loc { color: var(--text-muted); margin: 6px 0 10px; }
.ev-detail-desc { line-height: 1.7; }
.ev-day-list { margin-top: 14px; }
.ev-day-list .event-card { cursor: pointer; }
.pt-switch-lbl input { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }

/* ---------- Forum ---------- */
.forum-col { min-width: 0; }
.forum-more { margin-top: 18px; text-align: center; }
.author-avatar { flex-shrink: 0; overflow: hidden; color: var(--primary); font-weight: 600; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; }
.post-category-tag { white-space: nowrap; }
.post-title { font-size: 1.08rem; margin: 2px 0 6px; line-height: 1.35; overflow-wrap: anywhere; }
.post-title a { color: var(--text-dark); }
.post-title a:hover { color: var(--primary); }
.post-content { overflow-wrap: anywhere; }
button.post-action { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; }
.post-action.liked { color: var(--primary); font-weight: 600; }
a.post-action { color: var(--text-muted); }
.post-action.fr-del:hover { color: #dc2626; }

.fr-form textarea { resize: vertical; }
.fr-rules { margin: -4px 0 12px; }
.fr-login { text-align: center; padding: 8px 4px; }
.fr-login-icon { font-size: 2.6rem; line-height: 1; margin-bottom: 8px; }
.fr-login h3 { margin-bottom: 6px; }
.fr-login p { color: var(--text-muted); margin-bottom: 16px; }

/* Forumsidan: sektioner per ämne */
.fr-section { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px; }
.fr-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.fr-section-head h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.fr-count { background: var(--primary-light); color: var(--primary-dark); font-size: .8rem; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.fr-rows { display: flex; flex-direction: column; }
.fr-row { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-top: 1px solid var(--border); color: var(--text-dark); border-radius: var(--radius-sm); }
.fr-row:first-child { border-top: 0; }
.fr-row:hover { background: var(--bg-light); }
.fr-row-av { width: 38px; height: 38px; font-size: 1rem; }
.fr-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-row-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-row-stats { display: flex; gap: 14px; color: var(--text-muted); font-size: .88rem; white-space: nowrap; }
.fr-empty-sec { color: var(--text-muted); padding: 8px 2px; }

/* En diskussion */
.fr-topic { margin-bottom: 26px; }
.fr-topic-title { font-size: 1.6rem; line-height: 1.3; margin: 8px 0 12px; overflow-wrap: anywhere; }
.fr-body { line-height: 1.75; overflow-wrap: anywhere; }
.fr-body p { margin: 0 0 10px; }
.fr-topic .post-actions { margin-top: 8px; }
.fr-h2 { font-size: 1.2rem; margin: 0 0 12px; }
.fr-replies { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.fr-reply { display: flex; gap: 12px; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.fr-reply .author-avatar { width: 38px; height: 38px; font-size: 1rem; }
.fr-reply-main { flex: 1; min-width: 0; }
.fr-reply-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.fr-del-sm { margin-left: auto; background: none; border: 0; cursor: pointer; opacity: .55; font-size: .95rem; }
.fr-del-sm:hover { opacity: 1; }
.fr-reply-box textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); font: inherit; resize: vertical; }
.fr-reply-box textarea:focus { outline: none; border-color: var(--primary); }
.fr-reply-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.fr-new { max-width: 760px; margin: 0 auto; }
@media (max-width: 600px) {
    .post-header { flex-wrap: wrap; gap: 8px; }
    .fr-row-stats { flex-direction: column; gap: 2px; align-items: flex-end; }
    .fr-topic-title { font-size: 1.3rem; }
    .fr-section { padding: 14px 12px; }
}

/* Adminpanel: nödnummer */
.adm-emg-row input { font-size: 1.1rem; letter-spacing: .02em; max-width: 280px; }
.pt-invalid { border-color: #dc2626 !important; }
.emergency-card[hidden] { display: none !important; }
/* Nödkort: tätare mellan rubrik och nummer */
.emergency-info strong { line-height: 1.3; margin-bottom: 2px; }
.emergency-info a { display: block; line-height: 1.2; }

/* ---------- Hyrbil (গাড়ি ভাড়া) ---------- */
.hb-filters { grid-template-columns: 1fr auto; }
.pt-ad-price small { font-size: .75em; font-weight: 500; color: var(--text-muted); margin-left: 2px; }
.hb-ask { font-size: .9rem; font-weight: 600; color: var(--accent); }
.hb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.hb-tags span { background: var(--bg-light); border-radius: 20px; padding: 2px 10px; font-size: .78rem; color: var(--text-muted); }
.hb-owner { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--text-dark); margin-top: 6px; min-width: 0; }
.hb-owner > span:first-of-type { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-av-sm, .hb-av-md { border-radius: 50%; object-fit: cover; object-position: center 25%; flex-shrink: 0; }
.hb-av-sm { width: 24px; height: 24px; font-size: .75rem; }
.hb-av-md { width: 52px; height: 52px; font-size: 1.3rem; }
.hb-av-letter { background: var(--primary-light); color: var(--primary); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.hb-price-big { font-size: 1.6rem; margin-bottom: 8px; }
.hb-contact { margin-top: 18px; }
.hb-contact h3 { margin-bottom: 12px; }
.hb-contact-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.hb-passport { width: 84px; height: 108px; border-radius: 8px; object-fit: cover; object-position: center 25%; flex-shrink: 0; border: 1px solid var(--border); font-size: 2.2rem; }
.hb-contact-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.hb-contact-info strong { font-size: 1.1rem; }
.hb-phone { font-size: 1.25rem; font-weight: 700; color: var(--primary-dark); letter-spacing: .02em; }
.hb-contact-preview { background: var(--bg-light); border-radius: var(--radius); padding: 14px 16px 2px; margin-bottom: 18px; }
.hb-contact-preview .hb-contact-row { margin: 8px 0 12px; }
.hb-warn { color: #b45309; font-weight: 600; font-size: .9rem; }
@media (max-width: 768px) { .hb-filters { grid-template-columns: 1fr; } }
.hb-title { font-size: 1.5rem; line-height: 1.3; margin: 10px 0 6px; overflow-wrap: anywhere; }

/* ---------- Bönetider (startsidan) ---------- */
.prayer { background: linear-gradient(180deg, #ecfeff 0%, var(--bg-white) 100%); padding: 56px 0 40px; }
.prayer .section-header { margin-bottom: 18px; }
.pr-box { max-width: 1000px; margin: 0 auto; }
.pr-date { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; color: var(--text-muted); font-weight: 500; margin-bottom: 18px; }
.pr-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.pr-item {
    position: relative; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 8px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
    box-shadow: var(--shadow);
}
.pr-icon { font-size: 1.5rem; line-height: 1; }
.pr-name { font-weight: 600; color: var(--text-dark); line-height: 1.3; }
.pr-time { font-size: 1.35rem; font-weight: 700; color: var(--primary-dark); line-height: 1.2; letter-spacing: .01em; }
.pr-sun { background: var(--bg-light); box-shadow: none; }
.pr-sun .pr-time { color: var(--text-muted); font-size: 1.15rem; }
.pr-next { border: 2px solid var(--primary); background: var(--primary-light); transform: translateY(-2px); }
.pr-badge { font-size: .74rem; font-weight: 600; color: #fff; background: var(--primary); border-radius: 20px; padding: 2px 9px; margin-top: 4px; white-space: nowrap; }
.pr-source { text-align: center; font-size: .78rem; color: var(--text-muted); margin-top: 14px; }
.pr-error, .pr-loading { text-align: center; color: var(--text-muted); padding: 16px; }
@media (max-width: 900px) { .pr-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .pr-grid { gap: 8px; } .pr-time { font-size: 1.15rem; } .pr-badge { white-space: normal; } }
.pr-more { text-align: center; margin-top: 8px; }
.pr-more a { font-weight: 600; }
.pr-page .pr-box { max-width: 1100px; }
.pr-page .pr-item { padding: 22px 10px 18px; }
.pr-page .pr-time { font-size: 1.6rem; }
.pr-note { text-align: center; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin: 20px auto 0; max-width: 720px; color: var(--text-dark); }
