/* AI Task Runner — Kookaburra-inspired theme */

:root {
    --atr-purple: #4f46e5;
    --atr-purple-light: #818cf8;
    --atr-blue: #60a5fa;
    --atr-orange: #f59e0b;
    --atr-orange-light: #fbbf24;
    --atr-dark: #0f0d1a;
    --atr-card: #1a1730;
    --atr-card-border: rgba(255, 255, 255, 0.12);
    --atr-card-border-hover: rgba(255, 255, 255, 0.25);
    --atr-text: #e8e6f0;
    --atr-text-muted: #a09bb5;
    --atr-white: #ffffff;
}

/* Override Pico theme */
[data-theme="dark"] {
    --pico-primary: var(--atr-purple-light);
    --pico-primary-hover: var(--atr-purple);
    --pico-primary-background: var(--atr-purple);
    --pico-background-color: var(--atr-dark);
    --pico-card-background-color: var(--atr-card);
    --pico-card-border-color: var(--atr-card-border);
    --pico-color: var(--atr-text);
    --pico-muted-color: var(--atr-text-muted);
}

body {
    background: var(--atr-dark);
    color: var(--atr-text);
}

/* Rounded corners */
article, details, input, textarea, select, .flash-error, .flash-success {
    border-radius: 16px !important;
}

button, [role="button"], .btn-primary {
    border-radius: 10px !important;
}

/* ---- NAV ---- */
header nav a {
    color: var(--atr-text);
}

.nav-logo {
    height: 36px;
    width: auto;
    vertical-align: middle;
    margin-right: 0.4rem;
}

/* ---- HERO ---- */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero-logo {
    height: 250px;
    width: auto;
    display: block;
    margin: 0 auto 2rem;
    filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.4))
            drop-shadow(0 0 80px rgba(99, 102, 241, 0.2));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--atr-white);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero h1 .accent {
    color: var(--atr-orange);
}

.hero > p {
    font-size: 1.3rem;
    color: var(--atr-text-muted);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---- FEATURE CARDS ---- */
.feature-card {
    background: var(--atr-card);
    border: 1px solid var(--atr-card-border);
    border-radius: 16px !important;
    padding: 2rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.feature-card:hover {
    border-color: var(--atr-card-border-hover);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
}

.feature-card h3 {
    color: var(--atr-white);
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--atr-orange);
    display: inline-block;
}

.feature-card li {
    margin-bottom: 0.6rem;
    color: var(--atr-text);
}

.feature-card p {
    color: var(--atr-text-muted);
}

/* ---- PRICING CARD ---- */
.pricing-card {
    background: var(--atr-card);
    border: 2px solid var(--atr-orange);
    border-radius: 20px !important;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--atr-purple), var(--atr-orange), var(--atr-blue));
}

.pricing-card h3 {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--atr-orange);
    margin-bottom: 0.75rem;
}

.pricing-card p {
    color: var(--atr-text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ---- BUTTONS ---- */
.btn-primary {
    background: var(--atr-orange);
    border: none;
    color: #1a1730;
    padding: 0.85rem 2.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 10px !important;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    color: #1a1730;
}

.btn-secondary {
    color: var(--atr-text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 1rem;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
}

.btn-secondary:hover {
    color: var(--atr-white);
    border-bottom-color: var(--atr-white);
}

/* ---- SELF-HOST DETAILS ---- */
details {
    background: var(--atr-card);
    border: 1px solid var(--atr-card-border);
    padding: 1rem 1.5rem;
    margin-top: 1rem;
}

details summary {
    color: var(--atr-text-muted);
    cursor: pointer;
    font-weight: 500;
}

details p {
    color: var(--atr-text-muted);
}

/* ---- CODE ---- */
code {
    background: rgba(99, 102, 241, 0.15);
    color: var(--atr-purple-light);
    padding: 0.2rem 0.5rem;
    border-radius: 6px !important;
    font-size: 0.9em;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

pre code {
    border: none;
}

/* ---- AUTH PAGES ---- */
.auth-card {
    max-width: 480px;
    margin: 2rem auto;
    background: var(--atr-card);
    border: 1px solid var(--atr-card-border);
    border-radius: 20px !important;
    padding: 2.5rem;
}

.auth-card h2 {
    text-align: center;
    color: var(--atr-white);
    margin-bottom: 0.5rem;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--atr-text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-card label {
    color: var(--atr-text);
}

.auth-card input {
    background: var(--atr-dark);
    border: 1px solid var(--atr-card-border);
    color: var(--atr-text);
    border-radius: 10px !important;
}

.auth-card input:focus {
    border-color: var(--atr-purple-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.prerequisite-note {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px !important;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--atr-text);
    line-height: 1.6;
}

.prerequisite-note a {
    color: var(--atr-orange);
    font-weight: 600;
}

/* ---- DASHBOARD ---- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    min-height: calc(100vh - 120px);
}

.dashboard-layout aside {
    border-right: 1px solid var(--atr-card-border);
    padding-right: 1rem;
}

.dashboard-layout aside nav ul {
    flex-direction: column;
    gap: 0;
}

.dashboard-layout aside a {
    display: block;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--atr-text-muted);
    transition: all 0.2s;
    font-weight: 500;
}

.dashboard-layout aside a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--atr-white);
}

.dashboard-layout aside a.active {
    background: var(--atr-purple);
    color: var(--atr-white);
}

.dash-content {
    max-width: 900px;
}

/* ---- FLASH MESSAGES ---- */
.flash-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.flash-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

/* ---- STATUS INDICATORS ---- */
.status-ok {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
    padding: 1rem 1.25rem;
    border-radius: 12px !important;
}

.status-ok strong {
    color: #4ade80;
}

.status-warn {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--atr-orange-light);
    padding: 1rem 1.25rem;
    border-radius: 12px !important;
}

.status-warn strong {
    color: var(--atr-orange);
}

/* ---- TASK STATUS BADGES ---- */
.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-queued {
    background: rgba(96, 165, 250, 0.15);
    color: var(--atr-blue);
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.badge-processing {
    background: rgba(245, 158, 11, 0.15);
    color: var(--atr-orange-light);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-done {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-failed {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ---- STATUS SUMMARY CARDS ---- */
.status-card {
    text-align: center;
    padding: 1.2rem 1rem;
    background: var(--atr-card);
    border: 1px solid var(--atr-card-border);
    border-radius: 12px !important;
}

.status-card h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--atr-white);
    margin-bottom: 0;
}

.status-card p {
    color: var(--atr-text-muted);
    margin: 0;
    font-size: 0.9rem;
}

/* Small buttons */
.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--atr-card-border);
    padding-top: 1.5rem;
    margin-top: 3rem;
}

footer small {
    color: var(--atr-text-muted);
}

footer a {
    color: var(--atr-purple-light);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero-logo {
        height: 160px;
    }
    .pricing-card {
        padding: 2rem;
    }
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .dashboard-layout aside {
        border-right: none;
        border-bottom: 1px solid var(--atr-card-border);
        padding-right: 0;
        padding-bottom: 1rem;
    }
    .dashboard-layout aside nav ul {
        flex-direction: row;
        flex-wrap: wrap;
    }
}
