body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f7f7fa;
    color: #222;
}
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 220px;
    background: #232946;
    color: #fff;
    padding: 2em 1em 1em 1em;
    display: flex;
    flex-direction: column;
    z-index: 100;
}
.sidebar-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 2em;
    text-align: center;
}
.sidebar a {
    color: #eebbc3;
    text-decoration: none;
    margin: 1em 0;
    font-size: 1.1em;
    transition: color 0.2s;
}
.sidebar a:hover {
    color: #fff;
}
.main-content {
    margin-left: 240px;
    padding: 2em;
    max-width: 700px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.deck-form textarea {
    width: 90%;
    font-size: 1em;
    padding: 1em;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 1em;
    resize: vertical;
    min-height: 300px;
    background: #fff;
}
.deck-form button {
    background: #232946;
    color: #fff;
    border: none;
    padding: 0.7em 2em;
    border-radius: 6px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s;
}
.deck-form button:hover:not(:disabled) {
    background: #eebbc3;
    color: #232946;
}
.deck-form button:disabled {
    cursor: wait;
    opacity: 0.7;
}
.submit-feedback {
    margin-top: 0.5em;
    color: #555;
}
.download-btn {
    display: inline-block;
    background: #232946;
    color: #fff;
    padding: 1em 2em;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.2em;
    margin: 1em 0;
    transition: background 0.2s;
}
.download-btn:hover {
    background: #eebbc3;
    color: #232946;
}
.secondary-btn {
    background: #666;
}
.status-card {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    background: #fff;
    border-left: 6px solid #232946;
    border-radius: 8px;
    padding: 1.2em;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}
.status-complete {
    border-left-color: #26734d;
}
.status-failed {
    border-left-color: #a00;
}
.status-label {
    margin: 0;
    text-transform: capitalize;
}
.status-meta,
.status-help {
    color: #555;
}
.spinner {
    width: 32px;
    height: 32px;
    border: 4px solid #ddd;
    border-top-color: #232946;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.flash {
    padding: 1em;
    margin-bottom: 1em;
    border-radius: 6px;
}
.flash.error {
    background: #ffdddd;
    color: #a00;
}
.error-list {
    background: #fff3cd;
    color: #856404;
    border-radius: 6px;
    padding: 1em;
    margin: 1em 0;
}
.deck-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.deck-item {
    margin-bottom: 1em;
}
.no-decks {
    color: #888;
}
.settings-title {
    text-align: center;
    margin-bottom: 1.5em;
}
.settings-form {
    max-width: 400px;
    margin: 0 auto;
    background: #f9f9f9;
    padding: 2em 2.5em 1.5em 2.5em;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}
.settings-fields {
    display: flex;
    flex-direction: column;
    gap: 1em;
}
.settings-fields label {
    display: flex;
    flex-direction: column;
    font-weight: 500;
}
.settings-fields input,
.settings-fields select {
    margin-top: 0.3em;
    padding: 0.5em;
    border-radius: 5px;
    border: 1px solid #ccc;
}
.settings-fields .settings-checkbox-label {
    flex-direction: row;
    align-items: center;
    gap: 0.5em;
}
.settings-fields .settings-checkbox-label input {
    margin-top: 0;
}
.settings-field-invalid {
    background: #ffecec;
    border: 1px solid #f2a3a3;
    border-radius: 6px;
    padding: 0.5em;
}
.settings-field-invalid input,
.settings-field-invalid select {
    background: #fff6f6;
    border-color: #d9534f;
}
.settings-fields button {
    margin-top: 1em;
    padding: 0.7em;
    background: #0078d4;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.settings-fields button:hover {
    background: #005fa3;
}
@media (max-width: 900px) {
    .main-content { margin-left: 0; padding: 1em; }
    .sidebar { position: static; width: 100%; flex-direction: row; justify-content: space-between; }
    .sidebar-title { margin-bottom: 0; }
}

.pdf {
    width: 90%;
    aspect-ratio: 3/4;
}
