:root {
    --bg: #f8f2ff;
    --bg-accent: #fee000;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-border: rgba(127, 19, 153, 0.18);
    --text: #1e1025;
    --muted: #654373;
    --primary: #7f1399;
    --primary-dark: #590a6e;
    --success: #2f7d4d;
    --error: #a02a2a;
    --warning: #9b6b00;
    --shadow: 0 28px 90px rgba(73, 12, 88, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(127, 19, 153, 0.24), transparent 30%),
        radial-gradient(circle at 85% 12%, rgba(254, 224, 0, 0.38), transparent 18%),
        radial-gradient(circle at bottom right, rgba(127, 19, 153, 0.16), transparent 28%),
        linear-gradient(135deg, #fcf8ff, var(--bg) 46%, #fff8cc);
}

.drag-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(31, 9, 39, 0.32);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 160ms ease, visibility 160ms ease;
    z-index: 50;
}

.drag-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.drag-overlay-card {
    padding: 28px 34px;
    border: 2px dashed rgba(254, 224, 0, 0.9);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(127, 19, 153, 0.92), rgba(89, 10, 110, 0.95));
    color: #fff9d8;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 700;
    box-shadow: 0 24px 60px rgba(31, 9, 39, 0.35);
}

.shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1.05fr 0.95fr;
    gap: 24px;
    align-items: start;
    padding: 40px 0;
}

.auth-shell {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
    padding: 40px 0;
}

.panel {
    backdrop-filter: blur(10px);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.hero-panel {
    min-height: 100%;
}

.auth-panel {
    min-height: 520px;
    display: grid;
    align-content: center;
    gap: 18px;
}

.brandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-logo {
    width: 136px;
    max-width: 48%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(127, 19, 153, 0.12));
}

.eyebrow {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(127, 19, 153, 0.08);
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

h1,
h2 {
    margin: 0;
}

h1 {
    margin-top: 26px;
    font-size: clamp(2.1rem, 3vw, 3.6rem);
    line-height: 1;
}

.lede {
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.summary-text,
.operations-empty {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.view {
    display: grid;
    gap: 20px;
}

.hidden {
    display: none;
}

.view-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.view-head.compact {
    margin-bottom: 14px;
}

.form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 0.92rem;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
    width: 100%;
    border: 1px solid rgba(127, 19, 153, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 16px;
    font: inherit;
    color: var(--text);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

input:focus {
    outline: none;
    border-color: rgba(127, 19, 153, 0.72);
    box-shadow: 0 0 0 4px rgba(127, 19, 153, 0.12);
    transform: translateY(-1px);
}

.field-file small {
    color: var(--muted);
}

.sr-only-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dropzone {
    display: grid;
    justify-items: start;
    gap: 8px;
    padding: 22px 20px;
    border: 1.5px dashed rgba(127, 19, 153, 0.26);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 249, 211, 0.96)),
        radial-gradient(circle at top right, rgba(127, 19, 153, 0.1), transparent 42%);
    cursor: pointer;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone.drag-over {
    transform: translateY(-1px);
    border-color: rgba(127, 19, 153, 0.72);
    box-shadow: 0 0 0 4px rgba(127, 19, 153, 0.1);
}

.dropzone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), #a72ac9);
    color: #fffdf2;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dropzone em {
    color: var(--muted);
    font-style: normal;
}

.selected-file {
    margin-top: 6px;
    padding: 10px 12px;
    width: 100%;
    border-radius: 14px;
    background: rgba(127, 19, 153, 0.07);
    color: var(--text);
    font-size: 0.9rem;
    word-break: break-word;
}

button {
    appearance: none;
    border: 0;
    border-radius: 18px;
    padding: 15px 18px;
    font: inherit;
    font-weight: 700;
    color: #fffef2;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
    box-shadow: 0 18px 32px rgba(89, 10, 110, 0.28);
}

button:hover {
    transform: translateY(-1px);
}

button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.button-secondary {
    color: var(--primary-dark);
    background: rgba(127, 19, 153, 0.08);
    box-shadow: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(127, 19, 153, 0.08);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.badge.success {
    background: rgba(47, 125, 77, 0.14);
    color: var(--success);
}

.badge.error {
    background: rgba(160, 42, 42, 0.14);
    color: var(--error);
}

.operations-block {
    margin-top: 8px;
}

.operations-list {
    display: grid;
    gap: 12px;
}

.operation-item {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(127, 19, 153, 0.05);
    border: 1px solid rgba(127, 19, 153, 0.08);
}

.operation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.operation-title {
    margin: 0;
    font-weight: 700;
}

.operation-meta {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.operation-status {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.operation-status.success {
    background: rgba(47, 125, 77, 0.14);
    color: var(--success);
}

.operation-status.failed {
    background: rgba(160, 42, 42, 0.14);
    color: var(--error);
}

.result-panel {
    min-height: 100%;
}

.auth-result-panel {
    min-height: 520px;
}

.response-output {
    margin: 0;
    height: 520px;
    overflow: auto;
    border-radius: 22px;
    padding: 20px;
    background: linear-gradient(180deg, #2f0b3b, #1f0927);
    color: #fff6bf;
    line-height: 1.5;
    font-size: 0.92rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (max-width: 1100px) {
    .shell {
        grid-template-columns: 1fr;
        padding: 24px 0 32px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        padding: 24px 0 32px;
    }

    .response-output {
        height: 280px;
    }
}

@media (max-width: 720px) {
    .panel {
        padding: 22px;
    }

    .brandbar,
    .view-head,
    .operation-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
