html, body {
    height: 100vh;
    margin: 0;
}

h1 {
    color: inherit;
}

/* ── Forms ── */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    font-family: sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

.form-label .optional {
    font-weight: 400;
    text-transform: none;
    color: #94a3b8;
    letter-spacing: 0;
}

.form-input {
    font-family: sans-serif;
    font-size: 0.92rem;
    color: #1e293b;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

/* ── Cards ── */
.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-title {
    font-family: sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin: 0 0 1rem;
}

/* ── Buttons ── */
.btn-primary {
    font-family: sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: white;
    background: #3b82f6;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-primary:hover:not(:disabled) { background: #2563eb; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
    font-family: sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 1.1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-secondary:hover { background: #f1f5f9; color: #1e293b; }

.btn-success {
    font-family: sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: white;
    background: #10b981;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-success:hover:not(:disabled) { background: #059669; }
.btn-success:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-new {
    background: #3b82f6;
    color: #ffffff;
    font-family: sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-new:hover { background: #2563eb; }

/* ── Spinner ── */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Navigation ── */
.back-link {
    display: inline-flex;
    align-items: center;
    font-family: sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: color 0.15s;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.back-link:hover { color: #1e293b; }

.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    gap: 1rem;
}

/* ── Badges ── */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: sans-serif;
    color: var(--badge-color);
    background: color-mix(in srgb, var(--badge-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--badge-color) 25%, transparent);
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.price-tag {
    font-family: sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 99px;
    padding: 0.2rem 0.65rem;
    white-space: nowrap;
    width: fit-content;
}

/* ── Post cards ── */
.post-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}

.post-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.post-desc {
    font-family: sans-serif;
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Contact card ── */
.contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    flex-wrap: wrap;
}

.contact-card-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.contact-card-icon { font-size: 1.5rem; }

.contact-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.contact-card-type {
    font-family: sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-card-value {
    font-family: sans-serif;
    font-size: 0.9rem;
    color: #334155;
    word-break: break-word;
}

/* ── Contact type picker ── */
.contact-type-row { display: flex; gap: 0.6rem; }

.contact-type-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.65rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    font-family: sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.15s;
}

.contact-type-btn:hover { border-color: #93c5fd; }
.contact-type-btn.selected { border-color: #3b82f6; background: #eff6ff; color: #1d4ed8; }

.contacts-list { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-item { display: flex; align-items: center; gap: 0.75rem; }
.contact-icon { font-size: 1.2rem; flex-shrink: 0; }
.contact-info { display: flex; flex-direction: column; gap: 0.1rem; }
.contact-type { font-family: sans-serif; font-size: 0.72rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-value { font-family: sans-serif; font-size: 0.9rem; color: #334155; word-break: break-all; }
.contact-grid { display: flex; flex-direction: column; gap: 0.75rem; }

/* ── Author ── */
.author-link {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s;
}

.author-link:hover { background: #f8fafc; }

.author-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.author-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #475569;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: "Georgia", serif;
    display: grid;
    place-items: center;
}

.author-name {
    font-family: sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}

/* ── Avatar ── */
.avatar-placeholder {
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-family: "Georgia", serif;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #f1f5f9;
}

/* ── Misc ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 5rem 1rem;
    color: #94a3b8;
    font-family: sans-serif;
    font-size: 1rem;
}

.empty-icon { font-size: 3rem; opacity: 0.4; }

.pickers-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.4rem;
}