/* Logged-in app shell — same palette as the Figma "Auth" frame:
   page #F5F7FA, white surfaces, primary #4F46E5, brand #5F33E1, text #111827 / #64748B. */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; background: #F5F7FA; font-family: 'Inter', sans-serif; color: #111827; }

.shell__side {
    position: sticky; top: 0; height: 100vh; height: 100dvh; width: 248px; flex: none;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 20px 16px; box-sizing: border-box; background: #fff; border-right: 1px solid #E7EAF2;
}
.shell__brand { display: flex; align-items: center; gap: 12px; margin: 0 4px 24px; text-decoration: none; color: #111827; }
.shell__mark {
    flex: none; width: 36px; height: 36px; border-radius: 12px; background: #5F33E1; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
    box-shadow: 0 6px 10px rgba(95, 51, 225, 0.2);
}
.shell__brand-name { font-size: 20px; font-weight: 700; }
.shell__nav { display: flex; flex-direction: column; gap: 4px; }
.shell__link {
    display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 8px;
    font-size: 14px; font-weight: 500; color: #64748B; text-decoration: none; transition: background .15s, color .15s;
}
.shell__link:hover { background: #F5F7FA; color: #111827; }
.shell__link.is-active { background: #EEE9FF; color: #5F33E1; }
.shell__icon { flex: none; }

.shell__profile { position: relative; }
.shell__avatar-btn {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #E7EAF2;
    border-radius: 12px; background: #fff; cursor: pointer; font: inherit; text-align: left; min-width: 0;
}
.shell__avatar-btn:hover { background: #F5F7FA; }
.shell__avatar {
    flex: none; width: 36px; height: 36px; border-radius: 50%; background: #5F33E1; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px;
}
.shell__email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; color: #111827; }
.shell__panel {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); padding: 6px; z-index: 20; min-width: 180px;
    background: #fff; border: 1px solid #E7EAF2; border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
    display: flex; flex-direction: column;
}
.shell__panel-item {
    display: block; padding: 9px 12px; border: 0; border-radius: 8px; background: none;
    font: inherit; font-size: 14px; color: #111827; text-align: left; text-decoration: none; cursor: pointer;
}
.shell__panel-item:hover { background: #F5F7FA; }
.shell__panel-item--danger { color: #D92D20; }

.shell__main { flex: 1; min-width: 0; padding: 32px; box-sizing: border-box; }
.shell__h1 { margin: 0 0 20px; font-size: 28px; line-height: 34px; font-weight: 700; }
.shell__card { padding: 24px; background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .07); }
.shell__muted { margin: 0; font-size: 14px; color: #64748B; }
.shell__dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; font-size: 14px; }
.shell__dl dt { color: #64748B; }
.shell__dl dd { margin: 0; }

.shell__h2 { margin: 0 0 8px; font-size: 18px; line-height: 24px; font-weight: 600; color: #111827; }
.shell__stack { display: flex; flex-direction: column; gap: 16px; }
.shell__card--accent { border-left: 4px solid #5F33E1; }
.shell__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.shell__btn {
    display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; margin-top: 16px;
    border: 1px solid #4F46E5; border-radius: 8px; background: #4F46E5; color: #fff;
    font-size: 14px; font-weight: 500; text-decoration: none; transition: background .15s, border-color .15s;
}
.shell__btn:hover { background: #4338CA; border-color: #4338CA; }
.shell__actions .shell__btn { margin-top: 0; }
.shell__btn--ghost { background: #fff; border-color: #D7DFEA; color: #111827; }
.shell__btn--ghost:hover { background: #F5F7FA; border-color: #D7DFEA; }

.shell__badge {
    margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #E11D48; color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}

/* mobile: the menu stays on the left and shrinks to small icons */
@media screen and (max-width: 720px) {
    .shell__side { width: 60px; padding: 12px 8px; align-items: center; }
    .shell__brand { margin: 0 0 16px; }
    .shell__brand-name, .shell__label, .shell__email { display: none; }
    .shell__nav { align-items: center; }
    .shell__link { position: relative; width: 40px; justify-content: center; padding: 0; }
    .shell__badge { position: absolute; top: 0; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
    .shell__avatar-btn { width: auto; padding: 2px; border: 0; border-radius: 50%; background: none; }
    /* dropdown opens to the right of the narrow rail */
    .shell__panel { left: calc(100% + 8px); right: auto; bottom: 0; width: 180px; }
    .shell__main { padding: 20px 16px; }
    .shell__h1 { font-size: 24px; }
}
