/* Shared redesign layer for authenticated workspaces. Product accents stay separate. */
.app-shell {
    --ink: #18283a;
    --muted: #718094;
    --line: #e2e8ef;
    --canvas: #f4f6fa;
    --paper: #fff;
    --radius: 18px;
    --shadow: 0 12px 34px rgba(26, 42, 62, .055);
    background:
        radial-gradient(ellipse at 82% 0, color-mix(in srgb, var(--accent) 7%, transparent), transparent 34rem),
        var(--canvas);
}

.app-shell .sidebar {
    width: 260px;
    gap: 25px;
    padding: 24px 14px 18px;
    border-right: 1px solid rgba(255, 255, 255, .055);
    background: linear-gradient(180deg, color-mix(in srgb, var(--navy) 93%, #081522), var(--navy) 52%, color-mix(in srgb, var(--navy) 90%, #07111d));
}

.app-shell .brand {
    min-height: 54px;
    gap: 12px;
    padding: 0 8px 18px;
    border-bottom: 1px solid rgba(231, 240, 247, .11);
}

.app-shell .brand-mark {
    width: 42px;
    height: 42px;
    flex: none;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 14px;
    background: linear-gradient(145deg, var(--accent), var(--accent-strong));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 32%, transparent);
}

.app-shell .brand strong { font-size: 14px; letter-spacing: -.01em; }
.app-shell .brand small { color: #aab8c6; font-size: 11px; }
.app-shell .navigation { gap: 4px; }

.app-shell .navigation > a,
.app-shell .nav-logout {
    position: relative;
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #c4d0dc;
    font-size: 12px;
    font-weight: 620;
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.app-shell .navigation > a::before {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #8293a4;
    content: "";
}

.app-shell .navigation > a:hover,
.app-shell .nav-logout:hover {
    border-color: rgba(255, 255, 255, .055);
    background: rgba(255, 255, 255, .075);
    color: #fff;
}

.app-shell .navigation > a.is-active {
    border-color: color-mix(in srgb, var(--accent) 33%, transparent);
    background: color-mix(in srgb, var(--accent) 19%, transparent);
    color: #fff;
}

.app-shell .navigation > a.is-active::before {
    width: 7px;
    height: 7px;
    flex-basis: 7px;
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 19%, transparent);
}

.app-shell .navigation .nav-label {
    margin: 17px 10px 5px;
    padding-top: 13px;
    border-top: 1px solid rgba(231, 240, 247, .1);
    color: #91a2b3;
    font-size: 9px;
    letter-spacing: .14em;
}

.app-shell .navigation .nav-label:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.app-shell .navigation .logout-form { margin-top: auto; padding-top: 12px; border-top-color: rgba(231, 240, 247, .12); }

.app-shell .workspace-bar {
    min-height: 70px;
    margin-left: 260px;
    padding: 11px clamp(22px, 3.4vw, 48px);
    border-color: rgba(221, 229, 237, .9);
    background: rgba(255, 255, 255, .91);
    box-shadow: 0 4px 18px rgba(25, 42, 61, .035);
    backdrop-filter: blur(16px);
}

.app-shell .workspace-context strong { font-size: 12px; }
.app-shell .workspace-context small,
.app-shell .workspace-account small { font-size: 11px; }
.app-shell .workspace-indicator { width: 8px; height: 8px; }
.app-shell .account-avatar { border-radius: 50%; }

.app-shell .main-content {
    width: min(1440px, calc(100% - 324px));
    margin-left: 292px;
    padding: 34px 28px 64px;
}

.app-shell .page-heading {
    align-items: center;
    margin: 2px 0 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}

.app-shell .page-heading h1 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: clamp(27px, 2.3vw, 34px);
    font-weight: 760;
    letter-spacing: -.045em;
}

.app-shell .page-heading p { max-width: 760px; font-size: 13px; line-height: 1.65; }

.app-shell .panel,
.app-shell .feature-card,
.app-shell .welcome-card {
    border-color: var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.app-shell .panel { padding: 22px; }
.app-shell .admin-table { padding: 0; }
.app-shell .admin-stat-grid { gap: 15px; margin-bottom: 25px; }

.app-shell .admin-stat {
    min-height: 126px;
    gap: 12px;
    padding: 20px 21px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--accent-soft) 32%, #fff));
    box-shadow: var(--shadow);
}

.app-shell .admin-stat:hover { transform: translateY(-2px); box-shadow: 0 17px 38px rgba(26, 42, 62, .09); }
.app-shell .admin-stat span { font-size: 12px; font-weight: 650; }
.app-shell .admin-stat strong { color: var(--ink); font-size: clamp(26px, 2.2vw, 34px); font-variant-numeric: tabular-nums; }

.app-shell .admin-table table { border-spacing: 0; }
.app-shell .admin-table th {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    background: #f7f9fb;
    color: #65758a;
    font-size: 10px;
    letter-spacing: .085em;
}

.app-shell .admin-table td { padding: 14px 16px; border-top-color: #edf1f5; }
.app-shell .admin-table tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 34%, #fff); }

.app-shell .button {
    min-height: 42px;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 720;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.app-shell .button:hover { transform: translateY(-1px); }
.app-shell .button-primary { box-shadow: 0 6px 15px color-mix(in srgb, var(--accent) 22%, transparent); }
.app-shell .page-heading .button-secondary,
.app-shell .admin-actions .button-secondary,
.app-shell .button-secondary:not(.mobile-nav *) {
    border-color: #d8e0e8;
    background: #fff;
    color: var(--ink);
}

.app-shell .page-heading .button-secondary:hover,
.app-shell .admin-actions .button-secondary:hover { border-color: color-mix(in srgb, var(--accent) 42%, #d8e0e8); background: var(--accent-soft); }

.app-shell .input,
.app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.app-shell select,
.app-shell textarea {
    border-color: #d5dee8;
    border-radius: 11px;
    background-color: #fff;
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(24, 40, 58, .025);
}

.app-shell .input:focus,
.app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.app-shell select:focus,
.app-shell textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent); outline: 0; }

.app-shell .notice { border-radius: 12px; box-shadow: 0 4px 12px rgba(24, 40, 58, .035); }
.app-shell .status-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; }
.app-shell .legal-site-footer { color: var(--muted); }

@media (max-width: 1080px) {
    .app-shell .main-content { width: calc(100% - 292px); margin-left: 272px; padding-inline: 22px; }
    .app-shell .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .app-shell .mobile-header { min-height: 68px; background: var(--navy); }
    .app-shell .workspace-bar { min-height: 62px; margin-left: 0; padding-inline: 18px; }
    .app-shell .main-content { width: 100%; margin-left: 0; padding: 27px 22px 52px; }
}

@media (max-width: 640px) {
    .app-shell .mobile-header { min-height: 62px; padding-inline: 14px; }
    .app-shell .workspace-bar { min-height: 58px; padding: 9px 14px; }
    .app-shell .workspace-account { max-width: 58%; }
    .app-shell .main-content { padding: 21px 14px 38px; }
    .app-shell .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 18px; padding-bottom: 15px; }
    .app-shell .page-heading h1 { font-size: 27px; }
    .app-shell .page-heading > .button { width: 100%; }
    .app-shell .panel { padding: 17px; }
    .app-shell .admin-table { padding: 0; }
    .app-shell .admin-stat-grid { gap: 9px; }
    .app-shell .admin-stat { min-height: 98px; gap: 8px; padding: 14px 13px; border-radius: 14px; }
    .app-shell .admin-stat strong { font-size: 25px; }
    .app-shell .admin-stat span { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .app-shell .button,
    .app-shell .navigation > a,
    .app-shell .admin-stat { transition: none; }
}
