:root {
    --shell-bg: #0b0f17;
    --shell-text: #e8eef7;
    --shell-muted: #9fb0c9;
    --shell-panel: rgba(255, 255, 255, .06);
    --shell-panel-strong: rgba(255, 255, 255, .12);
    --shell-border: rgba(255, 255, 255, .12);
    --shell-accent: #7bdff2;
    --shell-accent-2: #cdb4db;
    --shell-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shell-deep: #0f1623;
    --shell-card: rgba(8, 12, 20, .86);
}

/* Shared rounded actions for wizard controls rendered by the HTML dashboards. */
.btn {
    border: 0;
    border-radius: 13px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #7be4d3, #8ebcff);
    color: #07111d;
    font: 800 14px inherit;
    cursor: pointer;
}

.btn.ghost {
    background: rgba(255, 255, 255, .08);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, .16);
}

.btn.danger {
    background: rgba(255, 107, 107, .13);
    color: #ffb3b3;
    border: 1px solid rgba(255, 107, 107, .3);
}

/* Native time pickers otherwise render a black clock against dark dashboard inputs. */
input[type="time"] {
    color-scheme: dark;
}

input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: .9;
}

/* Form controls frequently use width:100% inside grid/flex columns. Keep their
   padding and borders inside the allocated column so adjacent controls retain
   their declared gap instead of visually overlapping. */
*, *::before, *::after {
    box-sizing: border-box;
}

.shell-header *,
.artisan-shell input,
.artisan-shell select,
.artisan-shell textarea {
    min-width: 0;
}

/* Sequence library cards: keep the title clear of the step/status line. */
.artisan-shell .seq > b {
    display: block;
    margin-bottom: 6px;
}

body.artisan-shell {
    margin: 0;
    background: var(--shell-bg);
    color: var(--shell-text);
}

.shell-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: linear-gradient(120deg, #0b0f17 0%, #101a2a 55%, #0b0f17 100%);
    border-bottom: 1px solid var(--shell-border);
    box-shadow: var(--shell-shadow);
}

.shell-top {
    max-width: 1600px;
    margin: 0 auto;
    padding: 14px 20px 10px;
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 16px;
    align-items: center;
}

.shell-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--shell-text);
}

.shell-brand img {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4));
}

.shell-brand-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .6px;
}

.shell-brand-sub {
    font-size: 11px;
    color: var(--shell-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shell-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.96);
    border-radius: 999px;
    padding: 4px;
    gap: 6px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}

.shell-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 12px;
    font-size: 13px;
    background: transparent;
    color: #111827;
}

.shell-search button {
    border: none;
    border-radius: 999px;
    padding: 8px 14px;
    background: linear-gradient(120deg, var(--shell-accent), var(--shell-accent-2));
    color: #1a1a1a;
    font-weight: 700;
    cursor: pointer;
}

.shell-identity {
    display: grid;
    gap: 2px;
    text-align: right;
}

.shell-identity-label {
    font-size: 10px;
    color: var(--shell-muted);
    text-transform: uppercase;
    letter-spacing: .14em;
}

.shell-identity-name {
    font-size: 13px;
    font-weight: 700;
}

.shell-actions {
    display: flex;
    gap: 8px;
}

.shell-actions a {
    color: var(--shell-text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--shell-border);
}

.shell-nav-desktop {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px 14px;
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.shell-nav-group {
    position: relative;
}

.shell-nav-trigger {
    color: var(--shell-text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--shell-border);
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
    display: inline-flex;
    align-items: center;
}

.shell-nav-trigger:hover,
.shell-nav-group:hover .shell-nav-trigger {
    background: rgba(255, 255, 255, .14);
    transform: translateY(-1px);
    border-color: rgba(123, 223, 242, .55);
}

.shell-nav-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 300px;
    display: grid;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(10,15,24,.98), rgba(11,15,23,.94));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 22px;
    box-shadow: 0 22px 70px rgba(0,0,0,.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    pointer-events: none;
}

.shell-nav-panel::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 0;
    left: 0;
    height: 8px;
}

.shell-nav-panel-wide {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    min-width: 580px;
}

.shell-nav-group:hover .shell-nav-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.shell-nav-card {
    background: var(--shell-card);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 16px;
    display: grid;
    gap: 10px;
}

.shell-nav-card-title {
    font-size: 15px;
    font-weight: 800;
}

.shell-nav-card p {
    margin: 0;
    color: var(--shell-muted);
    font-size: 12px;
    line-height: 1.45;
}

.shell-nav-card a {
    color: var(--shell-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.07);
}

.shell-nav-card a:hover {
    background: rgba(255,255,255,.10);
}

.shell-nav-toggle {
    display: none;
}

.shell-nav-button {
    display: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
    background: linear-gradient(120deg, var(--shell-accent), var(--shell-accent-2));
    cursor: pointer;
    border: 0;
}

.shell-nav-mobile {
    display: none;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px 14px;
    gap: 12px;
}

.shell-mobile-section {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.shell-mobile-title {
    font-size: 11px;
    color: var(--shell-muted);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 800;
}

.shell-mobile-section a {
    color: var(--shell-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.artisan-footer {
    margin-top: 32px;
    padding: 16px 20px 26px;
    color: var(--shell-muted);
    font-size: 12px;
    border-top: 1px solid var(--shell-border);
    text-align: center;
}

@media (max-width: 900px) {
    .shell-top {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "brand identity menu"
            "search search search"
            "actions actions actions";
    }

    .shell-brand { grid-area: brand; }
    .shell-identity { grid-area: identity; }
    .shell-search { grid-area: search; }
    .shell-actions { grid-area: actions; flex-wrap: wrap; }

    .shell-nav-desktop { display: none; }

    .shell-nav-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        grid-area: menu;
        justify-self: end;
    }

    .shell-nav-toggle:checked + .shell-nav-mobile {
        display: grid;
    }
}
