:root {
    --bg-1: #06070b;
    --bg-2: #0b0f16;
    --panel: rgba(14, 16, 22, 0.62);
    --panel-strong: rgba(17, 20, 28, 0.82);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f4f4f6;
    --muted: #9ca3b3;
    --accent: #ff7a30;
    --accent-2: #ff4f1f;
    --shadow: 0 20px 70px rgba(0, 0, 0, 0.50);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(circle at 75% 20%, rgba(255, 122, 48, 0.22), transparent 0 28%),
        radial-gradient(circle at 18% 35%, rgba(44, 99, 255, 0.18), transparent 0 26%),
        linear-gradient(180deg, #0b0f16 0%, #07090d 42%, #040507 100%);
    overflow-x: hidden;
    position: relative;
}

body::after {
    content: "";
    position: fixed;
    inset: auto 0 0 0;
    height: 38vh;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at center, rgba(255,122,48,0.08), transparent 58%),
        linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0.02));
    clip-path: polygon(0 100%, 0 72%, 8% 68%, 16% 73%, 25% 66%, 35% 78%, 43% 70%, 52% 76%, 61% 67%, 72% 75%, 82% 64%, 91% 72%, 100% 60%, 100% 100%);
}

.page {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px;
}

.frame {
    min-height: calc(100vh - 56px);
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(12,14,20,0.72), rgba(7,8,12,0.72));
    backdrop-filter: blur(18px);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    background: linear-gradient(180deg, rgba(8,10,15,0.78), rgba(10,12,17,0.55));
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 26px 18px 22px;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 10px 22px;
    margin-bottom: 10px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,122,48,0.24), rgba(255,79,31,0.08));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 25px rgba(255,122,48,0.18);
    display: grid;
    place-items: center;
    font-size: 19px;
}

.brand-text {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-text span { color: #ffb089; }

.menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.menu a {
    text-decoration: none;
    color: #d2d7e2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.02);
    transition: 0.22s ease;
}

.menu a.active,
.menu a:hover {
    color: #fff;
    background: linear-gradient(90deg, rgba(255,122,48,0.18), rgba(255,79,31,0.08));
    border: 1px solid rgba(255,122,48,0.20);
    box-shadow: 0 0 20px rgba(255,122,48,0.10);
}

.main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(13,15,21,0.55), rgba(13,15,21,0.18));
    backdrop-filter: blur(18px);
}

.top-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.top-tabs a {
    text-decoration: none;
    color: #c3c9d6;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    transition: 0.2s ease;
}

.top-tabs a.active,
.top-tabs a:hover {
    color: #fff;
    background: linear-gradient(90deg, rgba(255,122,48,0.18), rgba(255,79,31,0.08));
    border: 1px solid rgba(255,122,48,0.20);
    box-shadow: 0 0 20px rgba(255,122,48,0.12);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}

.logout {
    text-decoration: none;
    color: white;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    padding: 10px 16px;
    border-radius: 999px;
    box-shadow: 0 0 20px rgba(255,122,48,0.18);
}

.content { padding: 28px 24px 34px; }

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(circle at 65% 20%, rgba(255,122,48,0.18), transparent 22%),
        radial-gradient(circle at 20% 15%, rgba(44,99,255,0.12), transparent 20%),
        linear-gradient(180deg, rgba(20,16,15,0.48), rgba(12,13,19,0.72));
    box-shadow: var(--shadow);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

.hero-subtitle {
    color: var(--muted);
    max-width: 720px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;
}

.editor-card,
.preview-card {
    background: rgba(16, 18, 26, 0.62);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(22px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 14px 45px rgba(0,0,0,0.38);
}

.section-title {
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.field-block {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #dfe4ee;
    font-weight: 600;
    font-size: 0.96rem;
}

input, textarea, select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.34);
    color: white;
    outline: none;
    transition: 0.2s ease;
    font-size: 0.98rem;
    margin-bottom: 14px;
}

select option {
    background: #11151f;
    color: white;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(255,122,48,0.45);
    box-shadow: 0 0 0 4px rgba(255,122,48,0.08), 0 0 22px rgba(255,122,48,0.10);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.hint {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 16px;
}

.actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

button {
    border: none;
    color: white;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    padding: 14px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 0 22px rgba(255,122,48,0.20);
}

.preview-embed {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 4px solid #ff7a30;
    border-radius: 18px;
    padding: 18px;
}

.preview-embed h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.preview-embed p {
    color: #d4d9e3;
    line-height: 1.6;
    margin-bottom: 14px;
    white-space: pre-wrap;
}

.preview-field {
    margin-bottom: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.preview-field strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
}

.preview-footer {
    margin-top: 16px;
    color: #9ca3b3;
    font-size: 0.9rem;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(520px, 92vw);
    padding: 38px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(circle at 75% 20%, rgba(255,122,48,0.16), transparent 22%),
        radial-gradient(circle at 20% 15%, rgba(44,99,255,0.10), transparent 20%),
        linear-gradient(180deg, rgba(14,16,22,0.70), rgba(10,12,18,0.84));
    backdrop-filter: blur(22px);
    box-shadow: 0 24px 70px rgba(0,0,0,0.50);
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.logo span {
    color: #ffb089;
}

.login-card h1 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #f6f7fb;
}

.login-card p {
    color: #aab2c5;
    line-height: 1.65;
    margin-bottom: 26px;
}

.button {
    display: inline-block;
    text-decoration: none;
    color: white;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 0 22px rgba(255,122,48,0.20);
}

.secondary-button {
    margin-top: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
    padding: 12px 18px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: none;
}

.secondary-button:hover {
    background: rgba(255,255,255,0.08);
}

@media (max-width: 1150px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1020px) {
    .frame {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .page { padding: 16px; }
    .hero-title { font-size: 1.8rem; }
    .brand-text { font-size: 1.6rem; }
}