:root {
    --bg: #f2efe8;
    --panel: rgba(255, 255, 255, 0.82);
    --panel-strong: #ffffff;
    --text: #172126;
    --muted: #5d6b73;
    --line: rgba(23, 33, 38, 0.12);
    --brand: #0f9b8e;
    --brand-dark: #123c69;
    --danger: #a73b3b;
    --shadow: 0 20px 60px rgba(18, 60, 105, 0.18);
    --radius-lg: 28px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(15, 155, 142, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(18, 60, 105, 0.15), transparent 26%),
        linear-gradient(180deg, #fffaf2 0%, var(--bg) 100%);
    font-family: 'Cairo', sans-serif;
}

a {
    color: inherit;
}

.page-shell,
.landing-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.landing-shell {
    display: grid;
    gap: 24px;
    min-height: 100vh;
    align-content: center;
}

.two-column,
.dash-layout {
    display: grid;
    gap: 24px;
    align-items: start;
}

.two-column {
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

.dash-layout {
    grid-template-columns: minmax(260px, 320px) minmax(360px, 1fr) minmax(300px, 520px);
}

.panel,
.hero-card,
.company-tile,
.empty-state,
.status-shell {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.panel,
.hero-card,
.empty-state,
.status-shell {
    padding: 28px;
}

.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.company-tile {
    padding: 22px;
}

.hero-card h1,
.panel h1,
.status-shell h1 {
    margin: 0 0 12px;
    line-height: 1;
    font-size: clamp(2rem, 4vw, 4.8rem);
    letter-spacing: -0.05em;
}

.company-tile h2,
.company-row h2,
.empty-state h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.lede,
.muted,
.caption,
.company-tile p,
.company-row p,
.feature-list,
.status-shell p,
.empty-state p {
    color: var(--muted);
}

.button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.button {
    min-height: 46px;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    color: #ffffff;
    font: inherit;
    font-weight: 700;
}

.button:hover,
.text-link:hover {
    transform: translateY(-1px);
}

.button-secondary {
    background: #e9f5f2;
    color: var(--brand-dark);
}

.button-danger {
    background: #f9e3e3;
    color: var(--danger);
}

.full-width {
    width: 100%;
}

.stack-form {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.triple-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(23, 33, 38, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font: inherit;
}

input[type='color'] {
    padding: 6px;
}

input[type='file'] {
    padding: 10px 14px;
}

.inline-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.feature-list {
    margin: 0;
    padding-left: 18px;
}

.preview-stage {
    display: grid;
    place-items: center;
    min-height: 420px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(18, 60, 105, 0.07), rgba(15, 155, 142, 0.08));
    border: 1px dashed rgba(18, 60, 105, 0.2);
    overflow: auto;
}

.preview-stage canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(23, 33, 38, 0.18);
}

.company-list {
    display: grid;
    gap: 12px;
}

.company-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid transparent;
}

.company-row.active {
    border-color: rgba(15, 155, 142, 0.28);
    background: rgba(15, 155, 142, 0.08);
}

.company-row p,
.company-row h2 {
    margin: 0;
}

.share-box {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(18, 60, 105, 0.06);
}

.share-box span {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--brand-dark);
    font-weight: 700;
}

.toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.toggle-row input {
    width: 20px;
    min-height: 20px;
    padding: 0;
}

.toggle-cell {
    display: grid;
    align-items: end;
}

.notice {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 14px;
}

.notice-success {
    background: #e8f8f4;
    color: #0b5a51;
}

.notice-error {
    background: #fbeaea;
    color: #8a2b2b;
}

.status-shell {
    width: min(700px, calc(100% - 32px));
    margin: 72px auto;
}

@media (max-width: 1080px) {
    .dash-layout,
    .two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .page-shell,
    .landing-shell {
        width: min(100% - 20px, 1240px);
        padding: 20px 0 32px;
    }

    .panel,
    .hero-card,
    .empty-state,
    .status-shell {
        padding: 22px;
    }

    .form-grid,
    .triple-grid {
        grid-template-columns: 1fr;
    }

    .inline-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }
}
