/* Mehfil — shared styles for Thymeleaf app pages (matches marketing tone) */
:root {
    --mf-paper: #f7f4ef;
    --mf-white: #fdfcfa;
    --mf-ink: #141118;
    --mf-ink-soft: #5c5852;
    --mf-line: rgba(20, 17, 24, 0.1);
    --mf-gold: #b8954a;
    --mf-gold-dark: #8b6914;
    --mf-void: #12101a;
    --mf-radius: 14px;
    --mf-radius-sm: 10px;
    --mf-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --mf-font: "DM Sans", system-ui, sans-serif;
    --mf-display: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

body.mf-body {
    margin: 0;
    font-family: var(--mf-font);
    font-optical-sizing: auto;
    background: var(--mf-paper);
    color: var(--mf-ink);
    line-height: 1.55;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

.mf-bg {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(184, 149, 74, 0.12), transparent 55%),
        var(--mf-paper);
}

/* Top navigation */
.mf-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem clamp(1rem, 4vw, 2.5rem);
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
    background: rgba(247, 244, 239, 0.92);
    border-bottom: 1px solid var(--mf-line);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.mf-nav__brand {
    font-family: var(--mf-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--mf-ink);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.mf-nav__brand:hover {
    color: var(--mf-gold-dark);
}

.mf-nav__tag {
    display: inline-block;
    margin-left: 0.5rem;
    font-family: var(--mf-font);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mf-gold-dark);
    vertical-align: middle;
}

.mf-nav__links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.mf-nav__links a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mf-ink-soft);
    text-decoration: none;
    letter-spacing: 0.04em;
}

.mf-nav__links a:hover {
    color: var(--mf-ink);
}

/* Buttons */
.mf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-family: var(--mf-font);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s var(--mf-ease), border-color 0.2s, color 0.2s, transform 0.15s;
}

.mf-btn:active {
    transform: scale(0.98);
}

.mf-btn--primary {
    background: var(--mf-void);
    color: var(--mf-paper);
    border-color: var(--mf-void);
}

.mf-btn--primary:hover {
    background: #1f1c28;
}

.mf-btn--gold {
    background: linear-gradient(135deg, #d4af4a, var(--mf-gold));
    color: var(--mf-void);
    border: none;
}

.mf-btn--gold:hover {
    box-shadow: 0 6px 24px rgba(184, 149, 74, 0.35);
}

.mf-btn--outline {
    background: transparent;
    color: var(--mf-ink);
    border-color: var(--mf-line);
}

.mf-btn--outline:hover {
    border-color: rgba(184, 149, 74, 0.45);
    background: rgba(184, 149, 74, 0.06);
}

.mf-btn--block {
    width: 100%;
    padding: 0.9rem 1.25rem;
}

/* Layout */
.mf-main {
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem);
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
}

.mf-main--narrow {
    max-width: 440px;
}

.mf-main--wide {
    max-width: 640px;
}

/* Card */
.mf-card {
    background: var(--mf-white);
    border: 1px solid var(--mf-line);
    border-radius: var(--mf-radius);
    padding: clamp(1.5rem, 4vw, 2.25rem);
    box-shadow: 0 4px 40px rgba(20, 17, 24, 0.04);
}

.mf-card__title {
    font-family: var(--mf-display);
    font-size: clamp(1.65rem, 4vw, 2rem);
    font-weight: 400;
    text-align: center;
    margin: 0 0 0.35rem;
    color: var(--mf-ink);
}

.mf-card__subtitle {
    text-align: center;
    font-size: 0.875rem;
    color: var(--mf-ink-soft);
    margin: 0 0 1.75rem;
}

/* Forms */
.mf-field {
    margin-bottom: 1.15rem;
}

.mf-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mf-ink-soft);
    margin-bottom: 0.4rem;
}

.mf-input,
.mf-select,
.mf-textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    font-family: var(--mf-font);
    font-size: 0.9375rem;
    color: var(--mf-ink);
    background: var(--mf-paper);
    border: 1px solid var(--mf-line);
    border-radius: var(--mf-radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mf-input:focus,
.mf-select:focus,
.mf-textarea:focus {
    outline: none;
    border-color: rgba(184, 149, 74, 0.55);
    box-shadow: 0 0 0 3px rgba(184, 149, 74, 0.12);
}

.mf-textarea {
    min-height: 100px;
    resize: vertical;
}

.mf-error {
    padding: 0.75rem 1rem;
    border-radius: var(--mf-radius-sm);
    background: rgba(180, 40, 40, 0.08);
    border: 1px solid rgba(180, 40, 40, 0.25);
    color: #8b2525;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.mf-muted {
    text-align: center;
    font-size: 0.875rem;
    color: var(--mf-ink-soft);
    margin-top: 1.5rem;
}

.mf-muted a {
    color: var(--mf-gold-dark);
    font-weight: 600;
    text-decoration: none;
}

.mf-muted a:hover {
    text-decoration: underline;
}

.mf-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--mf-ink-soft);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mf-divider::before,
.mf-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--mf-line);
}

.mf-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--mf-white);
    border: 1px solid var(--mf-line);
    border-radius: var(--mf-radius-sm);
    font-family: var(--mf-font);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mf-ink);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.mf-google:hover {
    border-color: rgba(20, 17, 24, 0.2);
    background: var(--mf-paper);
}

/* Search */
.mf-search-intro {
    text-align: center;
    font-size: 0.9rem;
    color: var(--mf-ink-soft);
    max-width: 36rem;
    margin: 0 auto 1.25rem;
    line-height: 1.5;
}

.mf-search-intro strong {
    color: var(--mf-gold-dark);
    font-weight: 600;
}

.mf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.mf-filters .mf-input,
.mf-filters .mf-select {
    flex: 1 1 160px;
    min-width: 0;
}

.mf-filters .mf-btn {
    flex: 0 0 auto;
    align-self: stretch;
}

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

.mf-artist-card {
    background: var(--mf-white);
    border: 1px solid var(--mf-line);
    border-radius: var(--mf-radius);
    padding: 1.35rem 1.5rem;
    transition: border-color 0.2s, box-shadow 0.25s var(--mf-ease);
}

@media (hover: hover) {
    .mf-artist-card:hover {
        border-color: rgba(184, 149, 74, 0.35);
        box-shadow: 0 12px 40px rgba(20, 17, 24, 0.06);
    }
}

.mf-artist-card__name {
    font-family: var(--mf-display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--mf-ink);
    margin: 0 0 0.35rem;
}

.mf-artist-card__meta {
    font-size: 0.8125rem;
    color: var(--mf-ink-soft);
    margin-bottom: 0.65rem;
}

.mf-artist-card__bio {
    font-size: 0.875rem;
    color: var(--mf-ink-soft);
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

.mf-artist-card__price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mf-gold-dark);
    margin-bottom: 1rem;
}

.mf-artist-card .mf-btn {
    width: 100%;
}

.mf-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--mf-ink-soft);
    background: var(--mf-white);
    border: 1px dashed var(--mf-line);
    border-radius: var(--mf-radius);
}

/* Profile */
.mf-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mf-ink-soft);
    text-decoration: none;
    margin-bottom: 1.25rem;
}

.mf-back:hover {
    color: var(--mf-gold-dark);
}

.mf-profile__name {
    font-family: var(--mf-display);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 400;
    margin: 0 0 0.35rem;
    line-height: 1.1;
}

.mf-profile__meta {
    font-size: 0.9375rem;
    color: var(--mf-ink-soft);
    margin-bottom: 1.25rem;
}

.mf-profile__bio {
    font-size: 1rem;
    color: var(--mf-ink);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.mf-dl {
    border-top: 1px solid var(--mf-line);
}

.mf-dl__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--mf-line);
    font-size: 0.9rem;
}

.mf-dl__label {
    color: var(--mf-ink-soft);
}

.mf-dl__value {
    font-weight: 600;
    color: var(--mf-ink);
    text-align: right;
}

.mf-profile__price {
    font-family: var(--mf-display);
    font-size: 1.75rem;
    color: var(--mf-gold-dark);
    margin: 1.5rem 0 1rem;
}

.mf-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.mf-actions-stack .mf-btn {
    width: 100%;
}

/* Centered auth layout */
.mf-auth-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    padding-top: max(1.5rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
}

.mf-auth-wrap .mf-card {
    width: 100%;
    max-width: 420px;
}
