/* Craft Studio — global styles (BITOTRON design system, see ai/GRAPHICS-TEMPLATE.md) */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* ---------- Public (auth) pages: split brand panel + form ---------- */

.auth-page {
    min-height: 100vh;
    display: flex;
}

.auth-brand {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* The visuals are capped in viewport-height units so the panel stays on one
       screen — the whole story is meant to be readable without scrolling. */
    gap: clamp(0.6rem, 1.6vh, 1.4rem);
    padding: clamp(1.25rem, 3vw, 3rem);
    background: linear-gradient(160deg, #0e8a72 0%, #1abc9c 60%, #16a086 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-brand img.hero {
    width: min(880px, 100%);
    max-height: 42vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.auth-brand .brand-logo {
    width: 72px;
    height: 72px;
    background: #fff;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.auth-motto {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    font-weight: 300;
    font-size: clamp(1.35rem, 2.8vw, 2.15rem);
    letter-spacing: 0.02em;
}

.auth-motto span {
    opacity: 0.92;
}

.auth-motto span + span::before {
    content: "·";
    margin-right: 0.75rem;
    opacity: 0.6;
}

.auth-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    min-width: 340px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

/* Three pipeline steps under the hero: capture → develop → deploy.
   Always a single row — wrapping pushed the panel past the fold. */
.auth-flow {
    display: flex;
    flex-wrap: nowrap;
    gap: clamp(0.5rem, 1.5vw, 1.75rem);
    justify-content: center;
    align-items: flex-start;
    width: min(880px, 100%);
}

.auth-flow figure {
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}

.auth-flow img {
    width: 100%;
    max-width: 240px;
    max-height: 18vh;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
}

.auth-flow figcaption {
    margin-top: 0.4rem;
    font-size: clamp(0.72rem, 1vw, 0.9rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.92;
}

.floating-page-controls {
    position: fixed;
    top: 0.6rem;
    right: 0.8rem;
    z-index: 1400;
    display: flex;
    gap: 0.25rem;
    border-radius: 24px;
    background: var(--mud-palette-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    padding: 0.15rem 0.35rem;
}

@media (max-width: 900px) {
    .auth-page {
        flex-direction: column;
    }

    .auth-brand {
        padding: 2rem 1rem;
    }

    /* Stacked layout: the panel no longer shares the viewport with the form,
       so the height caps would only shrink the visuals for nothing. */
    .auth-brand img.hero {
        max-height: none;
    }

    .auth-flow img {
        max-height: none;
    }
}

/* ---------- Change request board ---------- */

.board-container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.board-column {
    min-width: 300px;
    max-width: 340px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--mud-palette-background-gray);
    border: 2px solid transparent;
}

.board-column .mud-drop-zone {
    min-height: 120px;
    padding: 0.5rem;
    /* MudBlazor's base .mud-drop-zone rule transitions "all" 300ms, which
       animates the CanDropClass border in from 0 to 2px — reading as the
       outline "growing" a beat after it appears. Show it instantly instead. */
    transition: none;
}

/* MudDropZone's own small reorder-insertion box would otherwise show up
   alongside — and slightly after — the whole-card dashed outline above,
   giving two overlapping "drop here" cues. One is enough. */
.board-column .mud-dropitem-placeholder {
    display: none !important;
}

.board-column-header {
    padding: 0.75rem 1rem 0.25rem 1rem;
}

.cr-card {
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cr-card:active {
    cursor: grabbing;
}

.cr-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.mud-drop-item-dragging {
    opacity: 0.4;
}

/* ---------- Status ring (signature element, echoes the segmented-C logo) ---------- */

.status-ring {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.status-ring i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--mud-palette-lines-default);
    display: inline-block;
}

.status-ring i.done {
    background: #1f4e79;
}

.status-ring i.current {
    background: #f8a01c;
}

.status-ring i.failed {
    background: var(--mud-palette-error);
}

/* ---------- Misc ---------- */

.copyright-footer {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.pointer {
    cursor: pointer;
}

#blazor-error-ui {
    background: #b32121;
    color: #fff;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

#blazor-error-ui a.reload {
    color: #fff;
}

/* ── How it works page ─────────────────────────────────────────────── */

.how-lead {
    max-width: 78ch;
}

/* The infographics are drawn on a very light canvas, so they get their own
   light panel — otherwise they would float as bright rectangles in dark mode. */
.how-overview,
.how-step {
    background: #f6fafa;
    border-radius: 8px;
    height: auto;
    width: 100%;
}

/* Both caps sit at the artwork's own pixel width — larger would only upscale. */
.how-overview {
    max-width: 1275px;
}

.how-step {
    max-width: 640px;
}

.how-step-number {
    align-items: center;
    background: var(--mud-palette-primary);
    border-radius: 50%;
    color: var(--mud-palette-primary-text);
    display: flex;
    flex: 0 0 auto;
    font-weight: 600;
    height: 34px;
    justify-content: center;
    width: 34px;
}
