* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #222;
    background: #f6f7fb;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #1f2937;
    color: #fff;
}

.topbar h1 { margin: 0; font-size: 18px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-right button {
    background: #374151;
    color: #fff;
    border: 0;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}
.topbar-right button:hover { background: #4b5563; }

.layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 16px;
    padding: 16px;
    height: calc(100vh - 56px);
}

.sidebar {
    background: #fff;
    border-radius: 6px;
    padding: 12px;
    overflow-y: auto;
}

.detail {
    background: #fff;
    border-radius: 6px;
    padding: 24px;
    overflow-y: auto;
}

.upload-area button {
    width: 100%;
    padding: 10px;
    border: 1px dashed #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.upload-status {
    margin-top: 8px;
    font-size: 12px;
    color: #555;
}

.list { list-style: none; padding: 0; margin: 12px 0 0; }

.list-item {
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 4px;
    border-left: 3px solid transparent;
}

.list-item:hover { background: #f3f4f6; }
.list-item.selected { background: #e0e7ff; border-left-color: #4338ca; }

.list-item-header {
    display: flex; justify-content: space-between;
    font-weight: 600; font-size: 13px;
}

.list-item-meta {
    display: flex; justify-content: space-between;
    color: #6b7280; font-size: 12px; margin-top: 4px;
}

.status-PENDING .status { color: #b45309; }
.status-PROCESSING .status { color: #1d4ed8; }
.status-COMPLETED .status { color: #047857; }
.status-FAILED .status { color: #b91c1c; }

.placeholder { color: #9ca3af; }

audio { display: block; margin: 12px 0; width: 100%; }

.fields { display: grid; grid-template-columns: 140px 1fr; gap: 4px 16px; }
.fields dt { color: #6b7280; }
.fields dd { margin: 0; }

pre.text, pre.json {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 12px;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow: auto;
}

.error { color: #b91c1c; }

.login-body {
    display: flex; min-height: 100vh; align-items: center; justify-content: center;
    background: #1f2937;
}

.login-card {
    background: #fff; padding: 32px; border-radius: 8px; min-width: 320px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.login-card h1 { margin: 0 0 16px; font-size: 20px; }

.login-card label {
    display: block; margin-bottom: 12px; font-size: 13px; color: #374151;
}

.login-card input {
    display: block; width: 100%; margin-top: 4px;
    padding: 8px; border: 1px solid #d1d5db; border-radius: 4px;
    font-size: 14px;
}

.login-card button {
    width: 100%; padding: 10px; background: #4338ca; color: #fff;
    border: 0; border-radius: 4px; cursor: pointer; font-weight: 600;
}

.login-card button:hover { background: #3730a3; }
