@font-face {
    font-family: "Roboto Slab";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/fonts/roboto-slab-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

body {
    font-family: "Roboto Slab", serif;
    background: #fff;
    color: #090909;
    line-height: 1.6;
    padding: 2rem 0;
    max-width: 40em;
    width: 90%;
    margin: 0 auto;
}

h1 {
    font-weight: 300;
    font-size: 2rem;
    letter-spacing: -0.1rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

@media (min-width: 550px) {
    h1 {
        font-size: 2.4rem;
    }
}

.status {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.status.info {
    background: #e8f4fd;
    color: #1a5276;
}

.status.success {
    background: #d5f5e3;
    color: #1e8449;
}

.status.error {
    background: #fadbd8;
    color: #922b21;
}

.auth-section {
    margin-bottom: 2rem;
}

.auth-section p {
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    font-family: "Roboto Slab", serif;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s linear;
}

.btn-primary {
    background: #090909;
    color: #fff;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    background: #e1e1e1;
    color: #090909;
}

.btn-secondary:hover {
    background: #ccc;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-form {
    display: none;
}

.upload-form.visible {
    display: block;
}

.field {
    margin-bottom: 1.5rem;
}

.field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.4rem;
    color: #555;
}

.field input[type="file"] {
    font-family: "Roboto Slab", serif;
    font-size: 0.9rem;
}

.field-help {
    font-size: 0.85rem;
    color: #666;
}

.preview {
    margin-bottom: 1.5rem;
    display: none;
}

.preview.visible {
    display: block;
}

.preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    object-fit: contain;
}

.actions {
    margin-top: 0.5rem;
}

.user-info {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.25rem;
}

.logout-link {
    color: #922b21;
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    font-family: "Roboto Slab", serif;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

/* AI description section */
.ai-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f8f8;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.ai-section .status {
    margin-bottom: 0.75rem;
}

.ai-results {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ai-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ai-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.03rem;
}

.ai-value {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #090909;
}

input.ai-value,
textarea.ai-value {
    width: 100%;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-family: "Roboto Slab", serif;
    padding: 0.5rem 0.75rem;
    outline: none;
}

input.ai-value:focus,
textarea.ai-value:focus {
    border-color: #999;
}

input.ai-value.invalid,
textarea.ai-value.invalid {
    border-color: #b94a48;
}

input.ai-value::placeholder,
textarea.ai-value::placeholder {
    color: #8a8a8a;
}

textarea.ai-value {
    resize: vertical;
    min-height: 4.5rem;
}

/* Feedback and regenerate */
.ai-feedback {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e1e1e1;
}

.ai-feedback textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-family: "Roboto Slab", serif;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.ai-feedback textarea:focus {
    outline: none;
    border-color: #999;
}

.ai-feedback .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

#publish-date-status {
    margin-top: 0.25rem;
}

#publish-date-status.error {
    color: #922b21;
}

#publish-date-status.info {
    color: #555;
}
