/* Axynema Custom Styles */

/* Layout */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
}

.center {
    text-align: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--pico-primary);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--pico-muted-color);
}

.stat-error .stat-value {
    color: var(--pico-del-color);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--pico-border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-downloading,
.status-transcribing,
.status-translating,
.status-generating,
.status-uploading {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-review {
    background-color: #fce7f3;
    color: #9d174d;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
}

button.small,
a[role="button"].small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Flash Messages */
.flash-error {
    border-left: 4px solid var(--pico-del-color);
    background: #fee2e2;
}

.flash-success {
    border-left: 4px solid var(--pico-ins-color);
    background: #d1fae5;
}

.flash-warning {
    border-left: 4px solid #f59e0b;
    background: #fef3c7;
}

.flash-info {
    border-left: 4px solid var(--pico-primary);
    background: #dbeafe;
}

/* Error Text */
.error-text {
    color: var(--pico-del-color);
    background: #fee2e2;
    padding: 0.5rem;
    border-radius: var(--pico-border-radius);
    font-family: monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Tables */
table {
    width: 100%;
}

table th,
table td {
    padding: 0.5rem;
}

/* HTMX Indicators */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline;
}

.htmx-request.htmx-indicator {
    display: inline;
}

/* Article Headers with Actions */
article > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

article > header h3 {
    margin: 0;
}

/* Definition Lists */
dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

dt {
    font-weight: 600;
    color: var(--pico-muted-color);
}

dd {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    dl {
        grid-template-columns: 1fr;
    }

    dt {
        margin-top: 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] {
    .status-pending {
        background-color: #78350f;
        color: #fef3c7;
    }

    .status-downloading,
    .status-transcribing,
    .status-translating,
    .status-generating,
    .status-uploading {
        background-color: #1e3a8a;
        color: #dbeafe;
    }

    .status-review {
        background-color: #831843;
        color: #fce7f3;
    }

    .status-completed {
        background-color: #064e3b;
        color: #d1fae5;
    }

    .status-failed {
        background-color: #7f1d1d;
        color: #fee2e2;
    }

    .flash-error {
        background: #7f1d1d;
        color: #fee2e2;
    }

    .flash-success {
        background: #064e3b;
        color: #d1fae5;
    }

    .flash-warning {
        background: #78350f;
        color: #fef3c7;
    }

    .flash-info {
        background: #1e3a8a;
        color: #dbeafe;
    }

    .error-text {
        background: #7f1d1d;
        color: #fee2e2;
    }
}
