/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --mg-bg:       #0f0f0f;
    --mg-surface:  #1a1a1a;
    --mg-surface2: #242424;
    --mg-border:   #2e2e2e;
    --mg-text:     #e8e6e0;
    --mg-muted:    #888;
    --mg-accent:   #e05a1f;        /* laranja queimado — mota, estrada, fogo */
    --mg-accent2:  #c44a10;
    --mg-radius:   12px;
    --mg-radius-sm:6px;
    --mg-font:     'Inter', system-ui, sans-serif;
    --mg-max:      680px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--mg-font);
    background: var(--mg-bg);
    color: var(--mg-text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--mg-accent); }

/* ── Shell ──────────────────────────────────────────────────── */
.mg-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Nav ────────────────────────────────────────────────────── */
.mg-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15,15,15,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--mg-border);
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mg-logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--mg-accent);
}

.mg-nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.mg-nav-links a {
    padding: .4rem .75rem;
    border-radius: var(--mg-radius-sm);
    font-size: .875rem;
    color: var(--mg-muted);
    transition: color .15s, background .15s;
}

.mg-nav-links a:hover,
.mg-nav-links a.active {
    color: var(--mg-text);
    background: var(--mg-surface2);
}

.mg-nav-logout {
    color: var(--mg-muted) !important;
    margin-left: .5rem;
}

/* ── Main / Page ────────────────────────────────────────────── */
.mg-main { flex: 1; }

.mg-page {
    max-width: var(--mg-max);
    margin: 2rem auto;
    padding: 0 1rem;
}

.mg-page h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ── Feed ───────────────────────────────────────────────────── */
.mg-feed {
    max-width: var(--mg-max);
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ── Composer ───────────────────────────────────────────────── */
.mg-post-composer {
    background: var(--mg-surface);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.mg-post-composer h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mg-muted);
}

.mg-post-composer textarea {
    background: var(--mg-surface2);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius-sm);
    color: var(--mg-text);
    padding: .75rem;
    font-family: inherit;
    font-size: .9rem;
    resize: vertical;
    outline: none;
    transition: border-color .15s;
}

.mg-post-composer textarea:focus { border-color: var(--mg-accent); }

/* Hide default file input */
#file-input { display: none; }

/* ── Buttons ────────────────────────────────────────────────── */
.mg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    border-radius: var(--mg-radius-sm);
    font-family: inherit;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background .15s, transform .1s;
    white-space: nowrap;
}

.mg-btn:active:not(:disabled) { transform: scale(.98); }
.mg-btn:disabled { opacity: .5; cursor: not-allowed; }

.mg-btn-primary {
    background: var(--mg-accent);
    color: #fff;
}
.mg-btn-primary:hover:not(:disabled) { background: var(--mg-accent2); }

.mg-btn-secondary {
    background: var(--mg-surface2);
    color: var(--mg-text);
    border: 1px solid var(--mg-border);
}
.mg-btn-secondary:hover:not(:disabled) { background: var(--mg-border); }

.mg-btn-sm { padding: .3rem .7rem; font-size: .8rem; }
.mg-btn-full { width: 100%; }

.mg-btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: .25rem;
    color: var(--mg-muted);
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.mg-btn-icon:hover { color: var(--mg-accent); background: var(--mg-surface2); }

.mg-delete-btn { margin-left: auto; }

/* ── Post card ──────────────────────────────────────────────── */
.mg-post-card {
    background: var(--mg-surface);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius);
    overflow: hidden;
}

.mg-post-header {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem;
}

.mg-avatar-link { flex-shrink: 0; }

.mg-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.mg-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mg-accent);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.mg-avatar-lg { width: 80px; height: 80px; font-size: 1.8rem; }

.mg-post-meta {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    flex: 1;
    min-width: 0;
}

.mg-post-author { font-weight: 600; font-size: .95rem; }
.mg-post-moto   { font-size: .8rem; color: var(--mg-accent); }
.mg-post-time   { font-size: .78rem; color: var(--mg-muted); }

.mg-post-content {
    padding: 0 1rem 1rem;
    font-size: .95rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Post images ────────────────────────────────────────────── */
.mg-post-images {
    display: grid;
    gap: 2px;
}

.mg-images-1 { grid-template-columns: 1fr; max-height: 480px; }
.mg-images-2 { grid-template-columns: 1fr 1fr; }
.mg-images-3 { grid-template-columns: 1fr 1fr; }
.mg-images-3 .mg-post-img-wrap:first-child { grid-column: 1 / -1; }
.mg-images-4 { grid-template-columns: 1fr 1fr; }

.mg-post-img-wrap {
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--mg-surface2);
}

.mg-images-1 .mg-post-img-wrap { aspect-ratio: unset; max-height: 480px; }

.mg-post-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s;
}
.mg-post-img-wrap:hover img { transform: scale(1.02); }

/* ── Post actions ───────────────────────────────────────────── */
.mg-post-actions {
    display: flex;
    gap: .5rem;
    padding: .75rem 1rem;
    border-top: 1px solid var(--mg-border);
}

.mg-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: .875rem;
    color: var(--mg-muted);
    padding: .3rem .6rem;
    border-radius: var(--mg-radius-sm);
    transition: color .15s, background .15s;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.mg-action-btn:hover { color: var(--mg-text); background: var(--mg-surface2); }
.mg-action-btn.liked { color: #e05a1f; }

/* ── Comments ───────────────────────────────────────────────── */
.mg-comments {
    border-top: 1px solid var(--mg-border);
    padding: .75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.mg-comment {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .35rem;
    font-size: .85rem;
}
.mg-comment-author { font-weight: 600; }
.mg-comment-text   { color: var(--mg-muted); flex: 1; min-width: 0; word-break: break-word; }
.mg-comment-time   { font-size: .75rem; color: var(--mg-muted); opacity: .7; }

.mg-comment-form {
    display: flex;
    gap: .5rem;
    margin-top: .25rem;
}

.mg-comment-form input {
    flex: 1;
    background: var(--mg-surface2);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius-sm);
    color: var(--mg-text);
    padding: .4rem .75rem;
    font-family: inherit;
    font-size: .875rem;
    outline: none;
    transition: border-color .15s;
}
.mg-comment-form input:focus { border-color: var(--mg-accent); }

/* ── Gallery ────────────────────────────────────────────────── */
.mg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px;
}

.mg-gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--mg-surface2);
    border-radius: var(--mg-radius-sm);
}

.mg-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
}

.mg-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,.7));
    display: flex;
    align-items: flex-end;
    padding: .5rem;
    opacity: 0;
    transition: opacity .2s;
}

.mg-gallery-overlay span {
    font-size: .8rem;
    color: #fff;
    font-weight: 500;
}

.mg-gallery-item:hover img { transform: scale(1.05); }
.mg-gallery-item:hover .mg-gallery-overlay { opacity: 1; }

/* ── Members ────────────────────────────────────────────────── */
.mg-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.mg-member-card {
    background: var(--mg-surface);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    text-align: center;
    transition: border-color .15s, transform .15s;
}

.mg-member-card:hover {
    border-color: var(--mg-accent);
    transform: translateY(-2px);
    color: var(--mg-text);
}

.mg-member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.mg-member-info {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .85rem;
    color: var(--mg-muted);
}

.mg-member-info strong { color: var(--mg-text); font-size: .95rem; }
.mg-member-posts { font-size: .78rem; opacity: .7; }

/* ── Profile ────────────────────────────────────────────────── */
.mg-profile-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.mg-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mg-profile-info { flex: 1; min-width: 180px; }
.mg-profile-info h1 { font-size: 1.4rem; margin-bottom: .25rem; }
.mg-profile-moto  { color: var(--mg-accent); font-size: .9rem; margin-bottom: .25rem; }
.mg-profile-bio   { color: var(--mg-muted); font-size: .9rem; margin-bottom: .5rem; }
.mg-profile-stats { display: flex; gap: 1.5rem; font-size: .85rem; color: var(--mg-muted); }

.mg-edit-form {
    background: var(--mg-surface);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mg-edit-form h2 { font-size: 1rem; font-weight: 600; color: var(--mg-muted); }

.mg-profile-posts h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }

/* ── Auth ───────────────────────────────────────────────────── */
.mg-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.mg-auth-hero {
    display: none;
    flex: 1;
    position: relative;
}

.mg-auth-hero img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--mg-radius);
}

.mg-auth-hero-overlay {
    position: absolute;
    inset: 0;
    /*background: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, rgba(0,0,0,.45) 100%);*/
}

.mg-auth-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .mg-auth-hero { display: block; flex: 0 0 500px; max-width: 500px; align-self: center; }
    .mg-auth-side { width: 440px; flex-shrink: 0; }
}

.mg-auth-card {
    background: var(--mg-surface);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mg-auth-card h1 { font-size: 1.5rem; text-align: center; color: var(--mg-accent); }
.mg-auth-card h2 { font-size: 1.1rem; text-align: center; color: var(--mg-muted); }
.mg-auth-switch   { text-align: center; font-size: .875rem; color: var(--mg-muted); }
.mg-auth-switch a { color: var(--mg-accent); }

/* ── Forms ──────────────────────────────────────────────────── */
.mg-form-group {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.mg-form-group label {
    font-size: .8rem;
    font-weight: 500;
    color: var(--mg-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mg-form-group input,
.mg-form-group textarea {
    background: var(--mg-surface2);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius-sm);
    color: var(--mg-text);
    padding: .6rem .85rem;
    font-family: inherit;
    font-size: .9rem;
    outline: none;
    transition: border-color .15s;
    width: 100%;
}

.mg-form-group input:focus,
.mg-form-group textarea:focus { border-color: var(--mg-accent); }

/* ── Misc ───────────────────────────────────────────────────── */
.mg-loading   { text-align: center; padding: 3rem; color: var(--mg-muted); }
.mg-empty     { text-align: center; padding: 3rem; color: var(--mg-muted); }
.mg-hint      { font-size: .82rem; color: var(--mg-muted); }
.mg-error     { font-size: .85rem; color: #e05a1f; }
.mg-success   { font-size: .85rem; color: #4caf72; }
.mg-auth-note { font-size: .82rem; color: var(--mg-muted); font-style: italic; }
.mg-link      { color: var(--mg-accent); }
.mg-link:hover { color: var(--mg-accent2); }

/* ── Danger button ──────────────────────────────────────────── */
.mg-btn-danger { background: #8b2020; color: #fff; }
.mg-btn-danger:hover:not(:disabled) { background: #a82525; }

/* ── Admin table ────────────────────────────────────────────── */
.mg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.mg-table th,
.mg-table td {
    padding: .65rem .9rem;
    text-align: left;
    border-bottom: 1px solid var(--mg-border);
}

.mg-table th {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--mg-muted);
    background: var(--mg-surface2);
}

.mg-table tbody tr:hover { background: var(--mg-surface2); }

.mg-table td:last-child { white-space: nowrap; }

.mg-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: .8rem;
    color: var(--mg-muted);
    border-top: 1px solid var(--mg-border);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .mg-nav { padding: 0 1rem; }
    .mg-nav-links a { padding: .35rem .5rem; }
    .mg-logo { font-size: 1rem; }
    .mg-profile-header { flex-direction: column; align-items: center; text-align: center; }
    .mg-profile-stats { justify-content: center; }
}

/* ── Trips list ─────────────────────────────────────────────── */
.mg-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: .75rem;
}
.mg-page-header h1 { margin-bottom: 0; }

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

.mg-trip-card {
    background: var(--mg-surface);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .15s, transform .15s;
    color: var(--mg-text);
}
.mg-trip-card:hover { border-color: var(--mg-accent); transform: translateY(-2px); }

.mg-trip-cover {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--mg-surface2);
    overflow: hidden;
}
.mg-trip-cover img { width: 100%; height: 100%; object-fit: cover; }
.mg-trip-cover-placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; height: 100%;
}
.mg-trip-gpx-badge {
    position: absolute; top: .5rem; right: .5rem;
    background: rgba(0,0,0,.7); color: #fff;
    font-size: .75rem; padding: .2rem .5rem;
    border-radius: 99px;
}

.mg-trip-info { padding: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.mg-trip-info h3 { font-size: 1rem; font-weight: 600; }
.mg-trip-dates { font-size: .82rem; color: var(--mg-accent); }
.mg-trip-stats { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .8rem; color: var(--mg-muted); }
.mg-trip-author { font-size: .78rem; color: var(--mg-muted); }

/* ── Trip form ──────────────────────────────────────────────── */
.mg-card { background: var(--mg-surface); border: 1px solid var(--mg-border); border-radius: var(--mg-radius); padding: 1.5rem; }
.mg-trip-form { margin-bottom: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.mg-trip-form h2 { font-size: 1rem; font-weight: 600; color: var(--mg-muted); }
.mg-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Trip detail ────────────────────────────────────────────── */
.mg-trip-detail {}

.mg-trip-hero {
    position: relative;
    height: 280px;
    background: var(--mg-surface2) center/cover no-repeat;
}
.mg-trip-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 1.5rem;
    color: #fff;
}
.mg-trip-hero h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: .3rem; }
.mg-trip-hero-dates { font-size: .9rem; color: #f4a96a; margin-bottom: .3rem; }
.mg-trip-hero-desc { font-size: .9rem; color: rgba(255,255,255,.8); margin-bottom: .5rem; max-width: 600px; }
.mg-trip-hero-stats { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; font-size: .82rem; color: rgba(255,255,255,.7); }

.mg-trip-body { max-width: var(--mg-max); margin: 0 auto; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 2rem; }

.mg-trip-section {}
.mg-section-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.mg-section-header h2 { font-size: 1.1rem; font-weight: 600; flex: 1; margin: 0; }

/* ── GPX routes list ────────────────────────────────────────── */
.mg-routes-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.mg-route-item {
    display: flex; align-items: center; gap: .75rem;
    background: var(--mg-surface); border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius-sm); padding: .6rem .9rem;
    cursor: pointer; transition: border-color .15s;
}
.mg-route-item:hover, .mg-route-item.active { border-color: var(--mg-accent); }
.mg-route-name { font-size: .875rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-route-meta { font-size: .78rem; color: var(--mg-muted); white-space: nowrap; }

/* ── Leaflet map ────────────────────────────────────────────── */
.mg-leaflet-map {
    width: 100%;
    height: 360px;
    border-radius: var(--mg-radius);
    overflow: hidden;
    border: 1px solid var(--mg-border);
}

/* Custom map markers */
.mg-map-marker {
    width: 28px; height: 28px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 700; color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.mg-map-marker span { transform: rotate(45deg); }
.mg-marker-start { background: var(--mg-accent); }
.mg-marker-end   { background: #3b82f6; }

/* ── Composer in trip detail ────────────────────────────────── */
.mg-composer-actions {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    margin-top: .25rem;
}

/* ── Notifications ──────────────────────────────────────────── */
.mg-notif-wrap {
    position: relative;
}

.mg-notif-btn {
    background: none; border: none; cursor: pointer;
    font-size: 1.1rem; padding: .35rem .5rem;
    border-radius: var(--mg-radius-sm);
    position: relative;
    color: var(--mg-muted);
    transition: color .15s, background .15s;
}
.mg-notif-btn:hover { color: var(--mg-text); background: var(--mg-surface2); }

.mg-notif-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--mg-accent); color: #fff;
    font-size: .65rem; font-weight: 700;
    border-radius: 99px;
    min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
    pointer-events: none;
}

.mg-notif-panel {
    position: absolute; right: 0; top: calc(100% + 8px);
    width: 320px;
    background: var(--mg-surface);
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    z-index: 200;
    overflow: hidden;
}

.mg-notif-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--mg-border);
    font-size: .875rem; font-weight: 600;
}

.mg-notif-empty { padding: 1.5rem; text-align: center; font-size: .875rem; color: var(--mg-muted); }

.mg-notif-item {
    display: flex; align-items: flex-start; gap: .6rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--mg-border);
    font-size: .83rem; color: var(--mg-text);
    transition: background .1s;
}
.mg-notif-item:last-child { border-bottom: none; }
.mg-notif-item:hover { background: var(--mg-surface2); }
.mg-notif-item.unread { background: rgba(224,90,31,.06); }
.mg-notif-item.unread:hover { background: rgba(224,90,31,.1); }

.mg-notif-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.mg-notif-text { flex: 1; line-height: 1.4; color: var(--mg-muted); }
.mg-notif-text strong { color: var(--mg-text); }
.mg-notif-text em { color: var(--mg-accent); font-style: normal; }
.mg-notif-time { font-size: .73rem; color: var(--mg-muted); white-space: nowrap; padding-top: 1px; }

/* ── Logout form (in nav) ───────────────────────────────────── */
.mg-logout-form { display: inline-flex; margin: 0; }
.mg-nav-logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: .875rem;
    color: var(--mg-muted);
    padding: .4rem .75rem;
    border-radius: var(--mg-radius-sm);
    transition: color .15s, background .15s;
}
.mg-nav-logout-btn:hover { color: var(--mg-text); background: var(--mg-surface2); }
