* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, Segoe UI, Roboto, sans-serif; color: #1f2937; background: #f1f5f9; }
.muted { color: #94a3b8; font-weight: 400; font-size: 12px; }
.hidden { display: none !important; }

/* login */
.login-bg { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #0f172a; }
.login-card { background: #fff; padding: 30px; border-radius: 14px; width: 320px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.login-card h1 { margin: 0; font-size: 24px; }
.login-card input { width: 100%; padding: 11px; margin: 16px 0 10px; border: 1px solid #cbd5e1; border-radius: 9px; font-size: 15px; }
.login-card button { width: 100%; padding: 11px; border: 0; border-radius: 9px; background: #2563eb; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.err { color: #dc2626; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* layout */
header { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 12px 20px; border-bottom: 1px solid #e2e8f0; }
.brand { font-weight: 700; font-size: 16px; }
.headright { display: flex; align-items: center; gap: 16px; }
.sched { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.pwpanel { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.pwcard { background: #fff; padding: 22px; border-radius: 12px; width: 300px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.pwcard h3 { margin: 0 0 12px; }
.pwcard input { width: 100%; padding: 9px; margin-bottom: 9px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
main { display: flex; gap: 18px; padding: 18px; max-width: 1100px; margin: 0 auto; align-items: flex-start; }
aside { width: 280px; flex-shrink: 0; }
.list { list-style: none; padding: 0; margin: 14px 0 0; }
.list li { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; cursor: pointer; }
.list li:hover { border-color: #93c5fd; }
.list li.active { border-color: #2563eb; box-shadow: 0 0 0 1px #2563eb inset; }
.list li .nm { font-weight: 600; }
.list li .dm { font-size: 12px; color: #64748b; }
.list li .badges { margin-top: 5px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 20px; margin-right: 4px; }
.tag.on { background: #dcfce7; color: #166534; } .tag.off { background: #f1f5f9; color: #94a3b8; }

/* editor */
.editor { flex: 1; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 22px; }
.editor.empty { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.editor h2 { margin: 0 0 16px; font-size: 18px; }
.editor h3 { margin: 22px 0 8px; font-size: 14px; }
.editor label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; }
.editor input[type=text], .editor select { width: 100%; padding: 9px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
.editor input[type=number] { width: 64px; padding: 6px; border: 1px solid #cbd5e1; border-radius: 7px; }
.editor input[type=time] { padding: 6px; border: 1px solid #cbd5e1; border-radius: 7px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.toggles label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin-right: 16px; }
.actions { margin-top: 22px; }
button { font-size: 14px; font-weight: 600; border: 0; border-radius: 8px; padding: 9px 15px; cursor: pointer; color: #fff; }
.primary { background: #2563eb; } .ghost { background: #64748b; } .danger { background: #e11d48; }
.block { width: 100%; }
table { border-collapse: collapse; width: 100%; margin-top: 8px; }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid #eef2f7; font-size: 13px; }
th { color: #64748b; }
.btnlink { display: inline-block; background: #0ea5e9; color: #fff; text-decoration: none; padding: 9px 15px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.joblog { background: #0b1220; color: #cbd5e1; padding: 12px; border-radius: 8px; font-size: 12px; line-height: 1.5; max-height: 240px; overflow: auto; white-space: pre-wrap; margin-top: 8px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.g { background: #25a13a; } .y { background: #d89400; } .r { background: #d83a3f; }
