:root {
    --bg: #0b1224;
    --panel: #0f172a;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e7ecf5;
    --muted: #8b95b7;
    --accent: #8b5cf6;
    --accent-2: #22d3ee;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.12), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(139, 92, 246, 0.16), transparent 35%),
    linear-gradient(135deg, #0b1224 0%, #0c1428 40%, #0b1021 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

.glow {
    position: absolute;
    filter: blur(140px);
    opacity: 0.4;
    z-index: 0;
}

.glow-1 {
    width: 320px;
    height: 320px;
    background: #8b5cf6;
    top: -60px;
    left: -40px;
}

.glow-2 {
    width: 340px;
    height: 340px;
    background: #22d3ee;
    bottom: -80px;
    right: -40px;
}

.app-shell {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.brand-logo {
    height: 40px;
    width: auto;
    display: block;
}

.brand-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    line-height: 1.4;
}

.app-footer {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 16px 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    gap: 12px;
}

.app-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    font-size: 12px;
    color: var(--accent-2);
    margin: 0 0 6px 0;
}

.subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
    max-width: 70ch;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
    color: var(--text);
}

h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.muted {
    color: var(--muted);
}

.tag {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-weight: 600;
    height: fit-content;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.app-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;
}

.card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.card-primary {
    border-color: rgba(139, 92, 246, 0.3);
}

.card-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.field-hint {
    font-size: 13px;
    color: var(--muted);
}

textarea {
    width: 100%;
    min-height: 240px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    padding: 14px 12px;
    font-size: 15px;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
}

.secret-readonly {
    min-height: 200px;
    resize: vertical;
}

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

.btn {
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    color: #0c0a1a;
}

.btn-gradient {
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: #0c0a1a;
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.35);
}

.btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(34, 211, 238, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 16px;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.generator {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.generator-row {
    display: grid;
    grid-template-columns: 1fr 0.65fr;
    gap: 14px;
}

.password-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.1s ease;
}

.icon-btn:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.pw-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 12px 10px;
    font-size: 16px;
    font-weight: 700;
}

select#pw-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 10px;
    font-size: 15px;
    width: 100%;
}

.toggles {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.toggle input {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

.generator-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.icon {
    width: 18px;
    height: 18px;
    filter: invert(1);
}

@media (max-width: 1080px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .generator-row {
        grid-template-columns: 1fr;
    }

    .app-header {
        flex-direction: column;
    }
}

