@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    color-scheme: dark;
    font-family: 'Inter', sans-serif;
    background-color: #1a1d1a;
    color: #e2e8f0;
    --surface: #242824;
    --surface-strong: #2d332d;
    --ink: #f0fdf4;
    --muted: #94a3b8;
    --accent: #10b981;
    /* Emerald */
    --accent-strong: #059669;
    --accent-2: #f59e0b;
    --border: #353f38;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg-color);
    background: radial-gradient(circle at top right, #132e23, transparent 40%),
        radial-gradient(circle at bottom left, #0f1f18, transparent 40%),
        #1a1d1a;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: #d1fae5;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 0.95rem;
}

button {
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.4rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
    font-weight: 500;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(16, 185, 129, 0.3);
}

button.ghost {
    background: transparent;
    color: var(--accent);
    box-shadow: none;
    border: 1px solid var(--border);
}

button.ghost:hover {
    background: rgba(16, 185, 129, 0.1);
}

.app-shell {
    padding: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.app-header h1 {
    font-size: 2.5rem;
}

.status-pill {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 0.3rem 1rem;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}

.panel {
    background: rgba(45, 51, 45, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.layout {
    display: grid;
    grid-template-columns: 280px 1fr 380px;
    gap: 2rem;
}

.toggle {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 0.4rem;
    gap: 0.4rem;
    display: flex;
}

.toggle button {
    flex: 1;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    border-radius: 12px;
}

.toggle button.active {
    background: var(--accent-strong);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input,
select,
textarea {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0.7rem 1rem;
    background: #151815;
    color: white;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #1a1d1a;
}

.card {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    /* Invisible border initially */
    height: auto;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.card.active {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent);
}

.badge {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Utilities */
.small {
    font-size: 0.75rem;
}

.meta span {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--muted);
}

.stack {
    display: grid;
    gap: 0.8rem;
}

.editor {
    display: grid;
    gap: 1rem;
}

.list {
    display: grid;
    gap: 0.8rem;
}

.list li {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    color: #e2e8f0;
}

.composer-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.6rem 1rem;
}

.composer-base {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.6rem 1rem;
}

/* Form Labels */
label {
    display: grid;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--ink);
}

label.checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 400;
    cursor: pointer;
}

label.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent);
}

/* Split Layout for Categories and Tags */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.checkbox-grid {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .split {
        grid-template-columns: 1fr;
    }
}