/* Pixiware design system */

:root {
    --gradient-signature: linear-gradient(135deg, #a3e635, #10b981 50%, #06b6d4);
    --color-lime: #a3e635;
    --color-emerald: #10b981;
    --color-cyan: #06b6d4;
    --color-emerald-dark: #059669;
    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --color-surface: #ffffff;
    --color-bg: #ffffff;
    --color-bg-subtle: #f8fafc;
    --color-border: #e2e8f0;
    --radius-xl: 16px;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
    --font-sans: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', Consolas, monospace;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1 {
    font-size: clamp(1.375rem, 3vw, 1.625rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
    color: var(--color-text);
}

p {
    margin: 0;
    color: var(--color-text-muted);
}

a {
    color: var(--color-emerald-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--color-cyan);
}

/* Brand logo */
.brand__logo {
    display: block;
    height: 36px;
    width: auto;
}

.brand__logo--sm {
    height: 28px;
}

/* Shared app header */
.app_header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 2rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

.app_header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--gradient-signature);
}

.app_header__meta h1 {
    font-size: 1.125rem;
    margin-bottom: 0.125rem;
}

.app_header__meta p {
    font-size: 0.8125rem;
}

/* Auth pages */
body.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: max(1.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    background: var(--color-bg);
}

body.auth-page h1 {
    text-align: center;
    margin-bottom: 0.375rem;
    margin-top: 0;
}

body.auth-page .auth-subtitle {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

body.auth-page form {
    width: 100%;
    max-width: 400px;
    margin-top: 1.75rem;
    padding: 1.75rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

body.auth-page input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.auth-page input:focus {
    outline: none;
    border-color: var(--color-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

body.auth-page input::placeholder {
    color: #94a3b8;
}

body.auth-page button {
    margin-top: 0.375rem;
    padding: 0.875rem 1.25rem;
    min-height: 48px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-signature);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

body.auth-page button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

body.auth-page .auth-footer {
    margin-top: 1.25rem;
    font-size: 0.875rem;
}

.btn-gradient {
    background: var(--gradient-signature);
    color: #fff;
    border: none;
    font-weight: 600;
}

input,
button {
    font-family: var(--font-sans);
}

button {
    cursor: pointer;
}

input:focus {
    outline: none;
}

::selection {
    background: rgba(163, 230, 53, 0.25);
}

@media (max-width: 480px) {
    body.auth-page form {
        padding: 1.25rem;
        margin-top: 1.25rem;
    }

    .app_header {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .app_header__meta h1 {
        font-size: 1rem;
    }

    .app_header__meta p {
        font-size: 0.75rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 55vw;
    }
}
