* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 13px; color: #333; background: #f5f5f5; }

/* Login Screen */
.login-screen { position: fixed; inset: 0; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.login-card { background: #fff; border-radius: 12px; padding: 40px 36px; width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-header { text-align: center; margin-bottom: 28px; }
.login-header .login-icon { font-size: 48px; display: block; margin-bottom: 8px; }
.login-header h2 { font-size: 22px; font-weight: 700; color: #1a1a2e; margin: 0 0 4px; }
.login-header p { color: #888; font-size: 13px; margin: 0; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 6px; }
.login-field input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color .2s, box-shadow .2s; outline: none; }
.login-field input:focus { border-color: #0f3460; box-shadow: 0 0 0 3px rgba(15,52,96,.12); }
.login-error { color: #e94560; font-size: 12px; min-height: 18px; margin-bottom: 4px; }
.login-btn { width: 100%; padding: 10px; font-size: 15px; font-weight: 600; border-radius: 6px; letter-spacing: 2px; }
.login-btn:disabled { opacity: .7; cursor: wait; }

/* Header */
.header { background: #1a1a2e; color: #fff; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; }
.header h1 { font-size: 16px; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-user { font-size: 12px; color: #aaa; }
.header-logout-btn { background: transparent; color: #aaa; border-color: rgba(255,255,255,.2); font-size: 11px; }
.header-logout-btn:hover { color: #fff; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.08); }

/* Tabs */
.tabs { display: flex; gap: 0; background: #16213e; }
.tab { padding: 8px 20px; color: #aaa; cursor: pointer; border: none; background: none; font-size: 13px; transition: all .15s; }
.tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.tab.active { color: #fff; background: #0f3460; border-bottom: 2px solid #e94560; }

/* Content */
.content { padding: 12px; display: none; }
.content.active { display: block; }

/* Toolbar */
.toolbar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { padding: 4px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 12px; }
.toolbar input { width: 140px; }

/* Buttons */
.btn { padding: 4px 12px; border: 1px solid #ccc; border-radius: 3px; background: #fff; cursor: pointer; font-size: 12px; transition: all .15s; }
.btn:hover { background: #f0f0f0; }
.btn-primary { background: #0f3460; color: #fff; border-color: #0f3460; }
.btn-primary:hover { background: #16213e; }
.btn-danger { background: #e94560; color: #fff; border-color: #e94560; }
.btn-danger:hover { background: #c23152; }
.btn-sm { padding: 2px 8px; font-size: 11px; }
.btn-success { background: #2d6a4f; color: #fff; border-color: #2d6a4f; }
.btn-success:hover { background: #1b4332; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; }
th, td { padding: 4px 8px; text-align: left; border-bottom: 1px solid #eee; white-space: nowrap; }
th { background: #f8f9fa; font-weight: 600; position: sticky; top: 0; }
tr:hover { background: #f0f7ff; }
.table-wrap { max-height: calc(100vh - 200px); overflow: auto; border: 1px solid #ddd; border-radius: 3px; }

/* Forms / Modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 6px; padding: 20px; min-width: 600px; width: 90vw; max-width: 1000px; max-height: 90vh; overflow: auto; }
.modal.modal-sm { min-width: 400px; width: auto; max-width: min(520px, 92vw); }
.modal.modal-lg { min-width: 820px; width: 94vw; max-width: 1280px; max-height: 92vh; padding: 24px; }
.modal.modal-xl { min-width: 1000px; width: 96vw; max-width: 1680px; max-height: 94vh; padding: 24px; }
.modal h3 { margin-bottom: 12px; font-size: 14px; }
.form-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.form-row label { min-width: 90px; font-size: 12px; font-weight: 500; }
.form-row input, .form-row textarea, .form-row select { flex: 1; padding: 4px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 12px; }
.form-row textarea { min-height: 60px; font-family: monospace; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* Status cards */
.stats-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.stat-card { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 10px 16px; min-width: 120px; }
.stat-card .label { font-size: 11px; color: #666; }
.stat-card .value { font-size: 20px; font-weight: 700; color: #0f3460; }

/* Tags */
.tag { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; margin: 1px; }
.tag-active { background: #d4edda; color: #155724; }
.tag-maintenance { background: #fff3cd; color: #856404; }
.tag-banned { background: #f8d7da; color: #721c24; }
.tag-default { background: #e2e3e5; color: #383d41; }

/* Pagination */
.pagination { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; }

/* Task status */
.task-card { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 12px; margin-bottom: 10px; }
.task-card h4 { font-size: 13px; margin-bottom: 6px; }
.task-card .status { font-size: 12px; color: #555; }
.task-card .running { color: #e94560; font-weight: 600; }
.task-card .stopping { color: #e67e22; font-weight: 600; font-style: italic; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Misc */
.text-muted { color: #888; font-size: 11px; }
.mono { font-family: 'Consolas', monospace; font-size: 11px; }
.ellipsis { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.actions { white-space: nowrap; }
td.actions .btn { margin-right: 2px; }
