* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #f5f7fa; color: #333; line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
header { text-align: center; margin-bottom: 30px; }
header h1 { color: #2c3e50; font-size: 28px; }
.subtitle { color: #7f8c8d; font-size: 14px; margin-top: 5px; }

.card { background: white; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.card h2 { color: #2c3e50; font-size: 18px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #3498db; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 14px; color: #555; margin-bottom: 5px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; transition: border-color 0.3s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #3498db; }
.form-group textarea { resize: vertical; min-height: 80px; font-family: 'Courier New', monospace; }
.form-group small { color: #999; font-size: 12px; margin-top: 3px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.3s; text-decoration: none; display: inline-block; }
.btn-primary { background: #3498db; color: white; }
.btn-primary:hover { background: #2980b9; }
.btn-success { background: #27ae60; color: white; }
.btn-success:hover { background: #229954; }
.btn-info { background: #17a2b8; color: white; }
.btn-info:hover { background: #138496; }
.btn-warning { background: #f39c12; color: white; }
.btn-warning:hover { background: #d68910; }
.btn-secondary { background: #95a5a6; color: white; }
.btn-secondary:hover { background: #7f8c8d; }

.status-badge { margin-left: 10px; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-badge.connected { background: #d4edda; color: #155724; }
.status-badge.disconnected { background: #f8d7da; color: #721c24; }
.status-badge.testing { background: #fff3cd; color: #856404; }

.badge { background: #3498db; color: white; padding: 2px 8px; border-radius: 10px; font-size: 12px; }

.table-wrapper { overflow-x: auto; max-height: 500px; overflow-y: auto; margin: 15px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: #34495e; color: white; padding: 10px; text-align: left; position: sticky; top: 0; }
td { padding: 8px 10px; border-bottom: 1px solid #eee; }
tr:hover { background: #f8f9fa; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: white; padding: 25px; border-radius: 8px; width: 90%; max-width: 500px; position: relative; }
.close { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; color: #999; }
.close:hover { color: #333; }

.schedule-list { margin-top: 15px; }
.schedule-item { background: #f8f9fa; padding: 10px; border-radius: 4px; margin-bottom: 8px; border-left: 3px solid #3498db; display: flex; justify-content: space-between; align-items: center; }
.schedule-item .info { flex: 1; }
.schedule-item .actions { margin-top: 5px; }
.btn-danger { background: #e74c3c; color: white; padding: 4px 10px; font-size: 12px; }
.btn-danger:hover { background: #c0392b; }

.alert { padding: 10px 15px; border-radius: 4px; margin: 10px 0; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

.loading { display: inline-block; width: 16px; height: 16px; border: 2px solid #f3f3f3; border-top: 2px solid #3498db; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
