* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f0f2f5; color: #1a1a2e; min-height: 100vh; padding: 32px 16px;
}
.container { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.container { max-width: 1140px; }

/* ===== TOP BAR ===== */
.top-bar { display: flex; align-items: center; justify-content: space-between; }
.top-bar h1 { font-size: 22px; font-weight: 700; }
.user-area { display: flex; align-items: center; gap: 12px; }
.user-email { font-size: 13px; color: #555; }
.logout-btn { all: unset; font-size: 12px; color: #b91c1c; cursor: pointer; padding: 4px 10px; border-radius: 6px; border: 1px solid #fecaca; background: #fef2f2; font-weight: 600; transition: background .15s; width: auto; margin: 0; }
.logout-btn:hover { background: #fee2e2; }
h2 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }

/* ===== FORM ===== */
.form-box { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.input-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.input-group label { font-size: 13px; font-weight: 600; color: #444; }
.input-group input, .input-group select {
  font-size: 14px; padding: 8px 10px; border: 1px solid #d0d0d0; border-radius: 8px; outline: none; transition: border .15s; width: 100%;
}
.input-group input:focus, .input-group select:focus { border-color: #4361ee; }
.hidden { display: none !important; }

/* ===== PREVIEW ===== */
.preview-wrapper { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.preview-frame { position: relative; width: 100%; aspect-ratio: 16/9; background: #1a1a2e; border-radius: 8px; overflow: hidden; user-select: none; display: flex; align-items: center; justify-content: center; }
.preview-label { color: rgba(255,255,255,.12); font-size: 28px; font-weight: 700; letter-spacing: 2px; pointer-events: none; }
.logo-overlay { position: absolute; cursor: grab; z-index: 2; touch-action: none; }
.logo-overlay img { display: block; width: 100%; height: 100%; pointer-events: none; }
.resize-handle { position: absolute; bottom: 0; right: 0; width: 14px; height: 14px; background: #4361ee; border: 2px solid #fff; border-radius: 3px; cursor: nwse-resize; z-index: 3; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.coords-bar { display: flex; justify-content: center; gap: 20px; font-size: 13px; color: #555; }
.coords-bar strong { color: #1a1a2e; font-weight: 700; }

/* ===== BUTTON ===== */
button { width: 100%; padding: 12px; border: none; border-radius: 10px; background: #4361ee; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s; margin-top: 4px; }
button:hover { background: #3a56d4; }
button:disabled { background: #b0b8c8; cursor: not-allowed; }

/* ===== RESULT ===== */
.result-box { margin-top: 10px; padding: 10px 14px; border-radius: 8px; font-size: 13px; }
.result-box.success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.result-box.error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

/* ===== JOB LIST ===== */
.job-list-box { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.job-list-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px;
}
.job-pagination-info { font-size: 12px; color: #666; }
.job-pagination-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-page-numbers { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.secondary-btn {
  width: auto; margin-top: 0; padding: 8px 12px; font-size: 13px; border-radius: 8px;
}
.page-btn {
  width: auto; margin-top: 0; min-width: 38px; padding: 8px 10px; font-size: 13px; border-radius: 8px;
}
.page-btn.active { background: #1f3fbf; }
.job-table-wrap { overflow-x: auto; }
.job-table {
  width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 13px;
}
.job-table th,
.job-table td {
  padding: 12px 10px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: top;
}
.job-table th {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; background: #f8fafc;
}
.job-table tr:last-child td { border-bottom: none; }
.job-time { color: #667085; font-size: 12px; white-space: nowrap; }
.job-type { font-weight: 700; font-size: 12px; color: #4361ee; text-transform: uppercase; }
.job-id { font-family: monospace; color: #667085; font-size: 12px; }
.job-out { min-width: 220px; word-break: break-word; }
.job-url { color: #4361ee; text-decoration: none; font-weight: 500; }
.job-url:hover { text-decoration: underline; }
.job-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 12px; border-radius: 8px; background: #4361ee; color: #fff;
  text-decoration: none; font-size: 12px; font-weight: 600;
}
.job-action-btn:hover { background: #3a56d4; }
.job-error { color: #b91c1c; font-size: 12px; margin-top: 4px; }

/* ===== BADGE ===== */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; min-width: 70px; text-align: center; }
.badge.green { background: #ecfdf5; color: #065f46; }
.badge.blue { background: #e0f2fe; color: #0369a1; }
.badge.grey { background: #f5f5f5; color: #888; }
.badge.red { background: #fef2f2; color: #b91c1c; }

.empty { text-align: center; color: #aaa; font-size: 14px; padding: 20px 0; }

@media (max-width: 640px) {
  .job-list-toolbar { flex-direction: column; align-items: stretch; }
  .job-pagination-actions { width: 100%; }
  .secondary-btn { flex: 1; }
  .job-page-numbers { justify-content: center; }
}
