/* Batch 1 public UI recovery: scoped to public shell to avoid admin side effects. */

:root {
    --df-bg: #eef2f7;
    --df-bg-soft: #f8fafc;
    --df-surface: #ffffff;
    --df-surface-alt: #f3f6fb;
    --df-border: #d7deea;
    --df-border-strong: #bcc8dc;
    --df-text: #0f172a;
    --df-text-soft: #3a4a66;
    --df-text-muted: #6b7890;
    --df-brand: #0f5ccd;
    --df-brand-strong: #0c48a0;
    --df-accent: #f2b713;
    --df-danger: #d93e4f;
    --df-success: #1c8c58;
    --df-info: #1f6fa9;
    --df-shadow-sm: 0 7px 20px rgba(15, 23, 42, 0.08);
    --df-shadow-md: 0 16px 36px rgba(15, 23, 42, 0.14);
    --df-shadow-lg: 0 26px 54px rgba(15, 23, 42, 0.2);
    --df-radius-sm: 10px;
    --df-radius-md: 16px;
    --df-radius-lg: 24px;
    --df-width: min(1140px, calc(100vw - 48px));
}

body.public-shell {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--df-text);
    background:
        radial-gradient(circle at 10% -20%, #dfe9fb 0%, transparent 52%),
        radial-gradient(circle at 88% 0%, #f9ecc8 0%, transparent 38%),
        linear-gradient(180deg, #f4f8ff 0%, var(--df-bg) 100%);
    line-height: 1.6;
}

body.public-shell * {
    box-sizing: border-box;
}

body.public-shell a {
    color: var(--df-brand);
    text-decoration: none;
}

body.public-shell a:hover {
    color: var(--df-brand-strong);
}

body.public-shell .public-main {
    width: var(--df-width);
    margin: 0 auto;
    padding: 32px 0 56px;
}

body.public-shell h1,
body.public-shell h2,
body.public-shell h3 {
    margin: 0;
    line-height: 1.16;
    color: var(--df-text);
    font-family: "Sora", "Manrope", sans-serif;
}

body.public-shell p {
    margin: 0;
    color: var(--df-text-soft);
}

body.public-shell .small {
    margin-top: 14px;
    color: var(--df-text-muted);
    font-size: 0.92rem;
}

body.public-shell .eyebrow,
body.public-shell .auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #cfdaf0;
    background: #f4f8ff;
    color: #194585;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.public-shell .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-family: "Sora", "Manrope", sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    background: linear-gradient(135deg, #1469e2 0%, #0f4fba 100%);
    padding: 12px 22px;
    box-shadow: 0 10px 22px rgba(17, 86, 188, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body.public-shell .button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(17, 86, 188, 0.32);
}

body.public-shell .button:focus-visible {
    outline: 3px solid rgba(18, 92, 204, 0.32);
    outline-offset: 2px;
}

body.public-shell .button.small {
    padding: 9px 16px;
    font-size: 0.82rem;
    box-shadow: 0 8px 16px rgba(17, 86, 188, 0.18);
}

body.public-shell .button-secondary {
    color: #103460;
    background: linear-gradient(135deg, #eff5ff 0%, #dbe8ff 100%);
    box-shadow: 0 8px 18px rgba(16, 73, 152, 0.16);
}

body.public-shell .button-secondary:hover {
    color: #0c2a4e;
}

body.public-shell .button-danger {
    background: linear-gradient(135deg, #e95d67 0%, #cf3242 100%);
    box-shadow: 0 10px 20px rgba(181, 27, 45, 0.28);
}

body.public-shell .button-danger:hover {
    color: #fff;
    box-shadow: 0 13px 26px rgba(181, 27, 45, 0.34);
}

body.public-shell .alert {
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: var(--df-radius-sm);
    border: 1px solid;
    font-size: 0.94rem;
    font-weight: 600;
}

body.public-shell .alert a {
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

body.public-shell .alert-error {
    color: #8b1f2a;
    background: #ffe7eb;
    border-color: #f2b7c0;
}

body.public-shell .alert-success {
    color: #135d3b;
    background: #e3f7eb;
    border-color: #aee2c4;
}

body.public-shell .alert-info {
    color: #0f4870;
    background: #e5f3ff;
    border-color: #b5d8f1;
}

body.public-shell .right {
    justify-content: flex-end;
}

body.public-shell .code-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #bfd0eb;
    padding: 4px 11px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.82rem;
    color: #0f3b77;
    background: #f2f7ff;
}

body.public-shell .form-grid {
    display: grid;
    gap: 14px;
}

body.public-shell .form-grid.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.public-shell .form-column,
body.public-shell .form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

body.public-shell label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #274161;
}

body.public-shell .input-control {
    width: 100%;
    border: 1px solid var(--df-border);
    border-radius: var(--df-radius-sm);
    background: #fff;
    padding: 11px 13px;
    font-size: 0.94rem;
    color: var(--df-text);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

body.public-shell .input-control::placeholder {
    color: #8ea0bc;
}

body.public-shell .input-control:focus {
    border-color: #7aa5e8;
    box-shadow: 0 0 0 4px rgba(26, 101, 215, 0.12);
    outline: none;
}

body.public-shell .form-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

body.public-shell .search-form {
    margin-top: 20px;
}

body.public-shell .page-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    background: rgba(244, 248, 255, 0.78);
    border-bottom: 1px solid rgba(175, 190, 214, 0.45);
}

body.public-shell .header-shell {
    width: var(--df-width);
    margin: 0 auto;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

body.public-shell .brand-logo {
    display: inline-flex;
    align-items: center;
    padding: 5px;
    border-radius: 12px;
}

body.public-shell .brand-logo:focus-visible {
    outline: 3px solid rgba(18, 92, 204, 0.32);
    outline-offset: 3px;
}

body.public-shell .brand-mark {
    display: block;
    width: 198px;
    height: auto;
}

body.public-shell .page-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

body.public-shell .page-header-group,
body.public-shell .site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.public-shell .page-header-tab {
    white-space: nowrap;
}

body.public-shell .lang-dropdown {
    position: relative;
}

body.public-shell .lang-dropbtn {
    min-width: 122px;
}

body.public-shell .lang-flag {
    display: inline-flex;
    width: 16px;
    height: 12px;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(16, 56, 101, 0.26);
}

body.public-shell .lang-dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 176px;
    background: #fff;
    border: 1px solid var(--df-border);
    border-radius: 13px;
    box-shadow: var(--df-shadow-md);
    padding: 7px;
    display: none;
}

body.public-shell .lang-dropdown.active .lang-dropdown-content {
    display: grid;
    gap: 4px;
}

body.public-shell .lang-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    padding: 8px 9px;
    color: #1f3657;
    font-size: 0.87rem;
    font-weight: 600;
}

body.public-shell .lang-dropdown-content a:hover {
    background: #eef4ff;
}

body.public-shell .page-under-header {
    border-bottom: 1px solid #d5deed;
    background: linear-gradient(180deg, #f3f7ff 0%, #ecf3ff 100%);
}

body.public-shell .page-under-header-note {
    width: var(--df-width);
    margin: 0 auto;
    padding: 11px 0;
    color: #d93e4f;
    font-size: 0.84rem;
    font-weight: 700;
    animation: df-pulse-red 1.25s ease-in-out infinite;
}

@keyframes df-pulse-red {
    0%, 100% {
        color: #d93e4f;
        text-shadow: 0 0 0 rgba(217, 62, 79, 0.0);
        transform: translateZ(0);
    }

    50% {
        color: #ff3b4c;
        text-shadow: 0 0 12px rgba(255, 59, 76, 0.45);
        transform: scale(1.01);
    }
}


body.public-shell .landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 28px;
    align-items: stretch;
    margin-top: 18px;
}

body.public-shell .hero-copy,
body.public-shell .hero-visual {
    border: 1px solid #d4dff0;
    border-radius: var(--df-radius-lg);
    background: linear-gradient(180deg, #fff 0%, #f6f9ff 100%);
    box-shadow: var(--df-shadow-sm);
}

body.public-shell .hero-copy {
    padding: 34px 32px;
}

body.public-shell .hero-copy h1 {
    font-size: clamp(1.85rem, 4vw, 2.8rem);
    margin-bottom: 14px;
}

body.public-shell .hero-copy p {
    font-size: 1.05rem;
    max-width: 56ch;
}

body.public-shell .hero-actions {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

body.public-shell .hero-points {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

body.public-shell .hero-points li {
    position: relative;
    padding-left: 22px;
    color: #2e4567;
    font-weight: 600;
}

body.public-shell .hero-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.52em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(140deg, #1f6ee8 0%, #0f4ca8 100%);
    box-shadow: 0 0 0 4px rgba(32, 103, 221, 0.17);
}

body.public-shell .hero-visual {
    padding: 22px;
    display: flex;
    align-items: center;
}

body.public-shell .hero-image-frame {
    position: relative;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #d0dcf0;
    background: #dde8fb;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

body.public-shell .hero-image {
    display: block;
    width: 100%;
    height: auto;
}

body.public-shell .hero-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    box-shadow: var(--df-shadow-sm);
}

body.public-shell .hero-zoom-icon {
    display: block;
    width: 16px;
    height: 16px;
    margin: 0 auto;
    border: 2px solid currentColor;
    border-radius: 3px;
    position: relative;
}

body.public-shell .hero-zoom-icon::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 2px;
    background: currentColor;
    right: -7px;
    bottom: -3px;
    transform: rotate(45deg);
    border-radius: 999px;
}

body.public-shell .feature-section,
body.public-shell .process-section {
    margin-top: 26px;
    border: 1px solid #d7e1f1;
    border-radius: var(--df-radius-lg);
    background: var(--df-surface);
    padding: 28px;
    box-shadow: var(--df-shadow-sm);
}

body.public-shell .section-head {
    margin-bottom: 18px;
}

body.public-shell .section-head h2 {
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    margin-bottom: 8px;
}

body.public-shell .section-head p {
    max-width: 66ch;
}

body.public-shell .feature-grid,
body.public-shell .process-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.public-shell .feature-card,
body.public-shell .process-step {
    border: 1px solid #d6deeb;
    border-radius: 14px;
    padding: 18px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

body.public-shell .feature-card h3,
body.public-shell .process-step h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

body.public-shell .feature-card p,
body.public-shell .process-step p {
    color: #415879;
    font-size: 0.94rem;
}

body.public-shell .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 30px;
    border-radius: 999px;
    margin-bottom: 10px;
    padding: 0 10px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.73rem;
    color: #1b4f95;
    border: 1px solid #bed1ef;
    background: #edf4ff;
}

body.public-shell .step-index {
    display: inline-block;
    margin-bottom: 10px;
    color: #1d4f8e;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.public-shell .news-grid {
    margin-top: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.public-shell .news-card {
    border: 1px solid #d7e0ef;
    border-radius: 14px;
    padding: 22px 20px;
    background: linear-gradient(180deg, #fff 0%, #f5f9ff 100%);
    box-shadow: var(--df-shadow-sm);
}

body.public-shell .news-card.highlight {
    background: linear-gradient(145deg, #0e4ca8 0%, #1f6ed6 100%);
    border-color: #185dbc;
}

body.public-shell .news-card.highlight .eyebrow {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

body.public-shell .news-card.highlight h3,
body.public-shell .news-card.highlight p {
    color: #fff;
}

body.public-shell .news-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

body.public-shell .news-row {
    margin-top: 16px;
}

body.public-shell .news-row-content {
    border-radius: 14px;
    border: 1px solid #d4deef;
    background: #fff;
    padding: 16px 18px;
}

body.public-shell .auth-page {
    margin-top: 10px;
}

body.public-shell .auth-card {
    border: 1px solid #d5dfef;
    border-radius: var(--df-radius-lg);
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
    box-shadow: var(--df-shadow-sm);
    padding: 26px;
}

body.public-shell .auth-card.auth-card-narrow {
    max-width: 640px;
    margin: 0 auto;
}

body.public-shell .auth-card h1 {
    font-size: clamp(1.45rem, 3vw, 2.2rem);
    margin-bottom: 10px;
}

body.public-shell .device-auth-form {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

body.public-shell .results-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

body.public-shell .results-section {
    margin-top: 24px;
    border-top: 1px solid #d9e1ee;
    padding-top: 20px;
}

body.public-shell .credentials-list {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

body.public-shell .credentials-item {
    border: 1px solid #d7e0ed;
    border-radius: 13px;
    background: #fff;
    padding: 14px;
}

body.public-shell .credentials-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 11px;
    font-size: 0.83rem;
    color: #5a6f8f;
}

body.public-shell .credential-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.public-shell .credential-grid > div {
    border: 1px dashed #ccdaef;
    border-radius: 10px;
    padding: 10px;
    background: #f9fbff;
    min-width: 0;
}

body.public-shell .credential-grid > div span {
    display: block;
}

body.public-shell .credential-grid > div > span:first-child {
    font-size: 0.76rem;
    font-weight: 700;
    color: #486086;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

body.public-shell .credential-grid .val,
body.public-shell .password-mask {
    font-size: 0.9rem;
    color: #1e3555;
    word-break: break-word;
}

body.public-shell .playlist-public-url {
    display: inline-block;
    margin-left: 6px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.84rem;
}

body.public-shell .site-footer {
    margin-top: 26px;
    border: 1px solid #d4deee;
    border-radius: 14px;
    background: #fff;
    padding: 14px 16px;
}

body.public-shell .site-footer p + p {
    margin-top: 6px;
}

body.public-shell .feature-card,
body.public-shell .process-step,
body.public-shell .news-card,
body.public-shell .credentials-item,
body.public-shell .auth-card,
body.public-shell .hero-copy,
body.public-shell .hero-visual {
    animation: df-reveal-up 0.45s ease both;
}

body.public-shell .feature-grid .feature-card:nth-child(2),
body.public-shell .process-grid .process-step:nth-child(2),
body.public-shell .news-grid .news-card:nth-child(2) {
    animation-delay: 0.05s;
}

body.public-shell .feature-grid .feature-card:nth-child(3),
body.public-shell .process-grid .process-step:nth-child(3),
body.public-shell .news-grid .news-card:nth-child(3) {
    animation-delay: 0.09s;
}

body.public-shell .feature-grid .feature-card:nth-child(4),
body.public-shell .process-grid .process-step:nth-child(4),
body.public-shell .news-grid .news-card:nth-child(4) {
    animation-delay: 0.13s;
}

@keyframes df-reveal-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1023px) {
    body.public-shell {
        --df-width: min(100vw - 30px, 1024px);
    }

    body.public-shell .header-shell {
        min-height: 74px;
    }

    body.public-shell .brand-mark {
        width: 178px;
    }

    body.public-shell .landing-hero {
        grid-template-columns: 1fr;
    }

    body.public-shell .feature-grid,
    body.public-shell .process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.public-shell .form-grid.three-columns,
    body.public-shell .credential-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    body.public-shell {
        --df-width: calc(100vw - 22px);
    }

    body.public-shell .public-main {
        padding-top: 18px;
        padding-bottom: 38px;
    }

    body.public-shell .header-shell {
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 0 12px;
        gap: 10px;
    }

    body.public-shell .page-header-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    body.public-shell .page-header-group,
    body.public-shell .site-nav {
        flex-wrap: wrap;
    }

    body.public-shell .button.small.page-header-tab {
        padding: 8px 11px;
    }

    body.public-shell .lang-dropdown-content {
        left: 0;
        right: auto;
    }

    body.public-shell .hero-copy,
    body.public-shell .hero-visual,
    body.public-shell .feature-section,
    body.public-shell .process-section,
    body.public-shell .auth-card {
        padding: 18px;
    }

    body.public-shell .hero-copy p {
        font-size: 0.98rem;
    }

    body.public-shell .feature-grid,
    body.public-shell .process-grid,
    body.public-shell .news-grid {
        grid-template-columns: 1fr;
    }

    body.public-shell .results-meta {
        flex-direction: column;
    }

    body.public-shell .site-footer {
        padding: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.public-shell * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
