* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f4f6f8; color: #1f2937; }
.login-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0f766e, #1d4ed8); }
.login-card { width: min(420px, 92vw); background: white; padding: 32px; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.login-card h1 { margin: 0 0 8px; }
.form { display: grid; gap: 10px; margin-top: 20px; }
.form input { padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 16px; }
button { cursor: pointer; border: 0; border-radius: 10px; padding: 12px 14px; font-weight: 700; }
.form button { margin-top: 8px; background: #0f766e; color: white; }
.layout { min-height: 100vh; display: flex; }
.sidebar { width: 240px; background: #0f172a; color: white; padding: 24px 16px; }
.brand { font-size: 22px; font-weight: 800; margin-bottom: 28px; }
.menu { display: grid; gap: 12px; }
.menu-button { width: 100%; text-align: left; background: #1e293b; color: white; }
.menu-button:hover { background: #334155; }
.menu-button.danger { background: #7f1d1d; }
.content { flex: 1; padding: 32px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.topbar h1 { margin: 0 0 6px; }
.panel { background: white; padding: 24px; border-radius: 16px; box-shadow: 0 8px 30px rgba(15,23,42,.08); max-width: 760px; }
.badge { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #e2e8f0; font-weight: 700; }
.badge.connected { background: #dcfce7; color: #166534; }
.badge.qr, .badge.connecting { background: #fef3c7; color: #92400e; }
.badge.error, .badge.logged_out, .badge.disconnected { background: #fee2e2; color: #991b1b; }
.alert { background: #fee2e2; color: #991b1b; padding: 12px; border-radius: 10px; margin: 12px 0; }
.success { background: #dcfce7; color: #166534; padding: 12px; border-radius: 10px; margin: 12px 0; }
.qr-box { margin-top: 18px; padding: 18px; border: 1px dashed #94a3b8; border-radius: 14px; display: inline-block; background: #f8fafc; }
.qr-box img { display: block; width: 280px; height: 280px; }
.hint { color: #64748b; font-size: 14px; margin-top: 18px; }
@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .content { padding: 18px; }
}
.panel + .panel { margin-top: 22px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-heading h2 { margin-bottom: 4px; }
.secondary-button { background: #0f766e; color: white; white-space: nowrap; }
.secondary-button:hover { background: #115e59; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.meta-grid > div { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; min-width: 0; }
.meta-label { display: block; color: #64748b; font-size: 13px; margin-bottom: 6px; }
code { background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 2px 5px; word-break: break-all; }
.muted { color: #64748b; }
.empty-state { background: #f8fafc; border: 1px dashed #cbd5e1; color: #475569; padding: 14px; border-radius: 12px; margin: 12px 0; }
.table-wrap { width: 100%; overflow-x: auto; margin-top: 12px; border: 1px solid #e2e8f0; border-radius: 12px; }
.group-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.group-table th, .group-table td { padding: 12px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.group-table th { background: #f8fafc; color: #475569; font-size: 13px; }
.group-table tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; background: #e0f2fe; color: #075985; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; margin: 2px 4px 2px 0; }
@media (max-width: 760px) {
  .panel-heading { display: block; }
  .panel-heading form { margin-top: 12px; }
  .secondary-button { width: 100%; }
  .meta-grid { grid-template-columns: 1fr; }
}
.menu-link { display: block; width: 100%; text-align: left; background: #1e293b; color: white; text-decoration: none; border-radius: 10px; padding: 12px 14px; font-weight: 700; }
.menu-link:hover { background: #334155; }
.link-button { display: inline-block; background: #0f766e; color: white; text-decoration: none; border-radius: 10px; padding: 12px 14px; font-weight: 700; }
.link-button.secondary { background: #475569; }
.stack-form { display: grid; gap: 12px; }
.stack-form input[type="text"], .stack-form textarea, .stack-form input[type="file"] { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 15px; background: white; }
.form-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.checkbox-list { display: grid; gap: 10px; max-height: 560px; overflow: auto; padding-right: 4px; }
.checkbox-item { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 12px; padding: 12px; }
.checkbox-item input { margin-top: 4px; }
.checkbox-item small { display: block; color: #64748b; margin-top: 4px; word-break: break-all; }
.actions-cell { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.small-link { color: #0f766e; font-weight: 700; text-decoration: none; }
.small-link:hover { text-decoration: underline; }
.text-danger { background: transparent; color: #991b1b; padding: 0; font-weight: 700; }
.warning-box { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.target-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 18px; }
.target-chip { display: inline-block; background: #e0f2fe; color: #075985; border-radius: 999px; padding: 7px 10px; font-size: 13px; font-weight: 700; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.summary-grid > div { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; }
.ok-text { color: #166534; }
.bad-text { color: #991b1b; }
.status-pill { display: inline-block; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.status-pill.success { background: #dcfce7; color: #166534; }
.status-pill.failed { background: #fee2e2; color: #991b1b; }
@media (max-width: 760px) {
  .topbar { display: block; }
  .topbar .link-button { margin-top: 12px; }
  .form-actions { display: grid; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.select-input { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 15px; background: white; }
.days-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.day-check { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px; }
.checkbox-item.compact { align-items: center; }
.text-button { background: transparent; color: #0f766e; padding: 0; font-weight: 700; }
.run-card { border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; margin-bottom: 16px; background: #fff; }
@media (max-width: 760px) { .days-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
