/* ============================================================
   JWT Claims Builder — Styles
   Mint Fresh dark mode with glassmorphism accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary: #14B8A6;
    --primary-light: #2DD4BF;
    --accent: #E11D48;
    --bg: #0A1A18;
    --bg-elevated: #0F2422;
    --bg-surface: #163330;
    --bg-card: #122B28;
    --bg-hover: #1C3D39;
    --text-primary: #E4F5F2;
    --text-secondary: #7CB8AE;
    --text-muted: #4A7A72;
    --border: #1E4A44;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, .3);
    --font: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.app {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}

.header {
    text-align: center;
    padding: 28px 0 20px;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: var(--text-secondary);
    font-size: .9rem;
    margin-top: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 200ms;
}

.btn:hover {
    background: var(--bg-hover);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 700;
}

.btn-sm {
    padding: 6px 12px;
    font-size: .8rem;
}

.btn-danger {
    background: rgba(225, 29, 72, .1);
    border-color: var(--accent);
    color: var(--accent);
}

.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.card-header {
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.label {
    font-size: .75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    display: block;
    margin-bottom: 4px;
}

.input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: .85rem;
    outline: none;
    margin-bottom: 10px;
}

.input:focus {
    border-color: var(--primary);
}

.input-mono {
    font-family: var(--font-mono);
    font-size: .8rem;
}

select.input {
    appearance: none;
    cursor: pointer;
}

.claim-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    margin-bottom: 6px;
    align-items: end;
}

.claim-row button {
    margin-bottom: 10px;
}

.exp-helper {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.exp-helper .btn {
    font-size: .75rem;
    padding: 4px 10px;
}

.token-preview {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: var(--font-mono);
    font-size: .8rem;
    word-break: break-all;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
}

.token-header {
    color: #f97316;
}

.token-payload {
    color: var(--primary-light);
}

.token-signature {
    color: var(--accent);
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: .85rem;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: all 200ms;
    z-index: 200;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

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

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}