/* ---- Login overlay ---- */
.login-overlay {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 100px 24px; text-align: center;
}
.login-overlay .login-logo { height: 48px; width: auto; margin-bottom: 24px; }
.login-overlay h2 { font-size: 24px; margin-bottom: 10px; color: var(--primary); }
.login-overlay p { color: var(--gray-500); margin-bottom: 28px; max-width: 440px; line-height: 1.6; }
.login-otp-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 360px;
}
#login-code-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
#login-code-wrap .login-otp-input {
    width: 100%;
}
.login-otp-input {
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 15px;
}
.login-otp-status {
    min-height: 1.2em;
    margin: 4px 0 0 0 !important;
    font-size: 13px;
    color: var(--gray-600);
}
.login-signup-hint {
    margin: 8px 0 0 0 !important;
    font-size: 12px;
    color: var(--gray-500);
}
.login-otp-form .btn {
    justify-content: center;
}
.login-dev-wrap {
    margin-top: 28px;
    max-width: 360px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}
/* `display: flex` would otherwise defeat the `hidden` attribute. */
.login-dev-wrap[hidden] { display: none; }
.login-dev-note {
    font-size: 12px;
    color: var(--gray-500);
    margin: 0 0 2px 0 !important;
}
.login-dev-btn {
    width: 100%;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: 12px 28px;
    font-size: 16px;
}
.login-dev-email {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-500);
}

/* ---- Tabs ---- */
/* The bar scrolls on its own so a long tab list never widens the page.
   The baseline and top seam are shadows: a border or an absolute ::before
   would be clipped by the overflow, hiding the active underline. */
.tabs {
    display: flex; gap: 0;
    padding: 0 16px; background: var(--white);
    box-shadow: 0 -1px 0 var(--white), inset 0 -2px 0 var(--gray-200);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    position: sticky;
    top: calc(var(--sticky-header-offset) + var(--setup-strip-height));
    z-index: 85;
    isolation: isolate;
    transform: translateZ(0);
    backface-visibility: hidden;
}
.tabs[hidden] { display: none; }
/* Template mode + project Edit: group row, then the active group's tabs. */
.tabs.has-tab-groups {
    flex-wrap: wrap;
    overflow-x: hidden;
    overflow-y: visible;
}
.tabs.has-tab-groups .tab-groups-row {
    flex: 1 0 100%;
    display: flex;
    gap: 0;
    margin: 0 -16px;
    padding: 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    box-shadow: inset 0 -1px 0 var(--gray-200);
}
.tabs.has-tab-groups > .tab[data-tab] {
    flex: 0 0 auto;
}
/* Subtabs stay left (order 1…); admin actions are pinned after them on the right. */
.tabs.has-tab-groups > .tab-admin {
    order: 1000;
}
.tab {
    padding: 10px clamp(8px, 0.9vw, 20px); font-size: 14px; font-weight: 500; cursor: pointer;
    border: none; background: transparent; color: var(--gray-500);
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.tab:hover { color: var(--gray-700); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab.section-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.tab .experimental-tag {
    display: inline-flex; align-items: center;
    margin-left: 6px; padding: 1px 5px;
    border-radius: 4px; background: var(--gray-100);
    color: var(--gray-500);
    font-size: 10px; font-weight: 600; letter-spacing: 0.01em;
    line-height: 1.4; vertical-align: middle;
}
.tab.active .experimental-tag,
.tab.section-active .experimental-tag {
    background: var(--neutral-e0e8f0); color: var(--primary);
}
.tab .count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px; background: var(--gray-100);
    font-size: 12px; font-weight: 600; margin-left: 6px;
}
.tab.active .count,
.tab.section-active .count { background: var(--neutral-e0e8f0); color: var(--primary); }
.tab .count:empty { display: none; }

.placeholder-panel {
    max-width: 640px;
    padding: 32px 8px;
    color: var(--gray-700);
}
.placeholder-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-900);
}
.placeholder-panel p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--gray-600);
}

