/* Video Knowledge Extractor — web UI.
   Warm neutral palette: background #f4f0e8, cards #fbf9f4,
   accent #a08b6d, text #3a352e. No gradients. */

:root {
    --bg: #f4f0e8;
    --card: #fbf9f4;
    --accent: #a08b6d;
    --accent-dark: #8a7660;
    --text: #3a352e;
    --muted: #7d7466;
    --border: #e3dccd;
    --error: #a3543f;
    --error-bg: #f5e6e0;
    --ok: #6d7f57;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header / footer */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    margin-bottom: 28px;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    text-decoration: none;
}
.logo:hover { color: var(--accent-dark); }
.header-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}
.header-link:hover { color: var(--accent-dark); }
.site-footer {
    margin-top: 40px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 24px;
}

h1 { font-size: 22px; margin: 0 0 14px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.section-title { margin: 28px 0 14px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Buttons */
.btn {
    display: inline-block;
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-secondary {
    background: transparent;
    color: var(--accent-dark);
}
.btn-secondary:hover { background: #f1ead9; }
.btn-danger {
    background: transparent;
    color: var(--error);
    border-color: var(--error);
}
.btn-danger:hover { background: var(--error-bg); }

/* Drop zone */
.drop-zone {
    border: 2px dashed var(--accent);
    border-radius: var(--radius);
    padding: 34px 20px;
    text-align: center;
    margin-bottom: 20px;
    transition: background 0.15s ease;
}
.drop-zone.dragover { background: #f1ead9; }
.drop-title { font-size: 17px; margin: 0 0 4px; }
.file-name { margin-top: 10px; font-weight: 600; }

/* Mode selection */
.mode-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.mode-label { font-weight: 600; margin-bottom: 2px; }
.mode-option {
    display: flex;
    gap: 10px;
    align-items: baseline;
    cursor: pointer;
}
.mode-option input { accent-color: var(--accent); }

/* Job list */
.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.job-item {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text);
}
.job-item:hover { border-color: var(--accent); }
.job-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.job-name {
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Status badges */
.status-badge {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid var(--muted);
    color: var(--muted);
}
.status-queued  { border-color: var(--muted);  color: var(--muted); }
.status-running { border-color: var(--accent); color: var(--accent-dark); }
.status-done    { border-color: var(--ok);     color: var(--ok); }
.status-error   { border-color: var(--error);  color: var(--error); }

/* Progress */
.progress-bar {
    height: 10px;
    background: #eae3d3;
    border-radius: 6px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 6px;
    transition: width 0.4s ease;
}
.progress-block { margin: 14px 0; }
.progress-block .muted { margin: 6px 0 0; font-size: 14px; }

/* Job page */
.job-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.job-head h1 { margin: 0; overflow-wrap: anywhere; }
.file-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
}
.file-list a {
    color: var(--accent-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
}
.file-list a:hover { color: var(--text); }
.report-frame {
    width: 100%;
    min-height: 600px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}
.job-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}
.job-actions form { margin: 0; }

/* Alerts */
.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 10px 14px;
}

/* Login */
.login-card { max-width: 420px; margin: 60px auto; }
.login-card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.login-card input[type="password"] {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}
.login-card input[type="password"]:focus {
    outline: 2px solid var(--accent);
    border-color: var(--accent);
}

@media (max-width: 600px) {
    .card { padding: 20px 18px; }
    .job-head { flex-direction: column; align-items: flex-start; }
}
